@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;1,9..144,400&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

/* ── Reset & Root ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body { overflow-x: hidden; }
:root {
  --ink: #0F0E0D;
  --ink-60: #6B6460;
  --ink-30: #C4BCBA;
  --ink-10: #F0EDEC;
  --ink-05: #F8F6F5;
  --accent: #1A3C34;
  --accent-mid: #2D6A5A;
  --accent-light: #E8F2EF;
  --gold: #C5A55A;
  --gold-light: #FBF5E8;
  --danger: #C0392B;
  --danger-light: #FDECEA;
  --success: #1A6B4A;
  --success-light: #E8F7EF;
  --warning: #B7791F;
  --warning-light: #FEF5E7;
  --white: #FFFFFF;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(15,14,13,.08);
  --shadow-md: 0 4px 16px rgba(15,14,13,.10);
  --shadow-lg: 0 12px 40px rgba(15,14,13,.12);
  --max: 1280px;
  --transition: all 0.2s ease;
}
body { font-family: 'DM Sans', sans-serif; color: var(--ink); background: var(--white); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--ink-05); }
::-webkit-scrollbar-thumb { background: var(--ink-30); border-radius: 10px; }

/* ── Typography ───────────────────────────────────────── */
h1,h2,h3,h4,h5 { font-family: 'Fraunces', serif; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem,4vw,3.5rem); }
h2 { font-size: clamp(1.5rem,3vw,2.5rem); }
h3 { font-size: clamp(1.1rem,2vw,1.5rem); }
h4 { font-size: 1.1rem; }
.display-serif { font-family: 'Fraunces', serif; font-weight: 300; font-size: clamp(2.5rem,5vw,5rem); letter-spacing: -0.03em; line-height: 1.05; }
.italic { font-style: italic; }
.text-accent { color: var(--accent-mid); }
.text-gold { color: var(--gold); }
.text-muted { color: var(--ink-60); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.fw-600 { font-weight: 600; }

/* ── Layout ───────────────────────────────────────────── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

/* ── Buttons ──────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: var(--r-md); font-size: 14px; font-weight: 500; border: 1.5px solid transparent; transition: var(--transition); white-space: nowrap; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-full { width: 100%; justify-content: center; }
.btn-primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn-primary:hover { background: #122C26; border-color: #122C26; }
.btn-secondary { background: white; color: var(--ink); border-color: var(--ink-30); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-gold { background: var(--gold); color: white; border-color: var(--gold); }
.btn-gold:hover { background: #B0923F; }
.btn-ghost { background: transparent; color: var(--ink); border-color: transparent; }
.btn-ghost:hover { background: var(--ink-05); }
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-danger:hover { background: #a93226; }
.btn-success { background: var(--success); color: white; border-color: var(--success); }

/* ── Forms ────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-60); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-control { width: 100%; padding: 10px 14px; border: 1.5px solid var(--ink-30); border-radius: var(--r-sm); background: white; font-family: 'DM Sans', sans-serif; font-size: 14.5px; color: var(--ink); transition: var(--transition); outline: none; }
.form-control:focus { border-color: var(--accent-mid); box-shadow: 0 0 0 3px rgba(45,106,90,.1); }
.form-control::placeholder { color: var(--ink-30); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B6460' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1/-1; }
.form-hint { font-size: 12px; color: var(--ink-60); margin-top: 4px; }
.form-error { font-size: 13px; color: var(--danger); margin-top: 4px; }
.form-section-title { font-family: 'Fraunces', serif; font-size: 18px; font-weight: 600; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1.5px solid var(--ink-10); }
.input-prefix { position: relative; }
.input-prefix .prefix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--ink-60); }
.input-prefix .form-control { padding-left: 32px; }
/* Phone prefix (+91) needs more left padding — it's 3 chars wide */
.input-prefix--phone .prefix { font-size: 13.5px; font-weight: 500; letter-spacing: -0.3px; }
.input-prefix--phone .form-control { padding-left: 46px; }

/* ── Alerts / Flash ───────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--r-md); font-size: 14px; display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px; }
.alert-success { background: var(--success-light); color: var(--success); border: 1px solid #b7dfc9; }
.alert-danger, .alert-error { background: var(--danger-light); color: var(--danger); border: 1px solid #f5c6c3; }
.alert-warning { background: var(--warning-light); color: var(--warning); border: 1px solid #f5d99c; }
.alert-info { background: var(--accent-light); color: var(--accent); border: 1px solid #b7d9ce; }

/* ── Cards ────────────────────────────────────────────── */
.card { background: white; border: 1.5px solid var(--ink-10); border-radius: var(--r-lg); }
.card-body { padding: 24px; }
.card-sm .card-body { padding: 16px; }
.card-header { padding: 20px 24px; border-bottom: 1.5px solid var(--ink-10); }
.card-footer { padding: 16px 24px; border-top: 1.5px solid var(--ink-10); background: var(--ink-05); border-radius: 0 0 var(--r-lg) var(--r-lg); }

/* ── Badge / Pill ─────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; letter-spacing: 0.3px; }
.badge-retail { background: var(--ink-10); color: var(--ink-60); }
.badge-reseller { background: var(--accent-light); color: var(--accent); }
.badge-wholesale { background: var(--gold-light); color: var(--gold); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-pending { background: #FFF3CD; color: #856404; }

/* ── Top Bar ──────────────────────────────────────────── */
.top-bar { background: var(--accent); color: rgba(255,255,255,.85); font-size: 12.5px; padding: 8px 0; }
.top-bar-inner { display: flex; justify-content: space-between; align-items: center; }
.top-bar-links { display: flex; gap: 20px; }
.top-bar-links a { color: rgba(255,255,255,.75); transition: color .2s; }
.top-bar-links a:hover { color: white; }
.top-bar-promo { text-align: center; }

/* ── Header ───────────────────────────────────────────── */
header { background: white; border-bottom: 1.5px solid var(--ink-10); position: sticky; top: 0; z-index: 900; box-shadow: var(--shadow-sm); }
.header-inner { height: 68px; display: flex; align-items: center; gap: 24px; }
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-mark { width: 50px; height: 50px; background: var(--accent); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: white; font-size: 19px; flex-shrink: 0; }
.logo-text-wrap .brand-name { font-family: 'Fraunces', serif; font-size: 20px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; line-height: 1; }
.logo-text-wrap .brand-sub { font-size: 10px; color: var(--ink-60); letter-spacing: 1.5px; text-transform: uppercase; }
.header-search { flex: 1; max-width: 420px; position: relative; }
/* Mobile search row — hidden on desktop, shown via media query on mobile */
.mobile-search-row {
  display: none;
  padding: 8px 16px;
  background: white;
  border-bottom: 1px solid var(--ink-10);
  position: relative;
}
.mobile-search-row input {
  width: 100%;
  padding: 9px 16px 9px 40px;
  border: 1.5px solid var(--ink-10);
  border-radius: var(--r-md);
  background: var(--ink-05);
  font-size: 16px;
  font-family: inherit;
  outline: none;
}
.mobile-search-row .search-icon {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-60);
  pointer-events: none;
}
.mobile-search-row .search-results {
  position: absolute;
  top: calc(100% - 8px);
  left: 16px;
  right: 16px;
  background: white;
  border: 1.5px solid var(--ink-10);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  display: none;
  overflow: hidden;
}
.mobile-search-row .search-results.open { display: block; }
.header-search input { width: 100%; padding: 9px 16px 9px 40px; border: 1.5px solid var(--ink-10); border-radius: var(--r-md); background: var(--ink-05); font-size: 14px; font-family: inherit; outline: none; transition: var(--transition); }
.header-search input:focus { border-color: var(--accent-mid); background: white; }
.header-search .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-60); pointer-events: none; }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: white; border: 1.5px solid var(--ink-10); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); z-index: 200; display: none; overflow: hidden; }
.search-results.open { display: block; }
.search-result-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; transition: background .15s; }
.search-result-item:hover { background: var(--ink-05); }
.search-result-item + .search-result-item { border-top: 1px solid var(--ink-10); }
.sri-icon { width: 40px; height: 40px; background: var(--ink-05); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.sri-name { font-size: 13.5px; font-weight: 500; }
.sri-price { font-size: 13px; color: var(--accent-mid); font-weight: 600; margin-left: auto; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header-action-btn { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--r-md); font-size: 13.5px; font-weight: 500; color: var(--ink); border: none; background: none; transition: var(--transition); position: relative; }
.header-action-btn:hover { background: var(--ink-05); }
.cart-count { background: var(--accent); color: white; border-radius: 50%; width: 18px; height: 18px; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.tier-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }

/* ── Main Nav ─────────────────────────────────────────── */
.main-nav { background: white; border-bottom: 1.5px solid var(--ink-10); }
.main-nav-inner { display: flex; align-items: center; gap: 4px; height: 46px; overflow-x: auto; scrollbar-width: none; }
.main-nav-inner::-webkit-scrollbar { display: none; }
.nav-link { display: flex; align-items: center; gap: 6px; padding: 8px 14px; font-size: 13.5px; font-weight: 500; color: var(--ink-60); border-radius: var(--r-sm); white-space: nowrap; transition: var(--transition); }
.nav-link:hover { color: var(--accent); background: var(--accent-light); }
.nav-link.active { color: var(--accent); background: var(--accent-light); }
.nav-link.nav-trade { color: var(--gold); }
.nav-link.nav-trade:hover { background: var(--gold-light); }

/* ── Hero ─────────────────────────────────────────────── */
.hero { background: var(--ink-05); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1fr 480px; gap: 60px; align-items: center; padding: 80px 24px; max-width: var(--max); margin: 0 auto; }
.hero-tag { display: inline-flex; align-items: center; gap: 8px; background: var(--accent-light); color: var(--accent); border-radius: 20px; padding: 5px 14px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 20px; }
.hero-btns { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero-visual { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero-card { background: white; border-radius: var(--r-lg); padding: 20px; border: 1.5px solid var(--ink-10); }
.hero-card:nth-child(2) { margin-top: 20px; }
.hero-card:nth-child(4) { margin-top: 20px; }
.hc-emoji { font-size: 36px; margin-bottom: 10px; }
.hc-name { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.hc-price { font-size: 13px; color: var(--accent-mid); font-weight: 600; }

/* ── Hero grid overlay cards (on top of hero image) ──── */
/* ── Hero overlay grid (on top of hero image) ───────────── */
.hero-overlay-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  /* Width is constrained by the parent column in the hero layout */
}
.hero-overlay-card {
  background: rgba(255,255,255,0.13);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: var(--r-lg);
  padding: 10px;
  text-decoration: none;
  color: white;
  transition: background .2s, transform .15s, opacity .4s;
  display: block;
  /* Uniform square: each card fills its grid cell and stays square via the image */
}
.hero-overlay-card:hover { background: rgba(255,255,255,0.22); transform: translateY(-2px); }
/* Image box — always square, identical for every card */
.hoc-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: calc(var(--r-lg) - 6px);
  overflow: hidden;
  background: rgba(255,255,255,.10);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.hoc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hoc-emoji { font-size: 30px; line-height: 1; }
.hoc-badge { display: inline-block; background: var(--gold); color: #1a1a1a; font-size: 9px; font-weight: 700; padding: 2px 8px; border-radius: 20px; letter-spacing: 0.5px; margin-bottom: 5px; }
.hoc-name { font-size: 11.5px; font-weight: 600; line-height: 1.3; margin-bottom: 3px; color: white; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hoc-price { font-size: 11.5px; font-weight: 700; color: var(--gold); }

/* ── Hero plain grid (no background image) ───────────────── */
.hero-grid-card {
  background: white;
  border: 1.5px solid var(--ink-10);
  border-radius: var(--r-lg);
  padding: 10px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow .2s, transform .15s, opacity .4s;
}
.hero-grid-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.10); transform: translateY(-2px); }
.hgc-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: calc(var(--r-lg) - 6px);
  overflow: hidden;
  background: var(--ink-05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.hgc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hgc-name { font-size: 11.5px; font-weight: 600; line-height: 1.3; margin-bottom: 3px; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hgc-price { font-size: 11.5px; font-weight: 700; color: var(--accent-mid); }

/* ── Trade Banner ─────────────────────────────────────── */
.trade-banner { background: var(--ink); color: white; }
.trade-banner-inner { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; padding: 48px 24px; max-width: var(--max); margin: 0 auto; }
.trade-tiers { display: flex; gap: 24px; margin-top: 20px; }
.trade-tier-item { text-align: center; }
.tier-icon { font-size: 28px; margin-bottom: 6px; }
.tier-name { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: rgba(255,255,255,.6); }

/* ── Stats Strip ──────────────────────────────────────── */
.stats-strip { background: white; border-top: 1.5px solid var(--ink-10); border-bottom: 1.5px solid var(--ink-10); padding: 24px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; }
.stat-item { text-align: center; padding: 0 24px; border-right: 1.5px solid var(--ink-10); }
.stat-item:last-child { border-right: none; }
.stat-num { font-family: 'Fraunces', serif; font-size: 2.2rem; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }
.stat-label { font-size: 12.5px; color: var(--ink-60); margin-top: 2px; }

/* ── Section Header ───────────────────────────────────── */
.section-header { margin-bottom: 40px; }
.section-header .overline { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent-mid); margin-bottom: 8px; }
.section-header-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }

/* ── Category Cards ───────────────────────────────────── */
.cat-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 12px; }

/* ── Category swipeable rail ─────────────────────────── */
.cat-rail-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cat-rail-prev,
.cat-rail-next {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-10);
  background: white;
  color: var(--ink-60);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s, color .15s;
}
.cat-rail-prev:hover, .cat-rail-next:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}
.cat-rail-prev:disabled, .cat-rail-next:disabled { opacity: .35; cursor: default; pointer-events: none; }
.cat-rail {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}
.cat-rail::-webkit-scrollbar { display: none; }
.cat-rail:active { cursor: grabbing; }
/* Track: 2-row CSS grid laid out horizontally */
/* Cat rail track — JS adds --1row or --2row and sets grid-template-columns */
.cat-rail-track {
  display: grid;
  gap: 12px;
  padding: 4px 2px 10px;
  width: max-content;     /* track is as wide as all cards combined */
  grid-auto-flow: column;
  grid-template-rows: auto; /* always single row — JS sets columns via inline style */
}
/* Cards */
.cat-card { background: white; border: 1.5px solid var(--ink-10); border-radius: var(--r-lg); padding: 20px 12px; text-align: center; transition: var(--transition); text-decoration: none; }
.cat-card:hover { border-color: var(--accent-mid); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.cat-icon { font-size: 28px; margin-bottom: 10px; width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; overflow: hidden; }
.cat-name { font-size: 13px; font-weight: 600; color: var(--ink); }
/* OOS back-in-stock notice on product card */
/* OOS overlay — covers the product image */
.product-oos-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,14,13,.52);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 14px;
  z-index: 3;
  pointer-events: none;   /* let clicks pass through to the <a> */
}
.product-oos-overlay-text {
  background: rgba(255,255,255,.92);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 20px;
  text-align: center;
  line-height: 1.3;
  letter-spacing: 0.1px;
}
.cat-count { font-size: 11px; color: var(--ink-60); margin-top: 3px; }

