/* ============================================================
   Quantum Core — Redesign system
   Implements the design tokens, primitives and page layouts
   from the "Quantum Core Redesign" handoff. Page-scoped under
   .qc so the existing site styles aren't disturbed.
   ============================================================ */
:root {
  --qc-green:     #02C38A;
  --qc-green-700: #019466;
  --qc-green-50:  #E6F9F2;
  --qc-navy:      #3E4368;
  --qc-ink:       #15171C;
  --qc-ink-2:     #2C2F38;
  --qc-ink-3:     #4A4E5A;
  --qc-mute:      #6E7280;
  --qc-mute-2:    #9AA0AB;
  --qc-line:      #E6E8EE;
  --qc-line-2:    #F1F2F6;
  --qc-bg-soft:   #F7F8FA;
  --qc-amber:     #F4B73A;
  --qc-rose:      #E5536B;

  --qc-r-sm: 6px;
  --qc-r-md: 10px;
  --qc-r-lg: 16px;

  --qc-sh-card: 0 4px 16px rgba(20, 23, 33, 0.06);
  --qc-sh-pop:  0 12px 32px rgba(20, 23, 33, 0.10);

  /* Fluid spacing/typography. All wrapped in clamp() so the value can never
     drop below the mobile floor or exceed the desktop ceiling — vw/vh alone
     would be unreadable on phones and excessive on 4K. */
  --qc-pad-x:     clamp(16px, 2.5vw, 28px);    /* container side gutter */
  --qc-pad-card:  clamp(18px, 2.4vw, 28px);    /* card internal padding */
  --qc-pad-card-lg: clamp(22px, 3vw, 40px);    /* large card padding (confirm, hero) */
  --qc-gap-md:    clamp(16px, 2.4vw, 24px);    /* mid layout gap */
  --qc-gap-lg:    clamp(20px, 3.2vw, 32px);    /* large layout gap */
  --qc-gap-xl:    clamp(24px, 4vw, 48px);      /* PDP-style two-column gap */
  --qc-sec-pad:   clamp(28px, 5vw, 48px);      /* section bottom padding */
  --qc-sec-mt:    clamp(24px, 4vw, 56px);      /* between-section vertical rhythm */
  --qc-fs-h1:     clamp(20px, 2.6vw, 26px);    /* PLP title */
  --qc-fs-h1-lg:  clamp(22px, 3.2vw, 30px);    /* PDP / confirm title */
  --qc-fs-h2:     clamp(17px, 2.1vw, 24px);    /* section title */
  --qc-fs-hero:   clamp(22px, 3.4vw, 32px);    /* big price */
}

/* Account dropdown — extracted from account-auth.css so the profile menu
   collapses correctly on pages that don't load that stylesheet (index, plp,
   pdp, product, compare, etc). Only the menu rules; nothing else. */
