/* =============================================
   FABRIC GIANT — Global Stylesheet
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ── Variables ── */
:root {
  --bg:         oklch(99% 0.005 55);
  --bg-subtle:  oklch(97% 0.010 55);
  --bg-warm:    oklch(93% 0.018 55);
  --dark:       oklch(16% 0.015 25);
  --dark-mid:   oklch(32% 0.012 25);
  --mid:        oklch(52% 0.010 25);
  --light:      oklch(72% 0.008 55);
  --gold:       oklch(68% 0.14 50);
  --gold-light: oklch(80% 0.10 55);
  --gold-dark:  oklch(54% 0.14 42);
  --red:        oklch(52% 0.22 25);
  --red-light:  oklch(92% 0.06 25);
  --green:      oklch(54% 0.14 155);
  --white:      oklch(100% 0 0);
  /* Brand accent — vivid red from logo */
  --accent:     oklch(52% 0.22 25);
  --accent-light: oklch(65% 0.20 28);
  --accent-dark:  oklch(40% 0.20 22);
  --shadow-sm:  0 1px 4px oklch(16% 0.015 25 / 0.08);
  --shadow-md:  0 4px 16px oklch(16% 0.015 25 / 0.12);
  --shadow-lg:  0 12px 40px oklch(16% 0.015 25 / 0.16);
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Outfit', system-ui, sans-serif;
  --transition: 0.22s ease;
  --max-w:      1320px;

  /* ── Layering ──────────────────────────────────────────────────────────────
     Every fixed/overlay layer in the site, in stacking order. Raise something by
     editing this list — never by inventing a bigger number at the call site.
     Paired backdrop/content layers use calc(var(--x) + 1) for the content.
     NOTE: .site-header is sticky and creates a stacking context, so anything that
     must sit above --z-tabbar has to live outside the header in the DOM. */
  --z-quick-bar:       990;  /* category chip strip                              */
  --z-mega-menu:       999;  /* desktop category mega-menu                       */
  --z-header:         1000;  /* sticky site header                               */
  --z-filter-drawer:  1050;  /* category filter drawer (mobile)                  */
  --z-drawer:         1100;  /* cart + wishlist slide-in drawers                 */
  --z-menu:           1200;  /* mobile menu, search dropdown, image lightbox     */
  --z-tabbar:         1300;  /* mobile bottom tab bar                            */
  --z-modal:          1360;  /* quick view (bottom sheet on mobile)              */
  --z-search-overlay: 2000;  /* full-screen mobile search                        */

  /* Single horizontal gutter for the whole page. Every full-width strip (container,
     header, quick bar) uses this so their left edges line up exactly. */
  --gutter: 24px;
}
@media (max-width: 768px) { :root { --gutter: 12px; } }

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: var(--font-sans); cursor: pointer; border: none; background: none; }