/* ── Product Cards ────────────────────────────────────── */
.product-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.product-card { background: white; border: 1.5px solid var(--ink-10); border-radius: var(--r-lg); overflow: hidden; transition: var(--transition); display: flex; flex-direction: column; }
.product-card:hover { box-shadow: var(--shadow-md); border-color: var(--ink-30); transform: translateY(-2px); }
.product-img { aspect-ratio: 1; background: var(--ink-05); display: flex; align-items: center; justify-content: center; font-size: 64px; position: relative; overflow: hidden; }
.product-badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 4px; z-index: 4; }
.product-badge { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 4px; background: var(--accent); color: white; display: inline-block; }
.product-badge.badge-gold { background: var(--gold); }
.product-badge.badge-sale { background: var(--danger); }
.product-wishlist-btn { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; background: white; border: 1.5px solid var(--ink-10); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; transition: var(--transition); cursor: pointer; }
.product-wishlist-btn:hover { border-color: var(--danger); }
.product-quick-add { display: none; } /* replaced by .product-atc below */
.product-atc { width: 100%; padding: 10px 14px; background: var(--accent); color: white; border: none; border-radius: var(--r-sm); font-size: 13.5px; font-weight: 600; font-family: inherit; cursor: pointer; transition: background .18s; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; line-height: 1.2; min-height: 42px; }
.product-atc:hover { background: #122C26; }
.product-atc:disabled { background: var(--ink-30); cursor: not-allowed; }
.product-info { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.product-cat { font-size: 11px; color: var(--ink-60); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.product-name { font-size: 14px; font-weight: 500; color: var(--ink); line-height: 1.35; margin-bottom: 8px; flex: 1; }
.product-name a { color: inherit; }
.product-name a:hover { color: var(--accent); }
.product-sku { font-size: 11px; color: var(--ink-30); margin-bottom: 10px; }
.product-price-row { display: flex; align-items: center; justify-content: space-between; }
.product-price { font-family: 'Fraunces', serif; font-size: 20px; font-weight: 600; color: var(--ink); }
.product-original-price { font-size: 13px; color: var(--ink-30); text-decoration: line-through; margin-left: 6px; }
.product-stock { font-size: 11px; padding: 2px 8px; border-radius: 20px; }
.stock-ok { background: var(--success-light); color: var(--success); }
.stock-low { background: var(--warning-light); color: var(--warning); }
.stock-out { background: var(--danger-light); color: var(--danger); }

/* Price tier table on product page */
.price-tier-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.price-tier-table th { background: var(--ink-05); padding: 10px 14px; text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--ink-60); }
.price-tier-table td { padding: 12px 14px; border-top: 1px solid var(--ink-10); font-size: 14px; }
.price-tier-table .current-tier td { background: var(--accent-light); color: var(--accent); font-weight: 600; }
.price-tier-locked { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-60); background: var(--ink-05); padding: 10px 14px; border-radius: var(--r-sm); border: 1px dashed var(--ink-30); }

/* ── Shop sidebar ─────────────────────────────────────── */
.shop-layout { display: grid; grid-template-columns: 220px 1fr; gap: 32px; }
.shop-sidebar { position: sticky; top: 80px; height: fit-content; }
.sidebar-section { margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1.5px solid var(--ink-10); }
.sidebar-section:last-child { border-bottom: none; }
.sidebar-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-60); margin-bottom: 14px; }
.filter-opt { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.filter-opt input { accent-color: var(--accent); }
.filter-opt label { font-size: 13.5px; cursor: pointer; transition: color .15s; flex: 1; }
.filter-opt label:hover { color: var(--accent); }
.filter-opt.active label { color: var(--accent); font-weight: 500; }
/* Sidebar subcategory toggle button */
.sidebar-subcat-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  color: var(--ink-60);
  font-size: 11px;
  line-height: 1;
  border-radius: 3px;
  transition: color .15s, background .15s;
  flex-shrink: 0;
}
.sidebar-subcat-toggle:hover { color: var(--accent); background: var(--accent-light); }
/* Subcategory list */
.sidebar-subcat-list { padding-left: 4px; }
.price-range-row { display: flex; gap: 8px; align-items: center; }
.price-range-row input { flex: 1; width: 80px; padding: 8px; border: 1.5px solid var(--ink-30); border-radius: var(--r-sm); font-size: 13px; font-family: inherit; outline: none; }
.price-range-row input:focus { border-color: var(--accent-mid); }
.sidebar-apply { width: 100%; padding: 9px; background: var(--accent); color: white; border: none; border-radius: var(--r-sm); font-size: 13px; font-weight: 600; margin-top: 10px; transition: var(--transition); }
.sidebar-apply:hover { background: #122C26; }

/* ── Breadcrumb ───────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-60); padding: 16px 0; flex-wrap: wrap; }
.breadcrumb a { color: var(--ink-60); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--ink-30); }

/* ── Cart ─────────────────────────────────────────────── */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--ink-60); border-bottom: 1.5px solid var(--ink-10); background: var(--ink-05); }
.cart-table td { padding: 16px 14px; border-bottom: 1px solid var(--ink-10); vertical-align: middle; }
.cart-product { display: flex; align-items: center; gap: 14px; }
.cart-img { width: 64px; height: 64px; background: var(--ink-05); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 32px; flex-shrink: 0; }
.cart-name { font-size: 14px; font-weight: 500; }
.cart-sku { font-size: 12px; color: var(--ink-60); margin-top: 2px; }
.qty-control { display: flex; align-items: center; border: 1.5px solid var(--ink-30); border-radius: var(--r-sm); overflow: hidden; width: fit-content; }
.qty-btn { width: 32px; height: 32px; background: white; border: none; font-size: 16px; color: var(--ink-60); transition: var(--transition); display: flex; align-items: center; justify-content: center; }
.qty-btn:hover { background: var(--ink-05); color: var(--ink); }
.qty-input { width: 40px; height: 32px; border: none; border-left: 1px solid var(--ink-10); border-right: 1px solid var(--ink-10); text-align: center; font-size: 14px; font-weight: 500; font-family: inherit; outline: none; }
.cart-total-col { font-family: 'Fraunces', serif; font-size: 18px; font-weight: 600; }
.order-summary-card { background: var(--ink-05); border-radius: var(--r-lg); padding: 24px; border: 1.5px solid var(--ink-10); position: sticky; top: 80px; }
.summary-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--ink-10); font-size: 14px; }

