/* =============================================================
   Boreal Performance — Design System
   Apple-inspired aesthetic: generous space, soft shadows, fluid type,
   white base with teal/navy accents drawn from the logo.
   ============================================================= */

/* ---------- Wordmark font (nav logo replacement) ---------- */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

/* ---------- Tokens ---------- */
:root {
  /* Brand palette */
  --c-paper:        #FFFFFF;
  --c-ink:          #0E1B2C;
  --c-ink-2:        #1A3A5A;
  --c-navy:         #1A3A5A;
  --c-teal:         #2A6E85;
  --c-teal-light:   #5BB3C9;
  --c-teal-bright:  #4DA8C7;
  --c-muted:        #6B7280;
  --c-line:         rgba(14, 27, 44, 0.08);
  --c-line-strong:  rgba(14, 27, 44, 0.16);

  /* Surfaces — all white-based now */
  --bg:             #FFFFFF;
  --surface:        #FFFFFF;
  --surface-2:      #F7F8FA;
  --surface-soft:   #F4F6F8;

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "SF Pro Display", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(14, 27, 44, 0.05), 0 1px 1px rgba(14, 27, 44, 0.03);
  --shadow-md: 0 8px 24px -8px rgba(14, 27, 44, 0.12), 0 2px 6px rgba(14, 27, 44, 0.04);
  --shadow-lg: 0 30px 60px -20px rgba(14, 27, 44, 0.18), 0 8px 20px -10px rgba(14, 27, 44, 0.08);

  /* Transitions */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 180ms var(--ease);
  --t-med:  320ms var(--ease);
  --t-slow: 600ms var(--ease);

  /* Layout */
  --container: 1240px;
  --gap: clamp(16px, 2vw, 28px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--c-ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
ul, ol { padding: 0; margin: 0; list-style: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--c-ink);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0;
}
h1 { font-size: clamp(2.6rem, 6vw + 0.5rem, 5.2rem); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(2rem, 3.6vw + 0.5rem, 3.4rem); letter-spacing: -0.03em; }
h3 { font-size: clamp(1.35rem, 1.4vw + 0.7rem, 1.75rem); }
h4 { font-size: 1.125rem; }
p  { margin: 0; }
.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--c-teal);
}
.muted { color: var(--c-muted); }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}
.section { padding: clamp(80px, 10vw, 140px) 0; }
.section-tight { padding: clamp(60px, 7vw, 96px) 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--r-pill);
  font-weight: 500;
  font-size: 0.97rem;
  letter-spacing: -0.005em;
  transition: transform var(--t-fast), background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--c-ink);
  color: #FFFFFF;
}
.btn-primary:hover { background: var(--c-navy); box-shadow: var(--shadow-md); }
.btn-secondary {
  background: var(--surface);
  color: var(--c-ink);
  border-color: var(--c-line);
}
.btn-secondary:hover { border-color: var(--c-line-strong); box-shadow: var(--shadow-sm); }
.btn-glass {
  background: rgba(255, 255, 255, 0.14);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-glass:hover { background: rgba(255, 255, 255, 0.22); border-color: rgba(255, 255, 255, 0.45); }
.btn-ghost {
  background: transparent;
  color: var(--c-ink);
}
.btn-ghost:hover { background: rgba(14, 27, 44, 0.05); }
.btn-teal {
  background: linear-gradient(135deg, var(--c-teal-light), var(--c-teal));
  color: white;
}
.btn-teal:hover { box-shadow: 0 10px 28px -8px rgba(42, 110, 133, 0.5); }
.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 18px 32px; font-size: 1.02rem; }
.btn-sm { padding: 10px 18px; font-size: 0.87rem; }

/* ---------- Wordmark logo ---------- */
.nav-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 1px;
  text-decoration: none;
}
.nav-wordmark-main {
  font-family: 'Bebas Neue', 'Arial Black', Impact, sans-serif;
  font-size: 1.75rem;
  letter-spacing: 0.06em;
  color: var(--c-ink);
  line-height: 1;
}
.nav-wordmark-sub {
  font-size: 0.48rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-muted);
  font-weight: 600;
  font-family: var(--font-sans);
  padding-left: 2px;
}

/* Footer version — white on dark */
.footer-wordmark .nav-wordmark-main { color: rgba(255,255,255,0.95); }
.footer-wordmark .nav-wordmark-sub  { color: rgba(255,255,255,0.45); }