/* ── Utility ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 72px 0; }
.section-sm { padding: 48px 0; }
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--dark);
  letter-spacing: -0.02em;
}
.section-subtitle {
  font-size: 0.95rem;
  color: var(--mid);
  margin-top: 6px;
  font-weight: 400;
}
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 16px;
}
.view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 10px 18px;
  border: 1.5px solid var(--dark);
  border-radius: var(--radius-sm);
  background: transparent;
  transition: all var(--transition);
}
.view-all--bottom { display: none; }
.view-all:hover {
  background: var(--dark);
  color: var(--white);
  transform: translateY(-1px);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--dark);
  color: var(--white);
  border-color: var(--dark);
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.btn-gold {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn-gold:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px oklch(52% 0.22 25 / 0.38);
}
.btn-outline {
  background: transparent;
  color: var(--dark);
  border-color: var(--dark);
}
.btn-outline:hover { background: var(--dark); color: var(--white); }
.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline-white:hover { background: var(--white); color: var(--dark); }
.btn-sm { padding: 9px 18px; font-size: 0.82rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }

/* ── Badge ── */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 40px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-sale { background: var(--red); color: #fff; }
.badge-new  { background: var(--green); color: #fff; }
.badge-hot  { background: var(--accent); color: #fff; }
.badge-discount { background: var(--dark); color: #fff; }

/* ── Product Card ── */
.product-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.product-card__image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 3;
  background: var(--white);
}
.product-card__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-card__image img { transform: scale(1.05); }
.products-grid--contain .product-card__image img { object-fit: contain; }
.product-card__actions {
  position: absolute;
  top: 12px; right: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* Was opacity:0 until :hover — invisible by default on any touch device, since
     touch has no hover state to reveal it. Floating and always-on, like the badge. */
}
.product-card__action-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--white);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
  color: var(--dark-mid);
  font-size: 0.95rem;
}
.product-card__action-btn:hover {
  transform: scale(1.08);
  color: var(--accent);
}
.product-card__action-btn.active {
  color: var(--accent);
}
.product-card__badges {
  position: absolute;
  top: 12px; left: 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.product-card__quick-add {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--dark);
  color: var(--white);
  border: none;
  padding: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transform: translateY(100%);
  transition: transform var(--transition);
  font-family: var(--font-sans);
}
.product-card:hover .product-card__quick-add { transform: translateY(0); }
.product-card__info { padding: 16px; }
.product-card__category {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 4px;
}
.product-card__title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 2px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card__code {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--mid);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.product-card__price { display: flex; align-items: baseline; gap: 8px; line-height: 1; }
/* Sans, not serif — Playfair's old-style figures read oddly at this size for a price. */
.product-card__price-current { font-family: var(--font-sans); font-weight: 700; font-size: 1.08rem; color: var(--dark); }
.product-card__price-original {
  font-size: 0.85rem;
  color: var(--light);
  text-decoration: line-through;
  line-height: 1;
}
/* Back on the same line as the price row (not its own line below) — a gold accent
   caption sitting right after the numbers rather than dropped underneath them. */
.product-card__price-unit {
  font-family: var(--font-sans); font-size: 0.68rem; font-weight: 700; color: var(--gold-dark);
  text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap;
}
.product-card__price-save { font-size: 0.72rem; font-weight: 700; color: var(--green); white-space: nowrap; }

/* ── Product cards on phones ───────────────────────────────────────────────────
   The image is already square + object-fit:cover globally now (see .product-card__image
   above), so what's left here is just the price row wrapping mid-way on narrow cards,
   orphaning "metre" onto its own line — tighter type and a non-breaking unit keep price
   + unit together. */
/* 640px, not 768px — this is where .products-grid drops to 2 columns, so the compact
   treatment starts exactly when cards become narrow. */
@media (max-width: 640px) {
  .product-card__info { padding: 10px 10px 12px; }
  .product-card__title { font-size: 0.88rem; line-height: 1.3; }
  .product-card__price { flex-wrap: wrap; gap: 3px 6px; margin-top: 6px !important; }
  .product-card__price-current { font-size: 0.98rem; }
  .product-card__price-original { font-size: 0.76rem; }
  .product-card__price-unit { font-size: 0.7rem; }
  .product-card__badges { top: 8px; left: 8px; }
}
.product-card__rating { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.product-card__stars { color: var(--accent); font-size: 0.78rem; letter-spacing: 1px; }
.product-card__review-count { font-size: 0.75rem; color: var(--mid); }

/* ── Placeholder image ── */
.img-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  color: var(--light);
  font-size: 0.72rem;
  font-family: monospace;
  text-align: center;
  padding: 16px;
  background: repeating-linear-gradient(
    45deg,
    var(--bg-warm),
    var(--bg-warm) 8px,
    var(--bg-subtle) 8px,
    var(--bg-subtle) 16px
  );
}
.img-placeholder svg { opacity: 0.35; }

/* ── Carousel ── */
.carousel-wrap { position: relative; }
.carousel-track-outer { overflow: hidden; }
.carousel-track {
  display: flex;
  gap: 24px;
  transition: transform 0.4s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.carousel-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-md);
  border: none;
  cursor: pointer;
  color: var(--dark);
  font-size: 1rem;
  transition: all var(--transition);
  z-index: 10;
}
.carousel-nav:hover { background: var(--dark); color: var(--white); }
.carousel-nav.prev { left: -22px; }
.carousel-nav.next { right: -22px; }
/* These hang 22px outside the carousel, which is fine on desktop but pushed past the
   viewport on phones (the gutter is only 12px) and caused a horizontal page scroll.
   The track is transform-driven, not natively swipeable, so the arrows must stay —
   tuck them just inside the edge instead. */