/* ── MOA progress bar ────────────────────────────────── */
.moa-bar-wrap {
  background: var(--ink-05);
  border: 1.5px solid var(--ink-10);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.moa-bar-wrap.moa-near  { border-color: #F5E0A0; background: #FEF9EC; }
.moa-bar-wrap.moa-met   { border-color: #9ED3B8; background: #EDFAF3; }
.moa-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}
.moa-bar-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}
.moa-met .moa-bar-title { color: var(--success); }
.moa-bar-amounts {
  font-size: 12px;
  color: var(--ink-60);
  white-space: nowrap;
}
.moa-bar-sep { margin: 0 3px; }
.moa-track {
  height: 7px;
  background: var(--ink-10);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 8px;
}
.moa-fill {
  height: 100%;
  background: var(--ink-30);
  border-radius: 99px;
  transition: width .4s ease;
}
.moa-near  .moa-fill { background: var(--warning); }
.moa-met   .moa-fill { background: var(--success); }
.moa-bar-msg {
  font-size: 12.5px;
  color: var(--ink-60);
  line-height: 1.5;
}
.moa-met .moa-bar-msg { color: var(--success); }
.summary-row:last-of-type { border-bottom: none; }
.summary-total { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 600; }
.free-ship-bar { background: var(--accent-light); border-radius: var(--r-sm); padding: 8px 12px; font-size: 12.5px; color: var(--accent); margin: 12px 0; }
.tier-info-box { background: var(--gold-light); border: 1px solid #e8d5a3; border-radius: var(--r-sm); padding: 12px; font-size: 12.5px; color: var(--warning); margin-top: 12px; }

/* ── Account Layout ───────────────────────────────────── */
.account-layout { display: grid; grid-template-columns: 220px 1fr; gap: 32px; }
.account-layout main { min-width: 0; }
.account-nav { background: white; border: 1.5px solid var(--ink-10); border-radius: var(--r-lg); overflow: hidden; position: sticky; top: 80px; height: fit-content; }
.acct-nav-toggle { display: none; }  /* hidden on desktop */
.account-nav-item { display: flex; align-items: center; gap: 10px; padding: 13px 20px; font-size: 14px; font-weight: 500; color: var(--ink-60); border-bottom: 1px solid var(--ink-10); transition: var(--transition); }
.account-nav-item:last-child { border-bottom: none; }
.account-nav-item:hover { background: var(--ink-05); color: var(--accent); }
.account-nav-item.active { background: var(--accent-light); color: var(--accent); border-right: 3px solid var(--accent); }
.account-nav-item .nav-icon { font-size: 16px; }
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 1.8rem; }
.page-header p { color: var(--ink-60); margin-top: 6px; }

/* ── Status chips ─────────────────────────────────────── */
.status-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.status-pending { background: #FFF3CD; color: #856404; }
.status-processing { background: var(--accent-light); color: var(--accent); }
.status-shipped { background: #D1ECF1; color: #0C5460; }
.status-delivered { background: var(--success-light); color: var(--success); }
.status-cancelled { background: var(--danger-light); color: var(--danger); }
.status-approved { background: var(--success-light); color: var(--success); }
.status-rejected { background: var(--danger-light); color: var(--danger); }
.status-paid      { background: var(--success-light); color: var(--success); }
.status-refunded  { background: #EDE7F6; color: #6A1B9A; }
.status-failed    { background: var(--danger-light); color: var(--danger); }
.status-on-hold   { background: var(--warning-light); color: var(--warning); }

/* ── Table ────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--ink-60); background: var(--ink-05); border-bottom: 1.5px solid var(--ink-10); white-space: nowrap; }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--ink-10); font-size: 13.5px; vertical-align: middle; }
.table tr:hover td { background: var(--ink-05); }
.table-wrap { border: 1.5px solid var(--ink-10); border-radius: var(--r-lg); overflow: hidden; overflow-x: auto; }

/* ── Admin Layout ─────────────────────────────────────── */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 240px; background: var(--ink); color: white; flex-shrink: 0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-logo { padding: 20px 20px 16px; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-logo .brand { font-family: 'Fraunces', serif; font-size: 18px; font-weight: 600; color: white; }
.admin-logo .sub { font-size: 10px; color: rgba(255,255,255,.4); letter-spacing: 1px; text-transform: uppercase; margin-top: 2px; }
.admin-nav { flex: 1; padding: 16px 0; }
.admin-nav-section { padding: 0 16px; margin-bottom: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(255,255,255,.3); margin-top: 20px; }
.admin-nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 20px; font-size: 13.5px; color: rgba(255,255,255,.7); transition: var(--transition); margin: 1px 8px; border-radius: var(--r-sm); }
.admin-nav-item:hover { background: rgba(255,255,255,.08); color: white; }
.admin-nav-item.active { background: var(--accent-mid); color: white; }
.admin-nav-item .ni-icon { font-size: 16px; }
.admin-badge { background: var(--gold); color: white; border-radius: 10px; padding: 1px 7px; font-size: 11px; font-weight: 700; margin-left: auto; }
.admin-main { flex: 1; background: var(--ink-05); overflow-x: hidden; }
.admin-topbar { background: white; border-bottom: 1.5px solid var(--ink-10); padding: 0 28px; height: 60px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
.admin-menu-btn { display: none; align-items: center; justify-content: center; width: 38px; height: 38px; background: none; border: 1.5px solid var(--ink-10); border-radius: var(--r-sm); cursor: pointer; gap: 0; flex-direction: column; padding: 8px 7px; flex-shrink: 0; }
.admin-menu-btn span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: all .2s; margin: 2px 0; }
.admin-menu-btn:hover { background: var(--ink-05); }
.admin-content { padding: 28px; }
.admin-page-header { margin-bottom: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-page-header h1 { font-family: 'Fraunces', serif; font-size: 1.6rem; }
.stat-card { background: white; border: 1.5px solid var(--ink-10); border-radius: var(--r-lg); padding: 20px 24px; }
.dash-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.stat-card--wide { grid-column: span 2; }
.stat-card-value { font-family: 'Fraunces', serif; font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; }
.stat-card-label { font-size: 12.5px; color: var(--ink-60); margin-top: 4px; }
.stat-card-icon { font-size: 28px; float: right; opacity: 0.5; }
.admin-search-bar { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-search-bar input, .admin-search-bar select { padding: 9px 14px; border: 1.5px solid var(--ink-30); border-radius: var(--r-sm); font-size: 13.5px; font-family: inherit; outline: none; }
.admin-search-bar input:focus, .admin-search-bar select:focus { border-color: var(--accent-mid); }
.admin-search-bar input { flex: 1; min-width: 200px; }

/* ── Pagination ───────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 6px; margin-top: 24px; justify-content: center; }
.page-btn { padding: 7px 12px; border: 1.5px solid var(--ink-10); border-radius: var(--r-sm); font-size: 13px; color: var(--ink-60); background: white; transition: var(--transition); }
.page-btn:hover { border-color: var(--accent-mid); color: var(--accent); }
.page-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
.page-btn.disabled { opacity: 0.4; pointer-events: none; }

/* ── Toast ────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: white; padding: 12px 20px; border-radius: var(--r-md); font-size: 14px; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-lg); transform: translateX(120%); transition: transform .3s ease; min-width: 280px; }
.toast.show { transform: translateX(0); }
.toast.success { border-left: 4px solid #4CAF7D; }
.toast.error { border-left: 4px solid var(--danger); }

/* ── Trust Badges ─────────────────────────────────────── */
.trust-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.trust-item { display: flex; align-items: flex-start; gap: 14px; }
.trust-icon { font-size: 26px; flex-shrink: 0; }
.trust-title { font-weight: 600; font-size: 14px; }
.trust-desc { font-size: 13px; color: var(--ink-60); margin-top: 3px; }

/* ── Footer ───────────────────────────────────────────── */
footer { background: var(--ink); color: rgba(255,255,255,.65); padding: 60px 0 28px; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-brand .brand-name { color: white; }
.footer-brand p { font-size: 14px; line-height: 1.7; margin-top: 14px; max-width: 280px; }
.footer-col h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(255,255,255,.9); margin-bottom: 16px; }
.footer-col a { display: block; font-size: 14px; color: rgba(255,255,255,.55); margin-bottom: 10px; transition: color .2s; }
.footer-col a:hover { color: white; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; font-size: 13px; flex-wrap: wrap; gap: 12px; }
.footer-pay-icons { display: flex; gap: 8px; }
.pay-icon { background: rgba(255,255,255,.1); border-radius: 4px; padding: 3px 10px; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.7); }

/* ── Success Page ─────────────────────────────────────── */
.success-page { text-align: center; padding: 80px 20px; }
.success-icon { font-size: 72px; margin-bottom: 20px; animation: pop .4s cubic-bezier(.175,.885,.32,1.275); }
@keyframes pop { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ── Empty state ──────────────────────────────────────── */
.empty-state { text-align: center; padding: 64px 20px; }
.empty-icon { font-size: 56px; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-family: 'Fraunces', serif; font-size: 1.3rem; margin-bottom: 8px; }
.empty-state p { color: var(--ink-60); margin-bottom: 24px; font-size: 14px; }

/* ── Checkout ─────────────────────────────────────────── */
.checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }
.payment-methods { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.payment-method { border: 1.5px solid var(--ink-30); border-radius: var(--r-md); padding: 14px; cursor: pointer; text-align: center; transition: var(--transition); }
.payment-method:hover { border-color: var(--accent-mid); }
.payment-method.selected { border-color: var(--accent); background: var(--accent-light); }
.payment-icon { font-size: 22px; margin-bottom: 4px; }
.payment-label { font-size: 13px; font-weight: 500; }

/* ── Responsive ───────────────────────────────────────── */
/* ═══════════════════════════════════════════════════════
   RESPONSIVE — mobile-first breakpoints
   ═══════════════════════════════════════════════════════ */

/* ── 1024px — tablet landscape ───────────────────────── */
@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(3,1fr); }
  /* cat-rail-track columns set by JS at runtime */
  .product-grid { grid-template-columns: repeat(3,1fr); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
}

/* ── 768px — tablet portrait / large mobile ──────────── */
@media (max-width: 768px) {
  /* Section padding: tighter on mobile */
  .section   { padding: 48px 0; }
  .section-sm { padding: 28px 0; }
  .section-header { margin-bottom: 24px; }

  /* Top bar: hide side links, keep promo centred */
  .top-bar-links { display: none; }
  .top-bar-promo { width: 100%; text-align: center; font-size: 11.5px; }

  /* Header: show mobile search icon (handled via .mobile-search-btn) */
  .header-search { display: none; }
  .mobile-search-row { display: flex; }

  /* Shop layout */
  .shop-layout { display: block; }  /* sidebar is a fixed drawer on mobile */
  .shop-sidebar { display: none; }  /* hidden by default; mobile drawer JS shows it */
  .product-grid { grid-template-columns: repeat(2,1fr); gap: 12px; }
  .cat-grid { grid-template-columns: repeat(3,1fr); }
  .cat-rail-prev, .cat-rail-next { display: none; }
  /* cat-rail-track columns set by JS at runtime */

  /* Layouts that stack */
  .account-layout { display: block; }  /* stack aside + main vertically */

  /* ── Account nav: collapsible hamburger menu on mobile ── */

  /* aside is full width, normal block */
  aside { display: block; }

  /* Toggle button — shown only on mobile */
  .acct-nav-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: white;
    border: 1.5px solid var(--ink-10);
    border-radius: var(--r-md);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    margin-bottom: 4px;
    justify-content: space-between;
  }
  .acct-nav-toggle:hover { background: var(--ink-05); }
  .acct-nav-toggle-label { display: flex; align-items: center; gap: 8px; }
  .acct-nav-toggle-arrow {
    font-size: 12px;
    color: var(--ink-60);
    transition: transform .2s;
    display: inline-block;
  }
  .acct-nav-toggle[aria-expanded="true"] .acct-nav-toggle-arrow {
    transform: rotate(180deg);
  }

  /* Nav panel — hidden by default, shown when open */
  .account-nav {
    position: static;
    display: none;
    border-radius: var(--r-md);
    overflow: hidden;
    margin-bottom: 20px;
    border: 1.5px solid var(--ink-10);
  }
  .account-nav.acct-nav-open { display: block; }

  /* Nav items: restore normal vertical list style */
  .account-nav-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 13px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-60);
    border-bottom: 1px solid var(--ink-10);
    border-right: none;
    border-top: none;
    white-space: normal;
    min-height: 44px;
    width: 100%;
    letter-spacing: 0;
  }
  .account-nav-item .nav-icon { font-size: 16px; }
  .account-nav-item:hover { background: var(--ink-05); color: var(--accent); }
  .account-nav-item.active {
    background: var(--accent-light);
    color: var(--accent);
    border-right: 3px solid var(--accent);
    border-top: none;
  }
  /* Show all items including sign-out and divider */
  .account-nav .account-nav-divider { display: block; }
  .account-nav .account-nav-signout { display: flex; }
  .account-nav .account-nav-admin  { display: flex; }
  .account-nav-item .badge { display: inline-flex; }

  /* Fix main content width — grid child must not overflow */
  .account-layout main { min-width: 0; max-width: 100%; }

  /* grid-2 used in order-detail and addresses: stack on mobile */
  .grid-2 { grid-template-columns: 1fr !important; gap: 16px !important; }

  /* Order table: card-per-row treatment */
  .table.orders-table thead { display: none; }
  .table.orders-table tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    padding: 14px 0;
    border-bottom: 1.5px solid var(--ink-10);
    position: relative;
  }
  .table.orders-table td { padding: 0; border: none; vertical-align: top; white-space: normal; }
  /* Order # + date: row 1 */
  .table.orders-table td:nth-child(1) { grid-column: 1; font-weight: 600; }
  .table.orders-table td:nth-child(2) { grid-column: 2; text-align: right; font-size: 12px; color: var(--ink-60); }
  /* Tier + payment: row 2, col 1 */
  .table.orders-table td:nth-child(3) { grid-column: 1; }
  .table.orders-table td:nth-child(4) { display: none; }  /* hide payment method */
  /* Total: row 2 col 2 */
  .table.orders-table td:nth-child(5) { grid-column: 2; text-align: right; }
  /* Status: row 3 */
  .table.orders-table td:nth-child(6) { grid-column: 1; }
  /* View button: row 3 col 2 */
  .table.orders-table td:nth-child(7) { grid-column: 2; text-align: right; align-self: end; }

  /* Order items table (order detail): simpler responsive */
  .table.order-items-table thead { display: none; }
  .table.order-items-table tbody tr { display: block; padding: 12px 0; border-bottom: 1.5px solid var(--ink-10); }
  .table.order-items-table td { display: flex; justify-content: space-between; padding: 2px 0; border: none; font-size: 13.5px; }
  .table.order-items-table td:before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ink-60);
  }

  /* Order summary: full width on mobile */
  .order-detail-summary { max-width: 100% !important; }

  /* Profile form: full-width actions */
  .profile-actions { flex-direction: column; }
  .profile-actions .btn { width: 100%; justify-content: center; }

  /* Address cards: full width */
  .address-card-actions { flex-wrap: wrap; gap: 6px; }

  /* Admin hamburger button — visible on mobile */
  .admin-menu-btn { display: flex !important; }
  /* Admin sidebar overlay */
  .admin-sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 150; }
  .admin-sidebar-overlay.open { display: block; }
  /* Admin sidebar: slide in from left */
  .admin-sidebar {
    display: flex !important;
    position: fixed !important;
    top: 0; left: 0;
    height: 100dvh;
    z-index: 200;
    transform: translateX(-105%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-layout { display: flex; }
  .admin-main { width: 100%; }
  .admin-content { padding: 16px; }
  .admin-topbar { padding: 0 16px; }
  .cart-layout { grid-template-columns: 1fr; }
  .checkout-layout { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .payment-methods { grid-template-columns: 1fr; }

  /* Trade banner */
  .trade-banner-inner { grid-template-columns: 1fr; gap: 20px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-brand p { max-width: 100%; }

  /* Trust grid: 2 cols on tablet */
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .trust-item { gap: 12px; }

  /* Stats: 2 cols */
  .stats-grid { grid-template-columns: repeat(2,1fr); }

  /* Admin grid: single column on very small screens */
  .grid-4 { grid-template-columns: 1fr !important; }
  /* Admin grid-span-2 card becomes full width */
  .stat-card--wide { grid-column: span 1 !important; }

  /* Account dashboard stats: single col on very small screens */
  .dash-stats { grid-template-columns: 1fr !important; }

  /* Cart total col: smaller on very small screens */
  .cart-total-col { font-size: 14px; }

  /* Trade CTA banner: tighter on small phone */
  .trade-upgrade-banner {
    padding: 24px 20px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  .trade-upgrade-banner .btn { width: 100%; justify-content: center; white-space: normal; }

  /* Admin */
  .admin-sidebar { display: none; }
  .admin-layout { display: block; }

  /* Product detail: stack image + info */
  .product-detail-grid { grid-template-columns: 1fr !important; gap: 28px !important; }
  .product-gallery-sticky { position: static !important; }

  /* Contact / About inline grids */
  .contact-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
  .about-grid   { grid-template-columns: 1fr !important; gap: 32px !important; }

  /* Card padding: tighter */
  .card-body { padding: 16px; }

  /* Hero slide content padding */
  .hero-slide-content .container { padding-top: 40px !important; padding-bottom: 40px !important; }

  /* Guarantee grid inside product detail */
  .guarantee-grid { grid-template-columns: 1fr !important; }
  /* Trade apply layout */
  .trade-apply-grid { grid-template-columns: 1fr !important; }
  /* About stats grid */
  .about-stats-grid { grid-template-columns: 1fr 1fr !important; }
  /* Account dashboard stats */
  .dash-stats { grid-template-columns: repeat(2,1fr); }

  /* Admin stat grid: 2 cols on tablet */
  .grid-4 { grid-template-columns: repeat(2,1fr) !important; }

  /* Cart: order-summary moves below items — already handled by grid-template-columns:1fr */
  /* Make order-summary card not sticky on mobile (full width, stacks below) */
  .order-summary-card { position: static; }

  /* Cart table: switch to card-per-row layout on mobile */
  .cart-table thead { display: none; }
  .cart-table tbody tr {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    grid-template-rows: auto auto;
    gap: 8px 12px;
    padding: 14px 0;
    border-bottom: 1.5px solid var(--ink-10);
    align-items: center;
  }
  .cart-table td { padding: 0; border: none; }
  /* Product cell: spans full width on second row */
  .cart-table td:nth-child(1) { grid-column: 1 / -1; }
  /* Price: left of qty */
  .cart-table td:nth-child(2) { grid-column: 2; align-self: center; }
  /* Qty: stays in col 2 row 2 */
  .cart-table td:nth-child(3) { grid-column: 2; }
  /* Line total: col 3 row 2 */
  .cart-table td:nth-child(4) { grid-column: 3; align-self: center; font-size: 15px; }
  /* Remove button: col 3 row 1 */
  .cart-table td:nth-child(5) { grid-column: 3; align-self: start; }

  /* Cart product image: slightly larger on mobile */
  .cart-img { width: 72px; height: 72px; }

  /* Qty controls: bigger tap targets */
  .qty-btn { width: 38px; height: 38px; font-size: 18px; }
  .qty-input { height: 38px; width: 44px; font-size: 15px; }

  /* Admin page header: stack on mobile */
  .admin-page-header { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ── 480px — small mobile ────────────────────────────── */
@media (max-width: 480px) {
  /* Container: tighter horizontal padding */
  .container { padding: 0 16px; }

  /* Products: 2-up grid */
  .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

  /* Product card: tighter text */
  .product-info { padding: 10px 12px 12px; }
  .product-name a { font-size: 13px; }
  .product-price { font-size: 14px; }

  /* Add to Cart button: prevent text wrap on narrow 2-col cards */
  .product-atc {
    font-size: 12px;
    padding: 9px 8px;
    gap: 4px;
    min-height: 40px;
    white-space: nowrap;
  }

  /* Price + stock badge: stack vertically so neither gets squeezed */
  .product-price-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .product-price { font-size: 13px; }
  .product-stock { align-self: flex-start; }

  /* Hero buttons */
  .hero-btns { flex-direction: column; }
  .btn-lg { padding: 12px 20px; width: 100%; justify-content: center; }

  /* Section heading size */
  .section-header h2 { font-size: 1.5rem; }

  /* Trust: single col */
  .trust-grid { grid-template-columns: 1fr; }

  /* Stats: 2 cols */
  .stats-grid { grid-template-columns: repeat(2,1fr); }

  /* Admin grid: single column on very small screens */
  .grid-4 { grid-template-columns: 1fr !important; }
  /* Admin grid-span-2 card becomes full width */
  .stat-card--wide { grid-column: span 1 !important; }

  /* Account dashboard stats: single col on very small screens */
  .dash-stats { grid-template-columns: 1fr !important; }

  /* Cart total col: smaller on very small screens */
  .cart-total-col { font-size: 14px; }

  /* Trade CTA banner: tighter on small phone */
  .trade-upgrade-banner {
    padding: 24px 20px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  .trade-upgrade-banner .btn { width: 100%; justify-content: center; white-space: normal; }

  /* Footer nav: 2 cols */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }

  /* Subcategory highlights: smaller circles */
  .subcat-hl-circle { width: 52px; height: 52px; }
  .subcat-hl-item   { width: 58px; }
  .subcat-hl-label  { font-size: 10px; }

  /* Category cards: tighter */
  .cat-card { padding: 14px 8px; }
  .cat-icon { width: 42px; height: 42px; font-size: 22px; }

  /* Account nav items: slightly tighter on very small screens */
  .account-nav-item { font-size: 13px; padding: 11px 14px; }
}

/* ── Prevent iOS auto-zoom on focused inputs ─────────── */
/* iOS Safari zooms when input font-size < 16px.          */
@media (max-width: 768px) {
  .form-control,
  .header-search input,
  select.form-control,
  textarea.form-control,
  input[type="text"],
  input[type="email"],
  input[type="number"],
  input[type="password"],
  input[type="tel"] { font-size: 16px !important; }
}

/* ── Touch targets: minimum 44px tap area ────────────── */
.btn        { min-height: 44px; }
.btn-sm     { min-height: 36px; }
.nav-link   { min-height: 44px; padding-top: 10px; padding-bottom: 10px; }
.header-action-btn { min-height: 44px; min-width: 44px; }
.filter-opt { min-height: 36px; }

/* ── Reduced motion ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Animations ───────────────────────────────────────── */
@keyframes fadeUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
.fade-up { animation: fadeUp .5s ease forwards; }
.fade-up-delay-1 { animation-delay: .1s; opacity: 0; }
.fade-up-delay-2 { animation-delay: .2s; opacity: 0; }
.fade-up-delay-3 { animation-delay: .3s; opacity: 0; }

/* ── Account Dropdown ────────────────────────────────── */
.acct-dropdown-wrap { position: relative; }
.acct-dropdown-trigger { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--r-md); font-size: 13.5px; font-weight: 500; color: var(--ink); border: none; background: none; cursor: pointer; font-family: inherit; transition: var(--transition); }
.acct-dropdown-trigger:hover { background: var(--ink-05); }
.acct-dropdown { position: absolute; top: calc(100% + 8px); right: 0; background: white; border: 1.5px solid var(--ink-10); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); min-width: 220px; z-index: 500; display: none; overflow: hidden; }
.acct-dropdown.open { display: block; animation: dropDown .15s ease; }
@keyframes dropDown { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.acct-dropdown-header { padding: 14px 16px; background: var(--ink-05); border-bottom: 1px solid var(--ink-10); }
.acct-dh-name { font-weight: 600; font-size: 14px; color: var(--ink); }
.acct-dh-email { font-size: 12px; color: var(--ink-60); margin-top: 2px; }
.acct-dropdown-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: 13.5px; color: var(--ink); text-decoration: none; transition: background .15s; width: 100%; background: none; border: none; cursor: pointer; font-family: inherit; text-align: left; }
.acct-dropdown-item:hover { background: var(--ink-05); color: var(--accent); }
.acct-dropdown-item svg { flex-shrink: 0; color: var(--ink-60); }
.acct-dropdown-divider { border-top: 1px solid var(--ink-10); margin: 4px 0; }
.acct-signout { color: var(--danger) !important; }
.acct-signout:hover { background: var(--danger-light) !important; }
.cart-action-btn { background: var(--accent); color: white !important; border-radius: var(--r-md); padding: 8px 14px; }
.cart-action-btn:hover { background: #122C26 !important; }
.cart-action-btn .cart-count { background: white; color: var(--accent); font-weight: 700; }

/* ── Product image in cards ─────────────────────────── */
.product-img img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; z-index: 1; }
.product-img { position: relative; }
.product-img .emoji-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 64px; z-index: 1; }

/* ── Admin image upload ──────────────────────────────── */
.img-upload-zone { border: 2px dashed var(--ink-30); border-radius: var(--r-md); padding: 20px; text-align: center; cursor: pointer; background: var(--ink-05); transition: var(--transition); }
.img-upload-zone:hover { border-color: var(--accent-mid); background: var(--accent-light); }
.img-upload-zone.drag-over { border-color: var(--accent); background: var(--accent-light); }
.img-preview-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.img-preview-item { position: relative; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; border: 1.5px solid var(--ink-10); background: var(--ink-05); }
.img-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.img-preview-item .img-remove { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; background: rgba(0,0,0,.6); color: white; border-radius: 50%; border: none; cursor: pointer; font-size: 13px; display: flex; align-items: center; justify-content: center; }

/* ── Toast bump ─────────────────────────────────────── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: all; min-width: 260px; max-width: 340px; }

/* ── Revoked status ───────────────────────────────────── */
.status-revoked { background: #f3e8ff; color: #6b21a8; }

/* ── WhatsApp floating button ────────────────────────── */
#wa-float {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  touch-action: manipulation;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,.45), 0 2px 6px rgba(0,0,0,.18);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
#wa-float:hover {
  transform: scale(1.10);
  box-shadow: 0 6px 24px rgba(37,211,102,.55), 0 3px 10px rgba(0,0,0,.22);
}
/* Pulse ring animation */
#wa-float::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2.5px solid rgba(37,211,102,.55);
  animation: wa-pulse 2.2s ease-out infinite;
}
@keyframes wa-pulse {
  0%   { transform: scale(1);    opacity: .8; }
  70%  { transform: scale(1.28); opacity: 0;  }
  100% { transform: scale(1.28); opacity: 0;  }
}
/* Keep button clear of page scrollbar and footer on mobile */
@media (max-width: 640px) {
  #wa-float {
    position: fixed !important;
    bottom: 16px !important;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    left: 16px !important;
    width: 50px !important;
    height: 50px !important;
  }
}

/* Hide WhatsApp button when mobile filter drawer is open */
body.sidebar-open #wa-float {
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

/* ── Subcategory Instagram-style highlights ──────────── */
/* ── Subcategory highlights rail ────────────────────── */
.subcat-rail-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
/* Arrow buttons */
.subcat-rail-prev,
.subcat-rail-next {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-10);
  background: white;
  color: var(--ink-60);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s, color .15s;
}
.subcat-rail-prev:hover,
.subcat-rail-next:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}
.subcat-rail-prev:disabled,
.subcat-rail-next:disabled {
  opacity: .35;
  cursor: default;
  pointer-events: none;
}
/* Scrolling container */
.subcat-rail {
  flex: 1;
  min-width: 0;           /* prevent flex child from overflowing parent */
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}
.subcat-rail::-webkit-scrollbar { display: none; }
.subcat-rail:active { cursor: grabbing; }
/* Inner track — must be wider than the viewport so items stay in one row */
.subcat-rail-track {
  display: flex;
  flex-direction: row;    /* explicit: never vertical */
  flex-wrap: nowrap;      /* never wrap to a second row */
  width: max-content;     /* track is as wide as all items combined */
  gap: 20px;
  padding: 4px 2px 10px;
}
/* Individual item */
.subcat-hl-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
  width: 72px;
  user-select: none;
}
.subcat-hl-item:hover .subcat-hl-circle { transform: scale(1.07); border-color: var(--accent); }
.subcat-hl-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2.5px solid var(--ink-10);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink-05);
  transition: transform .2s, border-color .2s;
  flex-shrink: 0;
}
.subcat-hl-circle img { width:100%; height:100%; object-fit:cover; display:block; }
.subcat-hl-emoji { font-size: 26px; line-height: 1; }
.subcat-hl-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  line-height: 1.3;
  word-break: break-word;
}
/* Hide arrows on mobile — touch-scroll handles it */
@media (max-width: 640px) {
  .subcat-rail-prev,
  .subcat-rail-next { display: none; }
}