.account-menu__root { position: relative; display: inline-flex; }
.account-menu__trigger { background: transparent; border: none; padding: 0; cursor: pointer; }
.account-menu__panel {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 220px; padding: 10px;
  background: #fff; border: 1px solid #dbe4f0; border-radius: 16px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  z-index: 1200;
}
.account-menu__root.is-open .account-menu__panel { opacity: 1; visibility: visible; transform: translateY(0); }
.account-menu__panel::before { content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
.account-menu__root--mobile .account-menu__panel { top: auto; bottom: calc(100% + 10px); right: -12px; }
.account-menu__item {
  display: block; padding: 10px 12px; border-radius: 12px;
  color: #0f172a; font-size: 14px; font-weight: 600; text-decoration: none;
  transition: background .16s ease, color .16s ease;
}
.account-menu__item:hover, .account-menu__item:focus-visible {
  background: #eef4ff; color: #142b55; outline: none;
}

/* QC scope — opt-in container. Doesn't touch global header/footer. */
.qc {
  font-family: 'Inter', 'Poppins', system-ui, sans-serif;
  color: var(--qc-ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}
.qc * { box-sizing: border-box; }
.qc img { max-width: 100%; height: auto; display: block; }

.qc-container { max-width: 1200px; margin: 0 auto; padding: 0 var(--qc-pad-x); }

/* ───── Primitives ───── */
.qc-btn {
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px; font:inherit; font-weight:600; font-size:12px;
  padding:10px 16px; border-radius:var(--qc-r-md);
  border:1px solid transparent; cursor:pointer; transition:.15s;
  text-decoration:none; line-height:1; letter-spacing:.2px; color: var(--qc-ink);
}
.qc-btn.lg { padding:14px 22px; font-size:13px; }
.qc-btn.block { width:100%; }
.qc-btn.primary { background: var(--qc-green); color:#fff; }
.qc-btn.primary:hover { background: var(--qc-green-700); }
.qc-btn.outline { background:#fff; color:var(--qc-ink); border-color: var(--qc-line); }
.qc-btn.outline:hover { border-color: var(--qc-ink); }
.qc-btn.dark { background: var(--qc-ink); color:#fff; }
.qc-btn.dark:hover { background: var(--qc-ink-2); }
.qc-btn.ghost { background: transparent; color: var(--qc-ink); padding:10px; }
.qc-btn.ghost:hover { background: var(--qc-bg-soft); }

.qc-input {
  width:100%; height:42px; border:1px solid var(--qc-line);
  border-radius: var(--qc-r-md); padding:0 14px;
  font:inherit; font-size:13px; background:#fff; color:var(--qc-ink); transition:.15s;
}
.qc-input:focus { outline:none; border-color: var(--qc-green); box-shadow: 0 0 0 3px rgba(2,195,138,.15); }

.qc-badge {
  display:inline-flex; align-items:center; padding:3px 8px;
  font-size:10px; font-weight:700; letter-spacing:.4px; text-transform:uppercase;
  border-radius: var(--qc-r-sm); background: var(--qc-green); color:#fff;
}
.qc-badge.rose { background: var(--qc-rose); }
.qc-badge.dark { background: var(--qc-ink); }
.qc-badge.amber { background: var(--qc-amber); color: var(--qc-ink); }
.qc-badge.soft { background: var(--qc-green-50); color: var(--qc-green-700); }

.qc-chip {
  display:inline-flex; align-items:center; gap:6px;
  font-size:11.5px; font-weight:500; padding:6px 10px;
  border-radius:999px; border:1px solid var(--qc-line);
  background:#fff; color: var(--qc-ink-3); cursor:pointer; white-space:nowrap;
  transition: .15s;
}
.qc-chip:hover { border-color: var(--qc-ink-3); }
.qc-chip.active { border-color: var(--qc-green); background: var(--qc-green-50); color: var(--qc-green-700); }
.qc-chip .x { color: var(--qc-mute); font-weight:700; margin-left:2px; }

.qc-card { background: #fff; border: 1px solid var(--qc-line); border-radius: var(--qc-r-md); }
.qc-stars { color: var(--qc-amber); font-size: 13px; letter-spacing: 1px; line-height: 1; }
.qc-stars-row { display:inline-flex; align-items:center; gap:6px; }
.qc-stars-row .count { font-size: 11.5px; color: var(--qc-mute); }

.qc-placeholder {
  background: repeating-linear-gradient(45deg, #F4F6FA 0 8px, #ECEEF3 8px 16px);
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; color: var(--qc-mute); letter-spacing: 1px;
  text-transform: uppercase; border-radius: var(--qc-r-sm); width: 100%;
}
.qc-divider { height:1px; background: var(--qc-line); border:none; margin:0; }

/* QC slim header (used on checkout/order confirm) — non-destructive */
.qc-slim-header {
  background:#fff; border-bottom:1px solid var(--qc-line); padding: 14px 0;
}
.qc-slim-header .qc-container {
  display:flex; justify-content:space-between; align-items:center;
}
.qc-logo { display:inline-flex; align-items:center; gap:8px; text-decoration:none; }
.qc-logo .mark {
  width:32px; height:32px; border-radius:8px; background: var(--qc-green);
  color:#fff; display:inline-flex; align-items:center; justify-content:center;
  font-weight:800; font-size:13px; letter-spacing: .5px;
}
.qc-logo .text { display:flex; flex-direction:column; gap:2px; line-height:1; }
.qc-logo .text b { font-weight:700; font-size:14px; letter-spacing:1.4px; color: var(--brand-navy, var(--qc-navy)); }
.qc-logo .text small { font-size:9px; letter-spacing:2px; color: var(--qc-green); text-transform:uppercase; font-weight:600; }
.qc-secure {
  font-size:12px; color: var(--qc-mute);
  display:inline-flex; align-items:center; gap:6px;
}

/* QC compact footer (used after redesigned bodies on standalone pages) */
.qc-footer {
  background: var(--qc-ink); color:#fff;
  padding: clamp(24px, 3.6vw, 40px) 0 clamp(16px, 2.2vw, 26px);
  font-size:12px; margin-top: var(--qc-sec-mt);
}
.qc-footer a { color: rgba(255,255,255,.65); text-decoration:none; display:block; padding:4px 0; font-size: 12.5px; }
.qc-footer a:hover { color:#fff; }
.qc-footer .grid { display:grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.qc-footer h6 {
  margin: 0 0 14px; font-size:11px; font-weight:700; letter-spacing:1.5px; text-transform:uppercase;
  position:relative; padding-bottom:8px;
}
.qc-footer h6::after { content:''; position:absolute; left:0; bottom:0; width:32px; height:1px; background: var(--qc-green); }
.qc-footer .legal {
  display:flex; justify-content:space-between; align-items:center;
  margin-top:24px; padding-top:18px; border-top:1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.55); flex-wrap:wrap; gap:12px;
}
.qc-footer p { color: rgba(255,255,255,.6); font-size:12px; line-height:1.6; max-width: 340px; margin: 14px 0 0; }
@media (max-width: 720px) {
  .qc-footer { padding: 26px 0 18px; }
  .qc-footer .grid { grid-template-columns: 1fr; gap: 22px; }
}

/* ───── Breadcrumbs ───── */
.qc-breadcrumb {
  display:flex; flex-wrap:wrap; align-items:center; gap:6px;
  font-size:12px; color: var(--qc-mute); padding: 18px 0 8px;
}
.qc-breadcrumb a { color: var(--qc-mute); text-decoration:none; }
.qc-breadcrumb a:hover { color: var(--qc-ink); }
.qc-breadcrumb .sep { color: var(--qc-line-2); display:inline-flex; }
.qc-breadcrumb .current { color: var(--qc-ink); font-weight:500; }

/* ───── PLP (03) ───── */
.qc-plp { display:flex; gap: var(--qc-gap-md); align-items:flex-start; padding-bottom: var(--qc-sec-pad); }
.qc-plp .filters { width: 260px; flex: none; }
.qc-plp .listing { flex:1; min-width:0; }
.qc-plp .listing-head {
  display:flex; justify-content:space-between; align-items:flex-end; margin-bottom:18px; gap:12px; flex-wrap: wrap;
}
.qc-plp h1 { margin:0; font-size: var(--qc-fs-h1); font-weight:600; letter-spacing:-.3px; }
.qc-plp .count { color: var(--qc-mute); font-size:13px; margin-top:4px; }
.qc-plp .controls { display:flex; gap:8px; align-items:center; }
.qc-plp .sort {
  font-size:12px; padding:10px 14px; border:1px solid var(--qc-line);
  border-radius: var(--qc-r-md); background:#fff; color: var(--qc-ink);
}
.qc-plp .view-toggle {
  display:inline-flex; border:1px solid var(--qc-line); border-radius: var(--qc-r-md); padding:2px;
}
.qc-plp .view-toggle button {
  background: transparent; border:none; padding: 8px 10px; border-radius: 6px; cursor:pointer;
  color: var(--qc-mute); display:inline-flex; align-items:center; justify-content:center;
}
.qc-plp .view-toggle button.active { background: var(--qc-green-50); color: var(--qc-green-700); }
.qc-product-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* List view — one row per product, image left, info right. Triggered by
   the grid/list toggle in the listing header. */
.qc-product-grid.is-list { grid-template-columns: 1fr; gap: 12px; }
.qc-product-grid.is-list .qc-prod { flex-direction: row; align-items: stretch; }
.qc-product-grid.is-list .qc-prod .thumb { width: 180px; flex: none; }
.qc-product-grid.is-list .qc-prod .thumb .qc-placeholder,
.qc-product-grid.is-list .qc-prod .thumb img,
.qc-product-grid.is-list .qc-prod .thumb picture { aspect-ratio: 1/1; height: 100%; object-fit: contain; }
.qc-product-grid.is-list .qc-prod .body { flex: 1; padding: 18px 20px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.qc-product-grid.is-list .qc-prod .name {
  -webkit-line-clamp: 3; min-height: 0; font-size: 14.5px; line-height: 1.5;
}
.qc-product-grid.is-list .qc-prod .price-row { margin-top: 12px; }
.qc-product-grid.is-list .qc-prod .price { font-size: 18px; }
@media (max-width: 720px) {
  .qc-product-grid.is-list .qc-prod .thumb { width: 110px; }
  .qc-product-grid.is-list .qc-prod .body { padding: 12px 14px; }
  .qc-product-grid.is-list .qc-prod .name { font-size: 13px; -webkit-line-clamp: 2; }
}
.qc-pagination {
  display:flex; justify-content:center; align-items:center; gap:6px; margin-top:32px;
}
.qc-pagination button {
  width:36px; height:36px; border:1px solid var(--qc-line);
  background:#fff; color: var(--qc-ink); border-radius: var(--qc-r-sm);
  cursor:pointer; font-weight:600; font-size:12px;
}
.qc-pagination button.active { border-color: var(--qc-green); background: var(--qc-green-50); color: var(--qc-green-700); }
.qc-pagination .nav { padding:8px 12px; width:auto; height:auto; }

/* Filter panel */
.qc-filters {
    border: 1px solid var(--qc-line);
    border-radius: var(--qc-r-md);
    /* Originally 2vh / 8vh — wrapped in clamp() so landscape phones don't
       collapse the padding to ~7px or the top margin to ~30px. Floor keeps
       readability on short viewports, ceiling prevents excess on tall iPads. */
    padding: clamp(14px, 2vh, 22px);
    background: #fff;
    margin-top: clamp(20px, 8.3vh, 78px);
}
.qc-filters .head {
  display:flex; justify-content:space-between; align-items:center; margin-bottom:14px;
}
.qc-filters h3 { margin:0; font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:1px; }
.qc-filters .clear {
  background:none; border:none; color: var(--qc-green-700); font-size:11px;
  font-weight:600; cursor:pointer;
}
.qc-active-chips { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:14px; }
.qc-filter-group { border-top: 1px solid var(--qc-line); padding-top:14px; margin-top:14px; }
.qc-filter-group:first-of-type { border-top:none; padding-top:0; margin-top:0; }
.qc-filter-group summary {
  display:flex; justify-content:space-between; align-items:center;
  cursor:pointer; list-style:none;
  font-size:12px; font-weight:600; color: var(--qc-ink);
}
.qc-filter-group summary::-webkit-details-marker { display:none; }
.qc-filter-group summary::after {
  content:''; width:10px; height:10px; border-right:1.5px solid var(--qc-mute);
  border-bottom:1.5px solid var(--qc-mute); transform: rotate(45deg); margin-right: 4px;
  transition: transform .15s;
}
.qc-filter-group[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.qc-filter-group label {
  display:flex; align-items:center; gap:10px; padding: 5px 0;
  font-size:13px; color: var(--qc-ink-3); cursor:pointer; line-height:1.3;
}
.qc-filter-group label input[type="checkbox"] {
  accent-color: var(--qc-green);
  width: 15px; height: 15px; flex: none; margin: 0;
}
.qc-filter-group label .lbl { flex: 1; min-width: 0; }
.qc-filter-group label .ct { margin-left:auto; color: var(--qc-mute-2); font-size:12px; flex: none; }
.qc-filter-group .opts { margin-top:8px; display:flex; flex-direction:column; gap:2px; }

/* Price range slider — dual-handle, brand-styled */
.qc-filter-group--price .qc-price-range { margin-top: 14px; }
.qc-price-track {
  position: relative;
  height: 28px;
  margin: 4px 9px 18px;
}
.qc-price-track::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 4px; margin-top: -2px;
  background: var(--qc-line); border-radius: 999px;
}
.qc-price-fill {
  position: absolute; top: 50%; height: 4px; margin-top: -2px;
  background: linear-gradient(90deg, var(--qc-green), var(--qc-green-700));
  border-radius: 999px; pointer-events: none;
  transition: left .12s ease, right .12s ease;
}
.qc-price-slider {
  position: absolute; top: 50%; left: 0;
  width: 100%; height: 28px; margin: 0;
  transform: translateY(-50%);
  -webkit-appearance: none; appearance: none;
  background: transparent;
  pointer-events: none;
}
.qc-price-slider:focus { outline: none; }
.qc-price-slider::-webkit-slider-runnable-track { background: transparent; height: 4px; border: none; }
.qc-price-slider::-moz-range-track { background: transparent; height: 4px; border: none; }
.qc-price-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 2px solid var(--qc-green);
  box-shadow: 0 1px 4px rgba(20,23,33,0.18);
  cursor: grab; pointer-events: auto;
  /* Centre an 18px thumb on the 4px track: (4 - 18) / 2 = -7px.
     Without this the thumb sits 7px below the track centre on WebKit. */
  margin-top: -7px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.qc-price-slider::-webkit-slider-thumb:hover {
  border-color: var(--qc-green-700);
  box-shadow: 0 0 0 6px rgba(2,195,138,0.10);
}
.qc-price-slider:focus-visible::-webkit-slider-thumb,
.qc-price-slider::-webkit-slider-thumb:active {
  border-color: var(--qc-green-700);
  box-shadow: 0 0 0 8px rgba(2,195,138,0.18);
  cursor: grabbing;
}
.qc-price-slider::-moz-range-thumb {
  /* Match the WebKit thumb size — Firefox auto-centres on the track so no
     margin offset is needed, only the visual size needs to agree. */
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 2px solid var(--qc-green);
  box-shadow: 0 1px 4px rgba(20,23,33,0.18);
  cursor: grab; pointer-events: auto;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.qc-price-slider::-moz-range-thumb:hover { border-color: var(--qc-green-700); box-shadow: 0 0 0 6px rgba(2,195,138,0.10); }
.qc-price-slider:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 8px rgba(2,195,138,0.18); }

.qc-price-inputs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: end;
}
.qc-price-input { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.qc-price-input__lbl {
  font-size: 10px; font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; color: var(--qc-mute);
}
.qc-price-input__wrap { position: relative; display: block; }
.qc-price-input__cur {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font-size: 10px; font-weight: 700; letter-spacing: .4px;
  color: var(--qc-mute-2); pointer-events: none;
}
.qc-price-input__field {
  width: 100%; height: 36px;
  padding: 0 10px 0 38px;
  border: 1px solid var(--qc-line); border-radius: var(--qc-r-sm);
  font: inherit; font-size: 13px; font-weight: 600;
  color: var(--qc-ink); background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
  -moz-appearance: textfield;
}
.qc-price-input__field::-webkit-outer-spin-button,
.qc-price-input__field::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qc-price-input__field:focus {
  outline: none;
  border-color: var(--qc-green);
  box-shadow: 0 0 0 3px rgba(2,195,138,0.18);
}
.qc-price-input__field:hover:not(:focus) { border-color: var(--qc-mute-2); }
.qc-price-input__sep {
  align-self: end; padding-bottom: 9px;
  color: var(--qc-mute-2); font-weight: 600;
}

/* Product card */
.qc-prod {
  background:#fff; border:1px solid var(--qc-line); border-radius: var(--qc-r-md);
  overflow: hidden; position: relative; transition: .15s; text-decoration:none; color: inherit;
  display:flex; flex-direction:column;
}
.qc-prod:hover { box-shadow: var(--qc-sh-card); border-color: #d6d8df; }
.qc-prod .thumb { position:relative; aspect-ratio: 1/1; overflow: hidden; }
.qc-prod .thumb .qc-placeholder { aspect-ratio: 1/1; }
.qc-prod .thumb picture,
.qc-prod .thumb > picture { display: block !important; width: 100% !important; height: 100% !important; }
.qc-prod .thumb img,
.qc-prod .thumb picture > img,
.qc-product-grid .qc-prod .thumb img { width: 100% !important; height: 100% !important; object-fit: contain !important; }
.qc-prod .badge { position:absolute; top:10px; left:10px; }
.qc-prod .wish {
  position:absolute; top:10px; right:10px;
  background:#fff; border:1px solid var(--qc-line); border-radius: var(--qc-r-sm);
  width:32px; height:32px; display:inline-flex; align-items:center; justify-content:center;
  cursor:pointer; color: var(--qc-mute); transition:.15s;
}
.qc-prod:hover .wish { color: var(--qc-rose); }
.qc-prod .body { padding: 14px 16px 16px; }
.qc-prod .cat {
  font-size: 11px; font-weight:600; color: var(--qc-green-700);
  text-transform: uppercase; letter-spacing:.5px; margin-bottom: 6px;
}
.qc-prod .name {
  /* Product card title — admin-controlled brand navy with the static
     qc-ink token as fallback while branding.js is in flight. */
  font-size: 13px; color: var(--brand-navy, var(--qc-ink)); line-height: 1.45; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 36px;
}
.qc-prod .price-row { display:flex; align-items:baseline; gap:10px; margin-top:10px; }
.qc-prod .price { font-size:15px; font-weight:700; color: var(--brand-navy, var(--qc-ink)); }
.qc-prod .was { font-size:12px; color: var(--qc-mute); text-decoration: line-through; }

/* Mobile bar (filter / sort) */
.qc-plp-mobile-bar {
  display:none;
  background:#fff; border-bottom:1px solid var(--qc-line);
  position: sticky; top: 0; z-index: 5;
}
.qc-plp-mobile-bar button {
  flex:1; background:none; border:none; padding:14px; font:inherit;
  font-size:12px; font-weight:600; color: var(--qc-ink);
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
}
.qc-plp-mobile-bar button + button { border-left:1px solid var(--qc-line); }

@media (max-width: 960px) {
  .qc-product-grid { grid-template-columns: repeat(2, 1fr); }
  .qc-plp .filters { display: none; }
  .qc-plp-mobile-bar { display: flex; }
  .qc-plp h1 { font-size: 20px; }
}
@media (max-width: 720px) {
  .qc-plp { padding-bottom: 40px; }
  .qc-product-grid { gap: 12px; }
  .qc-prod .name { font-size: 12.5px; }
}

/* PLP filter drawer (mobile) */
.qc-drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 90; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.qc-drawer-overlay.open { opacity: 1; pointer-events: auto; }
.qc-drawer {
  position: fixed; top:0; right:0; bottom:0;
  width: min(420px, 92vw); background: #fff; z-index: 91;
  transform: translateX(100%); transition: transform .25s ease;
  display: flex; flex-direction: column;
  box-shadow: var(--qc-sh-pop);
}
.qc-drawer.open { transform: translateX(0); }
.qc-drawer .head {
  padding: 18px 20px; border-bottom: 1px solid var(--qc-line);
  display: flex; justify-content: space-between; align-items: center;
}
.qc-drawer .head h3 { margin:0; font-size:15px; font-weight:600; display:inline-flex; gap:10px; align-items:center; }
.qc-drawer .body { flex:1; overflow-y: auto; padding: 8px 20px; }
.qc-drawer .foot { padding: 14px 20px; border-top: 1px solid var(--qc-line); }
.qc-icon-btn { background:none; border:none; cursor:pointer; color: var(--qc-ink); padding:6px; display:inline-flex; }

/* ───── PDP (04) ───── */
.qc-pdp { display:grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--qc-gap-xl); padding: 16px 0 var(--qc-sec-pad); }
@media (max-width: 960px) {
  .qc-pdp { grid-template-columns: 1fr; gap: 24px; padding-bottom: 88px; }
}
.qc-gallery { display:grid; grid-template-columns: 80px 1fr; gap:14px; }
.qc-gallery .thumbs { display:flex; flex-direction:column; gap:8px; }
.qc-gallery .thumb {
  width:80px; height:80px; padding:0; cursor:pointer;
  border:1px solid var(--qc-line); border-radius: var(--qc-r-sm);
  background:#fff; overflow:hidden;
}
.qc-gallery .thumb.active { border:2px solid var(--qc-green); }
.qc-gallery .thumb > picture,
.qc-gallery .thumb picture { display:block; width:100%; height:100%; }
.qc-gallery .thumb img { width:100%; height:100%; object-fit:contain; }
.qc-gallery .main {
  position:relative; aspect-ratio: 1/1; background:#fff;
  border:1px solid var(--qc-line); border-radius: var(--qc-r-md); overflow:hidden;
}
.qc-gallery .main .qc-placeholder { aspect-ratio: 1/1; }
.qc-gallery .main > picture,
.qc-gallery .main picture { display:block; width:100%; height:100%; }
.qc-gallery .main img,
.qc-gallery .main #qc-gallery-img { width:100% !important; height:100% !important; object-fit:contain !important; }
.qc-gallery .zoom {
  position:absolute; bottom:14px; right:14px; width:40px; height:40px;
  background:#fff; border:1px solid var(--qc-line); border-radius:999px;
  display:inline-flex; align-items:center; justify-content:center; cursor:pointer;
}
@media (max-width: 720px) {
  .qc-gallery { grid-template-columns: 1fr; }
  .qc-gallery .main .qc-placeholder { aspect-ratio: 1/1; }
  .qc-gallery .thumbs {
    flex-direction:row; overflow-x:auto; padding: 12px 0; gap:8px;
  }
  .qc-gallery .thumb { width:60px; height:60px; flex:none; }
}
.qc-pdp .crumb-cat { font-size:11px; font-weight:600; color: var(--qc-green-700); text-transform: uppercase; letter-spacing:1px; margin-bottom:8px; }
.qc-pdp h1 { margin:0; font-size: var(--qc-fs-h1-lg); font-weight:600; line-height:1.2; letter-spacing:-.3px; }
@media (max-width: 720px) { .qc-pdp h1 { font-size: 22px; } }
.qc-pdp .meta { display:flex; align-items:center; gap:14px; margin: 12px 0 18px; }
.qc-pdp .meta .sku { font-size:12px; color: var(--qc-mute); }
.qc-pdp .price-line { display:flex; align-items:baseline; gap:12px; margin-bottom:6px; flex-wrap:wrap; }
.qc-pdp .price-line .price { font-size: var(--qc-fs-hero); font-weight:700; color: var(--qc-ink); }
.qc-pdp .price-line .was { font-size:14px; color: var(--qc-mute); text-decoration:line-through; }
.qc-pdp .vat { font-size:12px; color: var(--qc-mute); margin-bottom:18px; }
@media (max-width: 720px) { .qc-pdp .price-line .price { font-size: 26px; } }

.qc-variant { margin-bottom:18px; }
.qc-variant .label { font-size:12px; font-weight:600; margin-bottom:8px; color: var(--qc-ink); }
.qc-variant .label .val { font-weight:400; color: var(--qc-mute); }
.qc-variant .opts { display:flex; gap:8px; flex-wrap:wrap; }
.qc-variant button {
  font:inherit; padding:10px 16px; border-radius:999px;
  border:1px solid var(--qc-line); background:#fff; color: var(--qc-ink); cursor:pointer; font-size: 12px;
}
.qc-variant button.active { border-color: var(--qc-green); background: var(--qc-green-50); color: var(--qc-green-700); font-weight:600; }

.qc-stock-pill {
  display:inline-flex; align-items:center; gap:8px;
  padding: 10px 14px; background: var(--qc-green-50); color: var(--qc-green-700);
  border-radius: var(--qc-r-sm); font-size:13px; font-weight:500; margin-bottom:18px;
}
.qc-stock-pill .dot { width:8px; height:8px; border-radius:999px; background: var(--qc-green); }

.qc-qty {
  display:inline-flex; border:1px solid var(--qc-line); border-radius: var(--qc-r-md);
}
.qc-qty button {
  width:42px; height:46px; background:none; border:none; cursor:pointer; color: var(--qc-ink-3);
  display:inline-flex; align-items:center; justify-content:center;
}
.qc-qty .val { width:42px; display:inline-flex; align-items:center; justify-content:center; font-weight:600; font-size:14px; }

.qc-cta-row { display:flex; gap:10px; margin-bottom:18px; }
.qc-cta-row .qc-btn.primary { flex:1; height:46px; }
.qc-cta-row .qc-btn.outline { width:46px; height:46px; padding:0; }

.qc-tray { display:grid; grid-template-columns:1fr; border:1px solid var(--qc-line); border-radius: var(--qc-r-md); }
.qc-tray .row { display:flex; gap:12px; padding:14px; align-items:flex-start; border-top:1px solid var(--qc-line); }
.qc-tray .row:first-child { border-top:none; }
.qc-tray .row svg { color: var(--qc-green); flex:none; }
.qc-tray .row b { font-size:13px; font-weight:600; }
.qc-tray .row small { display:block; font-size:12px; color: var(--qc-mute); margin-top:2px; }

.qc-pdp-specs {
  display:grid; grid-template-columns: 1fr 1fr; gap: var(--qc-gap-lg);
  background:#fff; border:1px solid var(--qc-line); border-radius:var(--qc-r-md);
  padding: var(--qc-pad-card-lg);
  margin-bottom: var(--qc-gap-lg);
}
@media (max-width: 720px) {
  .qc-pdp-specs { grid-template-columns: 1fr; padding: 22px; gap: 22px; }
}
.qc-pdp-specs h3 { margin:0 0 14px; font-size:14px; font-weight:600; text-transform:uppercase; letter-spacing:1px; }
.qc-pdp-specs p { color: var(--qc-ink-3); font-size:13.5px; line-height:1.7; margin: 0 0 12px; }
.qc-pdp-specs table { width:100%; font-size:13px; border-collapse: collapse; }
.qc-pdp-specs td { padding: 10px 0; border-bottom: 1px solid var(--qc-line); }
.qc-pdp-specs td:first-child { color: var(--qc-mute); width:40%; }
.qc-pdp-specs td:last-child { color: var(--qc-ink); font-weight:500; }
.qc-pdp-specs-cols { display: grid; grid-template-columns: 1fr; gap: 0 28px; }
.qc-pdp-specs-cols.two-col { grid-template-columns: 1fr 1fr; }
@media (max-width: 720px) {
  .qc-pdp-specs-cols.two-col { grid-template-columns: 1fr; }
}

.qc-reviews-card { padding: var(--qc-pad-card); display:grid; grid-template-columns: 200px 1fr; gap: var(--qc-gap-lg); }
.qc-reviews-card .agg { text-align:center; border-right:1px solid var(--qc-line); padding-right:24px; }
.qc-reviews-card .agg .num { font-size:48px; font-weight:700; }
.qc-reviews-card .agg small { display:block; font-size:12px; color:var(--qc-mute); margin-top:6px; }
.qc-reviews-card .bars { display:flex; flex-direction:column; gap:6px; }
.qc-reviews-card .bar { display:flex; align-items:center; gap:10px; font-size:12px; color:var(--qc-mute); }
.qc-reviews-card .bar .lab { width:18px; }
.qc-reviews-card .bar .track { flex:1; height:6px; background: var(--qc-line); border-radius:3px; overflow:hidden; }
.qc-reviews-card .bar .fill { height:100%; background: var(--qc-amber); }
.qc-reviews-card .bar .ct { width:32px; text-align:right; }
@media (max-width: 720px) {
  .qc-reviews-card { grid-template-columns: 1fr; gap:18px; }
  .qc-reviews-card .agg { border-right:none; border-bottom:1px solid var(--qc-line); padding: 0 0 16px 0; }
}

/* sticky mobile add-to-cart bar */
.qc-sticky-cta {
  display:none; position: fixed; bottom: 0; left:0; right:0; z-index: 50;
  background:#fff; border-top:1px solid var(--qc-line); padding:12px 16px;
  gap:8px; align-items:center; box-shadow: 0 -4px 12px rgba(0,0,0,.06);
}
.qc-sticky-cta .qc-btn.primary { flex:1; height:46px; font-size:13px; }
.qc-sticky-cta .qc-btn.outline { width:46px; height:46px; padding:0; }
@media (max-width: 960px) { .qc-sticky-cta { display:flex; } .qc-pdp .qc-cta-row { display:none; } }

/* ───── Cart drawer (05) ───── */
.qc-cart-page {
  position: relative; min-height: 70vh;
  background: rgba(0,0,0,.42);
}
.qc-cart-drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: 420px; max-width: 100vw;
  background: #fff; border-left: 1px solid var(--qc-line);
  display: flex; flex-direction: column; z-index: 91;
  box-shadow: var(--qc-sh-pop);
  transform: translateX(100%);
  transition: transform .25s ease;
}
.qc-cart-drawer.open { transform: translateX(0); }
@media (max-width: 720px) { .qc-cart-drawer { width: 100%; border-left: none; } }
.qc-cart-drawer .head {
  padding:18px 20px; border-bottom:1px solid var(--qc-line);
  display:flex; justify-content:space-between; align-items:center;
}
.qc-cart-drawer .head h3 { margin:0; font-size:15px; font-weight:600; display:inline-flex; gap:10px; align-items:center; }
.qc-cart-drawer .head h3 .ct { color: var(--qc-mute); font-weight:400; }

.qc-progress {
  padding:12px 20px; background: var(--qc-green-50); font-size:12px; color: var(--qc-green-700);
}
.qc-progress .row { display:flex; justify-content:space-between; margin-bottom:6px; }
.qc-progress .row b { font-weight:600; }
.qc-progress .track { height:4px; background: rgba(2,195,138,.2); border-radius:2px; overflow:hidden; }
.qc-progress .fill { height:100%; background: var(--qc-green); width:100%; }

.qc-cart-list { flex:1; overflow-y:auto; padding: 4px 20px; }
.qc-cart-line {
  display:flex; gap:12px; padding:16px 0; border-bottom:1px solid var(--qc-line);
}
.qc-cart-line .pic { width:72px; height:72px; flex:none; }
.qc-cart-line .pic .qc-placeholder { aspect-ratio:1/1; }
.qc-cart-line .info { flex:1; min-width:0; }
.qc-cart-line .cat { font-size:11px; color: var(--qc-green-700); text-transform:uppercase; letter-spacing:.5px; font-weight:600; }
.qc-cart-line .name { font-size:13px; color: var(--qc-ink); line-height:1.4; margin-top:2px; }
.qc-cart-line .ctrls { display:flex; justify-content:space-between; align-items:center; margin-top:8px; }
.qc-cart-line .qty { display:inline-flex; border:1px solid var(--qc-line); border-radius: var(--qc-r-sm); }
.qc-cart-line .qty button { width:28px; height:28px; background:none; border:none; cursor:pointer; color: var(--qc-ink-3); display:inline-flex; align-items:center; justify-content:center; }
.qc-cart-line .qty .val { width:28px; display:inline-flex; align-items:center; justify-content:center; font-size:12px; font-weight:600; }
.qc-cart-line .total { font-size:13px; font-weight:700; }
.qc-cart-line .rm { background:none; border:none; color: var(--qc-mute); cursor:pointer; padding:4px; align-self:flex-start; }

.qc-cart-foot { border-top:1px solid var(--qc-line); padding:18px 20px; }
.qc-cart-foot .eta {
  display:flex; justify-content:space-between; align-items:center;
  background: var(--qc-bg-soft); border-radius: var(--qc-r-sm);
  padding: 10px 12px; margin-bottom: 12px; font-size: 12px;
}
.qc-cart-foot .eta .lab { color: var(--qc-mute); }
.qc-cart-foot .eta .val { color: var(--qc-ink); font-weight:600; }
.qc-cart-foot .totals { display:flex; flex-direction:column; gap:6px; margin-bottom:14px; font-size:13px; color: var(--qc-ink-3); }
.qc-cart-foot .totals .row { display:flex; justify-content:space-between; }
.qc-cart-foot .totals .row.free { color: var(--qc-green-700); font-weight:600; }
.qc-cart-foot .totals .row.total {
  font-size:16px; font-weight:700; color: var(--qc-ink);
  padding-top:8px; border-top:1px solid var(--qc-line);
}
.qc-cart-foot .secure {
  text-align:center; margin-top:10px; color: var(--qc-mute);
  font-size:11px; display:inline-flex; width:100%; gap:6px; justify-content:center; align-items:center;
}

/* ───── Checkout (06) ───── */
.qc-checkout-page { background: var(--qc-bg-soft); min-height: 100vh; }
.qc-checkout-grid { display:grid; grid-template-columns: 1.6fr 1fr; gap: var(--qc-gap-lg); align-items:flex-start; padding: var(--qc-gap-lg) 0; }
@media (max-width: 960px) { .qc-checkout-grid { grid-template-columns: 1fr; gap:18px; padding: 18px 0 90px; } }

.qc-stepper { display:flex; align-items:center; gap:8px; margin-bottom:24px; }
.qc-stepper .step { display:flex; align-items:center; gap:8px; }
.qc-stepper .step .num {
  width:24px; height:24px; border-radius:999px; border:1px solid var(--qc-line);
  color: var(--qc-mute); font-size:11px; font-weight:700;
  display:inline-flex; align-items:center; justify-content:center; background:#fff;
}
.qc-stepper .step.done .num, .qc-stepper .step.active .num {
  background: var(--qc-green); color:#fff; border-color: var(--qc-green);
}
.qc-stepper .step span { font-size:12px; color: var(--qc-mute); }
.qc-stepper .step.active span { font-weight:600; color: var(--qc-ink); }
.qc-stepper .step.done span { color: var(--qc-ink); }
.qc-stepper .line { flex:1; height:1px; background: var(--qc-line); }
.qc-stepper .line.done { background: var(--qc-green); }
@media (max-width: 720px) {
  .qc-stepper { overflow-x: auto; padding-bottom: 4px; }
  .qc-stepper .step span { display: none; }
  .qc-stepper .step.active span { display: inline; }
  .qc-stepper .line { min-width: 14px; }
}

.qc-card-section { padding: var(--qc-pad-card); margin-bottom:14px; }
.qc-card-section h3 { margin:0 0 14px; font-size:14px; font-weight:600; text-transform:uppercase; letter-spacing:1px; }
.qc-card-section h3.with-action {
  display:flex; justify-content:space-between; align-items:baseline; text-transform:none; letter-spacing:0; font-size:14px;
}
.qc-card-section .hint { font-size:12px; color: var(--qc-mute); }
.qc-card-section .hint a { color: var(--qc-green-700); font-weight:600; text-decoration:none; }

.qc-form-grid { display:grid; grid-template-columns: 1fr 1fr; gap:10px; }
.qc-form-grid > .full { grid-column: 1/-1; }
@media (max-width: 720px) { .qc-form-grid { grid-template-columns: 1fr; } .qc-form-grid > .full { grid-column: auto; } }
.qc-input-icon { position:relative; }
.qc-input-icon .qc-input { padding-right: 40px; }
.qc-input-icon svg { position:absolute; right:14px; top:50%; transform:translateY(-50%); color: var(--qc-mute); pointer-events:none; }
.qc-input-icon.left .qc-input { padding-right: 14px; padding-left: 42px; }
.qc-input-icon.left svg { right:auto; left:14px; }

.qc-checkbox { display:flex; align-items:center; gap:8px; font-size:12px; color: var(--qc-ink-3); }
.qc-checkbox input { accent-color: var(--qc-green); }

.qc-shipping-options label, .qc-payment-tabs label { display:block; }
.qc-shipping-options .opt {
  display:flex; align-items:center; gap:12px; padding:14px;
  border:1px solid var(--qc-line); border-radius: var(--qc-r-md);
  margin-bottom:8px; cursor:pointer;
}
.qc-shipping-options .opt input { accent-color: var(--qc-green); }
.qc-shipping-options .opt.active { border:2px solid var(--qc-green); background: var(--qc-green-50); }
.qc-shipping-options .opt .info { flex:1; }
.qc-shipping-options .opt .info b { font-size:13px; font-weight:600; }
.qc-shipping-options .opt .info small { display:block; font-size:11.5px; color: var(--qc-mute); }
.qc-shipping-options .opt .price { font-size:13px; font-weight:600; }
.qc-shipping-options .opt.active .price.free { color: var(--qc-green-700); }

.qc-payment-tabs { display:grid; grid-template-columns: repeat(4,1fr); gap:8px; margin-bottom:16px; }
@media (max-width: 720px) { .qc-payment-tabs { grid-template-columns: 1fr 1fr; } }
.qc-payment-tabs button {
  padding: 14px 10px; border:1px solid var(--qc-line); background:#fff; border-radius: var(--qc-r-md);
  cursor:pointer; font-size:12px; font-weight:600; color: var(--qc-ink); font:inherit;
}
.qc-payment-tabs button.active { border:2px solid var(--qc-green); background: var(--qc-green-50); color: var(--qc-green-700); }

/* Order summary */
.qc-summary { padding: var(--qc-pad-card); position: sticky; top:24px; }
@media (max-width: 960px) { .qc-summary { position: static; } }
.qc-summary h3 { margin:0 0 14px; font-size:14px; font-weight:600; text-transform:uppercase; letter-spacing:1px; }
.qc-summary .lines { display:flex; flex-direction:column; gap:14px; margin-bottom:16px; }
.qc-summary .line { display:flex; gap:12px; align-items:flex-start; }
.qc-summary .line .pic { width:54px; height:54px; flex:none; position:relative; }
.qc-summary .line .pic .qc-placeholder { aspect-ratio:1/1; }
.qc-summary .line .pic .q {
  position:absolute; top:-6px; right:-6px;
  background: var(--qc-ink); color:#fff; font-size:10px; font-weight:700;
  width:18px; height:18px; border-radius:999px;
  display:inline-flex; align-items:center; justify-content:center;
}
.qc-summary .line .info { flex:1; min-width:0; }
.qc-summary .line .info .nm { font-size:12.5px; line-height:1.4; }
.qc-summary .line .info .ct { font-size:11px; color: var(--qc-mute); margin-top:2px; }
.qc-summary .line .pp { font-size:12.5px; font-weight:600; white-space:nowrap; }
.qc-summary .coupon { display:flex; gap:8px; margin-bottom:14px; }
.qc-summary .totals { display:flex; flex-direction:column; gap:6px; font-size:13px; color: var(--qc-ink-3); padding-bottom:12px; border-bottom: 1px solid var(--qc-line); }
.qc-summary .totals .row { display:flex; justify-content:space-between; }
.qc-summary .totals .row.free { color: var(--qc-green-700); font-weight:600; }
.qc-summary .grand { display:flex; justify-content:space-between; font-size:18px; font-weight:700; padding: 14px 0; }
.qc-summary .secure { display:flex; justify-content:center; align-items:center; gap:6px; font-size:11px; color: var(--qc-mute); margin-top:12px; }

/* Checkout sticky place-order (mobile) */
.qc-checkout-sticky {
  display:none; position: fixed; bottom:0; left:0; right:0; z-index: 50;
  background:#fff; border-top:1px solid var(--qc-line); padding:12px 16px;
}
@media (max-width: 960px) { .qc-checkout-sticky { display:block; } }

/* Checkout collapsible summary (mobile) */
.qc-summary-collapse {
  display:none;
  border:1px solid var(--qc-line); border-radius: var(--qc-r-md);
  padding: 14px; background: #fff; margin-bottom: 14px;
  cursor: pointer; user-select: none;
}
.qc-summary-collapse summary {
  list-style: none; display:flex; justify-content:space-between; align-items:center;
  cursor:pointer; font-size:13px;
}
.qc-summary-collapse summary::-webkit-details-marker { display:none; }
.qc-summary-collapse summary .total { font-size:15px; font-weight:700; }
.qc-summary-collapse[open] summary .chev { transform: rotate(180deg); }
.qc-summary-collapse .body { padding-top: 14px; }
@media (max-width: 960px) { .qc-summary-collapse { display:block; } .qc-checkout-grid > .qc-summary { display: none; } }

/* ───── Empty states (07) ───── */
.qc-empty {
  text-align:center; display:flex; flex-direction:column; align-items:center; gap:14px;
  padding: clamp(36px, 6vw, 64px) var(--qc-pad-x);
}
.qc-empty .ico {
  width:80px; height:80px; border-radius: var(--qc-r-md);
  background: var(--qc-green-50); color: var(--qc-green-700);
  display:inline-flex; align-items:center; justify-content:center;
}
.qc-empty h2 { margin:0; font-size:22px; font-weight:600; }
.qc-empty p { margin:0; color: var(--qc-mute); font-size:13.5px; line-height:1.6; max-width: 380px; }
.qc-empty .actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:center; margin-top: 6px; }

.qc-empty-grid { display:grid; grid-template-columns: repeat(3,1fr); gap:20px; padding: 32px 0; }
@media (max-width: 960px) { .qc-empty-grid { grid-template-columns: 1fr; gap: 14px; } .qc-empty { padding: 36px 16px; } .qc-empty h2 { font-size: 18px; } }

/* ───── Order confirmation (08) ───── */
.qc-confirm-page { background: var(--qc-bg-soft); }
.qc-confirm { max-width: 780px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) var(--qc-pad-x); }
.qc-confirm-card { padding: var(--qc-pad-card-lg); text-align:center; }
.qc-confirm-card .ic {
  width:64px; height:64px; border-radius:999px;
  background: var(--qc-green-50); color: var(--qc-green);
  display:inline-flex; align-items:center; justify-content:center; margin-bottom: 16px;
}
.qc-confirm-card h1 { margin:0; font-size: var(--qc-fs-h1-lg); font-weight:600; letter-spacing:-.3px; }
.qc-confirm-card p { color: var(--qc-ink-3); font-size:14px; line-height:1.6; margin: 10px auto 0; max-width: 520px; }
.qc-confirm-card .meta {
  display:inline-flex; gap:24px; margin-top:24px; padding:14px 24px;
  background: var(--qc-bg-soft); border-radius: var(--qc-r-md); flex-wrap:wrap; justify-content:center;
}
.qc-confirm-card .meta div small { font-size:11px; color: var(--qc-mute); text-transform:uppercase; letter-spacing:1px; }
.qc-confirm-card .meta div b { display:block; font-size:14px; font-weight:600; margin-top:2px; }
.qc-confirm-card .meta div b.code { font-family: 'JetBrains Mono', ui-monospace, monospace; }
@media (max-width: 720px) {
  .qc-confirm { padding: 24px 16px; }
  .qc-confirm-card { padding: 28px 22px; }
  .qc-confirm-card h1 { font-size: 22px; }
}

.qc-tracker { padding: var(--qc-pad-card); margin-top: 14px; }
.qc-tracker h3 { margin:0 0 22px; font-size:14px; font-weight:600; text-transform:uppercase; letter-spacing:1px; }
.qc-tracker.desktop { display:block; }
.qc-tracker.mobile { display:none; }
.qc-tracker .desktop-track { position:relative; padding-top: 4px; }
.qc-tracker .desktop-track .line {
  position:absolute; top: 19px; left: 16px; right: 16px; height: 1.5px; background: var(--qc-line);
}
.qc-tracker .desktop-track .line.done {
  position: absolute; top: 19px; left: 16px; height:1.5px; background: var(--qc-green);
  width: calc((100% - 32px) / 6);
}
.qc-tracker .steps {
  display:grid; grid-template-columns: repeat(4,1fr); position: relative;
}
.qc-tracker .steps .stp { display:flex; flex-direction:column; align-items:center; text-align:center; padding: 0 8px; }
.qc-tracker .steps .dot {
  width:32px; height:32px; border-radius:999px; background:#fff; border:1.5px solid var(--qc-line);
  color: var(--qc-mute); display:inline-flex; align-items:center; justify-content:center;
  font-size:11px; font-weight:600; box-shadow: 0 0 0 4px #fff; position:relative; z-index:1;
}
.qc-tracker .steps .stp.active .dot { background: var(--qc-green); border-color: var(--qc-green); color:#fff; box-shadow: 0 0 0 4px rgba(2,195,138,.12); }
.qc-tracker .steps .stp .lbl { margin-top:12px; font-size:12.5px; font-weight:600; color: var(--qc-ink-3); }
.qc-tracker .steps .stp.active .lbl { color: var(--qc-ink); }
.qc-tracker .steps .stp .sub { font-size:11px; color: var(--qc-mute); margin-top:2px; }
.qc-tracker .actions { display:flex; gap:8px; margin-top:24px; flex-wrap:wrap; }

/* mobile vertical timeline */
.qc-tracker .vsteps { display:flex; flex-direction:column; gap:14px; }
.qc-tracker .vsteps .vstep { display:flex; gap:12px; }
.qc-tracker .vsteps .col { display:flex; flex-direction:column; align-items:center; flex:none; }
.qc-tracker .vsteps .col .dot { width:32px; height:32px; border-radius:999px; background:#fff; border:1px solid var(--qc-line); color: var(--qc-mute); display:inline-flex; align-items:center; justify-content:center; font-size:11px; font-weight:600; }
.qc-tracker .vsteps .vstep.active .col .dot { background: var(--qc-green); border-color: var(--qc-green); color:#fff; }
.qc-tracker .vsteps .col .ln { width:1.5px; flex:1; min-height:18px; background: var(--qc-line); margin-top:4px; }
.qc-tracker .vsteps .info { padding-top:6px; }
.qc-tracker .vsteps .info b { font-size:12.5px; font-weight:600; color: var(--qc-mute); }
.qc-tracker .vsteps .vstep.active .info b { color: var(--qc-ink); }
.qc-tracker .vsteps .info small { display:block; font-size:11px; color: var(--qc-mute); margin-top:1px; }

@media (max-width: 720px) {
  .qc-tracker.desktop { display:none; }
  .qc-tracker.mobile  { display:block; }
}

/* Cross-sell row */
.qc-crosssell { padding-top: var(--qc-gap-lg); }
.qc-crosssell h3 { font-size:16px; font-weight:600; margin: 0 0 14px; }
.qc-crosssell .row { display:grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 960px) { .qc-crosssell .row { grid-template-columns: repeat(2, 1fr); } }

/* Reserve a stable scrollbar gutter on the document so changes that toggle
   vertical overflow (filter/sort re-fetch, opening drawers that lock body
   scroll) don't shift the page horizontally. Falls back gracefully on older
   browsers — no observable change on overlay-scrollbar platforms. */
html { scrollbar-gutter: stable; }

/* PLP — Load more */
.qc-plp-load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 24px 0 8px;
}
.qc-plp-load-more-wrap[hidden] { display: none; }
#qc-plp-load-more {
  min-width: 180px;
  height: 44px;
  padding: 0 28px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--qc-line);
  color: var(--qc-ink);
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
#qc-plp-load-more:hover { background: var(--qc-bg-soft); border-color: var(--qc-mute-2); }
#qc-plp-load-more:disabled { cursor: progress; opacity: 0.7; }
@media (max-width: 720px) {
  #qc-plp-load-more { width: 100%; }
}

/* PLP — mobile sort select (replaces the static "Sort: Popular" button) */
.qc-plp-sort-mobile {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  font: inherit;
  color: inherit;
  padding: 0 22px 0 0;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right center;
}

/* Search typeahead suggestions */
.header-search-container { position: relative; }
.qc-search-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 360px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--qc-line);
  border-radius: 12px;
  box-shadow: var(--qc-sh-pop);
  padding: 6px;
}
.qc-search-suggest[hidden] { display: none; }
.qc-search-suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: background-color .12s;
}
.qc-search-suggest-item:hover,
.qc-search-suggest-item:focus { background: var(--qc-bg-soft); outline: none; }
.qc-search-suggest-item img {
  width: 40px; height: 40px;
  object-fit: contain;
  border-radius: 6px;
  background: var(--qc-bg-soft);
  flex: 0 0 40px;
}
.qc-search-suggest-item .meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.qc-search-suggest-item .name {
  font-size: 13px;
  font-weight: 500;
  color: var(--qc-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qc-search-suggest-item .price {
  font-size: 12px;
  color: var(--qc-mute);
  margin-top: 2px;
}
.qc-search-suggest-empty {
  padding: 14px 12px;
  font-size: 13px;
  color: var(--qc-mute);
  text-align: center;
}

/* ============================================================
   Home v2 — curated layout (tiles + product bands)
   ============================================================ */
.qc-home-section { margin: var(--qc-sec-mt) auto; }
.qc-home-section--categories { margin-top: 24px; }
.qc-home-section--band + .qc-home-section--band { margin-top: 28px; }
.qc-home-section--usp { background: var(--qc-bg-soft); padding: 28px 0; margin: 36px 0; }
.qc-home-section--reviews { margin-top: 36px; }
.qc-home-section--blog { margin-top: 36px; }

.qc-home-section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 16px;
}
.qc-home-section-title {
  margin: 0; font-size: var(--qc-fs-h2); font-weight: 700; letter-spacing: -.4px;
  /* Admin-controlled brand navy (set by branding.js from settings.branding.
     primaryColor); falls back to the static qc-navy token while branding
     loads. */
  color: var(--brand-navy, var(--qc-navy)); line-height: 1.2;
}
.qc-home-section-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 600; color: var(--qc-green-700);
  text-decoration: none; padding: 6px 0; flex: none;
  transition: color .15s;
}
.qc-home-section-link:hover { color: var(--qc-ink); }
.qc-home-section-link svg { transition: transform .15s; }
.qc-home-section-link:hover svg { transform: translateX(3px); }

@media (max-width: 600px) {
  .qc-home-section-title { font-size: 17px; }
  .qc-home-section { margin: 24px auto; }
}

/* Hero banner — edge-to-edge on mobile, contained on desktop */
.qc-home-banner { margin-top: 0; }
@media (max-width: 600px) {
  .qc-home-banner > .container { padding-left: 0; padding-right: 0; max-width: none; }
  .qc-home-banner .slider-container { border-radius: 0; }
  .qc-home-banner .slider-item { border-radius: 0; }
}

/* Shop-by-category tiles
 * Column count is dynamic per breakpoint so a partial last row never leaves
 * empty cells. JS sets --qc-cat-cols-{sm,md,lg} from the category count;
 * CSS picks the right var per breakpoint. The fallback values here apply
 * before JS runs and as a safety net if no categories are returned. */
.qc-cat-tiles {
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 600px)  { .qc-cat-tiles { grid-template-columns: repeat(var(--qc-cat-cols-sm, 3), 1fr); gap: 14px; } }
@media (min-width: 900px)  { .qc-cat-tiles { grid-template-columns: repeat(var(--qc-cat-cols-md, 4), 1fr); gap: 16px; } }
@media (min-width: 1200px) { .qc-cat-tiles { grid-template-columns: repeat(var(--qc-cat-cols-lg, 6), 1fr); } }

.qc-cat-tile {
  display: flex; flex-direction: column; gap: 10px;
  background: #fff;
  border: 1px solid var(--qc-line);
  border-radius: var(--qc-r-lg);
  padding: 12px;
  text-decoration: none; color: var(--brand-navy, var(--qc-ink));
  transition: border-color .15s ease, box-shadow .2s ease, transform .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.qc-cat-tile:hover {
  border-color: var(--qc-green);
  box-shadow: var(--qc-sh-card);
  transform: translateY(-2px);
}
.qc-cat-tile:active { transform: translateY(0); }
.qc-cat-tile__media {
  display: block;
  aspect-ratio: 1/1;
  background: var(--qc-bg-soft);
  border-radius: var(--qc-r-md);
  overflow: hidden;
}
/* responsiveImage() emits <picture><img></picture>. <picture> is inline by
 * default, which would shrink-wrap and prevent the inner <img> from
 * filling — make it a block-level full-size container, then let the <img>
 * cover it. The icon-only fallback path emits a bare <img> (no <picture>)
 * and is handled by the same .qc-cat-tile__img rule below. */
.qc-cat-tile__media > picture { display: block; width: 100%; height: 100%; }
.qc-cat-tile__img {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover; object-position: center;
}
.qc-cat-tile__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qc-cat-tile__name {
  font-size: 13px; font-weight: 600;
  color: var(--brand-navy, var(--qc-ink));
  line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 599px) {
  .qc-cat-tile { padding: 10px; gap: 8px; border-radius: var(--qc-r-md); }
  .qc-cat-tile__name { font-size: 12px; }
}

/* Product band rail (horizontal scroll with snap on mobile/tablet, grid on desktop) */
.qc-band-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 70%;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 0 16px;
}
.qc-band-rail::-webkit-scrollbar { display: none; }
.qc-band-rail > * { scroll-snap-align: start; min-width: 0; }
@media (min-width: 600px) { .qc-band-rail { grid-auto-columns: 38%; gap: 14px; } }
@media (min-width: 900px) { .qc-band-rail { grid-auto-columns: 25%; gap: 16px; } }
@media (min-width: 1200px) {
  .qc-band-rail {
    grid-auto-flow: row;
    grid-template-columns: repeat(5, 1fr);
    grid-auto-columns: auto;
    overflow: visible;
    scroll-snap-type: none;
    padding: 4px 0;
  }
}
@media (max-width: 599px) {
  .qc-home-section--band .qc-band-rail {
    margin: 0 -16px;
    padding: 4px 16px 16px;
  }
}

.qc-band-card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--qc-line);
  border-radius: var(--qc-r-md);
  text-decoration: none; color: var(--brand-navy, var(--qc-ink));
  overflow: hidden;
  transition: border-color .15s, box-shadow .2s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.qc-band-card:hover {
  border-color: var(--qc-green);
  box-shadow: var(--qc-sh-card);
  transform: translateY(-2px);
}
.qc-band-card:active { transform: translateY(0); }
.qc-band-card__media {
  position: relative; display: block;
  aspect-ratio: 1/1; background: var(--qc-bg-soft);
}
.qc-band-card__img {
  width: 100%; height: 100%; object-fit: contain;
  padding: 8%;
}
.qc-band-card__placeholder {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  font-size: 32px; font-weight: 700; color: var(--qc-mute-2);
  background: var(--qc-bg-soft);
}
.qc-band-card__badge {
  position: absolute; top: 8px; left: 8px;
  font-size: 10px; font-weight: 700;
  padding: 4px 8px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .4px;
  background: var(--qc-ink); color: #fff;
}
/* "New" badge follows the admin's brand-navy color set by branding.js. */
.qc-band-card__badge--new { background: var(--brand-navy, var(--qc-navy)); }
.qc-band-card__badge--sale { background: var(--qc-rose); }
.qc-band-card__badge--out { background: var(--qc-ink-3); }
.qc-band-card__body {
  padding: 10px 12px 12px;
  display: flex; flex-direction: column; gap: 4px; flex: 1;
}
.qc-band-card__cat {
  font-size: 10px; color: var(--qc-mute); font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
}
.qc-band-card__title {
  font-size: 13px; font-weight: 600;
  color: var(--brand-navy, var(--qc-ink));
  line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.6em;
}
.qc-band-card__price-row {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin-top: auto; padding-top: 4px;
}
.qc-band-card__price { font-size: 14px; font-weight: 700; color: var(--brand-navy, var(--qc-ink)); }
.qc-band-card__compare { font-size: 12px; color: var(--qc-mute-2); }

/* ============================================================
   PLP chips: subcategories + active filters
   ============================================================ */
.qc-chip-bar {
  display: flex; gap: 8px; flex-wrap: nowrap;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 8px 0;
  margin: 0;
}
.qc-chip-bar::-webkit-scrollbar { display: none; }
.qc-chip-bar[hidden] { display: none; }
.qc-subcat-chips { padding: 4px 0 12px; border-bottom: 1px solid var(--qc-line-2); margin-bottom: 8px; }
.qc-active-chips { margin: 0 0 14px; padding: 0; flex-wrap: wrap; }

.qc-chip {
  display: inline-flex; align-items: center; gap: 6px;
  flex: none; height: 32px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--qc-line);
  background: #fff; color: var(--qc-ink-2);
  font: inherit; font-size: 12px; font-weight: 600; line-height: 1;
  text-decoration: none; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.qc-chip:hover { border-color: var(--qc-ink-3); }
.qc-chip.is-active {
  background: var(--qc-green-50);
  border-color: var(--qc-green);
  color: var(--qc-green-700);
}
.qc-chip--removable {
  background: var(--qc-green-50);
  border-color: var(--qc-green);
  color: var(--qc-green-700);
}
.qc-chip--removable svg { color: var(--qc-green-700); opacity: .65; transition: opacity .15s, color .15s; }
.qc-chip--removable:hover { background: var(--qc-green); border-color: var(--qc-green); color: #fff; }
.qc-chip--removable:hover svg { color: #fff; opacity: 1; }
.qc-chip--clear {
  background: transparent; border-color: transparent;
  color: var(--qc-mute); text-decoration: underline;
  padding: 0 8px;
}
.qc-chip--clear:hover { color: var(--qc-ink); border-color: transparent; background: transparent; }

/* ============================================================
   Mobile bottom tab bar (mobile-app feel)
   ============================================================ */
.qc-bottom-tabs {
  position: fixed; inset: auto 0 0 0;
  display: flex;
  background: #fff;
  border-top: 1px solid var(--qc-line);
  z-index: 60;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -4px 16px rgba(20, 23, 33, .04);
}
.qc-bottom-tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 8px 4px 8px;
  background: transparent; border: 0; cursor: pointer;
  color: var(--qc-mute); text-decoration: none;
  font: inherit; min-height: 58px; position: relative;
  transition: color .15s;
  -webkit-tap-highlight-color: transparent;
}
.qc-bottom-tab svg {
  width: 22px; height: 22px;
  transition: transform .15s, stroke-width .15s;
}
.qc-bottom-tab__lbl {
  font-size: 10px; font-weight: 600; letter-spacing: .2px; line-height: 1.2;
}
.qc-bottom-tab.is-active {
  color: var(--qc-green-700);
}
.qc-bottom-tab.is-active svg {
  stroke-width: 2.2;
  transform: translateY(-1px);
}
.qc-bottom-tab.is-active::before {
  content: ""; position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 36px; height: 3px;
  background: var(--qc-green);
  border-radius: 0 0 3px 3px;
}
.qc-bottom-tab:active:not(.is-active) { color: var(--qc-ink); }
.qc-bottom-tab__badge {
  position: absolute; top: 6px; left: 50%;
  transform: translateX(8px);
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: var(--qc-rose); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
.qc-bottom-tab__badge[hidden] { display: none; }

@media (min-width: 1024px) {
  .qc-bottom-tabs { display: none; }
}
@media (max-width: 1023px) {
  body.has-qc-bottom-tabs { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0)); }
  /* Lift the cart drawer & filter drawer above the bottom tabs they sit on top of */
  .qc-drawer { z-index: 70; }
  .qc-drawer-overlay { z-index: 65; }
}

/* ============================================================
   Mobile-app polish (sticky header, tap targets)
   ============================================================ */
@media (max-width: 1023px) {
  body.has-qc-bottom-tabs > header,
  body[data-qc-page] > header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
  }
}

@media (max-width: 600px) {
  .qc-plp .listing-head h1 { font-size: 18px; }
  .qc-plp .listing-head { gap: 12px; }
  .qc-plp .listing-head .controls .view-toggle { display: none; }
}

/* ============================================================
   Skeleton placeholders for redesign sections
   Empty containers (before JS hydrates them) show a shimmer block
   sized to match the real layout — no jank, no blank gaps. The
   shimmer keyframes are defined in style-prefix.css.
   ============================================================ */
.qc-cat-tiles:empty,
.qc-band-rail:empty,
#home-featured-band:empty,
#best-sellers-section:empty,
#home-category-tiles:empty {
  background: linear-gradient(120deg, #f1f3f6 0%, #fafbfc 50%, #f1f3f6 100%);
  background-size: 200% 100%;
  animation: sf-skeleton-shimmer 1.6s ease-in-out infinite;
  border-radius: var(--qc-r-md);
  min-height: 200px;
}
@media (min-width: 600px) {
  .qc-cat-tiles:empty,
  #home-category-tiles:empty { min-height: 240px; }
  .qc-band-rail:empty,
  #home-featured-band:empty,
  #best-sellers-section:empty { min-height: 360px; }
}
@media (min-width: 1200px) {
  .qc-cat-tiles:empty,
  #home-category-tiles:empty { min-height: 260px; }
  .qc-band-rail:empty,
  #home-featured-band:empty,
  #best-sellers-section:empty { min-height: 420px; }
}

/* Cart drawer body before render — keep the drawer "looking alive". */
.qc-cart-list:empty {
  background: linear-gradient(120deg, #f6f7f9 0%, #fafbfc 50%, #f6f7f9 100%);
  background-size: 200% 100%;
  animation: sf-skeleton-shimmer 1.6s ease-in-out infinite;
  min-height: 180px;
}

@media (prefers-reduced-motion: reduce) {
  .qc-cat-tiles:empty,
  .qc-band-rail:empty,
  #home-featured-band:empty,
  #best-sellers-section:empty,
  #home-category-tiles:empty,
  .qc-cart-list:empty {
    animation: none;
    background: #f4f5f8;
  }
}

/* When branding is pending, the overlay covers everything in white. Make
   sure the header bar (which uses --brand-navy) doesn't peek through as
   the wrong color during the brief moment the overlay fades out. */
html.sf-branding-pending .header-top,
html.sf-branding-pending .header-main {
  /* Override the gradient so we don't paint with the hardcoded default
     hsl(218, 61%, 29%) before branding.js sets the real value. */
  background: #ffffff;
  transition: background 0.2s ease;
}
html.sf-branding-pending .header-top {
  visibility: hidden;
}
