/* ============================================================
   THENEXIN — Mobile Design Upgrade (loads after store.css)
   Every rule is scoped to mobile widths — desktop unaffected.
   ============================================================ */

/* ════════════════════════════════════════════════════════════
   1. HERO — full-bleed image slider with overlay text
   (previously the slider was hidden on mobile)
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .s-hero {
    display: block !important;
    position: relative !important;
    min-height: 88vh !important;
    min-height: 88svh !important;
    background: #0f0f0f;
    overflow: hidden;
  }
  .s-hero-right {
    display: block !important;
    position: absolute !important;
    inset: 0;
    z-index: 1;
  }
  .s-hero-slider { height: 100% !important; }
  .s-hero-slide img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: top center;
  }
  /* Legibility gradient over the slide */
  .s-hero-right::after {
    content: '';
    position: absolute;
    inset: 0;
    height: auto !important;
    background: linear-gradient(180deg,
      rgba(10,10,10,.55) 0%,
      rgba(10,10,10,.12) 38%,
      rgba(10,10,10,.46) 68%,
      rgba(10,10,10,.92) 100%) !important;
    z-index: 3;
  }
  /* Content floats above the slider, anchored to bottom */
  .s-hero-left {
    position: relative;
    z-index: 2;
    min-height: 88vh;
    min-height: 88svh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 20px 40px !important;
    background: transparent !important;
  }
  .s-hero-headline { font-size: clamp(46px, 13vw, 64px) !important; line-height: .95 !important; }
  .s-hero-sub { font-size: 13.5px !important; max-width: 95%; color: rgba(255,255,255,.72) !important; }
  .s-hero-eyebrow {
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    padding: 6px 14px;
  }
  /* Buttons side-by-side */
  .s-hero-actions {
    flex-direction: row !important;
    gap: 10px !important;
    width: 100%;
    margin-top: 4px;
  }
  .s-hero-actions .s-btn {
    flex: 1;
    width: auto !important;
    justify-content: center;
    padding: 14px 12px !important;
    font-size: 11px !important;
  }
  /* Stats — glassy pill row */
  .s-hero-stats {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between;
    align-items: center;
    gap: 8px !important;
    width: 100%;
    margin-top: 24px !important;
    padding: 13px 18px;
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 14px;
  }
  .s-hstat { flex: 1; text-align: center; }
  .s-hstat-num { font-size: 19px !important; }
  .s-hstat-lbl { font-size: 9.5px !important; letter-spacing: 1.2px; }
  .s-hstat-divider { height: 26px !important; }
  /* Dots — vertical, right edge */
  .s-hero-dots {
    left: auto !important;
    right: 14px !important;
    top: 42% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    flex-direction: column !important;
    z-index: 5 !important;
  }
  .s-hero-dot.active { width: 6px !important; height: 18px !important; border-radius: 3px !important; }
}