/* ── Hero carousel ────────────────────────────────────── */
.hero-carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
}
.hero-track {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  transition: transform .55s cubic-bezier(.4,0,.2,1);
  will-change: transform;
  touch-action: pan-y;
}
.hero-slide {
  flex: 0 0 100%;          /* every slide is exactly viewport-wide */
  min-width: 0;
  min-height: 520px;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
}
.hero-slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,rgba(10,20,18,.84) 0%,rgba(10,20,18,.52) 54%,rgba(10,20,18,.20) 100%);
  z-index: 1;
  pointer-events: none;  /* overlay is decorative — must not absorb button clicks */
}
.hero-slide-content {
  position: relative;
  z-index: 2;
  width: 100%;
}
/* Arrow buttons */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  border: 1.5px solid rgba(255,255,255,.30);
  color: white;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.hero-arrow:hover { background: rgba(255,255,255,.32); }
.hero-arrow--prev { left: 16px; }
.hero-arrow--next { right: 16px; }
/* Dot indicators */
.hero-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 8px;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .2s, transform .2s;
}
.hero-dot-active {
  background: white;
  transform: scale(1.25);
}
/* No-image slide */
.hero-slide--plain {
  background: var(--ink-05);
  min-height: 480px;
}
.hero-slide--plain .hero-slide-overlay { display: none; }
@media (max-width: 768px) {
  .hero-slide { min-height: 400px; }
  .hero-arrow { width: 36px; height: 36px; font-size: 16px; }
}

