@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #0a0a0a;
  --paper: #ffffff;
  --muted: #6b6b6b;
  --line: #e8e8e8;
  --line-strong: #d4d4d4;
  --danger: #b3261e;
  --success: #1a7f37;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
/* Sticky footer: .site-main soaks up any leftover viewport height on short
   pages (login, empty cart, etc.) so .site-footer never floats mid-screen —
   on tall pages it simply has no extra space to give and behaves normally.
   Deliberately NOT display:flex here — that would turn its children into
   flex items and stop their margins from collapsing, subtly changing
   vertical spacing on every page. A plain block-level flex item doesn't. */
.site-main { flex: 1 0 auto; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 12px; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 14px; color: #2a2a2a; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--ink);
  color: var(--paper);
  border: 1.5px solid var(--ink);
  padding: 13px 26px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, transform .12s ease;
  text-align: center;
}
.btn:hover { background: var(--paper); color: var(--ink); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-outline { background: var(--paper); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-danger { background: var(--paper); color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: var(--paper); }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  z-index: 50;
}
.site-header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 24px;
  max-width: 1180px;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; flex-shrink: 0; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.brand img { height: 32px; width: auto; max-width: 160px; object-fit: contain; display: block; }
.main-nav { display: flex; flex-wrap: nowrap; gap: 26px; align-items: center; flex: 1; min-width: 0; }
.main-nav a { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: #333; white-space: nowrap; }
.main-nav a:hover { color: var(--ink); }
.main-nav .nav-icon { color: #999; }
.main-nav a:hover .nav-icon { color: var(--ink); }
.main-nav .nav-secondary-link { margin-left: auto; }
.main-nav .nav-secondary-link ~ .nav-secondary-link { margin-left: 0; }

.mobile-menu-toggle { align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; border: none; background: none; cursor: pointer; color: var(--ink); flex-shrink: 0; }
.mobile-menu-toggle:hover { background: #f4f4f4; }

.nav-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.nav-action {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 10px; border-radius: 10px; font-size: 10.5px; font-weight: 600; color: #555;
  position: relative; transition: background-color .15s, color .15s;
}
.nav-action:hover { background: #f4f4f4; color: var(--ink); }
.nav-action .nav-icon { color: inherit; }
.nav-action-label { line-height: 1; }
.cart-link .cart-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--ink); color: var(--paper); font-size: 10px; font-weight: 700;
  border-radius: 999px; min-width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* ---------- Mega menu ---------- */
.mega-trigger { display: inline-flex !important; align-items: center; gap: 4px; padding: 6px 0; }
.mega-trigger .nav-icon { transition: transform .18s var(--nav-ease, ease); width: 12px; height: 12px; }
.mega-item:hover .mega-trigger .nav-icon, .mega-item:focus-within .mega-trigger .nav-icon { transform: rotate(180deg); }
.mega-panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.09), 0 2px 8px rgba(0,0,0,0.04);
  padding: 10px; margin-top: 16px; width: 250px; z-index: 60;
}
.mega-panel::before {
  content: ''; position: absolute; top: -6px; left: 50%; transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px; background: var(--paper); border-left: 1px solid var(--line); border-top: 1px solid var(--line);
  border-radius: 2px 0 0 0;
}
.mega-panel-inner { position: relative; display: flex; flex-direction: column; }
.mega-product {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 9px 8px; border-radius: 8px; text-align: left; transition: background-color .14s var(--nav-ease, ease);
}
.mega-product:hover { background: #f6f6f6; }
.mega-product-title { font-size: 12.5px; font-weight: 600; line-height: 1.3; color: #333; }
.mega-product:hover .mega-product-title { color: var(--ink); }
.mega-product-price { flex-shrink: 0; font-size: 12px; font-weight: 700; color: #6b6b6b; }
.mega-view-all { position: relative; display: block; text-align: center; font-size: 12.5px; font-weight: 700; text-decoration: underline; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); }

/* Between the mobile drawer breakpoint and full desktop width, a full
   category list + Bundle Deals + Track Order + Sign In can get tight before
   there's any real need for the hamburger drawer. Reclaim room by shrinking
   gaps and dropping the label text on the lower-priority utility links
   (Track Order / Wishlist / My Account / Sign In) down to icon-only, rather
   than letting the row overflow or its content wrap awkwardly. */
@media (max-width: 1180px) and (min-width: 901px) {
  .main-nav { gap: 14px; }
  .main-nav .nav-secondary-link .nav-link-label { display: none; }
  .main-nav .nav-secondary-link { padding: 6px; }
}
@media (max-width: 900px) {
  .mega-panel { display: none !important; }
}

/* ---------- Category chips ---------- */
.chip-row { display: flex; gap: 10px; flex-wrap: wrap; padding: 24px 0 4px; }
.chip {
  padding: 8px 18px; border: 1.5px solid var(--line-strong); border-radius: 999px;
  font-size: 13px; font-weight: 600; color: #333; transition: all .15s;
}
.chip:hover, .chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 32px 22px;
  padding: 28px 0 60px;
}
.product-card { display: flex; flex-direction: column; position: relative; }
.product-card > a { display: block; flex: 1; }
.product-card-img {
  aspect-ratio: 3/4;
  background: #f4f4f4;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  margin-bottom: 12px;
  transition: box-shadow .3s ease, transform .3s ease;
}
/* Hover lift/shadow lives on the image box (not .product-card) so it can't
   fight the scroll-reveal transform that ui.js puts on the card itself. */
@media (hover: hover) {
  .product-card:hover .product-card-img { box-shadow: 0 14px 30px -12px rgba(0,0,0,.28); transform: translateY(-3px); }
}
.pc-slides { position: absolute; inset: 0; }
.pc-slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity .45s ease, transform .7s cubic-bezier(.2,.7,.2,1);
  -webkit-user-drag: none; user-select: none;
}

/* Desktop / mouse: 2nd photo crossfades in with a zoom-out settle while the
   1st zooms in and fades away. Slides 3+ are display:none here so they cost
   nothing (lazy images that aren't displayed are never fetched). */
@media (hover: hover) and (min-width: 701px) {
  .pc-slide:nth-child(n+3) { display: none; }
  .has-alt .pc-slide:nth-child(2) { opacity: 0; transform: scale(1.14); }
  .product-card:hover .pc-slide:first-child { transform: scale(1.08); }
  .product-card:hover .has-alt .pc-slide:first-child { opacity: 0; transform: scale(1.06); }
  .product-card:hover .has-alt .pc-slide:nth-child(2) { opacity: 1; transform: scale(1); }
  .pc-dots { display: none !important; }
}

/* Touch / narrow screens: the photos become a native, momentum-scrolling
   scroll-snap slider (no JS needed to swipe); dots are synced by ui.js. */
@media (hover: none), (max-width: 700px) {
  .pc-slides {
    display: flex; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; scroll-behavior: smooth;
    overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .pc-slides::-webkit-scrollbar { display: none; }
  .pc-slide { position: relative; inset: auto; flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
}

.pc-dots {
  position: absolute; left: 0; right: 0; bottom: 9px; display: flex; justify-content: center; gap: 5px;
  pointer-events: none; z-index: 1;
}
.pc-dot { width: 6px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.65); box-shadow: 0 0 0 1px rgba(0,0,0,.12); transition: width .25s ease, background-color .25s ease; }
.pc-dot.active { width: 16px; background: #fff; }

.badge-row { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 1; pointer-events: none; }
.badge {
  background: var(--ink); color: var(--paper); font-size: 10px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 9px; border-radius: 5px; align-self: flex-start;
}
.pc-discount {
  align-self: flex-start; background: #fff; color: var(--danger); font-size: 11.5px; font-weight: 800; letter-spacing: .01em;
  padding: 3px 8px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.14);
}
.pc-soldout {
  position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.62); color: var(--ink); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
}
.is-sold-out .pc-slide { filter: grayscale(.85); }
.product-card-title {
  font-size: 14.5px; font-weight: 600; margin-bottom: 4px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-sale { font-weight: 800; font-size: 15.5px; letter-spacing: -0.01em; }
.price-mrp { text-decoration: line-through; color: var(--muted); font-size: 13px; }

.wishlist-toggle {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.9); color: #b3b3b3; font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.wishlist-toggle:hover { background: #fff; color: #0a0a0a; }
.wishlist-toggle.active { color: #e0245e; }
.wishlist-toggle-inline { position: static; width: 44px; height: 44px; border: 1.5px solid var(--line-strong); background: var(--paper); font-size: 17px; }
.wishlist-toggle-inline:hover { border-color: var(--ink); }
.share-btn {
  position: static; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line-strong);
  background: var(--paper); color: var(--ink); cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; transition: border-color .15s, transform .12s;
}
.share-btn:hover { border-color: var(--ink); }
.share-btn:active { transform: scale(.94); }
.quick-buy-btn { margin-top: 10px; border-radius: 8px; padding: 8px; font-size: 12px; letter-spacing: 0; }

/* ---------- Product detail ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 40px 0 60px; }
@media (max-width: 860px) { .product-detail { grid-template-columns: 1fr; gap: 28px; } }
.gallery-main { aspect-ratio: 1/1; background: #f4f4f4; border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 1.5px solid var(--line); }
.gallery-thumbs img.active { border-color: var(--ink); }
.product-title { font-size: 26px; }
.product-price { display: flex; align-items: baseline; gap: 12px; margin: 14px 0 18px; }
.product-price .price-sale { font-size: 26px; }
.product-price .price-mrp { font-size: 16px; }
.save-pill { background: #eefbf1; color: var(--success); font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.stock-warning {
  display: flex; align-items: center; gap: 7px; color: var(--danger); background: #fdecec;
  border-radius: 8px; padding: 9px 13px; font-size: 13px; font-weight: 700; margin-bottom: 16px;
}
.stock-warning .nav-icon { color: var(--danger); width: 15px; height: 15px; }
.stock-warning-sm { padding: 4px 8px; font-size: 11px; margin-bottom: 6px; display: inline-flex; }
.stock-warning-sm .nav-icon { width: 12px; height: 12px; }
.qty-row { display: flex; align-items: center; gap: 14px; margin: 20px 0; }
.qty-control { display: flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.qty-control button { width: 38px; height: 38px; background: none; border: none; font-size: 18px; cursor: pointer; }
.qty-control input { width: 42px; text-align: center; border: none; font-size: 15px; font-weight: 600; }
.pack-table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 13.5px; }
.pack-table td { padding: 9px 0; border-bottom: 1px solid var(--line); }
.pack-table td:last-child { text-align: right; color: var(--muted); }
.product-description { font-size: 14.5px; color: #2a2a2a; }
.product-description h1, .product-description h2 { font-size: 18px; margin-top: 24px; }
.product-description h3 { font-size: 15px; }
.product-description ul { padding-left: 20px; }

/* ---------- Product tag chips (plain keyword chips — distinct from promotional .badge) ---------- */
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 2px 0 16px; }
.tag-chip {
  display: inline-block; padding: 4px 11px; border-radius: 999px; background: #f2f2f2; color: #5a5a5a;
  font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
}

/* ---------- Product page accordion (Description / Pack Contents / How to Set Up) ---------- */
.pd-accordion { border-top: 1px solid var(--line); margin-top: 24px; }
.pd-accordion-item { border-bottom: 1px solid var(--line); }
.pd-accordion-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 16px 2px; background: none; border: none; cursor: pointer; text-align: left;
  font-size: 14px; font-weight: 700; color: var(--ink); font-family: inherit;
}
.pd-accordion-trigger .nav-icon { color: #8a8a8a; transition: transform .22s var(--nav-ease, ease); flex-shrink: 0; }
.pd-accordion-item.is-open .pd-accordion-trigger .nav-icon { transform: rotate(180deg); }
.pd-accordion-panel {
  max-height: 0; overflow: hidden; transition: max-height .3s var(--nav-ease, ease);
}
.pd-accordion-panel-inner-pad { padding: 0 2px 18px; }

/* ---------- Ambient video player (blurred wrapper, no native controls, sound on hover) ---------- */
.amb-video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.amb-video {
  position: relative; aspect-ratio: 9/12; border-radius: 14px; overflow: hidden; cursor: pointer;
  background: #0a0a0a; isolation: isolate;
}
.amb-video-bg, .amb-video-fg { position: absolute; inset: 0; width: 100%; height: 100%; }
.amb-video-bg { object-fit: cover; filter: blur(28px) brightness(.6) saturate(1.2); transform: scale(1.25); }
.amb-video-fg { object-fit: contain; z-index: 1; }
.amb-video-sound-hint {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0,0,0,.45); backdrop-filter: blur(4px); color: #fff;
  display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .18s ease;
}
.amb-video:hover .amb-video-sound-hint { opacity: 1; }
.amb-video-sound-hint svg { width: 13px; height: 13px; }
.amb-video-sound-hint .icon-muted { display: block; }
.amb-video-sound-hint .icon-unmuted { display: none; }
.amb-video.is-unmuted .amb-video-sound-hint .icon-muted { display: none; }
.amb-video.is-unmuted .amb-video-sound-hint .icon-unmuted { display: block; }

/* ---------- Reviews marquee (auto-scrolling, pauses on hover/focus) ---------- */
.review-marquee { position: relative; margin: 0 -24px; padding: 4px 0 4px; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.review-marquee-track { display: flex; gap: 16px; width: max-content; animation: reviewMarquee var(--marquee-duration, 36s) linear infinite; padding: 0 24px; }
.review-marquee:hover .review-marquee-track, .review-marquee-track:has(.review-card:focus-visible) { animation-play-state: paused; }
@keyframes reviewMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.review-card {
  flex: 0 0 auto; width: 280px; border: 1.5px solid var(--line); border-radius: 14px; padding: 18px;
  background: var(--paper); transition: transform .18s var(--nav-ease, ease), box-shadow .18s var(--nav-ease, ease);
}
.review-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,.07); }
.review-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.review-card-name { font-size: 13.5px; font-weight: 700; }
.review-card-date { font-size: 11.5px; color: #8a8a8a; }
.review-card-comment { font-size: 13px; color: #333; line-height: 1.5; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 600px) { .review-marquee { margin: 0 -16px; } }

/* ---------- Cart & Checkout ---------- */
.page-title { font-size: 26px; padding: 34px 0 18px; }
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.cart-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 8px; border-bottom: 1.5px solid var(--ink); }
.cart-table td { padding: 16px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-item-row { display: flex; align-items: center; gap: 14px; }
.cart-item-row img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: #f4f4f4; }
.cart-summary { max-width: 380px; margin-left: auto; border-top: 2px solid var(--ink); padding-top: 16px; }
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.summary-row.total { font-weight: 700; font-size: 17px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; }
.empty-state { text-align: center; padding: 80px 20px; color: var(--muted); }

.checkout-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; padding: 30px 0 60px; align-items: start; }
@media (max-width: 860px) { .checkout-grid { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], textarea, select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: 8px; font-size: 14px; font-family: inherit;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); }