@media (max-width: 768px) {
  .carousel-nav { width: 36px; height: 36px; }
  .carousel-nav.prev { left: 2px; }
  .carousel-nav.next { right: 2px; }

  /* data-grid-mobile sections (Best Sellers / New Arrivals) become a 2-up product grid
     on phones instead of a one-at-a-time carousel. */
  .carousel-wrap.is-grid .carousel-nav { display: none; }
  .carousel-wrap.is-grid .carousel-track-outer { overflow: visible; }
  .carousel-wrap.is-grid .carousel-track {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    transform: none !important;
    transition: none;
  }
}

/* ── Form ── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--dark); }
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--bg-warm);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--dark);
  transition: border-color var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--accent); }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* ── Top Bar ── */
.top-bar {
  background: var(--dark);
  color: var(--white);
  padding: 8px 0;
  font-size: 0.78rem;
  font-weight: 400;
}
.top-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.top-bar__center {
  display: flex; align-items: center; gap: 24px;
  flex: 1; justify-content: center;
}
.top-bar__right { display: flex; align-items: center; gap: 16px; }
.top-bar a { opacity: 0.85; transition: opacity var(--transition); }
.top-bar a:hover { opacity: 1; }
.top-bar__sep { opacity: 0.3; }
.ticker-wrap { overflow: hidden; flex: 1; max-width: 500px; text-align: center; }
.ticker-text { white-space: nowrap; }
.ticker-text span { opacity: 0.9; }

/* ── Main Header ── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid oklch(90% 0.01 65);
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.site-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.03em;
  flex-shrink: 0;
}
.site-logo img {
  height: 52px;
  width: auto;
  max-width: none;
  object-fit: contain;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .site-logo img { height: 40px; }
}
.site-logo__icon {
  width: 36px; height: 36px;
  background: var(--dark);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-light);
  font-size: 1rem;
}
.site-logo__sub { font-size: 0.55rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--gold-dark); font-family: var(--font-sans); font-weight: 600; display: block; margin-top: -4px; }

.search-bar {
  display: flex;
  border: 2px solid var(--bg-warm);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition);
  background: var(--white);
}
.search-bar:focus-within { border-color: var(--accent); }
.search-category {
  padding: 0 14px;
  border: none;
  border-right: 1px solid var(--bg-warm);
  background: var(--bg-subtle);
  font-size: 0.82rem;
  font-family: var(--font-sans);
  color: var(--dark-mid);
  cursor: pointer;
  white-space: nowrap;
  outline: none;
  min-width: 130px;
}
.search-input {
  flex: 1;
  border: none;
  padding: 11px 14px;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  color: var(--dark);
  background: transparent;
  outline: none;
}
.search-input::placeholder { color: var(--light); }
.search-btn {
  padding: 0 18px;
  background: var(--dark);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background var(--transition);
}
.search-btn:hover { background: var(--gold-dark); }

.header-actions { display: flex; align-items: center; gap: 4px; }
.header-action-btn {
  position: relative;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--dark-mid);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.header-action-btn:hover { background: var(--bg-subtle); color: var(--dark); }
.header-action-btn svg { width: 22px; height: 22px; }
.header-action-btn .count {
  position: absolute;
  top: 4px; right: 4px;
  width: 17px; height: 17px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 0.62rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ── Mega Menu ── */