/* ── Admin: category move button ─────────────────────── */
/* ── Admin categories page — mobile responsive ───────── */
.cat-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.cat-col { }

@media (max-width: 768px) {
  /* Stack add-form below the table */
  .cat-grid { grid-template-columns: 1fr; }

  /* Categories table: card-per-row on mobile */
  .cat-table thead { display: none; }
  .cat-table tbody tr.cat-parent-row {
    display: block;
    padding: 12px 0;
    border-bottom: 1.5px solid var(--ink-10);
  }
  .cat-table tbody tr.cat-parent-row td {
    display: block;
    padding: 2px 12px;
    border: none;
    font-size: 13.5px;
  }
  /* Hide slug and subcats count — too much noise on mobile */
  .cat-table td.cat-slug,
  .cat-table td.cat-subcats { display: none !important; }
  /* Products badge: inline after name */
  .cat-table td.cat-products { display: inline-block; padding: 0 12px; }
  /* Actions: full width, wrap buttons */
  .cat-table td.cat-actions > div {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  /* Subcat nested table: also simplified */
  .subcat-group-row table { display: block; overflow-x: auto; }
  /* Edit form: stack fields */
  .cat-edit-form { flex-direction: column !important; }
  .cat-edit-form .form-group { min-width: 0 !important; width: 100% !important; flex: none !important; }
}

.cat-move-btn {
  background: none;
  border: 1px solid var(--ink-10);
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  padding: 2px 5px;
  color: var(--ink-60);
  line-height: 1;
}
.cat-move-btn:hover { background: var(--ink-05); }

/* ── Admin: subcategory toggle button ────────────────── */
.cat-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid var(--ink-10);
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  padding: 2px 8px;
  color: var(--accent);
  font-family: inherit;
  line-height: 1.4;
  white-space: nowrap;
  transition: background .15s;
}
.cat-toggle-btn:hover { background: var(--accent-light); }
.cat-toggle-btn[aria-expanded="true"] { background: var(--accent-light); }
.cat-toggle-icon { font-size: 10px; transition: transform .2s; display: inline-block; }
.cat-toggle-btn[aria-expanded="true"] .cat-toggle-icon { transform: rotate(90deg); }