/* ---------- Top navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--c-line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}
.nav-brand { display: flex; align-items: center; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: 0.94rem;
  color: var(--c-ink);
  transition: background var(--t-fast);
}
.nav-link:hover { background: rgba(14, 27, 44, 0.06); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-cart {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  background: rgba(14, 27, 44, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--c-ink);
  transition: background var(--t-fast);
}
.nav-cart:hover { background: rgba(14, 27, 44, 0.10); }
.nav-cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--c-teal);
  color: white;
  font-size: 0.68rem;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-toggle { display: none; }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: var(--r-pill);
    background: rgba(14, 27, 44, 0.05);
  }
}

/* ============================================================
   HERO — full-bleed, scroll-driven video as the page intro.
   The .hero-scroll-wrap is taller than the viewport so the
   sticky sticky child stays pinned while the user scrolls,
   and the JS scrubs the video's currentTime against scroll
   progress through this wrap.
   ============================================================ */
.hero-scroll {
  position: relative;
  /* No background here — the sticky child covers the viewport while
     active, and after it detaches we want a clean white transition,
     not a black gap. */
  /* NOTE: do NOT add overflow:hidden here — that would break
     position:sticky on the child. The sticky child handles its
     own overflow clipping below. */
}
.hero-scroll-wrap {
  position: relative;
  /* Hero is exactly one viewport tall — no scroll-driven scrub,
     so there is no sticky un-stick transition that could leave a
     blank gap before the trust strip. The video autoplays once. */
  height: 100vh;
}
.hero-scroll-sticky {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #0E1B2C;
}
.hero-scroll-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.hero-scroll-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(14,27,44,0.55) 0%, rgba(14,27,44,0.25) 40%, rgba(14,27,44,0.75) 100%),
    radial-gradient(60% 80% at 70% 30%, rgba(91,179,201,0.18), transparent 70%);
  pointer-events: none;
}
.hero-scroll-content {
  position: relative;
  z-index: 3;
  max-width: 820px;
  padding: 0 clamp(20px, 4vw, 48px);
  text-align: center;
  color: #FFFFFF;
}
.hero-scroll-content .hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 28px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.hero-scroll-content .hero-eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-teal-light);
  box-shadow: 0 0 0 4px rgba(91, 179, 201, 0.25);
}
.hero-scroll-content h1 {
  color: #FFFFFF;
  margin-bottom: 28px;
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.35);
}
.hero-scroll-content h1 .accent {
  background: linear-gradient(135deg, #8DD8EA, #5BB3C9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-scroll-content p.lead {
  font-size: clamp(1.05rem, 0.4vw + 1rem, 1.25rem);
  color: rgba(255, 255, 255, 0.82);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.55;
}
.hero-scroll-content .hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-scroll-content .btn-primary {
  background: #FFFFFF;
  color: var(--c-ink);
}
.hero-scroll-content .btn-primary:hover { background: #F0F0F0; }

/* ---------- Stats / trust strip ---------- */
.trust-strip {
  background: var(--surface-soft);
  padding: 48px 0;
  border-bottom: 1px solid var(--c-line);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
@media (max-width: 760px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}
.trust-item .num {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2vw + 1rem, 2.4rem);
  font-weight: 600;
  color: var(--c-navy);
  letter-spacing: -0.03em;
}
.trust-item .label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-muted);
  margin-top: 4px;
}

/* ---------- Section headers ---------- */
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(40px, 5vw, 64px);
}
.section-header h2 { margin: 12px 0 14px; }
.section-header p { color: var(--c-muted); font-size: 1.05rem; }

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: clamp(20px, 2vw, 32px);
}
.product-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--c-line);
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.product-card-media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #F4F6F8 0%, #E9EDF1 100%);
  overflow: hidden;
  position: relative;
}
.product-card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--t-slow);
}
.product-card:hover .product-card-media img { transform: scale(1.04); }
.product-card-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.product-card-cat {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-teal);
  font-weight: 600;
}
.product-card-title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--c-ink);
}
.product-card-desc {
  color: var(--c-muted);
  font-size: 0.92rem;
  margin-top: 2px;
  flex: 1;
}
.product-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  gap: 12px;
}
.product-card-price {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--c-ink);
  letter-spacing: -0.02em;
}
.product-card-price .compare {
  text-decoration: line-through;
  color: var(--c-muted);
  font-weight: 400;
  font-size: 0.9rem;
  margin-right: 6px;
}