.nav-bar {
  background: var(--white);
  border-top: 1px solid oklch(93% 0.01 65);
  border-bottom: 1px solid oklch(93% 0.01 65);
}
.nav-inner { display: flex; align-items: center; max-width: var(--max-w); margin: 0 auto; padding: 0 24px; position: relative; }
/* position:static so the absolutely-positioned .mega-menu resolves against .nav-inner. */
.nav-item { position: static; }
.nav-link {
  display: flex; align-items: center; gap: 5px;
  padding: 14px 16px 11px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--dark-mid);
  letter-spacing: 0.01em;
  border-bottom: 3px solid transparent;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  white-space: nowrap;
}
/* Highlight the item whose menu is actually open (hover on desktop, .touch-open on
   tablet — see _Header.cshtml's tap-to-open script) — previously just a text-color
   shift, easy to miss against five other items sitting right next to it. The
   underline continues the mega-menu panel's own accent top border, so the open item
   visually "connects" to the panel hanging below it. */
.nav-link:hover, .nav-item:hover > .nav-link, .nav-item.touch-open > .nav-link {
  color: var(--dark);
  background: var(--bg-subtle);
  border-bottom-color: var(--accent);
}

/* Mobile slide-out menu (MobileCategoryMenu/Default.cshtml) — separate <details>/
   <summary> markup from the desktop nav-bar above, so it needs its own equivalent
   highlight for the same reason: an expanded department/heading previously looked
   identical to a collapsed one apart from the list appearing underneath it. */
.mobmenu-summary {
  color: var(--dark-mid);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color var(--transition), background var(--transition);
}
details[open] > .mobmenu-summary {
  color: var(--dark);
  background: var(--bg-subtle);
}
.mobmenu-chevron {
  color: var(--light);
  transition: color var(--transition), transform var(--transition);
}
details[open] > .mobmenu-summary .mobmenu-chevron {
  color: var(--accent);
  transform: rotate(180deg);
}
.nav-link svg { transition: transform var(--transition); }
.nav-item:hover > .nav-link svg { transform: rotate(180deg); }
.nav-link.sale-link { color: var(--red); font-weight: 700; }

.quick-bar {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--bg-warm);
  position: sticky;
  top: var(--header-h, 108px);
  z-index: var(--z-quick-bar);
}
.quick-bar-inner {
  display: flex;
  align-items: center;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 calc(var(--gutter) / 2);
  position: relative;
}
.qb-track-outer {
  overflow: hidden;
  flex: 1;
  mask-image: linear-gradient(to right, transparent 0%, black 32px, black calc(100% - 32px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 32px, black calc(100% - 32px), transparent 100%);
}
.qb-track {
  display: flex;
  gap: 4px;
  padding: 8px calc(var(--gutter) / 2);
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.qb-track::-webkit-scrollbar { display: none; }
.qb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 40px;
  border: 1.5px solid var(--bg-warm);
  background: var(--white);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--dark-mid);
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.18s;
  cursor: pointer;
}
.qb-chip:hover {
  border-color: var(--gold);
  background: var(--white);
  color: var(--dark);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px oklch(18% 0.01 60 / 0.10);
}
.qb-scroll-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--bg-warm);
  background: var(--white);
  color: var(--dark-mid);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s;
  z-index: 2;
}
.qb-scroll-btn:hover { background: var(--dark); color: #fff; border-color: var(--dark); }
@media (max-width: 480px) { .qb-scroll-btn { display: none; } }

/* Edge fades are applied only on the side that still has content to scroll to, so the
   fade is a genuine "there's more this way" cue instead of permanent decoration. */
.qb-track-outer { mask-image: none; -webkit-mask-image: none; }
.qb-track-outer.can-right {
  mask-image: linear-gradient(to right, black calc(100% - 44px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 44px), transparent 100%);
}
.qb-track-outer.can-left {
  mask-image: linear-gradient(to right, transparent 0%, black 44px);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 44px);
}
.qb-track-outer.can-left.can-right {
  mask-image: linear-gradient(to right, transparent 0%, black 44px, black calc(100% - 44px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 44px, black calc(100% - 44px), transparent 100%);
}

/* Mobile "more" chevron, pinned to the right edge of the strip. */
.qb-more { display: none; }
@media (max-width: 480px) {
  .quick-bar-inner { position: relative; }
  .qb-more {
    display: flex; align-items: center; justify-content: center;
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--white); border: 1.5px solid var(--bg-warm);
    color: var(--dark-mid); cursor: pointer; padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    animation: qb-nudge 1.8s ease-in-out 3;
  }
  .qb-more[hidden] { display: none; }
  .qb-more svg { width: 15px; height: 15px; }
  @keyframes qb-nudge {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50%      { transform: translateY(-50%) translateX(3px); }
  }
  @media (prefers-reduced-motion: reduce) { .qb-more { animation: none; } }
}

