/* =========================================================================
   CWPOS Storefront — store.css
   Every colour is a CSS variable. The single accent is injected from config
   as --accent in the page <head>. Light and dark are full theme sets.
   ========================================================================= */

.theme-light {
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-2: #f4f4f2;
  --ink: #1a1a1f;
  --ink-2: #56565e;
  --ink-3: #9a9aa3;
  --border: #e6e6e2;
  --border-strong: #d6d6d0;
  --accent-ink: #ffffff;
  --ok-bg: #e7f6ec; --ok-ink: #1c7a45;
  --warn-bg: #fdf3e2; --warn-ink: #9a6712;
  --danger-bg: #fdecec; --danger-ink: #b3261e;
  --shadow: 0 1px 2px rgba(20,20,30,.04), 0 8px 24px rgba(20,20,30,.05);
  --shadow-sm: 0 1px 2px rgba(20,20,30,.06);
  --radius: 14px; --radius-sm: 10px;
}

.theme-dark {
  --bg: #0e0f13;
  --surface: #16181e;
  --surface-2: #1d2027;
  --ink: #f3f3f5;
  --ink-2: #a7a7b0;
  --ink-3: #6f6f79;
  --border: #282b33;
  --border-strong: #353944;
  --accent-ink: #ffffff;
  --ok-bg: rgba(46,160,89,.16); --ok-ink: #5fd08a;
  --warn-bg: rgba(214,158,46,.16); --warn-ink: #e2b35a;
  --danger-bg: rgba(214,68,58,.16); --danger-ink: #f1827a;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.45);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv01";
}

a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: var(--accent-ink); padding: 10px 16px; z-index: 50;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------------- Header ---------------- */
.site-head {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.head-inner {
  display: flex; align-items: center; gap: 20px;
  height: 68px;
}
.brand-mark {
  font-weight: 700; font-size: 19px; letter-spacing: -.02em;
}
.search {
  display: flex; flex: 1; max-width: 440px; margin-left: auto;
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  background: var(--surface-2);
}
.search input {
  flex: 1; border: 0; background: transparent; color: var(--ink);
  padding: 9px 14px; font-size: 14px; outline: none;
}
.search button {
  border: 0; background: transparent; color: var(--ink-2);
  padding: 0 14px; font-size: 13px; cursor: pointer;
}
.search button:hover { color: var(--ink); }
.head-actions { display: flex; align-items: center; gap: 10px; }
.theme-form { margin: 0; }
.icon-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--ink-2);
  border-radius: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer;
}
.icon-btn:hover { color: var(--ink); border-color: var(--border-strong); }
.bag-link {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--bg);
  padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 600;
}
.bag-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px;
  padding: 0 6px; border-radius: 999px; font-size: 12px;
  background: var(--accent); color: var(--accent-ink);
}

/* ---------------- Flash / errors ---------------- */
.flash { padding: 10px 0; font-size: 14px; }
.flash-ok { background: var(--ok-bg); color: var(--ok-ink); }
.flash-info { background: var(--surface-2); color: var(--ink-2); }
.errbox {
  background: var(--danger-bg); color: var(--danger-ink);
  border-radius: 10px; padding: 14px 18px; margin-bottom: 22px;
}
.errbox p { margin: 4px 0; font-size: 14px; }

/* ---------------- Main / headings ---------------- */
.site-main { padding-top: 40px; padding-bottom: 80px; }
.page-head { margin-bottom: 28px; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 8px;
}
.page-title {
  margin: 0; font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -.03em; font-weight: 700; line-height: 1.1;
}

/* ---------------- Category rail ---------------- */
.cat-rail { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.chip {
  font-size: 13px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--ink-2); background: var(--surface);
}
.chip:hover { border-color: var(--border-strong); color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------------- Product grid ---------------- */
.grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.card-media {
  position: relative; display: block; aspect-ratio: 4 / 5;
  background: var(--surface-2); overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 34px; font-weight: 700; letter-spacing: .02em;
  color: var(--ink-3);
  background:
    radial-gradient(120% 120% at 30% 20%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 60%),
    var(--surface-2);
}
.ph-lg { font-size: 64px; }
.tag {
  position: absolute; top: 12px; left: 12px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 6px;
}
.card-body { padding: 14px 16px 18px; }
.card-cat { font-size: 12px; color: var(--ink-3); letter-spacing: .03em; }
.card-name { margin: 4px 0 12px; font-size: 15px; font-weight: 600; line-height: 1.3; }
.card-name a:hover { color: var(--accent); }
.card-foot { display: flex; align-items: center; justify-content: space-between; }
.price { font-weight: 700; font-size: 15px; }
.stock { font-size: 12px; padding: 3px 8px; border-radius: 6px; font-weight: 600; }
.stock.low { background: var(--warn-bg); color: var(--warn-ink); }
.stock.out { background: var(--danger-bg); color: var(--danger-ink); }
.stock.in { background: var(--ok-bg); color: var(--ok-ink); }

/* ---------------- Product page ---------------- */
.crumbs { font-size: 13px; color: var(--ink-3); margin-bottom: 22px; }
.crumbs a:hover { color: var(--ink); }
.crumbs span { margin: 0 8px; }
.product { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.product-media {
  position: relative; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border);
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-name { margin: 6px 0 10px; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.025em; }
.product-price { font-size: 22px; font-weight: 700; margin-bottom: 20px; }
.product-desc { color: var(--ink-2); margin-bottom: 24px; }
.product-stock { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.sku { font-size: 12px; color: var(--ink-3); }
.add-form { display: flex; gap: 12px; align-items: flex-end; }
.qty { display: flex; flex-direction: column; gap: 6px; }
.qty label { font-size: 12px; color: var(--ink-2); }
.qty input {
  width: 76px; padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink);
  padding: 12px 22px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: transform .12s, filter .12s, background .12s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; color: var(--ink-3); cursor: pointer; font-size: 13px; padding: 0; }
.link-btn:hover { color: var(--danger-ink); }

/* ---------------- Cart ---------------- */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
.cart-row {
  display: grid; grid-template-columns: 72px 1fr auto auto auto;
  gap: 16px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--border);
}
.cart-thumb { width: 72px; height: 88px; border-radius: var(--radius-sm); overflow: hidden; position: relative; background: var(--surface-2); }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-detail { display: flex; flex-direction: column; gap: 4px; }
.cart-name { font-weight: 600; }
.cart-name:hover { color: var(--accent); }
.cart-unit { font-size: 13px; color: var(--ink-3); }
.cart-qty input {
  width: 64px; padding: 9px 10px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink); text-align: center;
}
.cart-line { font-weight: 700; min-width: 80px; text-align: right; }

.cart-summary, .checkout-summary {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 22px; position: sticky; top: 88px;
}
.summary-title { margin: 0 0 16px; font-size: 17px; }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; padding: 7px 0; }
.summary-row.muted { color: var(--ink-3); }
.summary-row.total {
  border-top: 1px solid var(--border); margin-top: 8px; padding-top: 14px;
  font-size: 17px; font-weight: 700;
}
.cart-summary .btn { margin-top: 16px; }
.continue { display: block; text-align: center; margin-top: 12px; font-size: 13px; color: var(--ink-3); }
.continue:hover { color: var(--ink); }