/* ---------- Testimonials ---------- */
.testimonials-bg {
  background: var(--surface-soft);
}
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}
.testimonial {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 28px 28px 26px;
  border: 1px solid var(--c-line);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform var(--t-med), box-shadow var(--t-med);
}
.testimonial:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.testimonial-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testimonial-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-teal-light), var(--c-teal));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  font-size: 0.95rem;
  overflow: hidden;
  flex-shrink: 0;
}
.testimonial-avatar img { width: 100%; height: 100%; object-fit: cover; }
.testimonial-user { font-weight: 600; font-size: 0.95rem; color: var(--c-ink); }
.testimonial-source {
  font-size: 0.75rem;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.testimonial-stars {
  display: inline-flex;
  gap: 2px;
  color: #E5B660;
  font-size: 0.95rem;
}
.testimonial-body {
  font-size: 0.97rem;
  color: var(--c-ink-2);
  line-height: 1.55;
}

/* ---------- Newsletter footer banner ---------- */
.newsletter {
  background: linear-gradient(135deg, #0E1B2C 0%, #1A3A5A 60%, #2A6E85 120%);
  color: #FFFFFF;
  padding: clamp(80px, 9vw, 120px) 0;
  position: relative;
  overflow: hidden;
}
.newsletter::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(91, 179, 201, 0.22), transparent 50%),
    radial-gradient(circle at 85% 80%, rgba(91, 179, 201, 0.15), transparent 50%);
  pointer-events: none;
}
.newsletter-inner {
  position: relative;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.newsletter h2 {
  color: white;
  margin-bottom: 16px;
}
.newsletter p {
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 32px;
  font-size: 1.05rem;
}
.newsletter-form {
  display: flex;
  gap: 8px;
  max-width: 480px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.08);
  padding: 6px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
}
.newsletter-form input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px 20px;
  color: white;
  font-size: 0.95rem;
  outline: none;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.5); }
.newsletter-form button {
  background: white;
  color: var(--c-ink);
  border-radius: var(--r-pill);
  padding: 12px 26px;
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform var(--t-fast);
}
.newsletter-form button:hover { transform: translateY(-1px); }
.newsletter-msg {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--c-teal-light);
  min-height: 1.4em;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-ink);
  color: rgba(255,255,255,0.65);
  padding: 64px 0 40px;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { font-size: 0.88rem; line-height: 1.6; max-width: 280px; }
.footer h5 {
  color: white;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 18px;
}
.footer li { margin-bottom: 10px; }
.footer a { transition: color var(--t-fast); }
.footer a:hover { color: var(--c-teal-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

/* ---------- Forms ---------- */
.form-row { display: grid; gap: 14px; }
.form-row.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .form-row.two { grid-template-columns: 1fr; } }
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--c-ink-2);
  letter-spacing: 0.02em;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: 0.97rem;
  color: var(--c-ink);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--c-teal);
  box-shadow: 0 0 0 3px rgba(91, 179, 201, 0.18);
}
.field-help { font-size: 0.82rem; color: var(--c-muted); margin-top: 4px; }
.field-error { font-size: 0.82rem; color: #C44545; margin-top: 4px; }

/* ---------- Cart / checkout ---------- */
.checkout-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 900px) { .checkout-layout { grid-template-columns: 1fr; } }
.summary-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-line);
  padding: 28px;
  position: sticky;
  top: 88px;
  box-shadow: var(--shadow-sm);
}
.summary-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.95rem;
}
.summary-line.total {
  margin-top: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--c-line);
  font-size: 1.15rem;
  font-weight: 600;
}