/* Anchored to the nav CONTAINER (.nav-inner), not the individual .nav-item. Anchored to
   the item with min-width:600px, menus under right-hand items extended past the viewport
   — and since they're hidden with visibility (not display) they still counted towards
   document width, giving every page a horizontal scrollbar at tablet widths even though
   nothing was visible. Spanning the nav width also reads better than a floating panel. */
.mega-menu {
  position: absolute;
  top: 100%; left: 0; right: 0;
  min-width: 0;
  background: var(--white);
  border: 1px solid oklch(93% 0.01 65);
  border-top: 3px solid var(--accent);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  display: grid;
  /* auto-fit (not auto-fill): auto-fill reserves a track for however many 170px
     columns COULD fit, even past the number of real .mega-col children — e.g. 6
     columns in a 1320px menu leaves room for a phantom 7th track, so the 6 real
     columns each got squeezed to ~171px instead of their fair ~200px share, which
     is what forced long headings like "Waterproof & Performance" to wrap. auto-fit
     collapses unused tracks so existing columns take the full width instead. */
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px 18px;
  /* A curated column can run to 15-20 items — without a cap the panel just grows past
     the viewport and forces the whole page (not the menu) to scroll to see the bottom,
     which also risks the mouse leaving .nav-item and closing the menu mid-scroll. The real
     cap is set inline by _Header.cshtml's sizeMenu(), computed from the menu's actual
     on-screen position each time it opens; this is just the pre-JS/no-JS fallback. Column
     padding below is kept tight specifically so the longest real column (~19 items) fits
     inside that computed height on ordinary desktop/laptop screens without ever needing
     this scrollbar. */
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
  z-index: var(--z-mega-menu);
}
.nav-item:hover .mega-menu,
.nav-item.touch-open .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-item.touch-open > .nav-link { color: var(--dark); }
.nav-item.touch-open > .nav-link svg { transform: rotate(180deg); }
.mega-col h4 {
  margin-bottom: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--bg-warm);
}
/* Qualified as ".mega-col h4 .mega-col-heading-link" (not just ".mega-col-heading-link")
   so this beats ".mega-col a" on specificity — that rule's font-size:0.85rem/display:block
   was otherwise winning over any single-class heading style, which is why the heading text
   kept rendering at body-link size (and wrapping) no matter what .mega-col h4 said; h4 only
   wraps the link, it doesn't itself hold the visible text run. */
.mega-col h4 .mega-col-heading-link {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-dark);
  white-space: nowrap;
  transition: color var(--transition);
  /* .mega-col a (the department item rows) also matches this element — it's still
     an <a> inside .mega-col — so its hover-chip padding/margin/radius would otherwise
     leak in here too and silently widen the heading past what the column-width math
     above accounts for. Reset them back out explicitly. */
  padding: 0;
  margin: 0;
  border-radius: 0;
  line-height: normal;
}
.mega-col h4 .mega-col-heading-link:hover { color: var(--accent); }
.mega-col a {
  display: block;
  font-size: 0.85rem;
  color: var(--dark-mid);
  padding: 7px 8px;
  margin: 0 -8px;
  border-radius: var(--radius-sm);
  line-height: 1.4;
  transition: color var(--transition), background var(--transition);
}
.mega-col a:hover { color: var(--dark); background: var(--bg-subtle); }
.mega-col a.mega-link--hot {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--accent);
}
.mega-col a.mega-link--hot .badge { padding: 1px 7px; font-size: 0.62rem; }