/* ── Admin: subcat group row ─────────────────────────── */
.subcat-group-row td { background: var(--ink-05); padding: 0; }
.subcat-item-row { border-bottom: 1px solid var(--ink-10); }
.subcat-item-row:last-child { border-bottom: none; }

/* ── Admin: product-form category accordion ──────────── */
.cat-accordion {
  border: 1.5px solid var(--ink-10);
  border-radius: var(--r-md);
  overflow: hidden;
  background: white;
}
.cat-accordion-item {
  border-bottom: 1px solid var(--ink-10);
}
.cat-accordion-item:last-child { border-bottom: none; }

.cat-accordion-summary {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;       /* remove default marker */
  background: var(--ink-05);
  gap: 8px;
  user-select: none;
}
/* Remove default details triangle in all browsers */
.cat-accordion-summary::-webkit-details-marker { display: none; }
.cat-accordion-summary::marker { display: none; }
/* Our own chevron via ::before on the details element */
.cat-accordion-item > summary::before {
  content: '▸';
  font-size: 10px;
  color: var(--ink-60);
  flex-shrink: 0;
  transition: transform .2s;
  display: inline-block;
  width: 14px;
}
.cat-accordion-item[open] > summary::before {
  transform: rotate(90deg);
}
.cat-accordion-parent-label { pointer-events: auto; }