/* ---------- Alerts / flash ---------- */
.alert {
  border-radius: var(--r-md);
  padding: 14px 18px;
  font-size: 0.92rem;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-info    { background: rgba(91, 179, 201, 0.12); color: var(--c-teal); border-color: rgba(91, 179, 201, 0.3); }
.alert-success { background: rgba(58, 160, 100, 0.12); color: #2C7A4D; border-color: rgba(58, 160, 100, 0.3); }
.alert-error   { background: rgba(196, 69, 69, 0.10); color: #A53737; border-color: rgba(196, 69, 69, 0.25); }
.alert-warning { background: rgba(229, 182, 96, 0.15); color: #8B6B1F; border-color: rgba(229, 182, 96, 0.4); }

/* ---------- Badges / pills ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(14, 27, 44, 0.06);
  color: var(--c-ink-2);
}
.badge-teal    { background: rgba(91, 179, 201, 0.18); color: var(--c-teal); }
.badge-warn    { background: rgba(229, 182, 96, 0.25); color: #8B6B1F; }
.badge-success { background: rgba(58, 160, 100, 0.18); color: #2C7A4D; }
.badge-error   { background: rgba(196, 69, 69, 0.15); color: #A53737; }

/* ---------- Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* =============================================================
   MOBILE OPTIMIZATIONS
   Most traffic is mobile — these rules tune touch targets,
   typography, and layout for phones. Desktop is untouched.
   ============================================================= */

/* Kill iOS tap delay and improve tap feedback */
a, button, input, select, textarea, label, [role="button"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(14, 27, 44, 0.08);
}

/* Prevent horizontal page overflow caused by stray wide content */
html, body { overflow-x: hidden; }

/* ---------- Mobile nav drawer ---------- */
@media (max-width: 880px) {
  .nav-inner { height: 60px; gap: 12px; }
  .nav-wordmark-main { font-size: 1.55rem; }
  .nav-toggle { width: 44px; height: 44px; }
  .nav-cart   { width: 44px; height: 44px; }

  .nav-links.open {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    padding: 12px 16px 20px;
    border-bottom: 1px solid var(--c-line);
    box-shadow: var(--shadow-md);
    gap: 4px;
    z-index: 49;
  }
  .nav-links.open .nav-link {
    display: block;
    padding: 14px 12px;
    font-size: 1.05rem;
    border-radius: var(--r-md);
    min-height: 44px;
  }
  body.nav-open { overflow: hidden; }
}

/* ---------- Hero on mobile (no scroll-driven video) ---------- */
@media (max-width: 880px) {
  .hero-scroll-wrap { height: 100vh; }
  .hero-scroll-sticky { background: var(--c-ink); }
  .hero-scroll-content { padding: 0 24px; }
  .hero-scroll-content h1 {
    font-size: clamp(2.2rem, 9vw, 3.2rem);
    margin-bottom: 18px;
  }
  .hero-scroll-content p.lead {
    font-size: 1rem;
    margin-bottom: 24px;
  }
  .hero-scroll-content .hero-actions { gap: 10px; }
  .hero-scroll-content .hero-actions .btn { flex: 1 1 auto; min-width: 0; }
}

/* ---------- Touch-target sizing ---------- */
@media (max-width: 880px) {
  .btn {
    min-height: 44px;
    padding: 12px 22px;
    font-size: 1rem;
  }
  .btn-lg { min-height: 52px; padding: 16px 28px; font-size: 1.02rem; }
  .btn-sm { min-height: 40px; padding: 10px 16px; font-size: 0.92rem; }
}

/* ---------- Forms: 16px inputs to prevent iOS zoom ---------- */
@media (max-width: 880px) {
  .field input, .field select, .field textarea,
  input[type="text"], input[type="email"], input[type="tel"],
  input[type="password"], input[type="number"], input[type="search"],
  select, textarea {
    font-size: 16px !important;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: var(--r-md);
  }
  textarea { min-height: 96px; }
  .field label { font-size: 0.88rem; }
}

/* ---------- Newsletter form: stack on phones ---------- */
@media (max-width: 600px) {
  .newsletter-form {
    flex-direction: column;
    background: transparent;
    border: none;
    padding: 0;
    gap: 10px;
    border-radius: 0;
    backdrop-filter: none;
  }
  .newsletter-form input {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--r-md);
    padding: 14px 16px;
    font-size: 16px;
    width: 100%;
  }
  .newsletter-form button {
    width: 100%;
    padding: 14px 22px;
    min-height: 48px;
    border-radius: var(--r-md);
    font-size: 1rem;
  }
}

/* ---------- Product grid: 2 cols phones, 1 col tiny ---------- */
@media (max-width: 720px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .product-card-body { padding: 14px 14px 16px; gap: 4px; }
  .product-card-title { font-size: 0.98rem; }
  .product-card-desc { display: none; }
  .product-card-cat { font-size: 0.68rem; }
  .product-card-price { font-size: 1.02rem; }
  .product-card-foot { margin-top: 10px; gap: 8px; flex-wrap: wrap; }
  .product-card-foot .btn { padding: 8px 12px; min-height: 36px; font-size: 0.82rem; }
}
@media (max-width: 380px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* ---------- Cart items: stack on phones ---------- */
@media (max-width: 600px) {
  /* Cart item row uses inline grid 100px 1fr auto — collapse to 2-row layout */
  .checkout-layout > div > div[style*="grid-template-columns: 100px 1fr auto"] {
    grid-template-columns: 72px 1fr !important;
    gap: 12px !important;
    padding: 14px !important;
    align-items: start !important;
  }
  .checkout-layout > div > div[style*="grid-template-columns: 100px 1fr auto"] img {
    width: 72px !important;
    height: 72px !important;
  }
  /* Push the line-total cell to span full width below */
  .checkout-layout > div > div[style*="grid-template-columns: 100px 1fr auto"] > div:last-child {
    grid-column: 1 / -1;
    text-align: right;
    border-top: 1px solid var(--c-line);
    padding-top: 10px;
    margin-top: 4px;
  }

  /* Quantity stepper and remove button bigger */
  .checkout-layout input[type="number"] {
    width: 72px !important;
    min-height: 44px;
    font-size: 16px !important;
  }
  .summary-card {
    position: static !important;
    padding: 20px;
  }

  /* Discount-code form: stack input + button */
  .summary-card form[style*="display: flex"] {
    flex-direction: column;
    gap: 8px !important;
  }
  .summary-card form input[type="text"] {
    width: 100%;
    min-height: 44px;
    font-size: 16px !important;
  }
  .summary-card form button { width: 100%; min-height: 44px; }
}

/* ---------- Checkout form ---------- */
@media (max-width: 600px) {
  .checkout-layout .card { padding: 20px !important; }
  /* Payment method radio cards: bigger tap area */
  .checkout-layout label[style*="border: 2px solid"] {
    padding: 16px !important;
    min-height: 64px;
  }
  /* Allow badges in payment rows to wrap */
  .checkout-layout label[style*="border: 2px solid"] .badge {
    align-self: flex-start;
    margin-top: 4px;
  }
}

/* ---------- Product page on mobile ---------- */
@media (max-width: 760px) {
  /* The big grid in product.php uses inline style — override it */
  section.section-tight > .container > div[style*="grid-template-columns: 1.05fr"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  /* Sticky info column shouldn't be sticky on mobile */
  section.section-tight > .container > div[style*="grid-template-columns: 1.05fr"] > div[style*="position: sticky"] {
    position: static !important;
  }
  /* Add-to-cart row */
  section.section-tight form[style*="display: flex"][style*="gap: 12px"] {
    flex-direction: row;
    gap: 10px !important;
  }
  section.section-tight form[style*="display: flex"][style*="gap: 12px"] input[type="number"] {
    width: 72px !important;
    min-height: 52px !important;
    font-size: 16px !important;
  }
  section.section-tight form[style*="display: flex"][style*="gap: 12px"] .btn {
    min-height: 52px;
    flex: 1;
  }
  /* Variant pills: bigger tap targets */
  .variant-pill {
    padding: 12px 18px !important;
    font-size: 0.95rem !important;
    min-height: 44px;
    display: inline-flex !important;
    align-items: center;
  }
  /* Thumbnail strip */
  section.section-tight div[style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px !important;
  }
}

/* ---------- Footer tightening on phones ---------- */
@media (max-width: 600px) {
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
  .site-footer { padding: 48px 0 32px; }
}

/* ---------- Discount popup: more breathing room on phones ---------- */
@media (max-width: 480px) {
  #bp-email-popup {
    right: 12px !important;
    left: 12px !important;
    bottom: 12px !important;
    width: auto !important;
    padding: 20px 18px 16px !important;
  }
  #bp-email-popup .bp-popup-close {
    width: 40px;
    height: 40px;
    font-size: 26px !important;
    top: 4px !important;
    right: 4px !important;
    border-radius: 999px;
  }
  #bp-email-popup .bp-popup-form { flex-direction: column !important; gap: 8px !important; }
  #bp-email-popup .bp-popup-form input {
    font-size: 16px !important;
    padding: 12px 14px !important;
    min-height: 44px;
  }
  #bp-email-popup .bp-popup-form button {
    width: 100%;
    min-height: 44px;
    padding: 12px 14px !important;
    font-size: 1rem !important;
  }
}

/* ---------- Trust strip ---------- */
@media (max-width: 480px) {
  .trust-strip { padding: 32px 0; }
  .trust-grid { gap: 16px; }
}

/* ---------- Section padding tightens on phones ---------- */
@media (max-width: 600px) {
  .section { padding: 56px 0; }
  .section-tight { padding: 40px 0; }
}

/* Make sure body text stays readable */
@media (max-width: 600px) {
  body { font-size: 16px; }
  p { font-size: 1rem; line-height: 1.6; }
}