.sale-menu {
  min-width: 200px;
  grid-template-columns: 1fr;
}
.sale-menu a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.sale-menu a:hover { background: var(--bg-subtle); padding-left: 16px; }

/* ── Footer ── */
.site-footer {
  background: var(--dark);
  color: var(--white);
  padding: 40px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid oklch(30% 0.01 60);
}
.footer-brand { max-width: 280px; }
.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.footer-logo-icon {
  width: 32px; height: 32px;
  background: var(--gold);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
}
.footer-desc { font-size: 0.85rem; color: oklch(70% 0.008 60); line-height: 1.7; margin-bottom: 20px; }
.footer-contact { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.footer-contact li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.85rem; color: oklch(70% 0.008 60); line-height: 1.5; }
.footer-contact svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; color: var(--gold-light); }
.footer-contact a { color: inherit; transition: color var(--transition); }
.footer-contact a:hover { color: var(--white); }
.footer-social { display: flex; gap: 10px; }
.footer-social-link {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid oklch(35% 0.01 60);
  display: flex; align-items: center; justify-content: center;
  color: oklch(70% 0.008 60);
  font-size: 0.85rem;
  transition: all var(--transition);
}
.footer-social-link:hover { background: var(--gold); border-color: var(--accent); color: #fff; }
.footer-col h5 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 16px;
}
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: 0.85rem; color: oklch(68% 0.008 60); transition: color var(--transition); }
.footer-links a:hover { color: var(--white); }

/* The mobile bottom tab bar deliberately sits ABOVE the cart/wishlist drawers in the
   z-index scale (so it stays reachable while a drawer is open), which means the tab
   bar's ~64px strip visually covers — and physically intercepts taps on — whatever the
   drawer renders directly behind it. Pad the drawer footer so its buttons clear that
   strip instead of hiding underneath it. */