/* ---------------- Checkout ---------------- */
.checkout { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
.fieldset { margin-bottom: 28px; }
.fieldset-title { font-size: 16px; margin: 0 0 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13px; color: var(--ink-2); }
.field input, .field textarea, .field select, .status-form select {
  padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  font-size: 15px; font-family: inherit; outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.choice-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.choice {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-size: 14px;
}
.choice:hover { border-color: var(--border-strong); }
.sum-items { margin-bottom: 12px; }
.sum-item { display: grid; grid-template-columns: 32px 1fr auto; gap: 8px; font-size: 14px; padding: 6px 0; }
.sum-q { color: var(--ink-3); }
.pay-note { font-size: 13px; color: var(--ink-2); background: var(--surface-2); padding: 12px; border-radius: 10px; margin: 14px 0; }
.checkout-summary .btn { margin-top: 16px; }

/* ---------------- Confirm ---------------- */
.confirm { max-width: 560px; margin-left: auto; margin-right: auto; }
.confirm-ref { font-size: 16px; margin: 12px 0; }
.confirm-msg { color: var(--ink-2); margin-bottom: 24px; }
.confirm-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px; margin-bottom: 26px; }

/* ---------------- Empty ---------------- */
.empty { text-align: center; padding: 60px 0; color: var(--ink-2); }
.empty p { margin-bottom: 18px; }

/* ---------------- Footer ---------------- */
.site-foot { border-top: 1px solid var(--border); margin-top: 40px; }
.foot-inner { display: flex; justify-content: space-between; align-items: center; padding: 28px 0; flex-wrap: wrap; gap: 16px; }
.foot-name { font-weight: 700; }
.foot-tag { font-size: 13px; color: var(--ink-3); }
.foot-meta { display: flex; gap: 18px; font-size: 13px; color: var(--ink-3); }
.foot-meta a:hover { color: var(--ink); }

/* ---------------- Admin ---------------- */
.admin-head { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
body.in-suite .admin-head { top: 40px; }
/* One-line bar, 56px like the Books / Pay top bars; content edges line up with the page below. */
.admin-head-inner { display: flex; align-items: center; gap: 24px; height: 56px; max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; }
.admin-brand { display: inline-flex; align-items: baseline; gap: 8px; flex: none; min-width: 0; color: var(--ink); text-decoration: none; }
.admin-brand-name { font-weight: 700; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.admin-brand-tag { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.admin-nav { display: flex; align-items: stretch; gap: 2px; flex: 1; min-width: 0; height: 100%; font-size: 14px; white-space: nowrap; }
@media (min-width: 1025px) {
  /* Safety net for very long store names / many badges: scroll, never wrap */
  .admin-nav { overflow-x: auto; scrollbar-width: none; }
  .admin-nav::-webkit-scrollbar { display: none; }
}
.admin-nav a { color: var(--ink-2); }
.admin-nav a:hover { color: var(--ink); }
.admin-nav-end { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.admin-main { padding: 32px 0 70px; }
.admin-head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.admin-auth { max-width: 360px; margin: 60px auto; }
.auth-form { margin-top: 20px; }
.back-link { display: inline-block; font-size: 13px; color: var(--ink-3); margin-bottom: 14px; }
.back-link:hover { color: var(--ink); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-3); padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.muted-sm { font-size: 12px; color: var(--ink-3); }
.low-cell { color: var(--warn-ink); font-weight: 700; }

.badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 6px; text-transform: capitalize; background: var(--surface-2); color: var(--ink-2); }
.badge-placed { background: var(--surface-2); color: var(--ink-2); }
.badge-paid { background: var(--ok-bg); color: var(--ok-ink); }
.badge-picking { background: var(--warn-bg); color: var(--warn-ink); }
.badge-fulfilled { background: var(--ok-bg); color: var(--ok-ink); }
.badge-closed { background: var(--surface-2); color: var(--ink-3); }
.badge-cancelled { background: var(--danger-bg); color: var(--danger-ink); }

.order-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.panel-title { font-size: 15px; margin: 0 0 14px; }
.panel-title + .panel-title { margin-top: 22px; }
.kv { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; margin: 8px 0; }
.kv span { color: var(--ink-3); }
.kv strong { font-weight: 600; text-align: right; }
.status-form { display: flex; gap: 10px; }
.status-form select { flex: 1; }

.prod-form { max-width: 640px; margin-left: auto; margin-right: auto; }
.check-row { display: flex; gap: 24px; margin: 4px 0 22px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }

/* ---------------- Focus visibility ---------------- */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 880px) {
  .product { grid-template-columns: 1fr; gap: 28px; }
  .cart-layout, .checkout { grid-template-columns: 1fr; }
  .order-grid { grid-template-columns: 1fr; }
  .cart-summary, .checkout-summary { position: static; }
}
@media (max-width: 620px) {
  .head-inner { flex-wrap: wrap; height: auto; padding: 12px 0; gap: 12px; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .cart-row { grid-template-columns: 56px 1fr auto; row-gap: 8px; }
  .cart-thumb { width: 56px; height: 68px; }
  .cart-qty { grid-column: 2; }
  .cart-line { grid-column: 3; }
  .cart-remove { grid-column: 2 / 4; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

.admin-who { color: var(--ink-3); font-size: 13px; padding-right: 4px; }

/* ---------------- Admin dashboard stats ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; }
.stat-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.stat-value { display: block; font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 2px; }
.stat-sub { display: block; font-size: 12px; color: var(--ink-3); }
@media (max-width: 880px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .stat-grid { grid-template-columns: 1fr; } }

/* ---------------- Variant picker (product page) ---------------- */
.variant-pick { display: flex; flex-direction: column; gap: 6px; margin-right: 12px; }
.variant-pick label { font-size: 12px; color: var(--ink-2); }
.variant-pick select {
  padding: 11px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); min-width: 160px; font-size: 14px;
}
.add-form { flex-wrap: wrap; }

/* ---------------- Header nav + hamburger ---------------- */
.head-nav { display: flex; gap: 18px; font-size: 14px; margin-left: 4px; }
.head-nav a { color: var(--ink-2); white-space: nowrap; }
.head-nav a:hover { color: var(--ink); }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; padding: 0 9px; border: 1px solid var(--border);
  border-radius: 9px; background: var(--surface); cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }

.nav-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; }
.nav-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 282px; max-width: 84vw;
  background: var(--surface); border-right: 1px solid var(--border);
  z-index: 45; transform: translateX(-100%); transition: transform .22s ease;
  display: flex; flex-direction: column;
}
.nav-drawer.is-open { transform: translateX(0); box-shadow: var(--shadow); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.drawer-close { background: none; border: 0; font-size: 26px; line-height: 1; color: var(--ink-2); cursor: pointer; }
.drawer-nav { display: flex; flex-direction: column; padding: 8px 0; }
.drawer-nav a { padding: 13px 20px; color: var(--ink); border-bottom: 1px solid var(--border); font-size: 15px; }
.drawer-nav a:hover { background: var(--surface-2); }
body.nav-locked { overflow: hidden; }

/* ---------------- Richer footer ---------------- */
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; padding: 44px 0 28px; }
.foot-col { display: flex; flex-direction: column; gap: 9px; }
.foot-h { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin: 0 0 4px; }
.foot-col a { font-size: 14px; color: var(--ink-2); }
.foot-col a:hover { color: var(--ink); }
.foot-brand .foot-name { font-weight: 700; font-size: 16px; }
.foot-brand .foot-tag { font-size: 13px; color: var(--ink-3); }
.foot-email { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.foot-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding: 18px 0 28px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--ink-3);
}

/* ---------------- Content pages ---------------- */
.page-content { max-width: 100%; }
.page-body { max-width: 760px; }  /* readable text measure inside the full-width page */
.page-body { margin-top: 18px; }
.page-body p { margin: 0 0 16px; color: var(--ink-2); line-height: 1.7; }

.contact-grid { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 40px; align-items: start; margin-top: 24px; }
.contact-aside { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px; }

/* ---------------- Header / footer responsive ---------------- */
@media (max-width: 820px) {
  .head-nav { display: none; }
  .nav-toggle { display: flex; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-aside { order: -1; }
}
@media (max-width: 520px) {
  .foot-grid { grid-template-columns: 1fr; }
}

/* ===== Header layout v2 — overrides earlier header rules ===== */
.head-inner { display: flex; align-items: center; gap: 18px; height: 66px; flex-wrap: nowrap; }
.brand { flex: 0 0 auto; display: inline-flex; align-items: center; }
.brand-mark { font-weight: 700; font-size: 18px; letter-spacing: -.02em; white-space: nowrap; }
.brand-logo { height: 34px; width: auto; display: block; }
.head-nav { display: flex; align-items: center; gap: 16px; flex: 0 1 auto; min-width: 0; }
.head-nav a { white-space: nowrap; }
.head-actions { margin-left: auto; flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.head-actions .search {
  display: flex; flex: 0 1 200px; max-width: 200px; min-width: 130px; margin: 0;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); overflow: hidden;
}
.head-actions .search input { width: 100%; min-width: 0; }
.drawer-search { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.drawer-search input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface-2); color: var(--ink); font-size: 14px; outline: none;
}

@media (max-width: 900px) {
  .head-nav { display: none; }
  .nav-toggle { display: flex; }
  .head-actions .search { display: none; }
}
@media (min-width: 901px) {
  .nav-toggle { display: none; }
}
@media (max-width: 620px) {
  .head-inner { flex-wrap: nowrap; height: 60px; padding: 0; gap: 12px; }
  .brand-mark { font-size: 16px; }
  .brand-logo { height: 28px; }
}

/* ============================================================
   Storefront skin v2 — hero, toolbar, refined product cards
   All colours via theme tokens; accent stays merchant-driven.
   ============================================================ */

/* Hero — the merchant's tagline is the thesis */
.shop-hero{ padding: 30px 0 34px; border-bottom: 1px solid var(--border); margin-bottom: 26px; }
.shop-hero-inner{ max-width: 640px; }
.shop-hero.align-center{ text-align: center; }
.shop-hero.align-center .shop-hero-inner{ max-width: 700px; margin: 0 auto; }
.shop-hero.align-center .shop-hero-eyebrow{ padding-left: 0; }
.shop-hero.align-center .shop-hero-eyebrow::before{ display: none; }
.shop-hero-eyebrow{
  display:inline-block; font-size:12px; font-weight:700; letter-spacing:.14em;
  text-transform:uppercase; color:var(--accent); padding-left:14px; position:relative;
}
.shop-hero-eyebrow::before{
  content:""; position:absolute; left:0; top:50%; width:8px; height:2px;
  background:var(--accent); transform:translateY(-50%);
}
.shop-hero-title{
  margin:14px 0 0; font-weight:800; letter-spacing:-.03em; line-height:1.04;
  font-size:clamp(30px,5vw,52px); color:var(--ink);
}
.shop-hero-cta{
  display:inline-flex; align-items:center; gap:8px; margin-top:20px;
  font-size:14px; font-weight:600; color:var(--ink);
  border-bottom:2px solid var(--accent); padding-bottom:3px;
}
.shop-hero-cta:hover{ color:var(--accent); }

/* Banner-image hero — set a Hero banner image in Settings */
.shop-hero.has-banner{
  background-size:cover; background-position:center; border-bottom:0;
  border-radius:18px; padding:56px 44px; min-height:300px;
  display:flex; align-items:center; position:relative; overflow:hidden;
}
.shop-hero.has-banner::before{
  content:""; position:absolute; inset:0;
  background:linear-gradient(90deg, rgba(0,0,0,.66), rgba(0,0,0,.18));
}
.shop-hero.has-banner.align-center{ justify-content:center; }
.shop-hero.has-banner.align-center::before{ background:rgba(0,0,0,.5); }
.shop-hero.has-banner .shop-hero-inner{ position:relative; z-index:1; }
.shop-hero.has-banner .shop-hero-eyebrow,
.shop-hero.has-banner .shop-hero-title,
.shop-hero.has-banner .shop-hero-cta{ color:#fff; }
.shop-hero.has-banner .shop-hero-eyebrow::before,
.shop-hero.has-banner .shop-hero-cta{ border-bottom-color:#fff; }
.shop-hero.has-banner .shop-hero-eyebrow::before{ background:#fff; }
@media (max-width:620px){
  .shop-hero.has-banner{ padding:36px 24px; min-height:220px; border-radius:14px; }
}

/* Toolbar: categories left, sort right */
.shop-toolbar{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  flex-wrap:wrap; margin-bottom:22px;
}
.cat-rail{ display:flex; gap:8px; flex-wrap:wrap; }
.sortbox{ display:flex; align-items:center; gap:8px; }
.sortbox label{ font-size:13px; color:var(--ink-3); }
.sortbox select{
  appearance:none; -webkit-appearance:none;
  padding:8px 30px 8px 12px; border:1px solid var(--border); border-radius:10px;
  background:var(--surface)
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' fill='none' stroke='%23999' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>")
    no-repeat right 10px center;
  color:var(--ink); font-size:13px; font-weight:600; cursor:pointer;
}
.sortbox select:focus{ outline:none; border-color:var(--accent); }

/* Grid */
.grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:22px; }

/* Product card */
.pcard{
  position:relative; display:flex; flex-direction:column;
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
  overflow:hidden; transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.pcard:hover{ border-color:var(--border-strong); box-shadow:var(--shadow); transform:translateY(-3px); }
.pcard-media{
  position:relative; display:block; aspect-ratio:1/1; background:var(--surface-2); overflow:hidden;
}
.pcard-media img{ width:100%; height:100%; object-fit:cover; display:block; transition:transform .4s ease; }
.pcard:hover .pcard-media img{ transform:scale(1.04); }
.pcard-media .ph{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-size:38px; font-weight:800; letter-spacing:.04em;
  color:var(--ink-3); background:var(--surface-2);
}
/* Category-tinted placeholders (decorative; subtle in light + dark) */
.ph.ph-c0{ background:rgba(59,130,246,.13);  color:#2f6fe0; }
.ph.ph-c1{ background:rgba(168,85,247,.14);  color:#9333ea; }
.ph.ph-c2{ background:rgba(16,185,129,.14);  color:#0f9d6e; }
.ph.ph-c3{ background:rgba(244,114,22,.14);  color:#dd6b13; }
.ph.ph-c4{ background:rgba(236,72,153,.13);  color:#db2f87; }
.ph.ph-c5{ background:rgba(20,184,166,.14);  color:#0e9aa0; }

/* Badges */
.pcard-badges{ position:absolute; top:10px; left:10px; display:flex; flex-direction:column; gap:6px; }
.badge-pill{ font-size:11px; font-weight:700; letter-spacing:.03em; padding:4px 9px; border-radius:999px; }
.badge-pill.sale{ background:var(--accent); color:var(--accent-ink); }
.badge-pill.feat{ background:var(--surface); color:var(--ink-2); border:1px solid var(--border); }
.pcard-status{
  position:absolute; top:10px; right:10px; font-size:11px; font-weight:700; padding:4px 9px;
  border-radius:999px; background:var(--warn-bg); color:var(--warn-ink);
}

/* Quick action over the foot of the image */
.pcard-quick{ position:absolute; left:10px; right:10px; bottom:10px; }
.pcard-add,.pcard-choose,.pcard-soldout{
  display:flex; width:100%; align-items:center; justify-content:center;
  height:40px; border-radius:10px; font-size:13.5px; font-weight:600; text-align:center;
}
.pcard-add{ background:var(--accent); color:var(--accent-ink); border:0; cursor:pointer; }
.pcard-add:hover{ filter:brightness(.95); }
.pcard-choose{ background:var(--surface); color:var(--ink); border:1px solid var(--border-strong); }
.pcard-choose:hover{ border-color:var(--accent); color:var(--accent); }
.pcard-soldout{ background:var(--surface-2); color:var(--ink-3); cursor:default; }

/* Reveal quick action on hover where hover is available */
@media (hover:hover){
  .pcard-quick{ opacity:0; transform:translateY(6px); transition:opacity .18s ease, transform .18s ease; pointer-events:none; }
  .pcard:hover .pcard-quick{ opacity:1; transform:none; pointer-events:auto; }
}

.pcard-body{ padding:14px 15px 16px; display:flex; flex-direction:column; gap:3px; }
.card-cat{ font-size:12px; color:var(--ink-3); letter-spacing:.03em; }
.card-name{ margin:2px 0 8px; font-size:15px; font-weight:600; line-height:1.3; }
.card-name a:hover{ color:var(--accent); }
.card-foot{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:auto; }
.price-wrap{ display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.price{ font-weight:700; font-size:15px; color:var(--ink); }
.price-was{ font-size:13px; color:var(--ink-3); text-decoration:line-through; }

@media (prefers-reduced-motion: reduce){
  .pcard, .pcard-media img, .pcard-quick{ transition:none !important; }
  .pcard:hover{ transform:none; }
  .pcard:hover .pcard-media img{ transform:none; }
}
/* Responsive: phones get a clean 2-up grid, never cramped */
@media (max-width:680px){
  .grid{ grid-template-columns:repeat(2,1fr); gap:14px; }
  .pcard-media .ph{ font-size:30px; }
  .pcard-quick{ opacity:1 !important; transform:none !important; pointer-events:auto !important; }
}
@media (max-width:380px){
  .grid{ grid-template-columns:1fr; }
}

/* ============================================================
   Theme presets — selectable in Settings (Appearance)
   classic = base styles above. editorial + vibrant layer on top.
   ============================================================ */

/* Editorial — serif display, quiet and refined */
.preset-editorial .shop-hero-title,
.preset-editorial .page-title,
.preset-editorial .product-name,
.preset-editorial .summary-title{
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-weight: 700; letter-spacing: -.015em;
}
.preset-editorial .shop-hero{ padding: 46px 0 38px; }
.preset-editorial .shop-hero-eyebrow{ color: var(--ink-2); }
.preset-editorial .shop-hero-eyebrow::before{ background: var(--ink-3); }
.preset-editorial .pcard-media{ aspect-ratio: 4/5; }

/* Vibrant — accent-forward, soft tinted hero, rounded */
.preset-vibrant .shop-hero{
  background: color-mix(in srgb, var(--accent) 9%, var(--bg));
  border-bottom: 0; border-radius: 20px; padding: 40px 32px; margin-bottom: 30px;
}
.preset-vibrant .shop-hero-cta{ color: var(--accent); }
.preset-vibrant .chip.is-active{
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
}
.preset-vibrant .pcard:hover{ box-shadow: 0 10px 34px color-mix(in srgb, var(--accent) 18%, transparent); }
.preset-vibrant .badge-pill.feat{ background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); border-color: transparent; }
@media (max-width:620px){
  .preset-vibrant .shop-hero{ padding: 30px 22px; border-radius: 16px; }
}

/* ============================================================
   Layout safety net (authoritative — loaded last)
   Guarantees content never breaks the viewport edges and the
   grid is responsive at every width. Overrides earlier duplicates.
   ============================================================ */
html, body { max-width: 100%; }
body { overflow-x: clip; }                 /* clip, not hidden: keeps sticky header working */

/* Authoritative side gutters — longhand, loaded last, so they override any
   earlier `padding: Xpx 0` shorthand on .wrap containers (main/footer/header/admin). */
.wrap { padding-left: 24px; padding-right: 24px; }
.site-main, .grid, .pcard { min-width: 0; }
img { max-width: 100%; }

/* Robust grid: min(100%,…) stops overflow on any narrow container */
.grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 22px; }
.card-name, .card-cat, .price-wrap { overflow-wrap: anywhere; }

@media (max-width: 700px){
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 400px){
  .grid { grid-template-columns: 1fr; }
}

/* Discreet footer admin link */
.foot-bottom-right { display: inline-flex; align-items: center; gap: 18px; }
.foot-admin { color: var(--ink-3); }
.foot-admin:hover { color: var(--accent); }

/* ============================================================
   Customer account area (storefront, customer-facing only)
   ============================================================ */
.btn-sm { padding: 7px 12px; font-size: 13px; }
.form-err { background: var(--danger-bg); color: var(--danger-ink); padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }

.acct-link { color: var(--ink-2); font-weight: 600; font-size: 14px; }
.acct-link:hover { color: var(--accent); }

.acct-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.acct-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 26px; flex-wrap: wrap; }
.acct-tabs a { padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; }
.acct-tabs a:hover { color: var(--ink); }
.acct-tabs a.is-active { color: var(--accent); border-bottom-color: var(--accent); }

.acct-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 760px){ .acct-grid { grid-template-columns: 1fr; } }

.acct-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.acct-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.acct-table td { padding: 11px 10px; border-bottom: 1px solid var(--border); }
.acct-table tr:last-child td { border-bottom: 0; }
.acct-table a { color: var(--accent); font-weight: 600; }

.status-pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.status-pill.s-paid, .status-pill.s-fulfilled { background: var(--ok-bg); color: var(--ok-ink); }
.status-pill.s-placed, .status-pill.s-picking { background: var(--warn-bg); color: var(--warn-ink); }
.status-pill.s-cancelled { background: var(--danger-bg); color: var(--danger-ink); }
.status-pill.s-guest { background: var(--surface-2); color: var(--ink-3); }

.acct-kv { display: flex; gap: 10px; font-size: 14px; margin: 0 0 8px; }
.acct-kv span:first-child { color: var(--ink-3); min-width: 72px; }
.acct-more { display: inline-block; margin-top: 14px; color: var(--accent); font-weight: 600; font-size: 14px; }
.acct-back { display: inline-block; margin-bottom: 14px; color: var(--ink-3); font-size: 14px; }
.acct-back:hover { color: var(--accent); }
.acct-order-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.acct-track { background: var(--surface-2); border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 14px; }
.acct-track a { color: var(--accent); font-weight: 600; }
.acct-totals { margin-top: 16px; max-width: 320px; margin-left: auto; }
.acct-totals p { display: flex; justify-content: space-between; font-size: 14px; margin: 0 0 6px; }
.acct-totals p span { color: var(--ink-3); }
.acct-total { font-weight: 700; font-size: 16px; padding-top: 8px; border-top: 1px solid var(--border); }
.acct-total span { color: var(--ink) !important; }
.acct-ship { margin-top: 18px; font-size: 14px; }
.acct-ship p { margin: 4px 0; color: var(--ink-2); }

.acct-auth { max-width: 420px; margin: 10px auto 40px; }
.acct-form { display: flex; flex-direction: column; gap: 14px; }
.acct-form .field { display: flex; flex-direction: column; gap: 5px; }
.acct-alt { margin-top: 18px; font-size: 14px; color: var(--ink-3); text-align: center; }
.acct-alt a { color: var(--accent); font-weight: 600; }

/* ============================================================
   Account: confirm-page claim, verify banner, admin reset
   ============================================================ */
.inline-form { display: inline; }
.acct-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.claim-card { border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px; margin: 4px 0 18px; background: var(--surface); }
.claim-title { font-size: 17px; font-weight: 700; margin: 0 0 4px; }
.claim-sub { color: var(--ink-3); font-size: 14px; margin: 0 0 14px; }
.claim-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.claim-row { display: flex; flex-direction: column; gap: 5px; flex: 1 1 220px; }
.claim-row label { font-size: 13px; color: var(--ink-2); }
.claim-note { font-size: 12px; color: var(--ink-3); }

.verify-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; padding: 10px 14px; font-size: 14px; margin-bottom: 22px; }
.verify-banner strong { font-weight: 700; }

/* ============================================================
   Admin: mobile hamburger nav + responsive back-office
   ============================================================ */
.admin-head-inner { position: relative; }
.admin-burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; margin: -8px; }
.admin-burger span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.admin-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.admin-burger.is-open span:nth-child(2) { opacity: 0; }
.admin-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.admin-who { color: var(--ink-3); font-size: 13px; }

@media (max-width: 1024px) {
  .admin-head-inner { justify-content: space-between; padding: 0 16px; }
  .admin-burger { display: flex; }
  .admin-nav-end { flex-direction: column; align-items: stretch; gap: 0; margin: 0; }
  .admin-nav a.cur { box-shadow: inset 3px 0 0 var(--accent); }
  .admin-nav {
    height: auto; white-space: normal;
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; align-items: stretch;
    background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow); padding: 6px 0; z-index: 60; font-size: 15px;
  }
  .admin-nav.open { display: flex; }
  .admin-nav a, .admin-nav .admin-who {
    padding: 12px 24px; border-bottom: 1px solid var(--border); color: var(--ink);
  }
  .admin-nav a:last-child { border-bottom: 0; }
  .admin-who { color: var(--ink-3); }
}

/* Admin order: status + tracking form stacks cleanly on small screens */
.status-form { flex-wrap: wrap; align-items: flex-end; }
.status-form select { min-width: 160px; }
.status-form .field { flex: 1 1 220px; display: flex; flex-direction: column; gap: 5px; }
@media (max-width: 620px) {
  .status-form { flex-direction: column; align-items: stretch; }
  .status-form select, .status-form .field { width: 100%; }
  .order-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Account stats, page-editor toolbar, PWA install button
   ============================================================ */
.acct-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
.acct-stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; }
.acct-stat-n { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.acct-stat-l { display: block; font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
@media (max-width: 560px){ .acct-stats { grid-template-columns: 1fr; } }

.rt-toolbar { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.rt-toolbar button { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; font-size: 13px; cursor: pointer; color: var(--ink); min-width: 34px; }
.rt-toolbar button:hover { border-color: var(--accent); color: var(--accent); }
.rt-toolbar .rt-right { margin-left: auto; }
.rt-preview { border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; background: var(--surface); min-height: 120px; }

.pwa-install {
  position: fixed; right: 16px; bottom: 16px; z-index: 200;
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px;
  padding: 11px 18px; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow);
}
.pwa-install[hidden] { display: none; }

/* ============================================================
   Settings section-nav layout + admin message reply
   ============================================================ */
.settings-layout { display: grid; grid-template-columns: 190px 1fr; gap: 28px; align-items: start; }
.settings-nav { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { padding: 8px 12px; border-radius: 8px; color: var(--ink-2); font-size: 14px; white-space: nowrap; }
.settings-nav a:hover { background: var(--surface-2); color: var(--ink); }
.settings-content .panel { margin-bottom: 20px; }
.settings-layout > * { min-width: 0; }
@media (max-width: 900px) {
  .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .settings-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
  .settings-nav a { background: var(--surface-2); }
}

.msg-reply { margin-top: 12px; }
.msg-reply > summary { cursor: pointer; color: var(--accent); font-size: 14px; font-weight: 600; list-style: none; display: inline-block; }
.msg-reply > summary::-webkit-details-marker { display: none; }
.msg-reply-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.msg-reply-shown { margin-top: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 8px; }

/* ============================================================
   Homepage section engine + LUXE preset
   ============================================================ */
.site-main-full { padding: 0; width: 100%; }

/* Announcement bar */
.announce-bar { background: var(--ink); color: var(--bg); text-align: center; font-size: 13px; letter-spacing: .02em; padding: 9px 16px; }
.announce-bar a { color: var(--bg); text-decoration: underline; text-underline-offset: 2px; }

/* Section bands */
.hs { padding: 64px 0; }
.hs-h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 24px; }
.hs-eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 14px; }

/* Hero */
.hs-hero { padding: 96px 0 80px; }
.hs-hero-inner { max-width: 680px; }
.hs-hero-title { font-size: clamp(32px, 5vw, 52px); line-height: 1.05; font-weight: 800; letter-spacing: -.03em; margin: 0 0 16px; }
.hs-hero-text { font-size: 17px; color: var(--ink-2); margin: 0 0 26px; max-width: 46ch; }
.hs-cta { font-size: 15px; padding: 13px 26px; }
.hs-hero.has-img { background-size: cover; background-position: center; }
.hs-hero.has-img .hs-hero-title, .hs-hero.has-img .hs-hero-text, .hs-hero.has-img .hs-eyebrow { color: #fff; }
.hs-hero.has-img .hs-hero-inner { padding: 40px 0; }

/* Showcase hero — headline beside a live featured product (signature) */
.hs-hero--showcase { padding: 76px 0 84px; }
.hs-showcase { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hs-showcase-copy { max-width: 540px; }
.hs-hero-actions { display: flex; align-items: center; gap: 22px; margin-top: 30px; flex-wrap: wrap; }
.hs-hero-link { color: var(--ink); font-weight: 600; font-size: 14px; border-bottom: 1px solid var(--border); padding-bottom: 2px; transition: border-color .18s ease; }
.hs-hero-link:hover { border-bottom-color: var(--ink); }
.hs-showcase-media { position: relative; }
.hs-showcase-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); transition: transform .3s ease, box-shadow .3s ease; }
.hs-showcase-card:hover { transform: translateY(-4px); box-shadow: 0 24px 60px rgba(0,0,0,.16); }
.hs-showcase-img { position: relative; aspect-ratio: 4 / 3; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; }
.hs-showcase-ph { font-size: 46px; font-weight: 800; color: var(--ink-3); letter-spacing: .04em; }
.hs-showcase-tag { position: absolute; top: 14px; left: 14px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; }
.hs-showcase-info { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; }
.hs-showcase-meta { min-width: 0; }
.hs-showcase-cat { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.hs-showcase-name { font-weight: 700; font-size: 16px; color: var(--ink); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-showcase-price { font-weight: 700; font-size: 18px; color: var(--ink); white-space: nowrap; }
.hs-showcase-plain { aspect-ratio: 4 / 3; border-radius: 20px; background-size: cover; background-position: center; box-shadow: var(--shadow); }
@media (max-width: 860px) {
  .hs-hero--showcase { padding: 48px 0 56px; }
  .hs-showcase { grid-template-columns: 1fr; gap: 30px; }
  .hs-showcase-copy { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hs-showcase-card { transition: none; }
  .hs-showcase-card:hover { transform: none; }
}
.preset-luxe .hs-showcase-card, .preset-luxe .hs-showcase-plain { border-radius: 4px; }
.preset-mono .hs-showcase-card, .preset-mono .hs-showcase-plain, .preset-mono .hs-showcase-tag { border-radius: 0; }

/* Feature strip */
.hs-features { background: var(--surface-2); padding: 40px 0; }
.hs-feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.hs-feat { display: flex; gap: 12px; align-items: flex-start; }
.hs-feat-ico { color: var(--accent); flex: 0 0 auto; margin-top: 2px; }
.hs-feat-title { font-weight: 700; font-size: 15px; }
.hs-feat-text { color: var(--ink-2); font-size: 13px; }

/* Categories */
.hs-cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hs-cat { position: relative; aspect-ratio: 4/3; border-radius: 16px; overflow: hidden; display: flex; align-items: flex-end; padding: 16px; background-color: var(--surface-2); background-size: cover; background-position: center; transition: transform .25s ease; }
.hs-cat.ph-c0 { background-color: rgba(59,130,246,.16); }
.hs-cat.ph-c1 { background-color: rgba(168,85,247,.17); }
.hs-cat.ph-c2 { background-color: rgba(16,185,129,.17); }
.hs-cat.ph-c3 { background-color: rgba(244,114,22,.17); }
.hs-cat.ph-c4 { background-color: rgba(236,72,153,.16); }
.hs-cat.ph-c5 { background-color: rgba(20,184,166,.17); }
.hs-cat:hover { transform: translateY(-3px); }
.hs-cat-label { position: relative; z-index: 1; font-weight: 700; font-size: 17px; color: var(--ink); }
.hs-cat[style*="background-image"] .hs-cat-label { color: #fff; }

/* Product row */
.hs-row-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.hs-row-head .hs-h2 { margin: 0; }
.hs-viewall { color: var(--accent); font-weight: 600; font-size: 14px; }

/* Promo band */
.hs-promo { background: var(--accent); color: var(--accent-ink); text-align: center; padding: 80px 0; }
.hs-promo-inner { max-width: 640px; margin: 0 auto; }
.hs-promo-h { font-size: clamp(24px, 4vw, 36px); font-weight: 800; letter-spacing: -.02em; margin: 0 0 12px; color: var(--accent-ink); }
.hs-promo-text { font-size: 16px; margin: 0 0 22px; opacity: .92; }
.hs-promo-cta { background: var(--accent-ink); color: var(--accent); border: 0; padding: 12px 26px; font-weight: 700; }

@media (max-width: 860px) {
  .hs-feat-grid { grid-template-columns: repeat(2, 1fr); }
  .hs-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .hs { padding: 44px 0; }
  .hs-hero { padding: 64px 0 48px; }
  .hs-features { padding: 32px 0; }
  .hs-promo { padding: 56px 0; }
}
@media (max-width: 480px) {
  .hs-feat-grid { grid-template-columns: 1fr; }
}

/* LUXE preset — warm, editorial palette + serif display */
.preset-luxe { --bg: #f6f1ea; --surface: #fffdf9; --surface-2: #efe7db; --ink: #2a2420; --ink-2: #6b6055; --ink-3: #a99e90; --border: #e4dccf; --radius: 4px; --radius-sm: 3px; }
.preset-luxe.dark { --bg: #1c1815; --surface: #241f1b; --surface-2: #2c2621; --ink: #f3ede4; --ink-2: #b3a696; --ink-3: #7d7264; --border: #362f28; }
.preset-luxe .hs-hero-title, .preset-luxe .hs-h2, .preset-luxe .hs-promo-h,
.preset-luxe .page-title, .preset-luxe .card-name, .preset-luxe .shop-hero-title {
  font-family: Georgia, 'Times New Roman', serif; font-weight: 600; letter-spacing: -.01em;
}
.preset-luxe .hs-cat, .preset-luxe .hs-cat-grid .hs-cat { border-radius: 4px; }

/* MONO preset — minimal, high-contrast, squared corners */
.preset-mono { --bg: #ffffff; --surface: #ffffff; --surface-2: #f4f4f4; --ink: #0f0f0f; --ink-2: #5a5a5a; --ink-3: #9b9b9b; --border: #e4e4e4; --radius: 0px; --radius-sm: 0px; }
.preset-mono.dark { --bg: #0b0b0c; --surface: #141416; --surface-2: #1b1b1e; --ink: #fafafa; --ink-2: #a6a6ab; --ink-3: #6c6c72; --border: #27272b; }
.preset-mono .hs-hero-title, .preset-mono .hs-h2, .preset-mono .hs-promo-h, .preset-mono .page-title, .preset-mono .shop-hero-title { letter-spacing: -.025em; font-weight: 800; }
.preset-mono .hs-eyebrow, .preset-mono .card-cat { letter-spacing: .16em; }

/* Footer extras */
.foot-social { display: flex; gap: 14px; margin-top: 12px; }
.foot-social a { color: var(--ink-2); font-size: 13px; }
.foot-social a:hover { color: var(--ink); }
.foot-note { color: var(--ink-3); font-size: 12px; padding-top: 18px; padding-bottom: 4px; }

/* Admin homepage editor */
.hp-toggle { font-size: 16px; margin-bottom: 10px; }
.hp-toggle .panel-title { margin: 0; display: inline; }
.hp-sec .field-row.hp-feat-row { gap: 12px; align-items: flex-end; }

/* Newsletter / subscribe form */
.sub-form { display: flex; gap: 8px; max-width: 440px; }
.sub-form input[type="email"] { flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-size: 14px; }
.sub-form input[type="email"]:focus { outline: none; border-color: var(--accent); }
.sub-form .btn { flex: 0 0 auto; }
.hs-promo .sub-form { margin: 0 auto; }
.hs-promo .sub-form input[type="email"] { background: rgba(255,255,255,.95); border-color: transparent; color: #1a1a1f; }
.hs-promo .sub-form .btn { background: var(--accent-ink); color: var(--accent); border: 0; font-weight: 700; }
.foot-news-text { color: var(--ink-2); font-size: 13px; margin: 0 0 10px; }
.foot-news .sub-form { max-width: 100%; flex-direction: column; }
.foot-news .sub-form .btn { width: 100%; }
.hp-hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
@media (max-width: 480px) { .sub-form { flex-direction: column; } .sub-form .btn { width: 100%; } }

/* ============================================================
   Reviews & star ratings
   ============================================================ */
.stars { display: inline-flex; gap: 1px; font-size: 15px; line-height: 1; }
.stars .star { color: var(--ink-3); }
.stars .star.on { color: #f5b301; }
.stars-count { font-size: 12px; color: var(--ink-2); margin-left: 6px; }
.card-stars { margin: 4px 0 2px; }
.card-stars .stars { font-size: 13px; }

.prod-reviews { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--border); }
.reviews-h { font-size: 22px; font-weight: 700; margin: 0 0 12px; }
.reviews-summary { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.reviews-summary .stars { font-size: 20px; }
.reviews-avg { font-size: 14px; color: var(--ink-2); }
.reviews-list { display: flex; flex-direction: column; gap: 18px; margin-bottom: 24px; }
.review { padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.review:last-child { border-bottom: 0; }
.review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.review-name { font-size: 14px; }
.review-title { font-weight: 700; font-size: 15px; }
.review-body { color: var(--ink-2); margin: 4px 0 0; white-space: pre-wrap; }
.reviews-empty { margin-bottom: 20px; }

.review-form-wrap > summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14px; list-style: none; display: inline-block; }
.review-form-wrap > summary::-webkit-details-marker { display: none; }
.review-form { max-width: 560px; margin-top: 14px; }

/* Interactive star input (row-reverse highlight trick) */
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; }
.star-input input { position: absolute; opacity: 0; width: 0; height: 0; }
.star-input label { font-size: 28px; color: var(--ink-3); cursor: pointer; padding: 0 2px; transition: color .12s ease; }
.star-input input:checked ~ label,
.star-input label:hover,
.star-input label:hover ~ label { color: #f5b301; }
.star-input input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

.review-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-danger { background: var(--danger-bg, rgba(220,38,38,.12)); color: var(--danger-ink, #dc2626); border: 1px solid transparent; }
.btn-danger:hover { background: rgba(220,38,38,.2); }



/* ============================================================
   Preset identities — distinct palette + shape per theme
   (colours flow to every public page via the design tokens)
   ============================================================ */
.preset-classic { --radius: 14px; --radius-sm: 10px; }

.preset-editorial { --bg:#f2f2f0; --surface:#ffffff; --surface-2:#e7e7e2; --ink:#0f0f0d; --ink-2:#494943; --ink-3:#8a8a81; --border:#dad9d2; --radius:3px; --radius-sm:2px; }
.preset-editorial.dark { --bg:#100f0d; --surface:#181815; --surface-2:#20201b; --ink:#f4f3ee; --ink-2:#a9a89f; --ink-3:#6f6e66; --border:#2b2a25; }

.preset-vibrant { --bg:#fbfcff; --surface:#ffffff; --surface-2:#edf0fc; --ink:#101019; --ink-2:#464a5f; --ink-3:#8d90a6; --border:#e3e6f5; --radius:20px; --radius-sm:13px; }
.preset-vibrant.dark { --bg:#0c0d16; --surface:#151620; --surface-2:#1d1f2c; --ink:#f3f4fc; --ink-2:#a3a6bd; --ink-3:#6b6e84; --border:#282a3b; }

/* tight themes get squared chips/badges to match */
.preset-editorial .chip, .preset-mono .chip,
.preset-editorial .badge-pill, .preset-mono .badge-pill,
.preset-editorial .badge, .preset-mono .badge { border-radius: var(--radius-sm); }

/* ============================================================
   Product image gallery — admin editor + storefront
   ============================================================ */
.img-gallery { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.img-gallery.is-empty { display: none; }
.img-item { position: relative; width: 96px; height: 96px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.img-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-primary-badge { display: none; position: absolute; top: 4px; left: 4px; background: var(--accent); color: var(--accent-ink); font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 6px; border-radius: 999px; }
.img-item.is-primary { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.img-item.is-primary .img-primary-badge { display: block; }
.img-actions { position: absolute; top: 4px; right: 4px; display: flex; gap: 4px; }
.img-btn { width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 13px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.img-btn:hover { background: rgba(0,0,0,.85); }
.img-make-primary { color: #ffd54a; }
.img-add { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.img-add input[type="text"] { flex: 1; min-width: 220px; }
.img-upload-btn { cursor: pointer; }

.product-main { border-radius: var(--radius); overflow: hidden; background: var(--surface-2); aspect-ratio: 1/1; }
.product-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.product-thumb { width: 68px; height: 68px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; padding: 0; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-thumb.is-active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* Settings form: full width panels (match the Maintenance panel) + spacing */
.settings-form { max-width: none; }
.settings-content > form + .panel { margin-top: 30px; }

/* ============================================================
   Product page — variants below title, tabs, related
   ============================================================ */
.product-info .variant-pick { margin: 20px 0 4px; }
.product-info .variant-pick label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.product-info .variant-pick select { width: 100%; }
.add-actions { display: flex; gap: 12px; align-items: flex-end; margin-top: 16px; }
.add-actions .qty { flex: 0 0 auto; }
.add-actions .qty input { width: 88px; }
.add-actions .btn-block { flex: 1; }
.product-rating-link { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 0; }

.product-tabs { margin-top: 48px; }
.tab-strip { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 22px; flex-wrap: wrap; }
.tab-btn { appearance: none; background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 12px 18px; font-size: 14px; font-weight: 600; color: var(--ink-3); cursor: pointer; margin-bottom: -1px; }
.tab-btn:hover { color: var(--ink); }
.tab-btn.is-active { color: var(--ink); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: tabfade .2s ease; }
.tab-text { color: var(--ink-2); line-height: 1.7; max-width: 72ch; white-space: pre-wrap; }
@keyframes tabfade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.related-products { margin-top: 56px; }
.related-h { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 22px; }
@media (prefers-reduced-motion: reduce) { .tab-panel.is-active { animation: none; } }

/* ============================================================
   Product panel — price/badge, specs, variant pills, stepper,
   dual CTA, share (all conditional in the view)
   ============================================================ */
.product-price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin: 6px 0 10px; }
.product-price-row .product-price { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.product-price-row .price-was { font-size: 16px; color: var(--ink-3); text-decoration: line-through; }
.price-badge { display: inline-block; background: var(--ink); color: var(--surface); font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-sm); letter-spacing: .02em; }

.product-rating-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; margin-bottom: 4px; }
.product-rating-link .rating-text { font-size: 13px; color: var(--ink-2); }

.product-divider { height: 1px; background: var(--border); margin: 18px 0; }

.product-specs { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.product-specs li { font-size: 14px; color: var(--ink-2); }
.product-specs .spec-k { font-weight: 700; color: var(--ink); }
.product-specs .spec-k::after { content: " : "; font-weight: 400; color: var(--ink-3); }
.product-specs .oos { color: var(--danger, #c0392b); font-style: normal; font-weight: 600; }

.opt-group { margin-bottom: 18px; }
.opt-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.opt-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-pill { appearance: none; cursor: pointer; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--ink); padding: 8px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; transition: border-color .12s, background .12s, color .12s; }
.opt-pill:hover { border-color: var(--ink); }
.opt-pill.is-active { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.opt-pill.is-oos { color: var(--ink-3); text-decoration: line-through; cursor: not-allowed; opacity: .6; }

.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.step-btn { appearance: none; border: 0; background: var(--surface-2); color: var(--ink); width: 40px; height: 40px; font-size: 18px; line-height: 1; cursor: pointer; }
.step-btn:hover { background: var(--border); }
.stepper input { width: 52px; height: 40px; text-align: center; border: 0; background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 600; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.cta-row { display: flex; gap: 12px; margin-top: 4px; }
.cta-row .btn { flex: 1; padding: 14px 20px; font-size: 15px; }
.btn-dark { background: var(--ink); color: var(--surface); border: 1px solid var(--ink); }
.btn-dark:hover:not(:disabled) { filter: brightness(1.15); }
.btn-buy { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); }
.btn-buy:hover:not(:disabled) { filter: brightness(1.05); }
.cta-row .btn:disabled { opacity: .5; cursor: not-allowed; }

.share-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.share-label { font-size: 14px; font-weight: 700; color: var(--ink); }
.share-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; transition: transform .12s, filter .12s; }
.share-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.sh-fb { background: #1877f2; } .sh-tw { background: #111; } .sh-in { background: #0a66c2; } .sh-wa { background: #25d366; }

/* ============================================================
   Product info column — merchandised layout
   ============================================================ */
.product-price { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 4px; }
.product-price .price-now { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.product-price .price-was { font-size: 16px; color: var(--ink-3); text-decoration: line-through; font-weight: 500; }
.discount-badge { background: var(--ink); color: var(--surface); font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-sm); letter-spacing: .02em; }

.product-rule { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }

.product-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.product-meta li { display: flex; gap: 10px; align-items: baseline; font-size: 14px; }
.product-meta .meta-k { color: var(--ink-3); min-width: 150px; font-weight: 500; }
.product-meta .meta-v { color: var(--ink); font-weight: 600; }
.product-meta .meta-v.in { color: var(--ok, #1a8a4a); }
.product-meta .meta-v.out { color: var(--danger, #c0392b); }

.variant-pick { margin: 20px 0 4px; }
.variant-label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; letter-spacing: .01em; }
.variant-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-btn { min-width: 46px; padding: 9px 14px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; border-radius: var(--radius-sm); cursor: pointer; transition: border-color .12s, background .12s, color .12s; }
.variant-btn:hover:not(:disabled) { border-color: var(--ink); }
.variant-btn.is-active { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.variant-btn:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }

.qty-row { display: flex; align-items: center; gap: 16px; margin: 20px 0 0; flex-wrap: wrap; }
.qty-label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.qty-btn { width: 40px; height: 42px; border: 0; background: var(--surface-2); color: var(--ink); font-size: 18px; line-height: 1; cursor: pointer; }
.qty-btn:hover { background: var(--border); }
.qty-stepper input { width: 56px; height: 42px; border: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); text-align: center; font-size: 15px; font-weight: 600; background: var(--surface); color: var(--ink); border-radius: 0; -moz-appearance: textfield; }
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stock-note { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.stock-note.low { color: #b8860b; }
.stock-note.out { color: var(--danger, #c0392b); }

.buy-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.buy-actions .btn { flex: 1; min-width: 150px; padding: 14px 20px; font-size: 15px; font-weight: 700; border-radius: var(--radius-sm); }
.btn-dark { background: var(--ink); color: var(--surface); border: 1px solid var(--ink); }
.btn-dark:hover:not(:disabled) { filter: brightness(1.15); }
.btn-buynow { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); }
.btn-buynow:hover:not(:disabled) { filter: brightness(.95); }
.buy-actions .btn:disabled { opacity: .5; cursor: not-allowed; }

.product-share { display: flex; align-items: center; gap: 10px; }
.product-share .share-label { font-size: 14px; font-weight: 700; color: var(--ink); margin-right: 4px; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; transition: transform .12s, filter .12s; }
.share-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.share-btn.fb { background: #1877f2; }
.share-btn.tw { background: #000; }
.share-btn.li { background: #0a66c2; }
.share-btn.wa { background: #25d366; }

/* Back-to-top button */
.to-top { position: fixed; right: 22px; bottom: 22px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s, transform .2s, visibility .2s; z-index: 90; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--accent); color: var(--accent); }

/* Checkout keep-shopping link */
.checkout-back { display: inline-block; margin: -8px 0 18px; color: var(--ink-2); font-size: 14px; font-weight: 600; text-decoration: none; }
.checkout-back:hover { color: var(--accent); }

/* Two-axis variants — option groups + colour swatches */
.variant-axis { margin: 18px 0 4px; }
.swatch-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch-btn { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--border); background: transparent; cursor: pointer; padding: 3px; display: inline-flex; align-items: center; justify-content: center; transition: border-color .12s; }
.swatch-btn:hover { border-color: var(--ink-3); }
.swatch-btn.is-active { border-color: var(--ink); }
.swatch-btn .swatch { width: 100%; height: 100%; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); background: var(--surface-2); font-size: 11px; font-weight: 700; color: var(--ink-2); }

/* Admin nav: desktop tabs sit on the bar's bottom edge, one line, never wrapping */
@media (min-width: 1025px) {
  .admin-nav > a.nav-link { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border-bottom: 2px solid transparent; }
  .admin-nav > a.nav-link:hover { background: var(--surface-2); }
  .admin-nav > a.cur { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
  .admin-nav .bag-count { position: static; margin: 0; }
  .admin-view-store { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); color: var(--ink); font-weight: 600; }
  .admin-view-store:hover { border-color: var(--ink-3); }
  body.in-suite .admin-view-store { display: none; }   /* shown in the suite bar instead */
}
/* Narrow desktops: the store name is already in the suite bar context, give the tabs the room */
@media (min-width: 1025px) and (max-width: 1239px) {
  .admin-brand-name { max-width: 140px; }
  .admin-brand-tag { display: none; }
  .admin-head-inner { gap: 14px; }
  .admin-nav > a.nav-link { padding: 0 8px; }
}
@media (min-width: 1025px) and (max-width: 1119px) {
  .admin-nav { font-size: 13.5px; }
  .admin-nav > a.nav-link { padding: 0 7px; }
}
.admin-nav a.cur { color: var(--ink); font-weight: 600; }
/* Colour-picker swatch paired with a hex input */
.colour-field { display: flex; gap: 8px; align-items: stretch; }
.colour-field input[type="color"] { width: 44px; min-width: 44px; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.colour-field input[type="text"] { flex: 1; }

/* Sticky save bar for long admin forms */
.sticky-save { position: sticky; bottom: 0; z-index: 30; display: flex; justify-content: flex-end; gap: 10px; padding: 14px 0; margin-top: 8px; background: linear-gradient(to top, var(--bg) 55%, transparent); }
.sticky-save .btn { box-shadow: var(--shadow); }

/* Lightweight rich-text editor (admin) */
.cw-editor { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.cw-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.cw-toolbar button { min-width: 30px; height: 28px; border: 1px solid transparent; background: transparent; color: var(--ink); border-radius: 4px; cursor: pointer; font-size: 13px; padding: 0 7px; line-height: 1; }
.cw-toolbar button:hover { background: var(--surface); border-color: var(--border); }
.cw-toolbar .cw-sep { width: 1px; background: var(--border); margin: 3px 4px; }
.cw-area { min-height: 200px; max-height: 520px; overflow-y: auto; padding: 14px 16px; outline: none; line-height: 1.65; color: var(--ink); }
.cw-area:empty::before { content: attr(data-ph); color: var(--ink-3); }
.cw-area h2 { font-size: 20px; font-weight: 700; margin: .7em 0 .3em; }
.cw-area h3 { font-size: 17px; font-weight: 700; margin: .7em 0 .3em; }
.cw-area ul, .cw-area ol { padding-left: 22px; margin: .5em 0; }
.cw-area a { color: var(--accent); }
.cw-area p { margin: .5em 0; }

/* Print receipt (confirmation page) */
.confirm-actions { margin-top: 18px; }
@media print {
  body { background: #fff !important; }
  .site-header, .topbar, .site-footer, .to-top, .no-print, .claim-card, .announce, nav, .cw-editor .cw-toolbar { display: none !important; }
  .confirm, .confirm-card { box-shadow: none !important; border: 0 !important; }
  .confirm-card { page-break-inside: avoid; }
  a[href]:after { content: ""; }
}

/* Compact file input under image URL fields */
.file-mini { display: block; width: 100%; max-width: 100%; min-width: 0; margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.file-mini::-webkit-file-upload-button, .file-mini::file-selector-button { margin-right: 8px; padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink); cursor: pointer; font-size: 12px; }

/* Product dimensions + Knutsford shipping */
.dim-row { display: flex; gap: 8px; }
.dim-row input { flex: 1; min-width: 0; }
.kx-box { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; margin: 4px 0 8px; background: var(--surface-2); }
.kx-track { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