/* ════════════════════════════════════════════════════════════
   2. PRODUCT CARDS — touch friendly
   (Add-to-Bag was hover-only = invisible on phones)
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .s-card-action {
    transform: none !important;
    bottom: 8px !important;
    left: 8px !important;
    right: 8px !important;
    border-radius: 11px;
    overflow: hidden;
    background: rgba(15,15,15,.9) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  .s-card-add-btn { font-size: 10.5px !important; padding: 11px 8px !important; letter-spacing: 1.2px; }
  .s-card-wish {
    opacity: 1 !important;
    width: 32px !important;
    height: 32px !important;
    font-size: 14px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,.12);
  }
  .s-card { border-radius: 12px; overflow: hidden; box-shadow: 0 1px 10px rgba(0,0,0,.05); }
}

/* ════════════════════════════════════════════════════════════
   3. CATEGORIES (bento) — swipeable snap carousel
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .s-bento {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 12px !important;
    padding: 2px 2px 8px;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .s-bento::-webkit-scrollbar { display: none; }
  .s-bento-card {
    flex: 0 0 64vw !important;
    max-width: 280px;
    height: 320px !important;
    border-radius: 16px !important;
    scroll-snap-align: center;
    grid-column: auto !important;
    grid-row: auto !important;
  }
  .s-bento-card.s-bento-wide { flex: 0 0 78vw !important; max-width: 330px; }
  .s-bento-name { font-size: 19px !important; }
}

/* ════════════════════════════════════════════════════════════
   4. REVIEWS — swipeable snap carousel
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .s-reviews-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 12px !important;
    margin: 0 -16px;
    padding: 2px 16px 10px;
  }
  .s-reviews-grid::-webkit-scrollbar { display: none; }
  .s-review {
    flex: 0 0 78vw !important;
    max-width: 310px;
    scroll-snap-align: center;
    border-radius: 14px;
  }
  .s-rating-bar { flex-wrap: wrap; gap: 8px 12px; justify-content: center; }
}

/* ════════════════════════════════════════════════════════════
   5. NEWSLETTER + OFFER STRIP + FINAL CTA
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .s-nl-2col {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
    border-radius: 16px !important;
  }
  .s-nl-2col .s-nl-col { padding: 30px 22px !important; }
  .s-nl-2col .s-nl-col:last-child { padding-top: 0 !important; }

  .s-offer-inner {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 18px !important;
    text-align: left;
  }
  .s-coupon-pill { width: 100%; justify-content: space-between !important; }
  .s-coupon-pill > span { font-size: 22px !important; padding: 12px 18px !important; letter-spacing: 3px !important; }
  .s-offer-inner > a.s-btn { width: 100%; justify-content: center; }

  .s-final-cta-actions { flex-direction: column !important; gap: 10px !important; }
  .s-final-cta-actions .s-btn { width: 100%; justify-content: center; }
}

/* ════════════════════════════════════════════════════════════
   6. APP-STYLE BOTTOM NAVIGATION
════════════════════════════════════════════════════════════ */
.s-mbnav { display: none; }
@media (max-width: 768px) {
  body { padding-bottom: 62px; }
  .s-mbnav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 950;
    display: flex;
    justify-content: space-around;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--s-border, #e8e4de);
    padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 24px rgba(0,0,0,.07);
  }
  .s-mbnav-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-family: var(--ff-head, sans-serif);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: #8a857e;
    text-decoration: none;
    padding: 3px 0;
    position: relative;
    transition: color .2s;
  }
  .s-mbnav-link i { font-size: 19px; line-height: 1; }
  .s-mbnav-link.active,
  .s-mbnav-link:active { color: var(--s-red, #C8272D); }
  .s-mbnav-link.active::before {
    content: '';
    position: absolute;
    top: -8px; left: 50%;
    transform: translateX(-50%);
    width: 18px; height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--s-red, #C8272D);
  }
  .s-mbnav-badge {
    position: absolute;
    top: -3px;
    left: calc(50% + 4px);
    background: var(--s-red, #C8272D);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    min-width: 15px; height: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
  }
}

/* ════════════════════════════════════════════════════════════
   7. GENERAL MOBILE POLISH
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Section headers — eyebrow accent */
  .s-sec-eyebrow { position: relative; padding-left: 26px; }
  .s-sec-eyebrow::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 2px;
    background: var(--s-red, #C8272D);
  }
  .s-sec-link { font-size: 11px; }

  /* Lookbook banner */
  .s-lookbook-body { padding: 56px 20px !important; }
  .s-lookbook-headline { font-size: clamp(28px, 8vw, 40px) !important; }
  .s-lookbook-body .s-btn { width: 100%; justify-content: center; }

  /* Photo strip */
  .s-photo-item { border-radius: 12px; overflow: hidden; }

  /* Features strip */
  .s-feature { text-align: center; }
  .s-feature-icon { margin: 0 auto; }

  /* Tap feedback */
  .s-btn:active { transform: scale(.97); }
  .s-bento-card:active, .s-card:active { transform: scale(.985); }
  .s-bento-card, .s-card { transition: transform .15s ease; }
}
@media (max-width: 400px) {
  .s-hero-headline { font-size: clamp(42px, 12.5vw, 54px) !important; }
  .s-bento-card { flex-basis: 72vw !important; height: 290px !important; }
  .s-card-add-btn { font-size: 10px !important; }
}

/* ════════════════════════════════════════════════════════════
   8. HEADER FIT + NO HORIZONTAL SCROLL (white gutter fix)
════════════════════════════════════════════════════════════ */

/* Belt-and-suspenders guard: stop any stray element from creating
   a horizontal scrollbar / white strip on the right.
   overflow-x:clip is used instead of hidden because it does NOT
   break position:sticky (the header & product gallery rely on it). */
html, body, .s-body {
  max-width: 100%;
  overflow-x: clip;
}

@media (max-width: 1024px) {
  /* The .s-container already supplies the side padding, so drop the
     header's extra inner padding and tighten the grid gap. This lets
     the three columns (menu · logo · icons) fit a narrow screen
     instead of pushing the right-side icons into a white gutter. */
  .s-header-inner {
    gap: 10px !important;
    padding: 0 !important;
  }
  /* Grid children default to min-width:auto and refuse to shrink
     below their content width — allow the logo column to shrink. */
  .s-header-inner > * { min-width: 0; }
  .s-logo {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* Keep the account dropdown pinned right and within the viewport. */
  .s-mega-account {
    left: auto !important;
    right: 0 !important;
    max-width: calc(100vw - 24px) !important;
  }
}

/* Extra-narrow phones: trim the icon footprint so everything fits. */
@media (max-width: 400px) {
  .s-header-icons { gap: 2px !important; }
  .s-icon-btn { width: 36px !important; height: 36px !important; }
  .s-logo { font-size: 18px !important; letter-spacing: 2px !important; }
}