.cat-accordion-body {
  padding: 6px 12px 8px 32px;
  background: white;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cat-sub-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  padding: 3px 0;
}
.cat-sub-arrow {
  color: var(--ink-30);
  font-size: 12px;
  flex-shrink: 0;
}
.filter-opt--sub { padding-left: 16px; opacity: .85; }

/* ── Skip-to-content link (accessibility + mobile) ──── */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--accent);
  color: white;
  padding: 10px 20px;
  border-radius: 0 0 var(--r-md) var(--r-md);
  font-weight: 600;
  font-size: 14px;
  z-index: 9999;
  text-decoration: none;
  transition: top .2s;
}
.skip-to-content:focus { top: 0; }

/* ── Scroll snap for hero on mobile ─────────────────── */
@media (max-width: 768px) {
  .hero-slide-content .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  /* Subcat rail: hide arrows already hidden, but also reduce gap */
  .subcat-rail-wrap { gap: 0; }
  /* Section headers: stack on mobile */
  .section-header-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  /* Stat numbers: smaller on mobile */
  .stat-num { font-size: 1.6rem; }
  /* Hero slide: less min-height */
  .hero-slide { min-height: 380px; }
  /* Trust items: horizontal layout */
  .trust-item { flex-direction: row; align-items: flex-start; gap: 14px; }
  /* Cart action button: more compact label */
  .cart-action-btn .cart-label { display: none; }
  /* Main nav: reduce padding on mobile */
  .nav-link { padding: 8px 10px; font-size: 13px; }
  /* Footer bottom: stack */
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
  /* Header height: compact on small screens */
  .header-inner { height: 58px; }
  /* Logo text: smaller */
  .logo-text-wrap .brand-name { font-size: 17px; }
  .logo-text-wrap .brand-sub  { display: none; }
  /* Hide trade badge in header to save space */
  .tier-badge { display: none; }
  /* Section header: no "View All" button inline */
  .section-header-row { align-items: flex-start; }
  /* Product cards: smaller images fill better */
  .product-img { min-height: auto; }
  /* Stat items: tighter */
  .stat-item { padding: 12px 8px; }
  .stat-num  { font-size: 1.4rem; }
  .stat-label { font-size: 11px; }
}

