/* ── Variables ───────────────────────────────────────────────────────────── */
:root {
  --header-bg: #0f172a;
  --header-text: #f1f5f9;
  --accent: #f97316;
  --accent-hover: #ea580c;
  --accent-dim: #fff7ed;
  --link: #0284c7;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-focus: #94a3b8;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-sm: 0.8125rem;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 8px;
  --radius-sm: 5px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12);
  --font: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --sidebar-width: 220px;
  /* Storefront theme hooks (defaults = navy theme). Overridden per theme below. */
  --header-muted: #94a3b8;
  --header-strong: #e2e8f0;
  --header-icon: #cbd5e1;
  --header-control-bg: rgba(255,255,255,.07);
  --header-control-bg-hover: rgba(255,255,255,.12);
  --header-control-border: rgba(255,255,255,.12);
  --header-control-border-strong: rgba(255,255,255,.2);
  --header-control-text: #f1f5f9;
  --header-control-placeholder: #475569;
  --hero-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0c2340 100%);
  --hero-title: #ffffff;
  --hero-sub: #94a3b8;
  --hero-outline-text: #e2e8f0;
  --hero-outline-border: #334155;
  --hero-trust: #cbd5e1;
  --dark-card-bg: #0f172a;
  --dark-card-img-bg: #1e293b;
  --dark-card-text: #cbd5e1;
  --dark-card-title: #f8fafc;
  --footer-bg: #0f172a;
  --footer-text: #94a3b8;
  --footer-link: #64748b;
  --footer-pill-bg: #1e293b;
  --chip-bg: #f1f5f9;
  --chip-hover: #e2e8f0;
  --chip-border: #cbd5e1;
}

/* ── Storefront themes (Settings → Storefront → Theme) ──────────────────── */
body[data-theme="workshop"] {
  --header-bg: #211c18; --header-text: #f5efe6;
  --accent: #e8650d; --accent-hover: #c2570c; --accent-dim: #faf0e4;
  --link: #b45309;
  --bg: #faf5ec; --surface: #fffdf8; --border: #e6dccb; --border-focus: #b3a48e;
  --text: #2b251f; --text-muted: #6e6052;
  --header-muted: #a89a8a; --header-strong: #ece4d8; --header-icon: #d8cdbf;
  --hero-bg: linear-gradient(135deg, #211c18 0%, #2b251f 60%, #1c1610 100%);
  --hero-sub: #a89a8a; --hero-outline-text: #e4dacb; --hero-outline-border: #57493c; --hero-trust: #d8cdbf;
  --dark-card-bg: #2b251f; --dark-card-img-bg: #3a322a; --dark-card-text: #d8cdbf; --dark-card-title: #f5efe6;
  --footer-bg: #211c18; --footer-text: #a89a8a; --footer-link: #8a7c6c; --footer-pill-bg: #3a322a;
  --chip-bg: #f1e8da; --chip-hover: #e8dcc8; --chip-border: #d8cdbf;
}
body[data-theme="pcb"] {
  --header-bg: #0e2a23; --header-text: #eef4ef;
  --link: #0d7a5f;
  --bg: #f4f7f3; --surface: #ffffff; --border: #d9e3da; --border-focus: #8aa595;
  --text: #143b31; --text-muted: #5b7268;
  --header-muted: #9ab3a7; --header-strong: #dcebe2; --header-icon: #c4d8cc;
  --hero-bg: linear-gradient(135deg, #0e2a23 0%, #143b31 60%, #0b2018 100%);
  --hero-sub: #9ab3a7; --hero-outline-text: #cfdfd6; --hero-outline-border: #2e5a4c; --hero-trust: #c4d8cc;
  --dark-card-bg: #143b31; --dark-card-img-bg: #1d4d40; --dark-card-text: #c4d8cc; --dark-card-title: #eef4ef;
  --footer-bg: #0e2a23; --footer-text: #9ab3a7; --footer-link: #6e857a; --footer-pill-bg: #1d4d40;
  --chip-bg: #e4ece4; --chip-hover: #d9e3da; --chip-border: #c4d3c7;
}
body[data-theme="light"] {
  --header-bg: #fdfcfa; --header-text: #211f1c;
  --accent: #ea580c; --accent-hover: #c2410c; --accent-dim: #fff3e8;
  --bg: #ffffff; --surface: #ffffff; --border: #e4e2dd; --border-focus: #a8a399;
  --text: #211f1c; --text-muted: #6e6a61;
  --header-muted: #6e6a61; --header-strong: #211f1c; --header-icon: #44403a;
  --header-control-bg: #f3f1ec; --header-control-bg-hover: #ece9e2;
  --header-control-border: #e4e2dd; --header-control-border-strong: #c9c4ba;
  --header-control-text: #211f1c; --header-control-placeholder: #98938a;
  --hero-bg: #f8f6f1;
  --hero-title: #211f1c; --hero-sub: #6e6a61;
  --hero-outline-text: #44403a; --hero-outline-border: #c9c4ba; --hero-trust: #44403a;
  --dark-card-bg: #211f1c; --dark-card-img-bg: #38342e; --dark-card-text: #d8d4cb; --dark-card-title: #f5f3ee;
  --footer-bg: #f3f1ec; --footer-text: #6e6a61; --footer-link: #6e6a61; --footer-pill-bg: #e4e2dd;
  --chip-bg: #f3f1ec; --chip-hover: #ece9e2; --chip-border: #d8d4cb;
}
body[data-theme="light"] .site-header { border-bottom: 1px solid var(--border); }

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
code { font-family: var(--font-mono); font-size: .875em; background: #f1f5f9; padding: .1em .3em; border-radius: 3px; }
address { font-style: normal; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .625rem 1.25rem; border-radius: var(--radius-sm); font-weight: 600;
  font-size: .875rem; border: 2px solid transparent; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .1s, box-shadow .15s;
  white-space: nowrap; text-decoration: none; line-height: 1.2;
  -webkit-appearance: none; appearance: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--text); background: var(--bg); }
.btn-disabled { background: #e2e8f0; color: var(--text-muted); cursor: not-allowed; border-color: #e2e8f0; }
.btn-stripe { background: #635bff; color: #fff; border-color: #635bff; }
.btn-stripe:hover { background: #4f46e5; border-color: #4f46e5; }
.btn-sm { padding: .375rem .875rem; font-size: .8125rem; }
.btn-large { padding: .75rem 1.75rem; font-size: 1rem; }
.btn-full { width: 100%; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-start; }
.btn-stack { display: flex; flex-direction: column; gap: .5rem; }

/* ── Site Header ─────────────────────────────────────────────────────────── */
.site-header {
  background: var(--header-bg); color: var(--header-text);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.header-inner {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(260px, 380px) minmax(40px, 1fr);
  align-items: center;
  gap: 1.25rem;
  height: 90px; /* TRIAL (was 70px) */
}
.header-left {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  min-width: 0;
}
.logo {
  display: flex; align-items: center; justify-content: flex-start; gap: .9rem; /* TRIAL gap (was .6rem) */
  height: 66px; flex: 0 0 auto; /* TRIAL height (was 48px) */
  text-decoration: none; color: var(--header-text);
  font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em;
  overflow: hidden;
}
.logo:hover { text-decoration: none; }
.logo-wordmark { display: flex; flex-direction: column; justify-content: center; line-height: 1; }
.logo-wordmark-name { font-size: 1.45rem; font-weight: 800; color: var(--header-text); letter-spacing: .02em; } /* TRIAL (was 1.3rem, 700, -.01em) */
.logo-wordmark-sub { font-size: 1.15rem; font-weight: 700; text-transform: uppercase; letter-spacing: .34em; color: var(--accent); margin-top: .12rem; } /* TRIAL (was .5625rem, 600, .32em, .25rem) */
.site-logo-img {
  display: block;
  width: auto !important;
  height: 58px !important; /* TRIAL (was 44px) */
  max-width: 174px !important;
  max-height: 58px !important; /* TRIAL (was 44px) */
  object-fit: contain;
}
.logo-mark {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--accent); color: #fff;
  font-weight: 800; font-size: 1rem;
}
.logo-text { color: var(--header-text); }
.header-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: .85rem;
}
.cart-link {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  color: var(--header-text); text-decoration: none;
  transition: background .15s;
}
.cart-link:hover { background: var(--header-control-bg-hover); }
.account-header-link {
  display: flex; align-items: center; gap: .35rem;
  color: var(--header-muted);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.25;
}
.account-header-link:hover { text-decoration: none; }
.account-header-link:hover .account-link-main { color: var(--header-text); }
.account-header-icon { color: var(--header-icon); flex-shrink: 0; display: none; }
.account-header-link:hover .account-header-icon { color: var(--header-text); }
.account-header-text { display: flex; flex-direction: column; justify-content: center; }
.account-link-sub { font-size: .6875rem; font-weight: 500; color: var(--header-muted); }
.account-link-main { font-size: .9375rem; font-weight: 700; color: var(--header-strong); }
.currency-header-button {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .65rem;
  border: 1px solid var(--header-control-border);
  border-radius: var(--radius-sm);
  background: var(--header-control-bg);
  color: var(--header-control-text);
  font-size: .8125rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.currency-header-button:hover {
  background: var(--header-control-bg-hover);
  border-color: var(--header-control-border-strong);
}
.currency-header-button:active { transform: translateY(1px); }
.currency-header-flag { font-size: .95rem; line-height: 1; }
.currency-header-code { letter-spacing: .03em; }
.cart-badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--accent); color: #fff;
  font-size: .625rem; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0 .2rem;
}

.currency-modal {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, .58);
}
.currency-modal[hidden] { display: none; }
.currency-modal-panel {
  position: relative;
  width: min(100%, 720px);
  max-width: 720px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
}
.currency-modal-panel h2 {
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  letter-spacing: -.02em;
  margin-bottom: .35rem;
}
.currency-modal-panel p { color: var(--text-muted); margin-bottom: 1rem; }
.currency-modal-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
}
.currency-modal-close:hover { background: var(--chip-hover); }
.currency-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
  padding: .5rem;
  background: var(--chip-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.currency-option {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem .85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--link);
  font-weight: 800;
  cursor: pointer;
  transition: transform .1s, border-color .15s, background .15s;
}
.currency-option:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  text-decoration: none;
}
.currency-option.active {
  border-color: var(--accent);
  background: #0ea5e9;
  color: #fff;
}
.currency-option-flag { font-size: 1.1rem; line-height: 1; }
.currency-option-code { letter-spacing: .03em; }
.currency-modal-note {
  margin-top: 1rem;
  padding: .85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--chip-bg);
  border: 1px solid var(--border);
}
.currency-modal-note strong { display: block; margin-bottom: .35rem; color: var(--text); }
.currency-modal-note ul { margin: 0 0 0 1.2rem; color: var(--text-muted); }
.currency-modal-note li + li { margin-top: .25rem; }
@media (max-width: 640px) {
  .currency-header-button { padding: .35rem .5rem; font-size: .75rem; }
  .currency-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  background: var(--hero-bg);
  color: var(--hero-title); padding: 3rem 0 2.75rem;
  border-bottom: 3px solid var(--accent);
}
.hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 3rem; }
.hero-main { flex: 0 1 600px; min-width: 0; }
.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800;
  letter-spacing: -.03em; line-height: 1.15; color: var(--hero-title);
}
.hero-accent { color: var(--accent); display: block; }
.hero p { color: var(--hero-sub); font-size: 1.05rem; max-width: 540px; margin-top: .75rem; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero-btn-outline {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .625rem 1.25rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .875rem; line-height: 1.2;
  color: var(--hero-outline-text); border: 1.5px solid var(--hero-outline-border); text-decoration: none;
  transition: border-color .15s, background .15s;
}
.hero-btn-outline:hover { border-color: var(--accent); background: rgba(249,115,22,.08); color: var(--hero-outline-text); text-decoration: none; }
.hero-trust { flex: 0 0 auto; min-width: 0; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .8rem; }
.hero-trust li { display: flex; align-items: center; gap: .65rem; color: var(--hero-trust); font-size: .875rem; }
.hero-trust svg { color: var(--accent); flex-shrink: 0; }
@media (max-width: 768px) {
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 1.75rem; }
  .hero-main { flex: 0 1 auto; }
  .hero-trust { gap: .6rem; }
}