/* ---------- Password strength meter (registration / reset — not shown on login) ---------- */
.password-field { position: relative; }
.password-strength { display: flex; gap: 5px; margin-top: 8px; }
.password-strength-bar { height: 4px; flex: 1; border-radius: 999px; background: var(--line); transition: background-color .2s ease; }
.password-strength[data-level="1"] .password-strength-bar:nth-child(1) { background: var(--danger); }
.password-strength[data-level="2"] .password-strength-bar:nth-child(-n+2) { background: #d97706; }
.password-strength[data-level="3"] .password-strength-bar:nth-child(-n+3) { background: #d97706; }
.password-strength[data-level="4"] .password-strength-bar { background: var(--success); }
.password-strength-label { font-size: 11.5px; font-weight: 600; margin-top: 5px; color: var(--muted); }
.password-strength[data-level="1"] ~ .password-strength-label { color: var(--danger); }
.password-strength[data-level="2"] ~ .password-strength-label, .password-strength[data-level="3"] ~ .password-strength-label { color: #d97706; }
.password-strength[data-level="4"] ~ .password-strength-label { color: var(--success); }
.draft-saved-indicator {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--success, #1a7f37);
  opacity: 0; transition: opacity .3s ease; vertical-align: middle;
}
.draft-saved-indicator.is-visible { opacity: 1; }
.order-summary-box { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 22px; }
.order-summary-box .line { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.order-summary-box .line img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }

.payment-method-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.payment-method-opt { position: relative; display: flex; flex-direction: column; gap: 4px; border: 1.5px solid var(--line-strong); border-radius: 10px; padding: 14px; cursor: pointer; font-weight: 600; font-size: 14px; }
.payment-method-opt.selected { border-color: var(--ink); border-width: 2px; }
.payment-method-opt input { width: auto; position: absolute; opacity: 0; }
.payment-method-opt .pm-note { font-weight: 500; font-size: 11.5px; color: var(--muted); }
@media (max-width: 500px) { .payment-method-row { grid-template-columns: 1fr; } }

/* ---------- Alerts ---------- */
.alert { padding: 13px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 13.5px; }
.alert-success { background: #eefbf1; color: var(--success); }
.alert-error { background: #fdecec; color: var(--danger); }
.alert-info { background: #f2f2f2; color: #333; }

/* ---------- Result pages ---------- */
.result-page { max-width: 520px; margin: 70px auto; text-align: center; padding: 0 20px; }
.result-icon { width: 68px; height: 68px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 32px; }
.result-icon.ok { background: #eefbf1; color: var(--success); }
.result-icon.fail { background: #fdecec; color: var(--danger); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 60px; background: #fafafa; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 44px 24px 24px; }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 26px; }
.footer-links a { font-size: 13.5px; color: #333; font-weight: 500; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 26px; align-items: center; padding-top: 22px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.footer-partner { display: flex; align-items: center; gap: 7px; }
.footer-partner img { height: 20px; width: auto; }
.footer-copy { margin-top: 16px; font-size: 12px; color: var(--muted); }

/* ---------- Sections ---------- */
.hero { padding: 56px 0 10px; text-align: center; }
.hero h1 { font-size: 34px; max-width: 640px; margin: 0 auto 10px; }
.hero p { max-width: 520px; margin: 0 auto; color: var(--muted); }

@media (max-width: 900px) {
  .site-header-inner { padding: 14px 16px; }
  .main-nav {
    flex-direction: column; align-items: stretch; gap: 0; flex: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 28px rgba(0,0,0,.08); padding: 6px 16px 14px;
  }
  .main-nav a, .main-nav .mega-item, .main-nav .mega-trigger { width: 100%; }
  .main-nav a { padding: 12px 2px; border-bottom: 1px solid #f4f4f4; margin-left: 0 !important; }
  .main-nav .mega-trigger { justify-content: space-between; }
  .mega-item .mega-panel { display: none !important; } /* categories still link through; previews are a desktop-hover nicety */

  .main-nav > * { opacity: 0; transform: translateY(-4px); transition: opacity .18s var(--nav-ease), transform .18s var(--nav-ease); }
  .main-nav.mobile-open > * { opacity: 1; transform: translateY(0); }
  .main-nav.mobile-open > *:nth-child(1) { transition-delay: .02s; }
  .main-nav.mobile-open > *:nth-child(2) { transition-delay: .05s; }
  .main-nav.mobile-open > *:nth-child(3) { transition-delay: .08s; }
  .main-nav.mobile-open > *:nth-child(4) { transition-delay: .11s; }
  .main-nav.mobile-open > *:nth-child(5) { transition-delay: .14s; }
  .main-nav.mobile-open > *:nth-child(6) { transition-delay: .17s; }
  .main-nav.mobile-open > *:nth-child(n+7) { transition-delay: .2s; }
}
@media (max-width: 600px) {
  .container { padding: 0 16px; }
}

/* ---------- Combo / bundle pages ---------- */
.combo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; padding: 24px 0 40px; }
.combo-card { position: relative; border: 1.5px solid var(--line); border-radius: 14px; padding: 22px; }
.combo-card.best-value { border-color: var(--ink); background: #fafafa; }
.combo-badge { position: absolute; top: -11px; left: 20px; background: var(--ink); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; padding: 4px 10px; border-radius: 999px; }
.combo-card h3 { font-size: 17px; margin-bottom: 6px; }
.combo-sub { color: var(--success); font-weight: 600; font-size: 13.5px; margin-bottom: 8px; }
.combo-effective { color: var(--muted); font-size: 13px; margin-bottom: 16px; }

.bundle-progress { position: sticky; top: 70px; background: #fff; border: 1.5px solid var(--ink); border-radius: 12px; padding: 16px 20px; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; z-index: 10; flex-wrap: wrap; }
.bundle-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.bundle-pick-card { border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; transition: border-color .15s; position: relative; }
.bundle-pick-card.selected { border-color: var(--ink); border-width: 2px; }
.bundle-pick-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.bundle-pick-card .bp-title { font-size: 12px; font-weight: 600; padding: 8px 8px 2px; }
.bundle-pick-card .bp-qty { font-size: 11.5px; color: var(--muted); padding: 0 8px 8px; }
.bundle-pick-card .bp-count { position: absolute; top: 6px; right: 6px; background: var(--ink); color: #fff; width: 22px; height: 22px; border-radius: 50%; display: none; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.bundle-pick-card.selected .bp-count { display: flex; }

/* ---------- Mini-cart drawer (fast path: add → checkout, no detour) ---------- */
.mini-cart-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 998;
  opacity: 0; pointer-events: none; transition: opacity .28s var(--nav-ease, ease);
}
.mini-cart-overlay.is-open { opacity: 1; pointer-events: auto; }
.mini-cart-drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 400px; max-width: 92vw;
  background: var(--paper); z-index: 999; display: flex; flex-direction: column;
  /* Closed state carries no shadow and is visibility:hidden — otherwise the
     shadow of the off-screen drawer bleeds ~40px into the right edge of every page. */
  box-shadow: none; visibility: hidden;
  transform: translateX(100%);
  transition: transform .32s var(--nav-ease, cubic-bezier(.16,1,.3,1)), box-shadow .32s ease, visibility 0s linear .32s;
}
.mini-cart-drawer.is-open {
  transform: translateX(0); visibility: visible; box-shadow: -16px 0 40px rgba(0,0,0,.18);
  transition: transform .32s var(--nav-ease, cubic-bezier(.16,1,.3,1)), box-shadow .32s ease, visibility 0s;
}
.mini-cart-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.mini-cart-header h3 { margin: 0; font-size: 16px; }
.mini-cart-close { width: 32px; height: 32px; border-radius: 50%; border: none; background: none; font-size: 20px; line-height: 1; cursor: pointer; color: #6b6b6b; }
.mini-cart-close:hover { background: #f4f4f4; color: var(--ink); }
.mini-cart-body { flex: 1; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; }
.mini-cart-empty { color: var(--muted); text-align: center; padding: 40px 0; }
.mini-cart-items { display: flex; flex-direction: column; gap: 14px; }
.mini-cart-item { display: flex; align-items: center; gap: 12px; }
.mini-cart-item img, .mini-cart-item-icon {
  width: 54px; height: 54px; border-radius: 8px; object-fit: cover; background: #f4f4f4; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.mini-cart-item-body { flex: 1; min-width: 0; }
.mini-cart-item-title { font-size: 13px; font-weight: 600; line-height: 1.3; }
.mini-cart-item-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.mini-cart-item-price { font-size: 13px; font-weight: 700; flex-shrink: 0; }
.mini-cart-footer { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.mini-cart-subtotal { display: flex; justify-content: space-between; font-size: 15px; font-weight: 700; margin-bottom: 14px; }
@media (max-width: 480px) { .mini-cart-drawer { width: 100%; max-width: 100%; } }

/* ---------- Toast notifications ---------- */
.toast-stack {
  position: fixed; bottom: 20px; right: 20px; z-index: 1000;
  display: flex; flex-direction: column-reverse; gap: 10px;
  width: min(340px, calc(100vw - 32px));
}
.toast-card {
  position: relative; display: flex; align-items: flex-start; gap: 12px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 13px 30px 13px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.05);
  opacity: 0; transform: translateX(24px) scale(.96);
  transition: opacity .22s var(--nav-ease, cubic-bezier(.16,1,.3,1)), transform .22s var(--nav-ease, cubic-bezier(.16,1,.3,1));
  overflow: hidden;
}
.toast-card.toast-in { opacity: 1; transform: translateX(0) scale(1); }
.toast-card.toast-out { opacity: 0; transform: translateX(24px) scale(.96); }
.toast-card:hover { transform: translateX(0) scale(1.015); }
.toast-icon {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.toast-success .toast-icon { background: var(--success, #1a7f37); }
.toast-error .toast-icon { background: var(--danger, #b3261e); }
.toast-info .toast-icon { background: #555; }
.toast-cart .toast-icon, .toast-wishlist .toast-icon { background: #0a0a0a; }
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-size: 13px; font-weight: 700; color: #111; line-height: 1.3; }
.toast-message { font-size: 12px; color: #6b6b6b; margin-top: 2px; line-height: 1.35; }
.toast-action { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; text-decoration: underline; color: #0a0a0a; }
.toast-time { position: absolute; top: 12px; right: 30px; font-size: 10px; color: #b3b3b3; }
.toast-close {
  position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 50%;
  border: none; background: none; color: #b3b3b3; font-size: 16px; line-height: 1; cursor: pointer;
}
.toast-close:hover { background: #f0f0f0; color: #333; }
.toast-progress { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: rgba(0,0,0,.12); transition: width linear; }
@media (max-width: 480px) {
  .toast-stack { left: 12px; right: 12px; bottom: 12px; width: auto; }
}

/* ---------- "Someone just bought this" popup (real orders only) ---------- */
.purchase-popup {
  position: fixed; left: 20px; bottom: 20px; z-index: 999;
  display: flex; align-items: center; gap: 12px;
  width: min(320px, calc(100vw - 32px));
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 30px 12px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.05);
  opacity: 0; transform: translateX(-24px) scale(.96);
  transition: opacity .25s cubic-bezier(.16,1,.3,1), transform .25s cubic-bezier(.16,1,.3,1);
}
.purchase-popup.is-visible { opacity: 1; transform: translateX(0) scale(1); }
.purchase-popup img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: #f4f4f4; flex-shrink: 0; }
.purchase-popup-body { min-width: 0; }
.purchase-popup-text { font-size: 12px; color: #555; }
.purchase-popup-text strong { color: var(--ink); }
.purchase-popup-title { font-size: 12.5px; font-weight: 700; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.purchase-popup-close {
  position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 50%;
  border: none; background: none; color: #b3b3b3; font-size: 16px; line-height: 1; cursor: pointer;
}
.purchase-popup-close:hover { background: #f0f0f0; color: #333; }
@media (max-width: 480px) {
  .purchase-popup { left: 12px; bottom: 12px; width: auto; }
}

/* ---------- Text reveal (checkout headings) ---------- */
.text-reveal-word {
  display: inline-block; opacity: 0; transform: translateY(60%);
  transition: opacity .5s var(--nav-ease, cubic-bezier(.16,1,.3,1)), transform .5s var(--nav-ease, cubic-bezier(.16,1,.3,1));
}
.text-reveal-in .text-reveal-word { opacity: 1; transform: translateY(0); }

/* ---------- Cart / checkout AJAX polish ---------- */
#cartRoot { transition: opacity .15s ease; }
#cartRoot.cart-root-fade { opacity: .4; }
.js-cart-remove, .js-cart-remove-bundle { transition: transform .12s ease; }
.js-cart-remove:hover, .js-cart-remove-bundle:hover { transform: translateY(-1px); }
.product-card.card-removing { transition: opacity .2s ease, transform .2s ease; opacity: 0; transform: scale(.95); }
#orderSummaryBox { transition: opacity .15s ease; }
#orderSummaryBox.summary-loading { opacity: .5; pointer-events: none; }
.btn-loading { opacity: .75; cursor: wait; }

/* =====================================================================
   Storefront polish v2 — hero, trust strip, section heads, listing
   filters, announcement bar, sticky buy bar, motion.
   ===================================================================== */

.btn-lg { padding: 15px 30px; font-size: 15px; }
.chip-strong { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip-strong:hover { background: var(--paper); color: var(--ink); }
button.chip { background: var(--paper); cursor: pointer; font-family: inherit; }
button.chip:hover, button.chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- Announcement bar ---------- */
.announce-bar { background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 600; letter-spacing: .01em; }
.announce-bar[hidden] { display: none; }
.announce-inner { max-width: 1180px; margin: 0 auto; padding: 9px 44px; text-align: center; position: relative; }
.announce-inner a { display: inline-block; }
.announce-inner a:hover { text-decoration: underline; }
.announce-close {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px;
  border: 0; background: none; color: rgba(255,255,255,.7); font-size: 18px; line-height: 1; cursor: pointer; border-radius: 50%;
}
.announce-close:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ---------- Hero ---------- */
.hero-v2 { position: relative; overflow: hidden; padding: 76px 0 54px; background: linear-gradient(#f7f7f7, #fff 85%); }
.hero-bg {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, #cfcfcf 1px, transparent 1.3px); background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 75% 95% at 50% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 75% 95% at 50% 0%, #000 0%, transparent 72%);
}
.hero-inner { position: relative; text-align: center; }
.hero-v2 h1 { font-size: clamp(32px, 6.4vw, 58px); letter-spacing: -.038em; line-height: 1.04; max-width: 780px; margin: 0 auto 16px; }
.hero-v2 .hero-sub { font-size: clamp(15px, 2vw, 18px); color: #555; max-width: 560px; }
.hero-v2 .hero-extra { font-size: 12.5px; color: #8a8a8a; margin-top: 10px; }
.hero-v2 .hero-pill {
  display: inline-flex; align-items: center; gap: 8px; max-width: none; margin: 0 0 20px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 12.5px; font-weight: 600;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.hero-cta .nav-icon { width: 16px; height: 16px; transition: transform .2s ease; }
.hero-cta .btn:hover .nav-icon { transform: translateX(4px); }
@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero-inner > * { animation: riseIn .7s cubic-bezier(.2,.7,.2,1) both; }
.hero-inner > *:nth-child(2) { animation-delay: .07s; }
.hero-inner > *:nth-child(3) { animation-delay: .14s; }
.hero-inner > *:nth-child(4) { animation-delay: .21s; }
.hero-inner > *:nth-child(5) { animation-delay: .28s; }

/* ---------- Trust strip ---------- */
.trust-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.trust-strip ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.trust-strip li { display: flex; align-items: center; gap: 12px; padding: 16px 14px; }
.trust-strip li + li { border-left: 1px solid var(--line); }
.trust-ico { width: 38px; height: 38px; border-radius: 50%; background: #f4f4f4; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.trust-ico .nav-icon { width: 18px; height: 18px; }
.trust-strip strong { display: block; font-size: 13.5px; line-height: 1.25; }
.trust-strip small { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; }
@media (max-width: 700px) {
  .trust-strip ul { grid-template-columns: 1fr 1fr; }
  .trust-strip li { padding: 12px 6px; gap: 10px; }
  .trust-strip li + li { border-left: 0; }
  .trust-strip li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .trust-ico { width: 34px; height: 34px; }
  .hero-v2 { padding: 52px 0 38px; }
}

/* ---------- Section heads ---------- */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 46px 0 4px; }
.section-head h2 { font-size: clamp(20px, 3vw, 27px); margin: 0; display: flex; align-items: center; gap: 8px; letter-spacing: -.025em; }
.eyebrow { display: block; font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.section-link { font-size: 13px; font-weight: 700; white-space: nowrap; border-bottom: 1.5px solid var(--ink); padding-bottom: 1px; transition: opacity .15s; }
.section-link:hover { opacity: .6; }

/* ---------- Scroll reveal (classes only ever added by ui.js) ---------- */
.rv-pending { opacity: 0; transform: translateY(20px); }
.rv-in { transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }

/* ---------- Listing bar: sort + custom price ---------- */
.listing-bar { margin: 20px 0 4px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.lb-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.lb-count { flex: 1; font-size: 13.5px; font-weight: 700; color: #333; }
.listing-bar label.lb-sort { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.lb-sort select { width: auto; padding: 8px 32px 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; background-color: #fff; cursor: pointer; }
.lb-toggle {
  display: none; align-items: center; gap: 6px; padding: 8px 14px; border: 1.5px solid var(--line-strong); border-radius: 999px;
  background: #fff; font-weight: 600; font-size: 13px; line-height: 1; font-family: inherit; cursor: pointer; color: var(--ink);
}
.lb-toggle .nav-icon { width: 14px; height: 14px; }
.lb-toggle.has-value { background: var(--ink); color: #fff; border-color: var(--ink); }
.lb-panel { border-top: 1px solid var(--line); padding: 16px; display: flex; flex-wrap: wrap; gap: 18px 36px; align-items: flex-end; }
.lb-price { flex: 1 1 380px; min-width: 0; }
.lb-price-head { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.lb-inputs { display: flex; align-items: center; gap: 10px; }
.listing-bar label.lb-money { position: relative; display: block; flex: 1; min-width: 0; max-width: 150px; margin: 0; }
.lb-money span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--muted); pointer-events: none; }
.lb-money input { padding: 9px 10px 9px 28px; border-radius: 999px; font-size: 14px; font-weight: 600; -moz-appearance: textfield; }
.lb-money input::-webkit-outer-spin-button, .lb-money input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.lb-to { font-size: 12px; color: var(--muted); font-weight: 600; }
.lb-apply { flex-shrink: 0; }
.listing-bar.is-enhanced .lb-apply { display: none; }

/* Dual-thumb range: two overlaid native range inputs over a custom track. */
.lb-slider { display: none; position: relative; height: 26px; margin: 16px 6px 2px; }
.listing-bar.is-enhanced .lb-slider { display: block; }
.lb-slider-track { position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; background: var(--line); border-radius: 4px; }
.lb-slider-fill { position: absolute; top: 0; bottom: 0; background: var(--ink); border-radius: 4px; }
.lb-slider input[type=range] {
  position: absolute; left: -6px; width: calc(100% + 12px); top: 0; height: 26px; margin: 0; padding: 0;
  background: none; pointer-events: none; -webkit-appearance: none; appearance: none; border: 0;
}
.lb-slider input[type=range]::-webkit-slider-runnable-track { background: transparent; height: 26px; }
.lb-slider input[type=range]::-moz-range-track { background: transparent; }
.lb-slider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: auto; width: 20px; height: 20px; margin-top: 3px; border-radius: 50%;
  background: #fff; border: 2px solid var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: grab; transition: transform .12s ease;
}
.lb-slider input[type=range]::-moz-range-thumb {
  pointer-events: auto; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--ink);
  box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: grab;
}
.lb-slider input[type=range]:active::-webkit-slider-thumb { transform: scale(1.15); cursor: grabbing; }
.lb-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.lb-presets .chip { padding: 6px 14px; font-size: 12.5px; }
.lb-extras { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.listing-bar label.lb-check { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 600; cursor: pointer; }
.lb-check input { width: 17px; height: 17px; accent-color: var(--ink); cursor: pointer; margin: 0; }
.lb-reset { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--danger); }
.lb-reset .nav-icon { width: 13px; height: 13px; }
.lb-reset:hover { text-decoration: underline; }
.lb-reset.is-hidden { display: none; }

@media (min-width: 701px) { .lb-panel { display: flex !important; } }
@media (max-width: 700px) {
  .lb-toggle { display: inline-flex; }
  .lb-top { flex-wrap: wrap; gap: 10px; padding: 12px; }
  .lb-count { flex: 1 1 100%; }
  .listing-bar label.lb-sort { flex: 1; }
  .lb-sort select { flex: 1; width: 100%; }
  .lb-panel { display: none; padding: 14px 12px 16px; }
  .lb-panel.is-open { display: block; }
  .lb-extras { margin-top: 16px; justify-content: space-between; }
}

.listing-grid { transition: opacity .2s ease; }
.listing-grid.is-loading { opacity: .45; pointer-events: none; }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.listing-grid.is-fresh .product-card { animation: cardIn .45s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 45ms); }
.listing-empty { padding: 60px 20px; }
.listing-empty .btn { margin-top: 6px; }

/* ---------- Phones: two-up grid ---------- */
@media (max-width: 700px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; padding: 20px 0 44px; }
  .product-card-title { font-size: 13.5px; }
  .price-sale { font-size: 14.5px; }
  .quick-buy-btn { font-size: 11.5px; padding: 8px 6px; }
  .section-head { padding-top: 34px; }
}
@media (max-width: 340px) { .product-grid { grid-template-columns: 1fr; } }

/* ---------- Product page: gallery zoom + swipe ---------- */
.gallery-main { position: relative; }
.gallery-main img { transition: transform .35s cubic-bezier(.2,.7,.2,1), opacity .25s ease; }
.gallery-main.is-zoom { cursor: zoom-in; }
.gallery-main.is-zoom img { transform: scale(1.8); transition: transform .2s ease-out; }
.gallery-main img.g-dim { opacity: .35; }
@media (max-width: 860px) {
  .gallery-thumbs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; scroll-snap-type: x proximity; }
  .gallery-thumbs::-webkit-scrollbar { display: none; }
  .gallery-thumbs img { flex-shrink: 0; scroll-snap-align: start; }
}

/* ---------- Mobile sticky buy bar ---------- */
.sticky-atc {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  align-items: center; gap: 14px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(0,0,0,.08);
  transform: translateY(110%); transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.sticky-atc-info { flex: 1; min-width: 0; }
.sticky-atc-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-atc-price { font-size: 13px; }
.sticky-atc-price s { color: var(--muted); margin-left: 4px; font-size: 12px; }
.sticky-atc .btn { flex-shrink: 0; padding: 12px 22px; }
@media (max-width: 860px) {
  .sticky-atc { display: flex; }
  .sticky-atc.is-visible { transform: none; }
  body.has-sticky-atc { padding-bottom: 68px; }
  body.has-sticky-atc .toast-stack, body.has-sticky-atc .purchase-popup { bottom: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-inner > * { animation: none; }
  .rv-pending { opacity: 1; transform: none; }
  .pc-slide, .product-card-img, .listing-grid.is-fresh .product-card { transition: none; animation: none; }
  html { scroll-behavior: auto; }
}