/* ── Mobile filter drawer ────────────────────────────── */
.mobile-filter-bar {
  display: none;     /* hidden on desktop */
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 14px;
  border-bottom: 1.5px solid var(--ink-10);
  margin-bottom: 16px;
  gap: 12px;
}
.mobile-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: white;
  border: 1.5px solid var(--ink-30);
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: var(--ink);
  transition: var(--transition);
  position: relative;
}
.mobile-filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.mobile-filter-badge {
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Sidebar drawer close row — only shown on mobile */
.sidebar-close-row {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1.5px solid var(--ink-10);
  margin-bottom: 16px;
}
.sidebar-close-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--ink-60);
  padding: 4px 8px;
  border-radius: var(--r-sm);
  line-height: 1;
}
.sidebar-close-btn:hover { background: var(--ink-05); color: var(--ink); }

/* Overlay backdrop */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 901;  /* just above sticky header (900) — dims it when drawer opens */
}
.sidebar-overlay--visible { display: block; }

@media (max-width: 768px) {
  /* Show mobile filter bar */
  .mobile-filter-bar { display: flex; }

  /* Sidebar becomes a slide-in drawer — z-index:1001 above header (900) and overlay (901) */
  .shop-sidebar {
    display: block !important;   /* override the display:none */
    position: fixed !important;
    top: 0;
    left: 0;
    height: 100dvh;
    width: min(320px, 85vw);
    background: white;
    z-index: 1001;
    overflow-y: auto;
    padding: 0 20px 40px;
    transform: translateX(-110%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    box-shadow: 4px 0 24px rgba(0,0,0,.18);
  }
  .shop-sidebar.sidebar--open {
    transform: translateX(0);
  }
  .sidebar-close-row { display: flex; }
  .sidebar-section:first-child { padding-top: 4px; }

  /* shop-layout is already display:block at 768px (set in main responsive block) */
}

/* ── Performance: prevent layout shift on images ────── */
.product-img { contain: layout; }

/* ── Nav fade edge on overflow scroll ────────────────── */
.main-nav {
  position: relative;
}
.main-nav::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 32px;
  background: linear-gradient(to right, transparent, white);
  pointer-events: none;
}

/* ── Smooth scrolling performance ────────────────────── */
.subcat-rail,
.cat-rail,
.main-nav-inner,
.account-nav {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* ── Better tap highlight on mobile ─────────────────── */
a, button { -webkit-tap-highlight-color: rgba(26,60,52,.12); }

/* ── Image lazy loading fade-in ──────────────────────── */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity .3s ease;
}
img[loading="lazy"].loaded { opacity: 1; }

/* ── Capture Station ─────────────────────────────────── */
.capture-wrap { width: 100%; }
/* 2-col default: camera | form */
.capture-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  width: 100%;
}
/* 3-col: camera | form | queue
   Use fr-based so it never overflows the admin-main area */
.capture-layout-3col {
  grid-template-columns: 300px minmax(0, 1fr) 260px;
}
.capture-camera-col { position: sticky; top: 72px; min-width: 0; }
.capture-queue-col  { position: sticky; top: 72px; min-width: 0; height: calc(100vh - 90px); display: flex; flex-direction: column; }
.capture-form-col   { min-width: 0; }
.cq-item { cursor: pointer; transition: background .12s; }
.cq-item:hover  { background: var(--ink-05); }
.cq-item.active { background: var(--accent-light); border-left: 3px solid var(--accent); }
.cq-tab { cursor: pointer; transition: color .12s; }
.cq-tab.active  { border-bottom-color: var(--accent) !important; color: var(--accent); }
@media (max-width: 1100px) {
  .capture-layout-3col { grid-template-columns: 260px minmax(0,1fr) 220px; }
}
@media (max-width: 860px) {
  .capture-layout, .capture-layout-3col { grid-template-columns: 1fr; }
  .capture-camera-col, .capture-queue-col { position: static; height: auto; }
}