/* ── Header search ───────────────────────────────────────── */
.header-search {
  display: flex;
  width: 100%;
  min-width: 0;
  justify-self: center;
}
.header-search-wrap {
  flex: 1; position: relative; min-width: 0;
}
.header-search-icon {
  position: absolute; left: .75rem; top: 50%; transform: translateY(-50%);
  color: var(--header-control-placeholder); pointer-events: none;
}
.header-search-input {
  display: block; width: 100%; min-width: 0; box-sizing: border-box;
  padding: .5rem .75rem .5rem 2.25rem;
  font-size: .875rem; font-family: var(--font);
  background: var(--header-control-bg);
  color: var(--header-control-text);
  border: 1px solid var(--header-control-border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  -webkit-appearance: none; appearance: none;
  transition: background .15s, border-color .15s;
  height: 38px;
  line-height: 1;
}
.header-search-input.has-value { padding-right: 2rem; }
.header-search-clear {
  position: absolute; right: .4rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; padding: .25rem; cursor: pointer; line-height: 0;
  color: var(--header-control-placeholder); border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  transition: color .15s, background .15s;
}
.header-search-clear:not([hidden]) { display: flex; }
.header-search-clear:hover { color: var(--header-text); background: rgba(255,255,255,.1); }
.header-search-input::placeholder { color: var(--header-control-placeholder); }
.header-search-input:focus {
  outline: none;
  background: var(--header-control-bg-hover);
  border-color: rgba(249,115,22,.5);
}
.header-search-btn {
  flex-shrink: 0;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  border: none; border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  -webkit-appearance: none; appearance: none;
  transition: background .15s;
  padding: 0;
}
.header-search-btn:hover { background: var(--accent-hover); }

@media (max-width: 900px) {
  /* The desktop grid's fixed tracks overflow at these widths — switch the
     header to flex so the search bar shrinks instead of being overlapped. */
  .header-inner { display: flex; gap: 1rem; }
  .header-left, .header-right { flex: 0 0 auto; }
  .header-search { flex: 1 1 auto; min-width: 0; }
}
.mobile-search-toggle { display: none; background: none; border: 0; padding: .4rem; cursor: pointer; color: var(--header-icon); line-height: 0; }
.mobile-search-toggle:hover { color: var(--header-text); }
.mobile-search-row { padding: 0 0 .75rem; background: var(--header-bg); }
.mobile-search-row .header-search { display: flex; }
/* 16px stops iOS Safari auto-zooming the page when the input is focused */
.mobile-search-row .header-search-input { font-size: 16px; }
@media (min-width: 641px) {
  .mobile-search-row { display: none !important; }
}
@media (max-width: 640px) {
  .header-inner > .header-search { display: none; }
  .mobile-search-toggle { display: inline-flex; align-items: center; }
  .header-inner { display: flex; gap: .6rem; height: 64px; }
  .header-right { gap: .5rem; }
  .header-left { gap: 1rem; }
  .logo { height: 52px; gap: .6rem; }
  .site-logo-img { height: 44px !important; max-height: 44px !important; }
  .logo-wordmark-name { font-size: 1.2rem; }
  .logo-wordmark-sub { font-size: .85rem; letter-spacing: .28em; margin-top: .1rem; }
  .account-header-text { display: none; }
  .account-header-icon { display: block; }
}

/* ── Product Grid ────────────────────────────────────────────────────────── */
.featured-products-section { padding: 2rem 0 0; background: linear-gradient(180deg, var(--bg) 0%, var(--surface) 100%); }
.featured-products-header { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; margin-bottom: 1.25rem; }
.section-kicker { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.featured-products-header h2 { font-size: clamp(1.25rem, 2vw, 1.75rem); letter-spacing: -.02em; }
.featured-products-header p { color: var(--text-muted); font-size: .9rem; max-width: 480px; }
.featured-products-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.featured-product-card { display: grid; grid-template-columns: 92px 1fr; gap: .9rem; align-items: center; background: var(--dark-card-bg); color: var(--dark-card-title); border-radius: var(--radius); padding: .75rem; text-decoration: none; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; }
.featured-product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; color: #fff; }
.featured-product-image { display: block; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--dark-card-img-bg); }
.featured-product-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-product-body { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.featured-product-body strong { font-size: .95rem; line-height: 1.25; }
.featured-product-body span { color: #fb923c; font-weight: 800; }
@media (max-width: 900px) {
  .featured-products-strip { grid-template-columns: 1fr; }
}

.homepage-reviews-section { padding: 2rem 0 0; background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); }
.homepage-reviews-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.homepage-review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: .75rem;
  min-height: 100%;
}
.homepage-review-rating {
  display: inline-flex;
  gap: .125rem;
  color: #cbd5e1;
  letter-spacing: .02em;
  font-size: .95rem;
}
.homepage-review-rating .filled { color: #f59e0b; }
.homepage-review-comment {
  color: var(--text);
  line-height: 1.6;
  font-size: .9rem;
  flex: 1;
}
.homepage-review-meta {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .8125rem;
}
.homepage-review-meta strong { color: var(--text); font-size: .875rem; }
.homepage-review-meta a { color: var(--link); }

.products-section { padding: 3rem 0 4rem; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.product-card {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.product-card-image-link {
  display: block; position: relative;
  aspect-ratio: 1; overflow: hidden;
  background: #f1f5f9;
}
.product-card-image-link img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s;
}
.product-card:hover .product-card-image-link img { transform: scale(1.04); }
.product-no-image {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #cbd5e1;
}
.product-no-image.large { min-height: 320px; }
.stock-badge {
  position: absolute; top: .5rem; left: .5rem;
  font-size: .65rem; font-weight: 700; padding: .2rem .55rem;
  border-radius: 4px; text-transform: uppercase; letter-spacing: .04em;
}
.stock-badge.out { background: #fee2e2; color: #b91c1c; }
.stock-badge.low { background: #fef9c3; color: #92400e; }
.product-card-sale-badge { position: absolute; bottom: .5rem; right: .5rem; background: #dc2626; color: #fff; font-size: .65rem; font-weight: 700; padding: .2rem .55rem; border-radius: 4px; text-transform: uppercase; letter-spacing: .04em; }
.price-original { text-decoration: line-through; color: var(--text-muted); font-weight: 400; }
.price-sale { color: #dc2626; font-weight: 600; }
.sale-badge { display: inline-flex; align-items: center; background: #dc2626; color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .03em; padding: .15rem .5rem; border-radius: 4px; text-transform: uppercase; }
.product-price--sale { display: flex; flex-direction: column; gap: .1rem; line-height: 1.2; }
.save-btn { position: absolute; top: .5rem; right: .5rem; display: none; width: 2rem; height: 2rem; border: none; border-radius: 50%; background: rgba(255,255,255,.88); backdrop-filter: blur(4px); cursor: pointer; align-items: center; justify-content: center; color: #94a3b8; transition: color .15s, transform .15s; padding: 0; z-index: 1; }
.save-btn.save-btn--visible { display: flex; }
.save-btn:hover { color: #e11d48; transform: scale(1.12); }
.save-btn .save-btn-filled { display: none; }
.save-btn--saved { color: #e11d48; }
.save-btn--saved .save-btn-empty { display: none; }
.save-btn--saved .save-btn-filled { display: block; }
.saved-items-strip { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .75rem; }
.saved-item-thumb { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-decoration: none; width: 90px; }
.saved-item-thumb img, .saved-item-thumb-placeholder { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; background: #f1f5f9; display: flex; align-items: center; justify-content: center; color: #cbd5e1; }
.saved-item-name { font-size: .7rem; color: var(--text-muted); text-align: center; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.saved-item-thumb:hover .saved-item-name { color: var(--accent); }
.saved-item-more { display: flex; align-items: center; justify-content: center; width: 90px; height: 90px; border-radius: 8px; background: #f1f5f9; font-size: .85rem; font-weight: 600; color: var(--text-muted); text-decoration: none; }
.saved-item-more:hover { background: #e2e8f0; color: var(--text); }

/* ── Shop filter bar (tag chips + result summary) ─────────── */
.view-all-products { text-align: center; margin: 2.5rem 0 1rem; }
.catalogue-header { padding: 2.5rem 0 0; }
.catalogue-header h1 { font-size: clamp(1.6rem, 3vw, 2.25rem); letter-spacing: -.02em; margin-top: .35rem; }
.shop-filter-bar { padding: 1.25rem 0 0; border-bottom: 1px solid var(--border); margin-bottom: 2rem; }
.tag-filter-kicker { display: block; margin-bottom: .75rem; }
.tag-filter-row { display: flex; flex-wrap: wrap; gap: .5rem; padding-bottom: 1rem; }
.tag-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .4rem 1rem; border-radius: 999px; font-size: .8125rem; font-weight: 500; background: var(--chip-bg); color: var(--text); text-decoration: none; border: 1px solid var(--chip-border); text-transform: capitalize; transition: background .15s, color .15s, border-color .15s; }
.tag-chip:hover { background: var(--chip-hover); border-color: var(--border-focus); text-decoration: none; }
.tag-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.tag-chip.active:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.tag-chip--sale.active { background: #dc2626; border-color: #dc2626; }
.filter-summary { font-size: .875rem; color: var(--text-muted); padding: .5rem 0 1rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.filter-summary strong { color: var(--text); }
.filter-clear { margin-left: auto; display: inline-flex; align-items: center; gap: .3rem; font-size: .8125rem; color: var(--text-muted); text-decoration: none; border: 1px solid var(--border); border-radius: 999px; padding: .2rem .75rem; transition: border-color .15s, color .15s; }
.filter-clear:hover { color: var(--text); border-color: #94a3b8; text-decoration: none; }
.sort-control { display: flex; align-items: center; gap: .5rem; padding: .5rem 0 1rem; margin-left: auto; font-size: .8125rem; color: var(--text-muted); }
.sort-control label { font-weight: 600; }
.sort-control select { font-family: var(--font); font-size: .8125rem; color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .35rem 1.75rem .35rem .6rem; background: var(--surface); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2394a3b8' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .6rem center; -webkit-appearance: none; appearance: none; }
.sort-control select:focus { outline: none; border-color: var(--accent); }
/* When the sort control shares the bar with the result summary, keep them on one line */
.shop-filter-bar .filter-summary + .sort-control { padding-top: 0; }

/* ── Admin tag chip-input ────────────────────────────────── */
.tag-input-widget { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; cursor: text; transition: border-color .15s; }
.tag-input-widget:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(249,115,22,.12); }
.tag-input-chips { display: flex; flex-wrap: wrap; gap: .375rem; padding: .5rem .625rem; min-height: 2.5rem; align-items: center; }
.tag-chip-admin { display: inline-flex; align-items: center; gap: .25rem; background: var(--accent-dim); color: var(--accent-hover); border: 1px solid rgba(249,115,22,.25); border-radius: 999px; padding: .2rem .55rem .2rem .7rem; font-size: .8125rem; font-weight: 500; white-space: nowrap; }
.tag-chip-remove { background: none; border: none; cursor: pointer; font-size: .75rem; color: var(--accent); padding: 0 .1rem; line-height: 1; opacity: .7; }
.tag-chip-remove:hover { opacity: 1; }
.tag-text-input { border: none; outline: none; font-size: .875rem; font-family: var(--font); padding: .15rem .25rem; flex: 1; min-width: 140px; background: transparent; }

.product-card-body { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; flex: 1; }
.product-card-name { font-size: .9375rem; font-weight: 600; margin-bottom: .35rem; line-height: 1.3; }
.product-card-name a { color: var(--text); text-decoration: none; }
.product-card-name a:hover { color: var(--accent); text-decoration: none; }
.product-card-desc { font-size: .8125rem; color: var(--text-muted); margin-bottom: .75rem; line-height: 1.45; flex: 1; }
.product-card-footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; }
.product-price { font-size: 1.125rem; font-weight: 700; color: var(--text); }
.product-price.large { font-size: 1.75rem; }

/* ── Product Detail ──────────────────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: .5rem; font-size: .8125rem; color: var(--text-muted); padding: 1.5rem 0 0; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text); }
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; padding: 2rem 0; align-items: start; }
@media (max-width: 768px) { .product-detail { grid-template-columns: 1fr; gap: 1.5rem; } }
.product-gallery {
  width: min(100%, 440px);
}
.gallery-main {
  border-radius: var(--radius);
  overflow: hidden;
  background: #f1f5f9;
  aspect-ratio: 1;
  cursor: zoom-in;
  position: relative;
  width: 100%;
  border: none;
  padding: 0;
  display: block;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}
.gallery-main:focus-visible {
  outline: 3px solid rgba(249, 115, 22, .35);
  outline-offset: 3px;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: .5rem; margin-top: .75rem; flex-wrap: wrap; }
.thumb-btn { border: 2px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; width: 64px; height: 64px; cursor: pointer; background: #f1f5f9; padding: 0; transition: border-color .15s; }
.thumb-btn.active, .thumb-btn:hover { border-color: var(--accent); }
.thumb-btn img { width: 100%; height: 100%; object-fit: cover; }
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, .88);
}
.gallery-lightbox[hidden] { display: none; }
.gallery-lightbox-panel {
  position: relative;
  width: min(96vw, 1200px);
  max-height: 92vh;
  border-radius: 18px;
  overflow: hidden;
  background: #020617;
  box-shadow: var(--shadow-lg);
}
.gallery-lightbox-image {
  width: 100%;
  height: auto;
  max-height: 92vh;
  object-fit: contain;
  background: #020617;
}
.gallery-lightbox-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, .82);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
}
.gallery-lightbox-close:hover { background: rgba(15, 23, 42, .95); }
.gallery-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, .82);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background .15s, transform .15s;
}
.gallery-lightbox-nav:hover { background: rgba(15, 23, 42, .95); }
.gallery-lightbox-nav:focus-visible,
.gallery-lightbox-close:focus-visible {
  outline: 3px solid rgba(249, 115, 22, .45);
  outline-offset: 2px;
}
.gallery-lightbox-prev { left: .75rem; }
.gallery-lightbox-next { right: .75rem; }
.product-title { font-size: clamp(1.25rem, 3vw, 1.75rem); font-weight: 800; letter-spacing: -.02em; }
.product-sku { color: var(--text-muted); font-size: .8125rem; margin-top: .25rem; }
.product-pricing { display: flex; align-items: center; gap: 1rem; margin: 1rem 0; flex-wrap: wrap; }
.stock-indicator { font-size: .8125rem; font-weight: 600; }
.stock-indicator.in { color: var(--success); }
.stock-indicator.out { color: var(--danger); }
.qty-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.qty-row label { font-size: .875rem; font-weight: 500; }
.share-btn-wrap { position: relative; }
.share-dropdown { position: absolute; top: calc(100% + .5rem); right: 0; min-width: 180px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 4px 16px rgba(0,0,0,.12); z-index: 50; overflow: hidden; }
.share-option { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .65rem 1rem; font-size: .875rem; font-weight: 500; color: var(--text); text-decoration: none; background: none; border: none; cursor: pointer; font-family: var(--font); transition: background .12s; white-space: nowrap; }
.share-option:hover { background: var(--surface-hover, var(--bg)); color: var(--accent); }
.share-option svg { flex-shrink: 0; color: var(--text-muted); }
.qty-control { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input { -moz-appearance: textfield; appearance: textfield; }
.qty-btn { width: 36px; height: 38px; background: var(--chip-bg); border: none; cursor: pointer; font-size: 1.2rem; color: var(--text); transition: background .15s; }
.qty-btn:hover { background: #e2e8f0; }
.qty-input { width: 48px; height: 38px; text-align: center; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); font-family: var(--font); font-size: .875rem; }
.qty-input:focus { outline: none; background: #fffbf7; }
.product-meta { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem .75rem; margin: 1.5rem 0; padding: 1rem; background: var(--chip-bg); border-radius: var(--radius-sm); }
.meta-item { display: flex; flex-direction: column; gap: .1rem; }
.meta-label { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.meta-value { font-size: .875rem; }
.shipping-note { display: flex; align-items: flex-start; gap: .5rem; margin-top: 1.5rem; font-size: .8125rem; color: var(--text-muted); padding: .75rem 1rem; background: var(--accent-dim); border-radius: var(--radius-sm); border-left: 3px solid var(--accent); }
.product-description { padding: 2rem 0 3rem; border-top: 1px solid var(--border); margin-top: 1rem; }
.product-description h2 { font-size: 1.125rem; font-weight: 700; margin-bottom: 1rem; }
.description-body { line-height: 1.7; color: var(--text); }

/* ── Cart ────────────────────────────────────────────────────────────────── */
.page-title { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; padding: 2rem 0 1.5rem; }
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; padding-bottom: 3rem; }
@media (max-width: 900px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; padding: .75rem 1rem; font-size: .8125rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; border-bottom: 2px solid var(--border); }
.cart-table td { padding: .875rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
@media (max-width: 640px) {
  .cart-table thead { display: none; }
  .cart-table, .cart-table tbody, .cart-table tr { display: block; width: 100%; }
  .cart-table tr { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; padding: .875rem 0; border-bottom: 1px solid var(--border); }
  .cart-table td { display: block; padding: 0; border: none; }
  .cart-table td:first-child { flex: 0 0 100%; }
  .cart-table td:nth-child(2) { display: none; }
  .cart-table td:nth-child(4) { font-weight: 600; flex: 1; }
  .cart-table td:nth-child(5) { margin-left: auto; }
}
.cart-product-cell { display: flex; align-items: flex-start; gap: .875rem; }
.cart-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.cart-thumb + div a { font-weight: 600; color: var(--text); }
.sku { display: block; font-size: .75rem; color: var(--text-muted); font-family: var(--font-mono); }
.cart-line-total { font-weight: 600; }
.qty-input-sm { width: 56px; padding: .35rem .5rem; border: 1px solid var(--border); border-radius: var(--radius-sm); text-align: center; font-family: var(--font); font-size: .875rem; }
.btn-icon-danger { background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 1rem; padding: .25rem .5rem; border-radius: var(--radius-sm); transition: color .15s, background .15s; }
.cart-saved-section { margin-top: 3rem; margin-bottom: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.cart-saved-heading { font-size: 1.125rem; font-weight: 600; margin-bottom: 1rem; }
.cart-saved-list { display: flex; flex-direction: column; gap: .75rem; }
.cart-saved-item { display: flex; align-items: center; gap: 1rem; padding: .875rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.cart-saved-thumb { flex-shrink: 0; width: 64px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); background: #f1f5f9; display: flex; align-items: center; justify-content: center; }
.cart-saved-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-saved-thumb-placeholder { color: #cbd5e1; }
.cart-saved-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.cart-saved-name { font-weight: 600; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-saved-name:hover { color: var(--accent); }
.cart-saved-price { font-size: .875rem; color: var(--text-muted); }
.cart-saved-oos { font-size: .75rem; color: #b91c1c; font-weight: 500; }
.cart-saved-actions { display: flex; flex-direction: row; align-items: center; gap: .75rem; flex-shrink: 0; }
@media (max-width: 600px) { .cart-saved-item { flex-wrap: wrap; } .cart-saved-actions { width: 100%; } }
.cart-save-later-form { display: block; margin-top: .3rem; }
.cart-save-later-btn { display: block; background: none; border: none; padding: 0; margin-top: .3rem; font-size: .8125rem; color: var(--text-muted); cursor: pointer; font-family: var(--font); transition: color .15s; }
.cart-save-later-btn:hover { color: var(--accent); }
.btn-icon-danger:hover { color: var(--danger); background: #fee2e2; }

/* ── Summary Card ────────────────────────────────────────────────────────── */
.summary-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.summary-card h2 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.summary-row { display: flex; justify-content: space-between; align-items: center; padding: .35rem 0; font-size: .9375rem; }
.summary-row.muted { color: var(--text-muted); font-size: .875rem; }
.summary-row.total-row { font-weight: 700; font-size: 1.125rem; }
.summary-divider { border: none; border-top: 1px solid var(--border); margin: .75rem 0; }
.summary-item { display: flex; justify-content: space-between; padding: .3rem 0; font-size: .875rem; }
.summary-item-name em { color: var(--text-muted); font-style: normal; }
.sticky-summary { position: sticky; top: 80px; }

/* ── Checkout ────────────────────────────────────────────────────────────── */
.checkout-layout { display: grid; grid-template-columns: 1fr 340px; gap: 2.5rem; align-items: start; padding-bottom: 4rem; }
@media (max-width: 900px) { .checkout-layout { grid-template-columns: 1fr; } .checkout-summary-col { order: -1; } }
.checkout-form-col, .checkout-summary-col { }
.checkout-agreement { margin: .875rem 0 0; font-size: .8125rem; line-height: 1.55; color: var(--text-muted); text-align: center; }
.checkout-agreement a { color: var(--text-muted); text-decoration: underline; }
.checkout-agreement a:hover { color: var(--text); }
.form-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; }
.form-section h2 { font-size: 1rem; font-weight: 700; margin-bottom: 1.25rem; }
.form-row { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.form-row:last-child { margin-bottom: 0; }
.form-row label { font-size: .8125rem; font-weight: 600; color: var(--text); }
.form-row input, .form-row select, .form-row textarea {
  padding: .625rem .875rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font); font-size: .9375rem; color: var(--text);
  background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(249,115,22,.12);
}
.form-row small { font-size: .75rem; color: var(--text-muted); }
.form-row textarea { resize: vertical; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.form-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 860px) { .form-grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .form-grid-2, .form-grid-3, .form-grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .form-grid-2, .form-grid-3, .form-grid-4 { grid-template-columns: 1fr; } }
.shipping-estimate { background: var(--surface); border: 1.5px solid var(--accent); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.shipping-loading { color: var(--text-muted); font-size: .875rem; }
.shipping-service { display: flex; align-items: center; gap: .5rem; font-size: .9375rem; font-weight: 500; }
.shipping-price { margin-left: auto; font-weight: 700; }
.shipping-rates-label { font-size: .8125rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 .5rem; }
.shipping-rate-option { display: flex; align-items: center; gap: .5rem; padding: .5rem .625rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); margin-bottom: .375rem; cursor: pointer; font-size: .9375rem; }
.shipping-rate-option:has(input:checked) { border-color: var(--accent); background: var(--surface); }
.shipping-rate-option input[type="radio"] { margin: 0; }
.shipping-rate-service { flex: 1; }
.tariff-notice { margin-top: .75rem; font-size: .8125rem; color: #92400e; background: #fef9c3; padding: .625rem .875rem; border-radius: var(--radius-sm); display: flex; align-items: flex-start; gap: .4rem; }
.secure-badge { display: flex; align-items: center; gap: .4rem; font-size: .75rem; color: var(--text-muted); margin-top: 1rem; justify-content: center; }
.shipping-confirmed { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; }
.shipping-confirmed h2 { font-size: .875rem; font-weight: 700; color: #166534; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .5rem; }
.shipping-confirmed address { font-size: .9375rem; line-height: 1.6; }
.shipping-service-confirmed { display: flex; align-items: center; gap: .4rem; font-size: .8125rem; color: #166534; margin-top: .5rem; }
.link-small { font-size: .8125rem; color: var(--link); text-decoration: none; }
.link-small:hover { text-decoration: underline; }
.discount-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; }
.discount-section h2 { font-size: .875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .75rem; color: var(--text-muted); }
.discount-input-row { display: flex; gap: .5rem; }
.discount-code-input { flex: 1; padding: .5rem .875rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: .9375rem; font-family: var(--font-mono); letter-spacing: .05em; }
.discount-code-input:focus { outline: none; border-color: var(--accent); }
.discount-applied { display: flex; align-items: center; gap: .75rem; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: var(--radius-sm); padding: .625rem .875rem; }
.discount-applied-code { font-family: var(--font-mono); font-weight: 700; font-size: .9rem; color: #166534; }
.discount-applied-amount { font-weight: 600; color: var(--success); font-size: .9rem; }
.payment-methods { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.payment-methods h2 { font-size: 1rem; font-weight: 700; margin-bottom: 1.25rem; }
.payment-note { margin-top: .75rem; color: var(--text-muted); font-size: .875rem; line-height: 1.5; }
.payment-divider { display: flex; align-items: center; text-align: center; margin: 1.25rem 0; color: var(--text-muted); font-size: .8125rem; }
.payment-divider::before, .payment-divider::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
.payment-divider span { padding: 0 .75rem; }
#paypal-button-container { max-width: 100%; }

/* ── Success / Error Pages ───────────────────────────────────────────────── */
.success-page, .error-page { text-align: center; padding: 5rem 1.5rem; max-width: 480px; margin: 0 auto; }
.success-icon { color: var(--success); margin-bottom: 1.5rem; display: flex; justify-content: center; }
.success-page h1 { font-size: 2rem; font-weight: 800; margin-bottom: .75rem; }
.success-order-number { font-size: 1.1rem; color: var(--text-muted); margin-bottom: .75rem; }
.success-shipping-note { font-size: .9rem; color: var(--text-muted); margin: .75rem 0 1.5rem; }
.error-code { font-size: 5rem; font-weight: 900; color: var(--border); line-height: 1; margin-bottom: .5rem; }
.error-page h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: .75rem; }
.error-page p { color: var(--text-muted); margin-bottom: 1.5rem; }
.empty-state { text-align: center; padding: 4rem 1.5rem; color: var(--text-muted); }
.empty-state svg { margin: 0 auto 1.25rem; opacity: .3; }
.empty-state p { font-size: 1.1rem; margin-bottom: 1.5rem; }

/* ── Customer Account ───────────────────────────────────── */
.account-auth-card { max-width: 440px; margin: 4rem auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
.account-auth-card-wide { max-width: 560px; }
.account-auth-card h1 { font-size: 1.5rem; margin-bottom: 1.25rem; }
.account-auth-links { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem; font-size: .875rem; }
.account-security-note { margin-top: 1rem; color: var(--text-muted); font-size: .875rem; }
.account-dashboard { padding: 3rem 0 4rem; }
.account-dashboard-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.account-dashboard-header h1 { font-size: 1.75rem; }
.account-dashboard-header p { color: var(--text-muted); }
.account-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.account-panel h2 { font-size: 1rem; margin-bottom: 1rem; }
.account-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.account-panel-heading h2 { margin-bottom: .35rem; }
.account-security-prompt { display: flex; gap: .75rem; align-items: center; background: #eff6ff; color: #1e3a8a; border: 1px solid #bfdbfe; border-radius: var(--radius); padding: .875rem 1rem; margin-bottom: 1.5rem; }
.account-security-prompt-2fa { background: var(--chip-bg); color: var(--text); border-color: var(--border); }
.account-status-pill { display: inline-flex; align-items: center; border: 1px solid #fed7aa; border-radius: 999px; color: #9a3412; background: #fff7ed; padding: .35rem .75rem; font-size: .8rem; font-weight: 700; }
.account-status-pill-on { border-color: #bbf7d0; color: #166534; background: #f0fdf4; }
.account-status-pill-danger { border-color: #fecaca; color: #991b1b; background: #fee2e2; }
.account-security-callout { display: flex; align-items: center; gap: .75rem; background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; border-radius: var(--radius); padding: 1rem; margin-bottom: 1.25rem; }
.account-security-callout-safe { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.account-security-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.account-security-action { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; background: var(--chip-bg); }
.account-security-action h3 { font-size: .95rem; margin-bottom: .5rem; }
.account-security-danger { border-color: #fecaca; background: #fff7f7; }
.account-actions-row { display: flex; align-items: center; justify-content: flex-end; gap: .75rem; margin-top: 1.25rem; }
.account-recovery-toggle { margin-top: .75rem; margin-bottom: 1rem; color: var(--text-muted); font-size: .875rem; }
.account-recovery-toggle summary { cursor: pointer; font-weight: 700; }
.account-secret-code { display: block; margin: .75rem 0 1.25rem; background: #0f172a; color: var(--accent); padding: .75rem 1rem; border-radius: var(--radius-sm); font-size: .875rem; word-break: break-all; }
.account-address-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1rem 0; }
.account-address-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; background: #f8fafc; }
.account-address-card address { margin: .75rem 0; color: var(--text-muted); line-height: 1.5; }
.account-address-form { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.account-address-form h3 { font-size: 1rem; margin-bottom: 1rem; }
.account-danger-zone { margin-top: 1.5rem; border-color: #fecaca; background: #fffafa; }
.account-delete-form { max-width: 520px; }
.table-button { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--accent); }
.table-button:hover { text-decoration: underline; }
@media (max-width: 720px) {
  .account-security-grid { grid-template-columns: 1fr; }
  .account-security-callout,
  .account-security-prompt,
  .account-panel-heading,
  .account-actions-row { align-items: stretch; flex-direction: column; }
}

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert { padding: .875rem 1.125rem; border-radius: var(--radius-sm); font-size: .9rem; margin-bottom: 1.25rem; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-warning { background: #fef9c3; color: #92400e; border: 1px solid #fde047; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer { background: var(--footer-bg); color: var(--footer-text); margin-top: auto; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; padding-top: 3rem; padding-bottom: 2rem; }
@media (max-width: 768px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-logo-img { display: block; width: auto; height: 42px; max-width: 160px; object-fit: contain; }
.footer-brand-lockup { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.footer-brand-name { display: flex; flex-direction: column; line-height: 1.1; }
.footer-brand-title { font-size: 1.1rem; font-weight: 700; color: var(--header-text); letter-spacing: -.01em; }
.footer-brand-sub { font-size: .65rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); }
.footer-brand p { font-size: .875rem; margin-top: 0; color: var(--footer-link); }
.footer-links h4 { color: var(--header-text); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .75rem; }
.footer-links { display: flex; flex-direction: column; gap: .5rem; }
.footer-links a { color: var(--footer-link); font-size: .875rem; text-decoration: none; transition: color .15s; }
.footer-links a:hover { color: var(--header-text); }
.footer-link-button { color: var(--footer-link); background: none; border: 0; padding: 0; text-align: left; font: inherit; font-size: .875rem; cursor: pointer; transition: color .15s; }
.footer-link-button:hover { color: var(--header-text); }
.footer-payment h4 { color: var(--header-text); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .75rem; }
.payment-badges { display: flex; gap: .4rem; flex-wrap: wrap; }
.badge-pill { background: var(--footer-pill-bg); color: var(--footer-text); font-size: .7rem; font-weight: 600; padding: .2rem .6rem; border-radius: 20px; letter-spacing: .03em; }
.sale-pill { background: #fee2e2; color: #b91c1c; }
.filter-chip { display: inline-flex; align-items: center; height: 2.375rem; padding: 0 .875rem; border-radius: var(--radius-sm); font-size: .8125rem; font-weight: 500; background: var(--surface); color: var(--text-muted); text-decoration: none; border: 1.5px solid var(--border); transition: border-color .15s, color .15s; white-space: nowrap; }
.filter-chip:hover { border-color: var(--border-focus); color: var(--text); }
.filter-chip.active { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; font-weight: 600; }
.bulk-action-bar { display: none; align-items: center; gap: .75rem; padding: .6rem .875rem; background: var(--accent-dim); border: 1.5px solid rgba(249,115,22,.2); border-radius: var(--radius-sm); margin-bottom: 1rem; flex-wrap: wrap; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 200; }
.modal-dialog { background: var(--surface); border-radius: var(--radius); padding: 1.75rem 2rem; min-width: 320px; max-width: 420px; width: 90%; box-shadow: 0 8px 32px rgba(0,0,0,.18); }
.modal-actions { display: flex; gap: .75rem; margin-top: 1.5rem; }
.atc-modal-dialog { text-align: center; }
.atc-check { width: 3rem; height: 3rem; border-radius: 50%; background: #dcfce7; color: #16a34a; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; font-weight: 700; }
.atc-modal-title { margin: 0 0 .25rem; font-size: 1rem; }
.atc-modal-sub { margin: 0; font-size: .875rem; }
.atc-modal-dialog .modal-actions { justify-content: center; }
.admin-table .select-col { width: 2.5rem; padding-left: .75rem; }
.admin-table.select-mode tbody tr { cursor: pointer; }
.admin-table.select-mode tbody tr:hover { background: var(--bg); }
.badge { display: inline-block; font-size: .7rem; font-weight: 700; padding: .2rem .55rem; border-radius: 20px; letter-spacing: .03em; text-transform: uppercase; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-neutral { background: #f1f5f9; color: #64748b; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.footer-bottom { border-top: 1px solid var(--footer-pill-bg); }
.footer-bottom .container { padding-top: 1rem; padding-bottom: 1rem; }
.footer-bottom p { font-size: .8125rem; color: var(--footer-link); }
.footer-legal { margin-top: .25rem; font-size: .75rem !important; }

/* ── Cookie Consent & Policy Pages ───────────────────────────────────────── */
.cookie-consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9998; padding: 1rem; background: linear-gradient(to top, rgba(15,23,42,.34), rgba(15,23,42,0)); }
.cookie-consent-card { max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto; gap: 1.25rem; align-items: center; background: rgba(255,255,255,.98); border: 1px solid var(--border); border-radius: 18px; padding: 1.25rem; box-shadow: 0 20px 60px rgba(15,23,42,.22); }
.cookie-consent-card h2 { margin: .15rem 0 .35rem; font-size: 1.05rem; }
.cookie-consent-card p { margin: 0 0 .5rem; color: var(--text-muted); font-size: .9rem; line-height: 1.55; }
.cookie-consent-actions { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: flex-end; }
.policy-page { padding: 3rem 1rem; max-width: 900px; margin: 0 auto; }
.policy-page h1 { font-size: clamp(2rem, 4vw, 3.25rem); margin-bottom: .35rem; }
.policy-updated { color: var(--text-muted); margin-bottom: 1.5rem; }
.policy-card { margin-bottom: 1rem; }
.policy-card ul { margin: .75rem 0 0 1.25rem; color: var(--text-muted); line-height: 1.7; }
.policy-legal-details { margin-top: .75rem; color: var(--text-muted); font-size: .875rem; }
.data-table { border-collapse: collapse; font-size: .9rem; margin-top: .75rem; }
.data-table th, .data-table td { text-align: left; padding: .55rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table th { font-weight: 600; color: var(--text); background: var(--bg-secondary); }
.data-table td { color: var(--text-muted); }
.data-table td:first-child { color: var(--text); font-weight: 500; white-space: nowrap; }

/* ── Mailing list page ────────────────────────────────────── */
.ml-hero { text-align: center; padding: 3rem 1rem 2rem; }
.ml-hero h1 { font-size: 2rem; margin: .5rem 0 1rem; }
.ml-hero-sub { color: var(--text-muted); font-size: 1.0625rem; max-width: 540px; margin: 0 auto; }
.ml-what { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; margin: 2rem 0; }
.ml-what-item { display: flex; gap: 1rem; padding: 1.25rem; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); }
.ml-what-icon { font-size: 1.5rem; line-height: 1; flex-shrink: 0; }
.ml-what-item strong { display: block; margin-bottom: .25rem; }
.ml-what-item p { margin: 0; font-size: .9rem; color: var(--text-muted); }
.ml-form-card { max-width: 540px; margin: 0 auto 3rem; }
.ml-success-card { text-align: center; padding: 4rem 2rem; max-width: 480px; margin: 0 auto; }
.ml-success-icon { font-size: 3rem; color: var(--success); margin-bottom: 1rem; }
.ml-success-card h1 { margin-bottom: .75rem; }
.ml-success-card p { color: var(--text-muted); }

@media (max-width: 720px) {
  .cookie-consent-card { grid-template-columns: 1fr; }
  .cookie-consent-actions { justify-content: stretch; }
  .cookie-consent-actions .btn { flex: 1; }
}

/* ── Auth Pages (login / 2fa) ────────────────────────────────────────────── */
.admin-login-page { background: #0f172a; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.auth-container { width: 100%; max-width: 400px; }
.auth-card { background: #1e293b; border: 1px solid #334155; border-radius: var(--radius); padding: 2rem; }
.auth-logo { display: flex; align-items: center; gap: .35rem; margin-bottom: 1.5rem; }
.auth-logo-img { display: block; width: auto; height: 40px; max-width: 150px; object-fit: contain; }
.auth-logo .logo-text { color: #f1f5f9; font-size: 1.1rem; font-weight: 700; }
.auth-subtitle { color: #64748b; font-size: .875rem; margin-left: .5rem; }
.auth-card h1 { color: #f1f5f9; font-size: 1.375rem; font-weight: 700; margin-bottom: 1.25rem; }
.auth-hint { color: #94a3b8; font-size: .875rem; margin-bottom: 1.25rem; }
.auth-card .form-row label { color: #94a3b8; }
.auth-card .form-row input { background: #0f172a; border-color: #334155; color: #f1f5f9; }
.auth-card .form-row input:focus { border-color: var(--accent); }
.auth-card .btn-primary { margin-top: .5rem; }
.code-input { text-align: center; font-family: var(--font-mono) !important; font-size: 1.25rem !important; letter-spacing: .2em; }
.recovery-toggle { margin-top: 1.25rem; color: #64748b; font-size: .875rem; }
.recovery-toggle summary { cursor: pointer; color: #94a3b8; }
.recovery-toggle summary:hover { color: #f1f5f9; }
.qr-container { display: flex; justify-content: center; margin: 1.25rem 0; }
.qr-code { border-radius: var(--radius-sm); background: #fff; padding: .75rem; }
.secret-code { display: block; margin-top: .75rem; background: #0f172a; color: var(--accent); padding: .75rem 1rem; border-radius: var(--radius-sm); font-size: .875rem; word-break: break-all; }
.recovery-codes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: 1.25rem 0; }
.recovery-code-item { background: #0f172a; color: #f1f5f9; padding: .625rem .875rem; border-radius: var(--radius-sm); font-size: .9rem; text-align: center; letter-spacing: .08em; border: 1px solid #334155; }
/* Outline buttons sit on the dark auth card — force readable light text (the default --text is dark) */
.auth-card .btn-outline { color: #f1f5f9; border-color: #475569; }
.auth-card .btn-outline:hover { background: #0f172a; border-color: #64748b; color: #fff; }

/* ── Admin Panel ─────────────────────────────────────────────────────────── */
.admin-body { background: #f1f5f9; }
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: var(--sidebar-width); background: #0f172a; color: #94a3b8;
  display: flex; flex-direction: column; flex-shrink: 0;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-sidebar-header { padding: 1.25rem 1rem 1rem; border-bottom: 1px solid #1e293b; }
.admin-logo { display: flex; align-items: center; gap: .35rem; text-decoration: none; color: #f1f5f9; font-weight: 700; font-size: 1rem; }
.admin-logo:hover { text-decoration: none; }
.admin-logo-img { display: block; width: auto; height: 32px; max-width: 120px; object-fit: contain; }
.admin-nav { padding: .5rem .5rem; flex: 1; display: flex; flex-direction: column; gap: .1rem; }
.admin-nav-section { font-size: .625rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #475569; padding: .875rem .75rem .25rem; }
.admin-nav-link {
  display: flex; align-items: center; gap: .625rem;
  padding: .55rem .75rem; border-radius: var(--radius-sm);
  color: #94a3b8; font-size: .875rem; font-weight: 500;
  text-decoration: none; transition: color .15s, background .15s;
}
.admin-nav-link:hover { color: #f1f5f9; background: #1e293b; text-decoration: none; }
.admin-nav-link.active { color: var(--accent); background: rgba(249,115,22,.08); }
.admin-nav-badge { margin-left: auto; background: #334155; color: #f1f5f9; font-size: .7rem; font-weight: 700; border-radius: 999px; padding: .15rem .5rem; min-width: 1.4rem; text-align: center; line-height: 1.4; letter-spacing: 0; }
.admin-nav-badge-danger { margin-left: .35rem; background: var(--danger); color: #fff; }
.admin-nav-badge + .admin-nav-badge-danger { margin-left: .35rem; }
.nav-badge { margin-left: auto; background: #d97706; color: #fff; font-size: .7rem; font-weight: 700; border-radius: 999px; padding: .15rem .5rem; min-width: 1.4rem; text-align: center; line-height: 1.4; letter-spacing: 0; }
tr.row-cancel-requested td { background: rgba(239, 68, 68, .07); }
tr.row-cancel-requested:hover td { background: rgba(239, 68, 68, .12); }
.admin-logout { color: #94a3b8; }
.admin-logout:hover { color: #ef4444; background: rgba(239,68,68,.08); }
.admin-sidebar-footer { padding: .75rem .5rem 1rem; border-top: 1px solid #1e293b; display: flex; flex-direction: column; gap: .125rem; }
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar { background: var(--surface); border-bottom: 1px solid var(--border); padding: 1rem 1.5rem; display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 10; box-shadow: var(--shadow); }
.admin-page-title { font-size: 1.125rem; font-weight: 700; flex: 1; }
.admin-topbar-actions { display: flex; gap: .5rem; }
.app-status { display: flex; align-items: center; gap: .375rem; font-size: .75rem; color: var(--text-muted); white-space: nowrap; }
.app-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; flex-shrink: 0; transition: background .3s; }
.app-status-dot.up { background: #22c55e; box-shadow: 0 0 0 2px rgba(34,197,94,.2); }
.app-status-dot.down { background: #ef4444; box-shadow: 0 0 0 2px rgba(239,68,68,.2); }
.admin-maintenance-banner {
  position: sticky;
  top: 61px;
  z-index: 9;
  display: flex;
  align-items: center;
  gap: .875rem;
  background:
    linear-gradient(90deg, rgba(17,24,39,.16), transparent 18%, transparent 82%, rgba(17,24,39,.16)),
    repeating-linear-gradient(135deg, #facc15 0 18px, #111827 18px 26px, #facc15 26px 44px);
  color: #111827;
  border-bottom: 2px solid #111827;
  border-top: 2px solid #111827;
  padding: .7rem 1.5rem;
  font-size: .9rem;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(15,23,42,.18);
}
.admin-maintenance-stripes {
  width: 72px;
  height: 20px;
  flex: 0 0 72px;
  border: 2px solid #111827;
  background: repeating-linear-gradient(135deg, #111827 0 12px, #facc15 12px 24px);
}
.admin-maintenance-banner strong,
.admin-maintenance-banner span,
.admin-maintenance-banner a {
  background: #facc15;
  padding: .15rem .35rem;
  border-radius: 2px;
}
.admin-maintenance-banner strong { text-transform: uppercase; letter-spacing: .08em; }
.admin-maintenance-banner a {
  margin-left: auto;
  color: #111827;
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 720px) {
  .admin-maintenance-banner {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: .5rem .75rem;
  }
  .admin-maintenance-stripes { width: 56px; flex-basis: 56px; }
  .admin-maintenance-banner a { margin-left: 0; }
}
.admin-content { padding: 1.5rem; flex: 1; }

/* ── Unsaved-changes banner ──────────────────────────────── */
.unsaved-banner {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1.25rem;
  background: #7c3500;
  border: 1px solid #a34700;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  animation: bannerSlideIn .2s ease;
}
@keyframes bannerSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.unsaved-banner-icon { font-size: 1.1rem; flex-shrink: 0; }
.unsaved-banner-text { flex: 1; font-size: .9375rem; font-weight: 600; color: #fed7aa; }
.unsaved-banner-save {
  flex-shrink: 0;
  padding: .375rem 1rem; font-size: .875rem; font-weight: 600;
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm);
  cursor: pointer; font-family: var(--font);
  transition: background .15s;
  white-space: nowrap;
}
.unsaved-banner-save:hover { background: var(--accent-hover); }
.unsaved-banner-dismiss {
  flex-shrink: 0;
  background: none; border: none; cursor: pointer;
  color: #fed7aa; opacity: .6; font-size: 1rem;
  padding: .2rem .4rem; line-height: 1;
  transition: opacity .15s;
}
.unsaved-banner-dismiss:hover { opacity: 1; }

/* ── Admin Stats Grid ────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.stat-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: .35rem; }
.stat-value { font-size: 1.625rem; font-weight: 800; color: var(--text); letter-spacing: -.02em; }

/* ── Admin Tables ────────────────────────────────────────────────────────── */
.admin-table-wrap { width: 100%; overflow-x: auto; display: block; }
.admin-table { width: 100%; min-width: 640px; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.admin-table th { text-align: left; padding: .625rem .875rem; font-size: .75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; background: #f8fafc; border-bottom: 2px solid var(--border); white-space: nowrap; }
.table-sort-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .25rem; }
.table-sort-link:hover { color: var(--accent); text-decoration: none; }
.admin-table td { padding: .625rem .875rem; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: .9rem; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fafafa; }
/* Inputs that live directly inside a table cell (variant rows, etc.) */
.admin-table td input[type="text"],
.admin-table td input[type="number"],
.admin-table td input[type="email"],
.admin-table td select {
  font-family: var(--font) !important; font-size: .9rem !important; color: var(--text);
  padding: .4rem .6rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface);
  width: 100%; min-width: 0; box-sizing: border-box;
  transition: border-color .15s;
}
.admin-table td input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.admin-table td input:focus, .admin-table td select:focus { outline: none; border-color: var(--accent); }
.clickable-row { cursor: pointer; }
.clickable-row:focus-within td, .clickable-row:hover td { background: #f8fafc; }
.table-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.table-thumb-placeholder { width: 40px; height: 40px; background: #e2e8f0; border-radius: var(--radius-sm); }
.table-link { color: var(--link); font-size: .875rem; font-weight: 500; }
.table-link:hover { color: var(--accent); }
.table-actions { white-space: nowrap; }
.detail-page-heading { display: flex; align-items: center; gap: .875rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.detail-page-heading h1 { margin: 0; font-size: 1.35rem; letter-spacing: -.02em; }
.detail-page-heading code { font-size: .9em; }
.table-actions-inner { display: inline-flex; align-items: center; gap: .75rem; }
.table-actions-inner form { margin: 0; }
.btn-danger-link { background: none; border: none; color: #94a3b8; font-size: .8125rem; cursor: pointer; padding: 0; font-family: var(--font); transition: color .15s; }
.btn-danger-link:hover { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.text-right { text-align: right; }
.text-sm { font-size: var(--text-sm); }
.stock-text.in { color: var(--success); font-weight: 600; }
.stock-text.low { color: var(--warning); font-weight: 600; }
.stock-text.out { color: var(--danger); font-weight: 600; }

/* ── Admin Section ───────────────────────────────────────────────────────── */
.admin-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; }
.admin-section > h2 { font-size: 1rem; font-weight: 700; margin-bottom: 1.25rem; }
.admin-section > h2 small { font-weight: 400; }
.shipping-format-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.shipping-blocked-list { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 1rem; }
.shipping-destination-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: .25rem 0 1rem; }
.shipping-destination-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; background: #f8fafc; }
.shipping-destination-card-blocked { border-color: #fecaca; background: #fff7f7; }
.shipping-destination-card-allowed { border-color: #bbf7d0; background: #f7fef9; }
.shipping-destination-card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.shipping-destination-card-head strong { color: var(--text); font-size: .9rem; }
.shipping-destination-card-head span { color: var(--text-muted); font-size: .75rem; }
.shipping-destination-chips { display: flex; gap: .45rem; flex-wrap: wrap; align-items: flex-start; }
.destination-chip { display: inline-flex; align-items: center; gap: .35rem; border-radius: 999px; padding: .35rem .65rem; font-size: .78rem; font-weight: 600; line-height: 1; border: 1px solid transparent; }
.destination-chip span { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; opacity: .8; }
.destination-chip-blocked { color: #991b1b; background: #fee2e2; border-color: #fecaca; }
.destination-chip-allowed { color: #166534; background: #dcfce7; border-color: #bbf7d0; }
.shipping-destination-empty { color: var(--text-muted); font-size: .8125rem; margin: 0; }
@media (max-width: 780px) { .shipping-destination-summary { grid-template-columns: 1fr; } }
.restriction-panel { transition: opacity .2s ease; }
.restriction-panel--inactive { opacity: .35; pointer-events: none; }

/* ── Analytics ───────────────────────────────────────────────────────────── */
.analytics-toolbar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.analytics-period-tabs { display: flex; gap: .25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .25rem; }
.analytics-tab { padding: .3rem .75rem; border-radius: 4px; font-size: .8125rem; font-weight: 500; color: var(--text-muted); text-decoration: none; transition: background .15s, color .15s; }
.analytics-tab.active { background: var(--accent); color: #fff; }
.analytics-tab:hover:not(.active) { background: var(--bg); color: var(--text); }
.analytics-summary .stat-card { min-height: 90px; }
.analytics-delta { font-size: .8125rem; margin-top: .25rem; font-weight: 500; }
.analytics-delta.up { color: #16a34a; }
.analytics-delta.down { color: #dc2626; }
.analytics-chart-wrap { padding: .5rem 0; overflow: hidden; }
.analytics-chart { width: 100%; height: auto; display: block; color: var(--text); }
.chart-bar { fill: var(--accent); opacity: .75; transition: fill .15s, opacity .15s; }
.chart-bar-current { opacity: 1; }
/* Hover/focus affordance is the bar changing colour — never an underline on the labels.
   The underline is drawn by the browser's a:hover on the SVG <a> itself, so it must be
   removed on the anchor in every state (a child text{} can't undo an ancestor's decoration). */
.chart-bar-link,
.chart-bar-link:link,
.chart-bar-link:visited,
.chart-bar-link:hover,
.chart-bar-link:focus,
.chart-bar-link:focus-visible { text-decoration: none; cursor: pointer; outline: none; }
.chart-bar-link:hover .chart-bar,
.chart-bar-link:focus .chart-bar,
.chart-bar-link:focus-visible .chart-bar { fill: var(--accent-hover); opacity: 1; }
.chart-bar-selected { fill: var(--accent); opacity: 1; stroke: var(--text); stroke-width: 1.5; }
.chart-label-month-selected { opacity: 1; font-weight: 700; }
.analytics-fy-select { font-size: .8125rem; padding: .55rem .6rem; max-width: 150px; width: auto; }
.chart-label-val { font-size: 9px; fill: var(--text-muted); font-family: inherit; }
.chart-label-month { font-size: 10px; fill: currentColor; opacity: .55; font-family: inherit; }
.analytics-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.best-seller-bar { height: 4px; background: var(--border); border-radius: 2px; margin-top: .35rem; }
.best-seller-bar-fill { height: 4px; background: var(--accent); border-radius: 2px; opacity: .6; }
.best-seller-name { font-size: .875rem; }
.text-danger { color: #dc2626; }
@media (max-width: 900px) { .analytics-two-col { grid-template-columns: 1fr; } }

/* ── Media pagination ────────────────────────────────────────────────────── */
.media-pagination { display: flex; align-items: center; justify-content: center; gap: .25rem; flex-wrap: wrap; margin-top: 1.25rem; }
.page-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 .5rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: .8125rem; font-weight: 500; text-decoration: none; transition: border-color .15s, background .15s; }
.page-btn:hover { border-color: var(--accent); text-decoration: none; }
.page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); pointer-events: none; }
.page-btn.disabled { opacity: .4; pointer-events: none; }
.page-gap { color: var(--text-muted); padding: 0 .25rem; font-size: .8125rem; }
.page-jump { display: inline-flex; align-items: center; gap: .4rem; margin-left: .75rem; font-size: .8125rem; color: var(--text-muted); }
.page-jump input { width: 56px; padding: .3rem .4rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .8125rem; text-align: center; }

/* ── Media cleanup (unused images) ───────────────────────────────────────── */
.btn-danger { background: #dc2626; color: #fff; border-color: #dc2626; }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }
.cleanup-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.cleanup-toolbar-info { font-size: .875rem; min-width: 0; }
.cleanup-toolbar-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cleanup-select-all { display: inline-flex; align-items: center; gap: .4rem; font-size: .8125rem; color: var(--text-muted); cursor: pointer; margin-right: .25rem; }
.cleanup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.cleanup-card { display: flex; flex-direction: column; background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; position: relative; transition: border-color .15s, box-shadow .15s; }
.cleanup-card:hover { border-color: var(--text-muted); }
.cleanup-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(37, 99, 235, .15); }
.cleanup-check { position: absolute; top: .5rem; left: .5rem; width: 18px; height: 18px; accent-color: var(--accent); z-index: 1; }
.cleanup-thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; background: var(--bg); overflow: hidden; }
.cleanup-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cleanup-noimg { font-size: 2rem; color: var(--text-muted); }
.cleanup-meta { padding: .5rem .625rem; display: flex; flex-direction: column; gap: .15rem; }
.cleanup-name { font-size: .7rem; font-family: var(--font-mono); word-break: break-all; line-height: 1.3; }
.cleanup-detail { font-size: .7rem; color: var(--text-muted); }

/* ── Product recommendations ─────────────────────────────────────────────── */
.product-recommendations { margin-top: 2.5rem; }
.product-recommendations h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.reco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
.reco-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s, transform .15s; }
.reco-card:hover { border-color: var(--accent); box-shadow: 0 4px 12px rgba(0,0,0,.08); transform: translateY(-2px); text-decoration: none; }
.reco-thumb { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; background: var(--bg); overflow: hidden; color: var(--text-muted); }
.reco-thumb img { width: 100%; height: 100%; object-fit: cover; }
.reco-name { padding: .625rem .75rem 0; font-size: .85rem; font-weight: 600; line-height: 1.35; }
.reco-price { padding: .25rem .75rem .75rem; font-size: .85rem; color: var(--accent); font-weight: 600; }

/* Admin recommended-products picker */
.reco-picker-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.reco-picker-chips:empty { display: none; }
.reco-picker-row { display: flex; gap: .5rem; align-items: center; }
.reco-picker-row input { flex: 1; }
.reco-chip-inactive { opacity: .55; }

/* ── Back-in-stock notify ─────────────────────────────────────────────────── */
.btn-notify { background: transparent; color: var(--text-muted); border-color: var(--border); font-size: .875rem; }
.btn-notify:hover { border-color: var(--accent); color: var(--accent); }
.btn-notify-active { background: var(--accent); color: #fff; border-color: var(--accent); font-size: .875rem; }
.btn-notify-active:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
/* ── Product add-ons ─────────────────────────────────────── */
.product-info .form-row > label { font-size: 1.0625rem; font-weight: 600; }
.product-addons label:first-child { display: block; }
.addon-option { display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; margin-bottom: .5rem; transition: border-color .15s, background .15s; font-weight: 400; }
.addon-option:has(input:checked) { border-color: var(--accent); background: var(--accent-dim); }
.addon-option input { width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0; }
.addon-label { flex: 1; font-size: .9375rem; }
.addon-price { font-weight: 600; color: var(--accent-hover); white-space: nowrap; }
.addon-oos { opacity: .55; cursor: not-allowed; }
.addon-stock-note { font-size: .75rem; color: var(--text-muted); }
.cart-addons { margin: .25rem 0 0; padding-left: 1rem; font-size: .8125rem; color: var(--text-muted); list-style: none; }

.notify-form { margin-top: .75rem; }
.notify-signin { font-size: .875rem; color: var(--text-muted); margin-top: .75rem; }
.shipping-format-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.shipping-format-summary { cursor: pointer; padding: 1rem 1.25rem; background: #f8fafc; border-bottom: 1px solid var(--border); list-style: none; }
.shipping-format-summary::-webkit-details-marker { display: none; }
.shipping-format-summary::before { content: '▸'; display: inline-block; margin-right: .65rem; color: var(--text-muted); transition: transform .15s; }
.shipping-format-panel[open] .shipping-format-summary::before { transform: rotate(90deg); }
.shipping-format-summary div { display: inline-flex; flex-direction: column; gap: .15rem; vertical-align: middle; }
.shipping-format-summary strong { color: var(--text); font-size: 1rem; }
.shipping-format-summary span { color: var(--text-muted); font-size: .8125rem; }
.shipping-format-actions { display: flex; gap: .5rem; padding: 1rem 1.25rem 0; }
.shipping-format-actions form { margin: 0; }
.shipping-rate-table { border: none; border-radius: 0; margin-top: 1rem; }
.shipping-rate-table .inline-input { max-width: none; width: 100% !important; }
.shipping-rate-table .inline-input-sm { width: 80px !important; }
.shipping-rate-table td select { width: 100% !important; }
.shipping-add-rate { padding: 0 1.25rem 1.25rem; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.section-header h2 { font-size: 1rem; font-weight: 700; }
.empty-table { color: var(--text-muted); font-size: .9rem; padding: 1rem 0; }
.orders-filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1.25rem; }
.admin-filter-input { padding: .5rem .875rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font); font-size: .9375rem; color: var(--text); background: var(--surface); min-width: 0; height: 2.375rem; box-sizing: border-box; }
.admin-filter-input:focus { outline: none; border-color: var(--accent); }
.admin-filter-input option { background: var(--surface); }

/* ── Status Badges ───────────────────────────────────────────────────────── */
.status-badge { font-size: .7rem; font-weight: 700; padding: .2rem .6rem; border-radius: 20px; text-transform: uppercase; letter-spacing: .04em; }
.status-pending { background: #fef9c3; color: #92400e; }
.status-paid { background: #d1fae5; color: #065f46; }
.status-processing { background: #dbeafe; color: #1e40af; }
.status-packed { background: #e0f2fe; color: #075985; }
.status-shipped { background: #f3e8ff; color: #6b21a8; }
.status-delivered { background: #dcfce7; color: #166534; }
.status-cancelled { background: #fee2e2; color: #991b1b; }
.status-refunded { background: #f1f5f9; color: #64748b; }

.order-timeline { list-style: none; margin: 0; padding: .25rem 0 0; }
.order-timeline-item { position: relative; display: grid; grid-template-columns: 1rem 1fr; gap: .75rem; padding-bottom: 1rem; }
.order-timeline-item::before { content: ""; position: absolute; left: .45rem; top: 1rem; bottom: 0; width: 2px; background: var(--border); }
.order-timeline-item:last-child { padding-bottom: 0; }
.order-timeline-item:last-child::before { display: none; }
.order-timeline-dot { position: relative; z-index: 1; width: .7rem; height: .7rem; border-radius: 50%; background: var(--accent); margin-top: .35rem; box-shadow: 0 0 0 4px var(--accent-dim); }
.order-timeline-content { min-width: 0; }
.order-timeline-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .35rem; }
.order-timeline-content p { margin-top: .35rem; }

/* ── Print Documents ─────────────────────────────────────────────────────── */
.print-body { background: #fff; color: #111827; font-family: Georgia, "Times New Roman", serif; }
.print-document { max-width: 920px; margin: 2rem auto; padding: 2rem; }
.print-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; border-bottom: 2px solid #111827; padding-bottom: 1rem; margin-bottom: 1.5rem; }
.print-logo { width: auto; height: 56px; max-width: 180px; object-fit: contain; }
.print-header h1 { font-size: 2rem; margin: 0 0 .5rem; }
.print-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem; margin-bottom: 1.5rem; }
.print-document h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; margin: 1rem 0 .5rem; }
.print-table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; }
.print-table th,
.print-table td { border: 1px solid #d1d5db; padding: .6rem; text-align: left; vertical-align: top; }
.print-table th { background: #f3f4f6; }
.print-table tfoot td { text-align: right; }
@media print {
  .print-document { margin: 0; padding: 0; max-width: none; }
  .print-body { background: #fff; }
}

/* ── Admin Form (product form etc.) ─────────────────────────────────────── */
.form-cols { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; align-items: start; max-width: 1200px; }
.form-col-main, .form-col-side { min-width: 0; }
.settings-side { position: sticky; top: 6rem; align-self: start; height: fit-content; }
.settings-side-inner { position: sticky; top: 6rem; }
@media (max-width: 900px) {
  .form-cols { grid-template-columns: 1fr; }
  .settings-side, .settings-side-inner { position: static; }
}
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.25rem; }
.form-card[id] { scroll-margin-top: 140px; }
.form-card h2 { font-size: .9375rem; font-weight: 700; margin-bottom: 1.25rem; padding-bottom: .75rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.form-card[data-collapsible-panel] > h2,
.nested-collapsible-panel > h3 { cursor: pointer; user-select: none; }
.form-card[data-collapsible-panel] > h2::after,
.nested-collapsible-panel > h3::after { content: "Collapse"; font-size: .75rem; font-weight: 600; color: var(--text-muted); margin-left: auto; }
.form-card[data-collapsible-panel].is-collapsed { padding-bottom: .25rem; }
.form-card[data-collapsible-panel].is-collapsed > h2 { margin-bottom: 0; border-bottom: 0; }
.form-card[data-collapsible-panel].is-collapsed > h2::after,
.nested-collapsible-panel.is-collapsed > h3::after { content: "Expand"; }
.form-card[data-collapsible-panel].is-collapsed > :not(h2),
.nested-collapsible-panel.is-collapsed > :not(h3) { display: none; }
.nested-collapsible-panel { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; margin-bottom: 1rem; background: #f8fafc; }
.nested-collapsible-panel:last-child { margin-bottom: 0; }
.nested-collapsible-panel > h3 { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: 0 0 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--border); font-size: .95rem; }
.nested-collapsible-panel.is-collapsed { padding-bottom: .25rem; }
.nested-collapsible-panel.is-collapsed > h3 { margin-bottom: 0; border-bottom: 0; }
.form-hint { font-size: .8125rem; color: var(--text-muted); margin-bottom: 1rem; }
.form-check { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.form-check input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
.form-check label { font-size: .9rem; cursor: pointer; }
.form-select, .form-select-sm { padding: .625rem .875rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font); font-size: .9375rem; color: var(--text); background: var(--surface); width: 100%; }
.form-select:focus { outline: none; border-color: var(--accent); }
.form-select-sm { padding: .35rem .625rem; font-size: .8125rem; width: auto; }
.form-actions { display: flex; flex-direction: column; gap: .5rem; }
.settings-panel-controls { max-width: 1200px; display: flex; justify-content: flex-end; align-items: center; gap: .6rem; margin-bottom: .75rem; color: var(--text-muted); font-size: .75rem; }
.settings-panel-controls button { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; font-family: var(--font); font-size: .75rem; font-weight: 600; color: var(--text-muted); }
.settings-panel-controls button:hover { color: var(--text); }
.admin-import-actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-start; margin: 1rem 0; }
.packing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem 1rem; }
.packing-rule-list { display: flex; flex-direction: column; gap: 1rem; }
.packing-format-group { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; background: #f8fafc; }
.packing-format-header { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.packing-format-header strong { font-size: .9rem; }
.packing-format-header small { color: var(--text-muted); font-size: .75rem; text-align: right; }
.packing-format-rules { display: flex; flex-direction: column; gap: .75rem; margin-bottom: .75rem; }
.packing-rule-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(160px, 1fr) auto;
  gap: .75rem;
  align-items: end;
}
@media (max-width: 640px) {
  .packing-rule-row { grid-template-columns: 1fr; }
  .packing-format-header { flex-direction: column; }
  .packing-format-header small { text-align: left; }
}

/* ── Image Upload ────────────────────────────────────────────────────────── */
.image-manager { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.image-item { border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.image-item img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.image-actions { padding: .25rem; background: #f8fafc; display: flex; flex-direction: column; gap: .2rem; }
.image-radio-label, .image-delete-label { display: flex; align-items: center; gap: .25rem; font-size: .65rem; color: var(--text-muted); cursor: pointer; }
.file-upload-area {
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 1.5rem;
  text-align: center; cursor: pointer; position: relative;
  transition: border-color .15s, background .15s;
}
.file-upload-area:hover { border-color: var(--accent); background: var(--accent-dim); }
.file-upload-area p { font-size: .875rem; color: var(--text-muted); margin-top: .5rem; }
.image-preview-list { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }
.preview-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }

/* ── Inline forms (shipping page) ───────────────────────────────────────── */
.inline-form { }
.inline-input { padding: .4rem .625rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font); font-size: .875rem; width: 100%; max-width: 220px; }
.inline-input-sm { padding: .4rem .5rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font); font-size: .875rem; width: 80px; }
.inline-edit-form { display: contents; }

/* ── Order detail ────────────────────────────────────────────────────────── */
.order-detail-layout { display: grid; grid-template-columns: 1fr 280px; gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .order-detail-layout { grid-template-columns: 1fr; } }
.order-side > * { margin-bottom: 1rem; }
.current-status { margin-bottom: .75rem; }
.order-meta { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; align-items: start; }
.order-meta dt { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.order-meta dd { font-size: .875rem; }
.subtotal-row td { padding-top: 1rem; border-top: 2px solid var(--border); }
.total-row td { font-size: 1rem; }
tfoot tr:first-child td { border-top: 2px solid var(--border); }

/* ── Settings ────────────────────────────────────────────────────────────── */
.form-card h2 a.link-small { font-size: .75rem; font-weight: 500; }

/* ── WYSIWYG rich-text editor ────────────────────────────────────────────── */
.wysiwyg-editor { border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); transition: border-color .15s; }
.wysiwyg-editor:focus-within { border-color: var(--border-focus); }
.wysiwyg-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 5px 8px; background: var(--bg); border-bottom: 1px solid var(--border); }
.wysiwyg-btn { background: none; border: 1px solid transparent; border-radius: 4px; padding: 3px 8px; cursor: pointer; font-size: 13px; color: var(--text); line-height: 1.4; font-family: var(--font); transition: background .1s, border-color .1s; }
.wysiwyg-btn:hover { background: var(--border); border-color: var(--border); }
.wysiwyg-btn.wys-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.wysiwyg-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; flex-shrink: 0; }
.wysiwyg-format-select { border: 1px solid var(--border); border-radius: 4px; padding: 3px 6px; font-size: 12px; color: var(--text); background: var(--surface); font-family: var(--font); cursor: pointer; }
.wysiwyg-body { min-height: 180px; max-height: 480px; overflow-y: auto; padding: 12px 14px; outline: none; font-size: .875rem; line-height: 1.65; color: var(--text); }
.wysiwyg-body p { margin: 0 0 .6em; }
.wysiwyg-body h2 { font-size: 1.1em; font-weight: 700; margin: 1em 0 .35em; }
.wysiwyg-body h3 { font-size: 1em; font-weight: 600; margin: .9em 0 .3em; }
.wysiwyg-body ul, .wysiwyg-body ol { padding-left: 1.4em; margin: .4em 0; }
.wysiwyg-body li { margin-bottom: .2em; }
.wysiwyg-body a { color: var(--link); text-decoration: underline; }
.wysiwyg-body strong, .wysiwyg-body b { font-weight: 700; }
.wysiwyg-body em, .wysiwyg-body i { font-style: italic; }
.wysiwyg-body u { text-decoration: underline; }
.wysiwyg-source { display: none; width: 100%; min-height: 180px; padding: 12px 14px; border: none; font-family: var(--font-mono); font-size: .8125rem; resize: vertical; background: #f8fafc; color: var(--text); outline: none; }
.wysiwyg-source.visible { display: block; }
.wysiwyg-body.hidden { display: none; }

/* ── SEO / search engine preview ─────────────────────────────────────────── */
.seo-preview { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; font-family: Arial, Helvetica, sans-serif; background: var(--surface); }
.seo-breadcrumb { font-size: 12px; color: #202124; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seo-breadcrumb span { color: #5f6368; }
.seo-title { font-size: 18px; color: #1a0dab; font-weight: 400; line-height: 1.3; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.seo-desc { font-size: 13px; color: #4d5156; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Product sales stats ──────────────────────────────────────────────────── */
.sales-stats-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0; }
.sales-stat-row { display: flex; justify-content: space-between; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: .875rem; }
.sales-stat-row:last-child { border-bottom: none; }
.sales-stat-value { font-weight: 600; color: var(--text); }
.sales-stat-label { color: var(--text-muted); font-size: .8125rem; }
.sales-stat-zero { color: var(--text-muted); font-weight: 400; }

/* ── Product Reviews ─────────────────────────────────────────────────────── */
.product-reviews {
  margin-top: 2rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.product-reviews-header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
.product-reviews h2 { margin-bottom: .35rem; }
.review-stars { display: inline-flex; gap: .125rem; color: #cbd5e1; letter-spacing: .02em; }
.review-stars .filled { color: #f59e0b; }
.review-list { display: grid; gap: 1rem; }
.review-card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8fafc;
}
.review-card-head,
.admin-review-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}
.review-card p { margin-top: .5rem; }
.review-product-summary {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  padding: .75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  margin-bottom: 1rem;
}
.review-rating-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: .4rem;
}
.review-rating-input input { position: absolute; opacity: 0; pointer-events: none; }
.review-rating-input label {
  cursor: pointer;
  padding: .45rem .65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  background: #fff;
  font-weight: 600;
}
.review-rating-input input:checked ~ label,
.review-rating-input label:hover,
.review-rating-input label:hover ~ label {
  color: #92400e;
  border-color: #fbbf24;
  background: #fffbeb;
}
.admin-page-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.admin-filter-tabs { display: flex; gap: .5rem; flex-wrap: wrap; }
.admin-filter-tabs a {
  padding: .45rem .75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
  background: var(--surface);
  font-size: .875rem;
  font-weight: 600;
}
.admin-filter-tabs a.active {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}
.admin-review-list { display: grid; gap: 1rem; }
.admin-review-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8fafc;
}
.admin-review-card h3 { margin: 0; font-size: 1rem; }
.admin-review-actions {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  min-width: 130px;
}
@media (max-width: 760px) {
  .product-reviews-header,
  .admin-page-actions,
  .admin-review-card { display: block; }
  .admin-review-actions { margin-top: 1rem; }
}