@media (max-width: 768px) {
  .drawer-footer { padding-bottom: calc(20px + 64px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* Mobile: collapse each footer column into an accordion. Fully stacked, 4 sections of
   5 links each made the footer enormous to scroll past. Headings stay visible so the
   structure is still scannable; tapping one reveals its links. */
@media (max-width: 768px) {
  /* Collapsed rows shouldn't inherit the 40px desktop row gap — it left large empty
     bands between the accordion headings. Column gap stays, though (gap: 0 0 zeroed
     both): at the 481-768px width this grid is 2 columns wide, and with no horizontal
     gap a column's own right-aligned chevron sits flush against the next column's text,
     reading as if it belonged to that column instead of its own. */
  .site-footer { padding-top: 32px; }
  .footer-grid { row-gap: 0; column-gap: 24px; padding-bottom: 28px; }
  .footer-brand { margin-bottom: 20px; }
  .footer-col h5 {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 0; padding: 14px 0; cursor: pointer;
    border-bottom: 1px solid oklch(100% 0 0 / 0.08);
  }
  .footer-col h5::after {
    content: ''; width: 7px; height: 7px; margin-right: 3px;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg); transition: transform 0.25s ease;
  }
  .footer-col.open h5::after { transform: rotate(-135deg); }
  .footer-col .footer-links { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
  .footer-col.open .footer-links { max-height: 420px; padding: 12px 0 4px; }
  @media (prefers-reduced-motion: reduce) {
    .footer-col .footer-links { transition: none; }
    .footer-col h5::after { transition: none; }
  }
}
/* A separate white strip below the dark link columns — matches how the payment icons
   and legal line read clearer on a light background than sitting dim-on-dark. */
.footer-bottom { background: var(--white); }
.footer-bottom-inner {
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--mid);
  gap: 16px;
  flex-wrap: wrap;
}
.footer-payment { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.payment-icon {
  background: var(--white);
  border: 1px solid var(--bg-warm);
  border-radius: 4px;
  padding: 4px 9px;
  font-size: 0.68rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 1.4;
}
/* Brand-ish colours so the row reads at a glance instead of as identical grey pills. */
.payment-icon--visa    { color: oklch(38% 0.16 265); }
.payment-icon--mc      { color: oklch(55% 0.19 40); }
.payment-icon--amex    { color: oklch(45% 0.13 235); }
.payment-icon--paypal  { color: oklch(35% 0.15 260); }
.payment-icon--stripe  { color: oklch(48% 0.20 300); }

.footer-back-top {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-sans); font-size: 0.78rem; font-weight: 600;
  color: var(--mid); padding: 6px 0;
  transition: color var(--transition);
}
.footer-back-top:hover { color: var(--dark); }
.footer-back-top svg { width: 15px; height: 15px; }

/* ── Product grid ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 1100px) { .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
/* Keep two products per row even on the narrowest phones — a single giant card per row
   makes browsing a long catalogue painfully slow to scan. */
@media (max-width: 400px)  { .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* ── Breadcrumbs on small screens ──────────────────────────────────────────────
   Long category/product names wrapped onto several lines and left the "/" separators
   stranded mid-line. Two changes: keep the trail on ONE line (scrolls horizontally if
   it overflows), and drop the final crumb — it's the page you're already on, it isn't
   a link, it duplicates the <h1> directly below it, and it's always the longest text.
   Hiding it also removes its preceding separator, hence nth-last-child(-n+2). */
@media (max-width: 768px) {
  .breadcrumb {
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .breadcrumb::-webkit-scrollbar { display: none; }
  .breadcrumb > * { flex: 0 0 auto; }
  .breadcrumb > :nth-last-child(-n + 2) { display: none; }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .header-inner { grid-template-columns: 160px 1fr auto; gap: 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; max-width: 100%; }
  /* 4 link columns (Categories, Customer Service, Company, Legal) don't divide evenly
     into 3 tracks — Legal would otherwise land alone at the start of an otherwise-empty
     last row. Span it across the remaining width instead of leaving it stranded. */
  .footer-col:last-child { grid-column: 2 / -1; }
  .mega-menu { min-width: 400px; }
}
@media (max-width: 768px) {
  .section { padding: 48px 0; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  /* On mobile the "View All" reads better as the section's closing action, after the
     product list, than crammed next to the heading — .view-all--bottom (hidden on
     desktop, see below) takes over there instead. */
  .section-header .view-all { display: none; }
  .view-all--bottom { display: flex !important; margin: 24px auto 0; width: fit-content; }
  .top-bar__center { display: none; }
  .header-inner { grid-template-columns: 1fr auto; }
  .search-bar { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  /* 4 columns divide evenly into 2 tracks here, unlike the 1024px breakpoint above — no
     orphan to fix. Media queries cascade rather than reset each other, so without this
     the 1024px rule's explicit placement on :last-child would still apply here too and
     throw off the grid's auto-placement. */
  .footer-col:last-child { grid-column: auto; }
  .nav-bar { display: none; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
  /* 5 payment badges don't fit one line at this width — flex-wrap alone left the
     overflow badge(s) stranded flush-left on their own row. Centering the row (parent's
     text-align doesn't reach into a flex child) makes the wrap read as deliberate. */
  .footer-payment { justify-content: center; }
  .top-bar__inner { flex-wrap: nowrap; font-size: 0.72rem; gap: 8px; }
  .top-bar__inner > div:first-child span { white-space: nowrap; }
  .top-bar__right a:last-child, .top-bar__right .top-bar__sep:last-of-type { display: none; }
  .hero-slide { padding: 24px var(--gutter) !important; }
}
