/* bizxmart — base styles. Flexbox layouts, CSS variables, no framework.
   Store templates override the variables in app/themes/{code}/theme.css. */
:root {
  --brand: #0b5d57;
  --brand-dark: color-mix(in srgb, var(--brand) 78%, black);
  --brand-tint: color-mix(in srgb, var(--brand) 10%, white);
  --accent: #f5b700;
  --accent-tint: #fff4d1;
  --ink: #16191c;
  --muted: #5a6168;
  --paper: #f6f5f1;
  --surface: #ffffff;
  --line: #e2e0da;
  --deal: #a0251a;
  --good: #1c6b2e;
  --radius: 14px;
  --radius-sm: 9px;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  --shadow: 0 1px 2px rgb(0 0 0 / 4%), 0 4px 18px rgb(0 0 0 / 4%);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: 12px; }   /* 12px base text; headings scale from it */
body { margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.5; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0; }
small, .small { font-size: 1rem; }
.muted { color: var(--muted); }
.good { color: var(--good); }
.deal { color: var(--deal); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; border-radius: 6px; }
.skip:focus { left: 8px; }

/* Layout helpers (flexbox) */
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.row.top { align-items: flex-start; }
.row.between { justify-content: space-between; }
.row.tight { gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack.tight { gap: 8px; }
.stack.loose { gap: 28px; }
.grow { flex: 1 1 0; min-width: 0; }
.push { margin-left: auto; }
.cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.cols > .main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.cols > .side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.cols.half > * { flex: 1 1 320px; min-width: 0; }

/* Cards & surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card h2 { margin-bottom: 4px; }
.notice { border-radius: var(--radius-sm); padding: 12px 16px; font-size: 1rem; }
.notice.ok { background: #e8f5ec; color: #14532d; }
.notice.error { background: #fdecea; color: #7f1d1d; }
.notice.info { background: var(--accent-tint); color: #5b4300; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 1rem; font-weight: 700; background: var(--paper); color: var(--ink); white-space: nowrap; }
.badge.ok { background: #e8f5ec; color: var(--good); }
.badge.warn { background: var(--accent-tint); color: #7a5a00; }
.badge.bad { background: #fdecea; color: var(--deal); }
.badge.brand { background: var(--brand-tint); color: var(--brand); }
.badge.dark { background: var(--ink); color: #fff; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: var(--radius-sm); border: 1px solid transparent; font: inherit; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; background: var(--brand); color: #fff; transition: filter .15s, background .15s; white-space: nowrap; }
.btn:hover { color: #fff; filter: brightness(0.93); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.accent { background: var(--accent); color: var(--ink); }
.btn.outline { background: var(--surface); color: var(--ink); border-color: #cfccc4; }
.btn.outline:hover { background: var(--paper); color: var(--ink); filter: none; }
.btn.danger { background: var(--surface); color: var(--deal); border-color: var(--deal); }
.btn.danger:hover { background: #fdecea; color: var(--deal); filter: none; }
.btn.link { background: none; color: var(--brand); padding: 0; border: 0; text-decoration: underline; font-weight: 600; }
.btn.small { padding: 6px 12px; font-size: 1rem; }
.btn.block { width: 100%; }
form { margin: 0; }
label, .label { display: flex; flex-direction: column; gap: 6px; font-size: 1rem; font-weight: 600; min-width: 0; }
.hint { font-size: 1rem; font-weight: 400; color: var(--muted); }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=url], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: 10px 12px; border: 1px solid #cfccc4; border-radius: var(--radius-sm); background: #fff; color: var(--ink); min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 17px; height: 17px; }
.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }
.fields { display: flex; flex-wrap: wrap; gap: 16px; }
.fields > * { flex: 1 1 240px; }
.fields > .full { flex-basis: 100%; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 700; margin-bottom: 8px; }
.input-group { display: flex; border: 1px solid #cfccc4; border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.input-group input { border: 0; border-radius: 0; }
.input-group span { background: var(--paper); padding: 10px 12px; color: var(--muted); font-size: 1rem; white-space: nowrap; }

/* Tables */
.table-wrap { overflow-x: auto; position: relative; }
table.table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.table th { text-align: left; font-weight: 600; color: var(--muted); padding: 10px 12px; white-space: nowrap; }
.table td { border-top: 1px solid var(--line); padding: 12px; vertical-align: top; }
.table tr:hover td { background: #fbfaf7; }

/* Product cards */
.grid { display: flex; flex-wrap: wrap; gap: 14px; }
.grid > * { flex: 1 1 200px; max-width: calc(50% - 7px); }
@media (min-width: 640px) { .grid > * { max-width: calc(33.33% - 10px); } }
@media (min-width: 960px) { .grid > * { max-width: calc(25% - 11px); } }
@media (min-width: 1180px) { .grid.five > * { max-width: calc(20% - 12px); } }
.pcard { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.pcard:hover { border-color: var(--brand); color: var(--ink); box-shadow: var(--shadow); }
.pcard .img { aspect-ratio: 1; border-radius: calc(var(--radius) - 4px); background: var(--brand-tint); overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--brand); font-weight: 700; }
.pcard .img img { width: 100%; height: 100%; object-fit: cover; }
.pcard .title { font-size: 1rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.price strong { font-size: 1.1rem; }
.price s { color: var(--muted); font-size: 1rem; }
.price .off { color: var(--good); font-weight: 700; font-size: 1rem; }

/* Marketplace chrome */
.mk-head { background: var(--brand); color: #fff; }
.mk-head .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; padding-top: 12px; padding-bottom: 12px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em; }
.logo:hover { color: #fff; }
.logo .mark { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; }
.logo .x { color: var(--accent); }
.search { display: flex; flex: 1 1 320px; min-width: 0; max-width: 680px; background: #fff; border-radius: var(--radius-sm); overflow: hidden; }
.search input { border: 0; border-radius: 0; flex: 1; }
.search button { border: 0; background: var(--accent); color: var(--ink); font-weight: 700; padding: 0 18px; cursor: pointer; font: inherit; }
.mk-nav { display: flex; align-items: center; gap: 18px; font-size: 1rem; }
.mk-nav a { color: #fff; text-decoration: none; font-weight: 600; }
.mk-nav .cart { background: rgb(255 255 255 / 14%); padding: 7px 12px; border-radius: var(--radius-sm); }
.mk-cats { background: var(--brand-dark); }
.mk-cats .wrap { display: flex; gap: 22px; overflow-x: auto; padding-top: 8px; padding-bottom: 8px; scrollbar-width: none; }
.mk-cats a { color: #e3f0ee; white-space: nowrap; text-decoration: none; font-size: 1rem; }
.mk-main { padding-top: 24px; padding-bottom: 48px; min-height: 60vh; }
.mk-foot { background: var(--ink); color: #c9cdd1; padding: 36px 0 20px; font-size: 1rem; }
.mk-foot a { color: #e8eaec; text-decoration: none; }
.mk-foot .cols > * { flex: 1 1 180px; display: flex; flex-direction: column; gap: 6px; }
.mk-foot strong { color: #fff; }
.hero { display: flex; flex-wrap: wrap; gap: 20px; }
.hero .banner { flex: 2 1 420px; background: var(--brand); color: #fff; border-radius: 22px; padding: clamp(24px, 5vw, 44px); position: relative; overflow: hidden; min-height: 280px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.hero .banner h1 { font-size: clamp(2rem, 5vw, 3rem); max-width: 540px; position: relative; }
.hero .banner p { max-width: 460px; opacity: .9; font-size: 1.1rem; position: relative; }
.hero .banner::after { content: ""; position: absolute; right: -60px; top: -60px; width: 300px; height: 300px; border-radius: 50%; background: var(--brand-dark); }
.hero .banner::before { content: ""; position: absolute; right: 70px; bottom: -90px; width: 200px; height: 200px; border-radius: 50%; background: var(--accent); z-index: 0; }
.hero .banner > * { z-index: 1; }
.hero .sell { flex: 1 1 280px; background: var(--accent-tint); border-radius: 22px; padding: 26px; display: flex; flex-direction: column; gap: 10px; color: var(--ink); text-decoration: none; }
.hero .sell:hover { color: var(--ink); }
.chips { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.chip { flex: 0 0 auto; padding: 8px 16px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 1rem; }
.chip.on, .chip:hover { border-color: var(--brand); color: var(--brand); }
.cat-tiles { display: flex; flex-wrap: wrap; gap: 12px; }
.cat-tiles a { flex: 1 1 130px; max-width: 180px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-size: 1rem; text-align: center; }
.cat-tiles a span { width: 56px; height: 56px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.section-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.section-head a { margin-left: auto; font-weight: 700; font-size: 1rem; }

/* Panels (vendor & admin) */
.panel { display: flex; min-height: 100vh; }
.panel-nav { flex: 0 0 248px; background: var(--ink); color: #c9cdd1; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.panel-nav .logo { font-size: 1.3rem; padding: 4px 10px 16px; }
.panel-nav .logo small { font-family: var(--font); font-weight: 600; color: #c9cdd1; font-size: 1rem; margin-left: 2px; }
.panel-nav a.item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: var(--radius-sm); color: #d9dcdf; text-decoration: none; font-size: 1rem; font-weight: 500; }
.panel-nav a.item:hover { background: rgb(255 255 255 / 7%); color: #fff; }
.panel-nav a.item.on { background: var(--brand); color: #fff; font-weight: 700; }
.panel-nav .count { background: var(--accent); color: var(--ink); border-radius: 99px; font-size: 1rem; font-weight: 800; padding: 1px 7px; }
.panel-nav .who { margin-top: auto; border-top: 1px solid rgb(255 255 255 / 10%); padding: 14px 10px 4px; font-size: 1rem; display: flex; flex-direction: column; gap: 6px; }
.panel-nav .who button { background: none; border: 0; color: #d9dcdf; text-decoration: underline; padding: 0; cursor: pointer; font: inherit; text-align: left; }
.panel-body { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.panel-top { background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.panel-main { padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.menu-toggle { display: none; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.stats { display: flex; flex-wrap: wrap; gap: 14px; }
.stat { flex: 1 1 200px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.stat strong { font-family: var(--font-display); font-size: 1.6rem; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs a { padding: 7px 14px; border-radius: 99px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); font-size: 1rem; }
.tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.steps { display: flex; gap: 6px; flex-wrap: wrap; counter-reset: step; }
.steps a, .steps span { flex: 1 1 120px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--muted); font-size: 1rem; font-weight: 600; }
.steps .n { width: 24px; height: 24px; border-radius: 50%; background: var(--paper); display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; flex: 0 0 auto; }
.steps .on { border-color: var(--brand); color: var(--ink); }
.steps .on .n { background: var(--brand); color: #fff; }
.steps .done .n { background: var(--good); color: #fff; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 12px; font-size: 1rem; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -24px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.progress { display: flex; gap: 6px; }
.progress span { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 1rem; color: var(--muted); }
.progress span::before { content: ""; height: 6px; border-radius: 99px; background: var(--line); }
.progress span.on { color: var(--ink); font-weight: 700; }
.progress span.on::before { background: var(--brand); }
.theme-grid { display: flex; flex-wrap: wrap; gap: 16px; }
.theme-card { flex: 1 1 260px; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.theme-card.on { border: 2px solid var(--brand); }
.theme-card .thumb { aspect-ratio: 16/10; padding: 12px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line); }
.theme-card .thumb .bar { height: 22px; border-radius: 6px; }
.theme-card .thumb .hero { flex: 1; border-radius: 8px; display: flex; align-items: center; padding: 0 14px; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; }
.theme-card .thumb .cells { display: flex; gap: 6px; }
.theme-card .thumb .cells span { flex: 1; aspect-ratio: 1; border-radius: 6px; background: rgb(255 255 255 / 70%); border: 1px solid rgb(0 0 0 / 5%); }
.theme-card .body { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.dropzone { border: 2px dashed #cfccc4; border-radius: var(--radius); padding: 18px; text-align: center; color: var(--muted); }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumbs figure { margin: 0; width: 92px; display: flex; flex-direction: column; gap: 4px; align-items: center; font-size: 1rem; }
.thumbs img { width: 92px; height: 92px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.gst-result { margin-top: 8px; }

/* Auth / plain pages */
.auth { max-width: 460px; margin: 40px auto; padding: 0 16px; display: flex; flex-direction: column; gap: 16px; }
.auth.wide { max-width: 760px; }

/* Invoice */
.invoice { max-width: 820px; margin: 24px auto; background: #fff; padding: 36px; font-size: 13px; line-height: 1.55; }
.invoice table { width: 100%; border-collapse: collapse; }
.invoice th, .invoice td { border: 1px solid #bbb; padding: 6px 8px; text-align: left; vertical-align: top; }
.invoice th { background: #f2f2f2; }
.invoice .r { text-align: right; }

@media (max-width: 860px) {
  .panel { flex-direction: column; }
  .panel-nav { position: static; height: auto; flex: none; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding: 10px; align-items: center; }
  .panel-nav .logo { padding: 0 8px 0 4px; flex: 0 0 auto; }
  .panel-nav a.item { flex: 0 0 auto; }
  .panel-nav .who { display: none; }
  .panel-main { padding: 16px; }
  .panel-top { padding: 10px 16px; }
  .mk-nav { width: 100%; justify-content: flex-end; }
}
@media print {
  .no-print, .mk-head, .mk-cats, .mk-foot, .panel-nav, .panel-top { display: none !important; }
  body { background: #fff; }
  .invoice { margin: 0; padding: 0; max-width: none; }
}

/* Storefront chrome shared by all templates (themes restyle via variables + theme.css) */
.store { background: var(--paper); color: var(--ink); }
.announce { background: var(--ink); color: var(--paper); text-align: center; font-size: 1rem; padding: 7px 16px; }
.store-main { padding-top: 24px; padding-bottom: 48px; min-height: 60vh; }
.st-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.st-head .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; padding-top: 14px; padding-bottom: 14px; }
.st-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.01em; min-width: 0; }
.st-brand:hover { color: var(--ink); }
.st-brand img { height: 42px; width: auto; max-width: 140px; object-fit: contain; }
.st-search { flex: 1 1 240px; display: flex; max-width: 460px; }
.st-search input { border-radius: 99px 0 0 99px; }
.st-search button { border: 0; padding: 0 16px; background: var(--brand); color: #fff; border-radius: 0 99px 99px 0; font: inherit; font-weight: 700; cursor: pointer; }
.st-links { display: flex; align-items: center; gap: 18px; margin-left: auto; font-size: 1rem; }
.st-links a { color: var(--ink); text-decoration: none; font-weight: 600; white-space: nowrap; }
.st-links .cart { background: var(--brand); color: #fff; padding: 7px 14px; border-radius: 99px; }
.st-cats { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; padding-bottom: 12px; }
.st-cats a { color: var(--muted); text-decoration: none; white-space: nowrap; font-size: 1rem; }
.st-cats a:hover { color: var(--brand); }
.st-hero { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--brand); color: #fff; min-height: 260px; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: clamp(24px, 5vw, 56px); background-size: cover; background-position: center; }
.st-hero.has-img::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(0 0 0 / 55%), rgb(0 0 0 / 10%)); }
.st-hero > * { position: relative; max-width: 560px; }
.st-hero h1 { font-size: clamp(1.8rem, 4.5vw, 3rem); }
.st-hero p { font-size: 1.05rem; opacity: .92; }
.st-hero .btn { align-self: flex-start; background: #fff; color: var(--ink); }
.st-about { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.st-about > * { flex: 1 1 300px; }
.st-foot { background: var(--surface); border-top: 1px solid var(--line); padding: 32px 0 20px; font-size: 1rem; color: var(--muted); }
.st-foot .cols > * { flex: 1 1 200px; display: flex; flex-direction: column; gap: 6px; }
.st-foot a { color: var(--ink); text-decoration: none; }
.st-foot strong { color: var(--ink); }
.st-trust { display: flex; flex-wrap: wrap; gap: 12px; }
.st-trust > * { flex: 1 1 200px; display: flex; gap: 10px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 1rem; }
.st-trust b { font-size: 1.3rem; }
@media (max-width: 640px) {
  .st-links { width: 100%; justify-content: space-between; margin-left: 0; }
  .st-search { order: 3; max-width: none; }
}

/* Font Awesome icons */
.fa-solid, .fa-regular, .fa-brands { line-height: 1; }
.notice > i:first-child { margin-right: 4px; }
.panel-nav a.item i { width: 1.25em; margin-right: 6px; opacity: .85; }
.panel-nav a.item.on i { opacity: 1; }
.cat-tiles a span i { font-size: 1.35rem; }
.dropzone i { color: var(--brand); margin-bottom: 6px; }
.st-trust b { color: var(--brand); }
.theme-tech .st-trust b { color: var(--accent); }
.search button i { font-size: 1rem; }
@media (max-width: 640px) { .hide-sm { display: none; } }
.check-item { flex-wrap: nowrap; gap: 10px; align-items: flex-start; }
.check-item > .badge { flex: 0 0 auto; min-width: 26px; justify-content: center; margin-top: 2px; }
.check-item > :not(.badge) { flex: 1 1 auto; min-width: 0; }

/* ===== Industry templates: shared components (themes restyle via variables + theme.css) ===== */
.bleed { width: calc(var(--page-w, 100vw)); margin-left: calc(50% - var(--page-w, 100vw) / 2); border-radius: 0 !important; max-width: none; }
body.store, body:has(.mk-head) { overflow-x: clip; }
.section-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.section-title h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); }
.section-title p { flex-basis: 100%; color: var(--muted); order: 3; }
.section-title a { margin-left: auto; font-weight: 700; font-size: 1rem; text-decoration: none; white-space: nowrap; }
.section-title.center { justify-content: center; text-align: center; flex-direction: column; align-items: center; }
.section-title.center a { margin-left: 0; }

/* Image placeholders (shown until the vendor uploads) */
.ph { width: 100%; height: 100%; min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 16px; position: relative;
  color: color-mix(in srgb, var(--brand) 70%, var(--ink));
  background:
    radial-gradient(circle at 18% 22%, color-mix(in srgb, var(--accent) 28%, transparent) 0 18%, transparent 19%),
    radial-gradient(circle at 85% 78%, color-mix(in srgb, var(--brand) 22%, transparent) 0 22%, transparent 23%),
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 14%, var(--surface)), color-mix(in srgb, var(--accent) 18%, var(--surface))); }
.ph .ph-icon { font-size: clamp(1.6rem, 4vw, 2.6rem); opacity: .55; }
.ph .ph-label { font-family: var(--font-display); font-weight: 700; font-size: 1rem; opacity: .75; }
.ph .ph-hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); background: rgb(0 0 0 / 70%); color: #fff; font-size: 1rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.ph-slide .ph-icon { font-size: 3.4rem; }

/* Slider */
.slider { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--surface); touch-action: pan-y; user-select: none; }
.slider-track { display: flex; transition: transform .7s cubic-bezier(.65, 0, .35, 1); will-change: transform; }
@media (prefers-reduced-motion: reduce) { .slider-track { transition: none; } }
.slide { flex: 0 0 100%; min-width: 0; position: relative; }
.slide-media img { width: 100%; height: 100%; object-fit: cover; }
.slide-kicker { display: inline-block; font-size: 1rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 10px; }
.slide-title { font-size: clamp(1.7rem, 4.4vw, 3.2rem); line-height: 1.08; margin-bottom: 12px; }
.slide-text { font-size: clamp(0.98rem, 1.6vw, 1.15rem); max-width: 46ch; margin-bottom: 20px; opacity: .92; }
.slide-cta { padding: 12px 22px; }
.slider-full .slide { min-height: clamp(340px, 46vw, 600px); display: flex; align-items: center; }
.slider-full .slide-media { position: absolute; inset: 0; }
.slider-full .slide-body { position: relative; z-index: 1; padding: clamp(28px, 6vw, 80px); max-width: 680px; }
.slider-full .slide.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(0 0 0 / 58%) 0%, rgb(0 0 0 / 28%) 50%, rgb(0 0 0 / 0%) 80%); }
.slider-full .slide.has-img .slide-body { color: #fff; }
.slider-full .slide:not(.has-img) .slide-body { color: var(--ink); }
.slider-split .slide { display: flex; min-height: clamp(360px, 40vw, 540px); }
.slider-split .slide-body { flex: 1 1 44%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: clamp(28px, 5vw, 72px); }
.slider-split .slide-media { flex: 1 1 56%; min-height: 100%; }
.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgb(255 255 255 / 88%); color: var(--ink); cursor: pointer; box-shadow: 0 2px 10px rgb(0 0 0 / 15%); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; }
.slider:hover .slider-arrow, .slider:focus-within .slider-arrow { opacity: 1; }
.slider-arrow.prev { left: 14px; } .slider-arrow.next { right: 14px; }
.slider-dots { position: absolute; z-index: 3; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; gap: 8px; }
.slider-dots button { width: 9px; height: 9px; border-radius: 99px; border: 0; padding: 0; background: rgb(255 255 255 / 60%); box-shadow: 0 0 0 1px rgb(0 0 0 / 18%); cursor: pointer; transition: width .3s, background .3s; }
.slider-dots button[aria-current="true"] { width: 26px; background: #fff; }
@media (max-width: 700px) {
  .slider-split .slide { flex-direction: column; min-height: 0; }
  .slider-split .slide-media { order: -1; aspect-ratio: 16/10; flex: none; }
  .slider-split .slide-body { padding: 22px 20px 48px; }
  .slider-full .slide { min-height: 420px; align-items: flex-end; }
  .slider-full .slide.has-img::after { background: linear-gradient(0deg, rgb(0 0 0 / 70%) 0%, rgb(0 0 0 / 20%) 60%, transparent 100%); }
  .slider-full .slide-body { padding: 24px 20px 52px; }
  .slider-arrow { display: none; }
}

/* Product card with quick add */
.card-p { display: flex; flex-direction: column; gap: 8px; min-width: 0; position: relative; }
.card-p-link { flex: 1; }
.card-p-price { margin-top: auto; }
.card-p-link { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); }
.card-p-link:hover { color: var(--ink); }
.card-p-img { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.card-p-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card-p:hover .card-p-img img { transform: scale(1.05); }
.card-p-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: color-mix(in srgb, var(--brand) 40%, transparent); }
.card-p-badge { position: absolute; top: 10px; left: 10px; background: var(--brand); color: #fff; font-size: 1rem; font-weight: 800; padding: 3px 9px; border-radius: 99px; }
.card-p-badge.low { left: auto; right: 10px; background: var(--accent); color: var(--ink); }
.card-p-badge.out { left: auto; right: 10px; background: var(--ink); }
.card-p-brand { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.card-p-title { font-size: 1rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.card-p-price strong { font-size: 1.05rem; }
.card-p-price s { color: var(--muted); font-size: 1rem; }
.card-p-add button { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--brand); background: transparent; color: var(--brand); font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; transition: background .15s, color .15s; }
.card-p-add button:hover { background: var(--brand); color: #fff; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 22px 18px; }
@media (max-width: 520px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; } .card-p-add button span { display: none; } }

/* Product rail */
.rail { position: relative; }
.rail-track { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.rail-track::-webkit-scrollbar { display: none; }
.rail-track > * { flex: 0 0 calc(25% - 14px); scroll-snap-align: start; }
@media (max-width: 960px) { .rail-track > * { flex-basis: calc(33.33% - 12px); } }
@media (max-width: 640px) { .rail-track > * { flex-basis: 46%; } }
.rail-arrow { position: absolute; top: 34%; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.rail-arrow.prev { left: -14px; } .rail-arrow.next { right: -14px; }
.rail-arrow:disabled { opacity: 0; pointer-events: none; }
.rail.no-scroll .rail-arrow { display: none; }
@media (max-width: 640px) { .rail-arrow { display: none; } }

/* Promo tiles: .tiles.round | .square | .tall | .arch */
.tiles { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--tile-min, 150px)), 1fr)); }
.tile { position: relative; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.tile:hover { color: var(--brand); }
.tile-media { overflow: hidden; position: relative; background: var(--surface); }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile:hover .tile-media img { transform: scale(1.06); }
.tile-title { font-weight: 700; font-family: var(--font-display); }
.tile-text { font-size: 1rem; color: var(--muted); margin-top: -6px; }
.tiles.round { --tile-min: 120px; text-align: center; }
.tiles.round .tile { align-items: center; }
.tiles.round .tile-media { width: min(100%, 150px); aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--line); }
.tiles.square .tile-media { aspect-ratio: 1; border-radius: var(--radius); }
.tiles.tall { --tile-min: 220px; }
.tiles.tall .tile-media { aspect-ratio: 3/4; border-radius: var(--radius); }
.tiles.arch { --tile-min: 170px; text-align: center; }
.tiles.arch .tile-media { aspect-ratio: 4/5; border-radius: 999px 999px var(--radius) var(--radius); }
.tiles.overlay .tile { color: #fff; }
.tiles.overlay .tile-body { position: absolute; inset: auto 0 0 0; padding: 18px; background: linear-gradient(0deg, rgb(0 0 0 / 65%), transparent); border-radius: 0 0 var(--radius) var(--radius); }
.tiles.overlay .tile-text { color: #f0f0f0; margin-top: 2px; }
@media (max-width: 520px) { .tiles.round, .tiles.square { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } .tiles.round .tile-title, .tiles.square .tile-title { font-size: 1rem; } }

/* Wide offer banner and split banners */
.banner { position: relative; display: flex; align-items: center; min-height: 240px; border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); }
.banner-media { position: absolute; inset: 0; }
.banner-media img { width: 100%; height: 100%; object-fit: cover; }
.banner-body { position: relative; z-index: 1; padding: clamp(24px, 5vw, 56px); max-width: 560px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.banner.has-img { color: #fff; }
.banner.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(0 0 0 / 55%), transparent 75%); }
.banner h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); }
.banners-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }

/* Feature strip, about split, CTA band */
.features { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.feature { display: flex; gap: 12px; align-items: center; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.feature i { font-size: 1.35rem; color: var(--brand); width: 1.6em; text-align: center; }
.feature strong { display: block; font-size: 1rem; }
.feature span { font-size: 1rem; color: var(--muted); }
.about-split { display: flex; flex-wrap: wrap; gap: clamp(20px, 4vw, 48px); align-items: center; }
.about-split > .about-media { flex: 1 1 320px; aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; }
.about-split > .about-media img { width: 100%; height: 100%; object-fit: cover; }
.about-split > .about-body { flex: 1 1 340px; display: flex; flex-direction: column; gap: 14px; }
.about-split .about-body p { white-space: pre-line; color: var(--muted); }
.cta-band { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; padding: clamp(22px, 4vw, 40px); border-radius: var(--radius); background: var(--brand); color: #fff; }
.cta-band h2 { font-size: clamp(1.3rem, 2.6vw, 1.9rem); }
.cta-band p { opacity: .9; }
.cta-band .actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 10px; }
.cta-band .btn { background: #fff; color: var(--ink); }
.cta-band .btn.ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / 60%); }
.home-stack { display: flex; flex-direction: column; gap: clamp(36px, 6vw, 64px); }

/* Store header v2 (industry templates) */
.sh { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.sh-top { background: var(--ink); color: color-mix(in srgb, #fff 82%, transparent); font-size: 1rem; }
.sh-top .wrap { display: flex; flex-wrap: wrap; gap: 6px 22px; padding-top: 7px; padding-bottom: 7px; }
.sh-top a { color: inherit; text-decoration: none; }
.sh-top .push { margin-left: auto; }
.sh-bar { display: flex; align-items: center; gap: 14px 22px; padding-top: 14px; padding-bottom: 14px; }
.sh-burger { display: none; border: 0; background: none; font-size: 1.3rem; color: var(--ink); cursor: pointer; padding: 6px; }
.sh-search { flex: 1 1 260px; max-width: 520px; display: flex; align-items: center; background: color-mix(in srgb, var(--ink) 4%, var(--surface)); border: 1px solid var(--line); border-radius: 99px; padding: 0 6px 0 16px; }
.sh-search input { border: 0 !important; background: transparent !important; outline: 0; padding: 10px 6px; }
.sh-search button { border: 0; background: var(--brand); color: #fff; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; flex: 0 0 auto; }
.sh-icons { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.sh-icons a { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1rem; border-radius: 99px; }
.sh-icons a:hover { background: color-mix(in srgb, var(--brand) 8%, transparent); color: var(--ink); }
.sh-icons i { font-size: 1.15rem; }
.sh-icons .bubble { position: absolute; top: 0; right: 0; min-width: 18px; height: 18px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 1rem; font-weight: 800; display: flex; align-items: center; justify-content: center; padding: 0 5px; }
.sh-icons .wa { background: #1f9d55; color: #fff; }
.sh-icons .wa:hover { background: #178547; color: #fff; }
.sh-nav { border-top: 1px solid var(--line); }
.sh-nav .wrap { display: flex; gap: 6px 26px; overflow-x: auto; scrollbar-width: none; padding-top: 11px; padding-bottom: 11px; }
.sh-nav a { color: var(--ink); text-decoration: none; font-size: 1rem; font-weight: 600; white-space: nowrap; }
.sh-nav a:hover { color: var(--brand); }
.sh.center .sh-bar { display: grid; grid-template-columns: 1fr auto 1fr; }
.sh.center .st-brand { justify-self: center; }
.sh.center .sh-search { max-width: 280px; }
.sh.center .sh-nav .wrap { justify-content: center; }
@media (max-width: 760px) {
  .sh-burger { display: inline-flex; }
  .sh-bar, .sh.center .sh-bar { display: flex; flex-wrap: wrap; }
  .sh-search, .sh.center .sh-search { order: 5; flex-basis: 100%; max-width: none; }
  .sh-icons .label { display: none; }
  .sh-nav { display: none; }
  .sh-nav.open { display: block; }
  .sh-nav .wrap { flex-direction: column; gap: 14px; }
  .sh-top .push { margin-left: 0; }
  .sh { position: static; }
}

/* Store footer v2 */
.sf { background: var(--ink); color: color-mix(in srgb, #fff 75%, transparent); padding: 48px 0 22px; font-size: 1rem; margin-top: 32px; }
.sf a { color: color-mix(in srgb, #fff 88%, transparent); text-decoration: none; }
.sf a:hover { color: #fff; }
.sf-cols { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.sf-cols > div { display: flex; flex-direction: column; gap: 8px; }
.sf h3 { color: #fff; font-size: 1rem; margin-bottom: 4px; }
.sf .sf-brand { font-family: var(--font-display); font-size: 1.35rem; font-weight: 800; color: #fff; }
.sf-social { display: flex; gap: 10px; }
.sf-social a { width: 36px; height: 36px; border-radius: 50%; background: rgb(255 255 255 / 10%); display: flex; align-items: center; justify-content: center; }
.sf-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid rgb(255 255 255 / 12%); display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; font-size: 1rem; }
.sf-pay { margin-left: auto; display: flex; gap: 10px; font-size: 1.5rem; align-items: center; }
.sf-pay span { font-size: 1rem; font-weight: 800; border: 1px solid rgb(255 255 255 / 35%); border-radius: 4px; padding: 1px 6px; }
.sf-note { font-size: 1rem; opacity: .8; }
/* Wizard: image slot editor */
.slot-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; background: var(--paper); }
.slot-item[open] { background: var(--surface); }
.slot-item summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.slot-item summary::-webkit-details-marker { display: none; }
.slot-thumb { width: 64px; height: 42px; border-radius: 6px; overflow: hidden; background: var(--brand-tint); color: var(--brand); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.slot-thumb img { width: 100%; height: 100%; object-fit: cover; }
.slot-name { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.slot-name small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumbs figure img { object-fit: cover; }
/* Slide placeholders: keep the art on the right so it never sits under the text; hint at top-right */
.slider-full .ph-slide { align-items: flex-end; padding-right: 10%; }
.ph-slide .ph-label { display: none; }
.ph-slide .ph-hint { top: 16px; right: 16px; left: auto; bottom: auto; transform: none; }
@media (max-width: 700px) { .slider-full .ph-slide { justify-content: flex-start; padding-top: 48px; align-items: center; padding-right: 16px; } }
.tile-body { display: flex; flex-direction: column; gap: 2px; }
.section-title.center a, .theme-luxe .section-title a, .theme-mangalam .section-title a { order: 4; }
.slider-split .slide-media { order: 2; }
.about-body .slide-kicker, .banner-body .slide-kicker { align-self: flex-start; }
@media (max-width: 640px) {
  .banner { min-height: 260px; }
  .banner.has-img::after { background: linear-gradient(0deg, rgb(0 0 0 / 72%), rgb(0 0 0 / 40%)); }
}
@media (max-width: 700px) {
  .slider-split .slide-media { order: -1; }
  /* demo and vendor banners keep products on the right: show that side on narrow screens */
  .slide-media img, .banner-media img { object-position: 82% 50%; }
}
@media (max-width: 760px) {
  .sh-bar { flex-wrap: wrap; }
  .sh-bar .st-brand { flex: 1 1 0; min-width: 0; }
  .sh-bar .st-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sh-icons { margin-left: 0; flex: 0 0 auto; }
  .sh-icons a { padding: 8px 7px; }
}
@media (max-width: 700px) { .slider-split .slide-media { min-height: 0; height: auto; } .slider-split .slide { min-height: 0; } }

/* ===== Product page (Amazon-style) ===== */
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }
.crumbs i { font-size: .7em; margin: 0 4px; }
.pdp { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4.4fr) minmax(240px, 2.6fr); gap: 28px; align-items: start; }
.pdp-gallery { position: sticky; top: 90px; min-width: 0; }
.pg-main { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); aspect-ratio: 1; max-height: 520px; touch-action: pan-y; }
.pg-track { display: flex; height: 100%; transition: transform .45s cubic-bezier(.65,0,.35,1); }
.pg-slide { flex: 0 0 100%; margin: 0; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: zoom-in; }
.pg-slide img { width: 100%; height: 100%; object-fit: contain; transition: transform .2s ease; }
.pg-slide img.zoomed { transform: scale(2); }
.pg-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: rgb(255 255 255 / 92%); color: var(--ink); cursor: pointer; z-index: 2; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.pg-arrow.prev { left: 10px; } .pg-arrow.next { right: 10px; }
.pg-count { position: absolute; right: 12px; bottom: 12px; background: rgb(0 0 0 / 60%); color: #fff; font-size: 1rem; padding: 2px 9px; border-radius: 99px; z-index: 2; }
.pg-badge { position: absolute; left: 12px; top: 12px; background: var(--deal); color: #fff; font-weight: 800; font-size: 1rem; padding: 3px 10px; border-radius: 99px; z-index: 2; }
.pg-badge.combo { top: 42px; background: var(--brand); }
.pg-thumbs-wrap { position: relative; margin-top: 12px; display: flex; align-items: center; gap: 6px; }
.pg-thumbs { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 3px; flex: 1; }
.pg-thumbs::-webkit-scrollbar { display: none; }
.pg-thumbs button { flex: 0 0 72px; height: 72px; padding: 0; border: 2px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; cursor: pointer; scroll-snap-align: start; }
.pg-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.pg-thumbs button[aria-selected="true"] { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent); }
.pg-tarrow { flex: 0 0 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.pdp-info { min-width: 0; gap: 14px; }
.pdp-brand { font-size: 1rem; font-weight: 600; text-decoration: none; }
.pdp-title { font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-family: var(--font); font-weight: 600; line-height: 1.3; }
.pdp-rating { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-size: 1rem; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.pdp-rating span:last-child { color: var(--brand); }
.stars { color: #f5a623; display: inline-flex; gap: 1px; font-size: .9em; white-space: nowrap; }
.pdp-price { display: flex; flex-direction: column; gap: 4px; }
.pdp-off { color: var(--deal); font-size: 1.5rem; font-weight: 400; }
.pdp-now { font-size: 1.9rem; font-weight: 600; font-family: var(--font); }
.pdp-now.small-now { font-size: 1.5rem; }
.pdp-options { display: flex; flex-direction: column; gap: 14px; }
.opt-group legend { font-size: 1rem; margin-bottom: 8px; font-weight: 500; }
.opt-list { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; flex-direction: row; font-weight: 500; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt span { display: inline-block; padding: 8px 14px; border: 1px solid #c9c6bf; border-radius: 8px; background: var(--surface); cursor: pointer; font-size: 1rem; }
.opt input:checked + span { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 30%, transparent); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.opt.na span { color: var(--muted); border-style: dashed; background: repeating-linear-gradient(135deg, transparent 0 6px, rgb(0 0 0 / 4%) 6px 7px); }
.pdp-about h2, .pdp-section h2 { font-size: 1.15rem; font-family: var(--font); font-weight: 700; }
.pdp-about ul { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 1rem; }
.pdp-combo { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.combo-line { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 1rem; }
.combo-line img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.pdp-buy { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--surface); position: sticky; top: 90px; }
.pdp-stock { font-size: 1rem; font-weight: 600; }
.pdp-meta { margin: 6px 0 0; display: flex; flex-direction: column; gap: 4px; font-size: 1rem; }
.pdp-meta div { display: flex; gap: 8px; } .pdp-meta dt { color: var(--muted); width: 64px; flex: 0 0 auto; } .pdp-meta dd { margin: 0; }
.pdp-section { border-top: 1px solid var(--line); padding-top: 24px; }
.pdp-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 0 32px; }
.pdp-desc p { margin-bottom: 12px; line-height: 1.65; color: color-mix(in srgb, var(--ink) 85%, transparent); }
.spec-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.spec-table th, .spec-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec-table th { width: 40%; background: color-mix(in srgb, var(--ink) 4%, var(--surface)); font-weight: 600; color: var(--muted); }
.combo-offers { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.combo-offer { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px; }
.combo-pics { display: flex; align-items: center; gap: 6px; }
.combo-pics a, .combo-pics .card-p-ph { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); display: block; position: relative; }
.combo-pics img { width: 100%; height: 100%; object-fit: cover; }
.combo-pics .plus { font-weight: 800; color: var(--muted); }
.reviews { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2.2fr); gap: 32px; margin-top: 14px; }
.rev-summary { display: flex; flex-direction: column; gap: 10px; }
.rev-big { font-size: 2.6rem; font-weight: 700; font-family: var(--font); line-height: 1; }
.rev-bar { display: grid; grid-template-columns: 52px 1fr 40px; gap: 10px; align-items: center; font-size: 1rem; }
.rev-bar .bar { height: 14px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 8%, var(--surface)); overflow: hidden; border: 1px solid var(--line); }
.rev-bar .bar span { display: block; height: 100%; background: #f5a623; }
.rev { display: flex; flex-direction: column; gap: 6px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.rev-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; }
.rev-reply { background: color-mix(in srgb, var(--brand) 6%, var(--surface)); border-left: 3px solid var(--brand); padding: 10px 14px; border-radius: 6px; font-size: 1rem; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; font-size: 1.9rem; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { color: #d6d2ca; cursor: pointer; flex-direction: row; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: #f5a623; }
.star-input input:focus-visible + label { outline: 2px solid var(--brand); border-radius: 4px; }
.order-item { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); font-size: 1rem; }
.order-item img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.card-p-rating, .pcard-rating { display: flex; align-items: center; gap: 4px; font-size: 1rem; color: var(--muted); }
@media (max-width: 1080px) {
  .pdp { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pdp-buy { grid-column: 2; position: static; }
  .pdp-gallery { grid-row: span 2; }
}
@media (max-width: 760px) {
  .pdp { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .pdp-gallery, .pdp-buy { position: static; grid-column: auto; grid-row: auto; }
  .pg-main { max-height: none; }
  .reviews { grid-template-columns: minmax(0, 1fr); }
}
.card-p-add .btn { width: 100%; }
.cat-table tr.sub td:first-child { padding-left: 34px; } .cat-edit input, .cat-edit select { padding: 7px 10px; }
/* Vendor product form */
.type-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 10px; }
.type-card { position: relative; flex-direction: row; }
.type-card input { position: absolute; opacity: 0; }
.type-card span { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-weight: 400; }
.type-card span i { color: var(--brand); font-size: 1.2rem; }
.type-card input:checked + span { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent); background: var(--brand-tint); }
.type-card input:focus-visible + span { outline: 2px solid var(--brand); }
.type-card small { color: var(--muted); }
.mini-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.mini-table th { text-align: left; font-weight: 600; color: var(--muted); padding: 4px 6px; }
.mini-table td { padding: 4px 6px; vertical-align: middle; }
.mini-table input, .mini-table select { padding: 7px 9px; font-size: 1rem; }
.var-table { min-width: 760px; }
.gen-box { border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 10px 14px; background: var(--paper); }
.gen-box summary { cursor: pointer; font-weight: 600; }
[hidden] { display: none !important; }

/* ---------- Policy pages ---------- */
.policy { display: flex; gap: 32px; align-items: flex-start; }
.policy-toc { flex: 0 0 260px; position: sticky; top: calc(var(--sticky-h, 0px) + 20px); max-height: calc(100vh - var(--sticky-h, 0px) - 40px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 10px 16px 14px; }
.policy-toc > summary { display: none; }
.policy-toc nav { display: flex; flex-direction: column; gap: 1px; }
.policy-toc-title { margin: 0 0 8px 6px; font-weight: 700; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.policy-toc a { display: block; padding: 6px 8px 6px calc(10px + var(--lvl, 0) * 14px); border-left: 2px solid transparent; border-radius: 0 6px 6px 0; color: var(--muted); text-decoration: none; font-size: 1rem; line-height: 1.35; }
.policy-toc a:hover { color: var(--ink); background: var(--paper); }
.policy-toc a.on { color: var(--brand); border-left-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); font-weight: 600; }
.policy-body { flex: 1 1 0; min-width: 0; max-width: 820px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 40px); }
.policy-head { border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 18px; }
.policy-head p { margin: 6px 0 0; }
.policy-more { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.policy-more a { padding: 7px 14px; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; color: var(--ink); font-size: 1rem; }
.prose { line-height: 1.7; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { scroll-margin-top: calc(var(--sticky-h, 0px) + 20px); margin: 1.6em 0 .5em; line-height: 1.25; }
.prose h1 { font-size: 1.7rem; } .prose h2 { font-size: 1.35rem; } .prose h3 { font-size: 1.12rem; } .prose h4, .prose h5, .prose h6 { font-size: 1rem; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose table, .prose address { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .3em; }
.prose blockquote { border-left: 3px solid var(--brand); padding: 4px 0 4px 14px; color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--paper); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 1.5em 0; }
.prose address { font-style: normal; }
.policy-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 1rem; padding: 12px 0 4px; border-top: 1px solid var(--line); margin-top: 8px; }
.st-foot .policy-links a { color: var(--muted); }
.sf-policies { border-top-color: rgb(255 255 255 / 12%); margin-top: 24px; }
.sf-policies a { opacity: .85; }
@media (max-width: 860px) {
  .policy { flex-direction: column; gap: 14px; }
  .policy-toc { position: static; flex: none; width: 100%; max-height: none; padding: 0; }
  .policy-toc > summary { display: flex; align-items: center; gap: 8px; padding: 13px 16px; font-weight: 600; cursor: pointer; }
  .policy-toc nav { padding: 0 10px 12px 6px; }
  .policy-toc-title { display: none; }
  .policy-body { width: 100%; }
}
/* Vendor/admin page editor */
.page-cards { display: flex; flex-wrap: wrap; gap: 16px; }
.page-cards .page-card { flex: 1 1 260px; }
.page-card-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); font-size: 1.1rem; }
.upload-box { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 14px; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: var(--paper); }
.rte { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.rte-bar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px; border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 2; }
.rte-bar button, .rte-bar select { min-height: 34px; min-width: 34px; padding: 4px 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink); font: inherit; font-size: 1rem; cursor: pointer; }
.rte-bar select { border-color: var(--line); background: var(--surface); width: auto; }
.rte-bar button:hover, .rte-bar button.on { background: var(--surface); border-color: var(--line); }
.rte-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.rte-area { min-height: 420px; max-height: 70vh; overflow: auto; padding: 18px 20px; outline: none; }
.rte-area:focus { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand) 30%, transparent); }
.rte-src { width: 100%; border: 0; border-radius: 0; min-height: 420px; font-size: 1rem; padding: 14px; resize: vertical; }
.outline-preview { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 1rem; max-height: 60vh; overflow: auto; }
.outline-preview li { padding: 4px 6px 4px calc(6px + var(--lvl, 0) * 14px); border-left: 2px solid var(--line); }
/* Email settings */
.mail-log { list-style: none; margin: 0; padding: 0 18px 12px; display: flex; flex-direction: column; font-size: 1rem; }
.mail-log li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line); }
.mail-log li > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.bad-text { color: var(--deal); }
tr.unread td { font-weight: 600; }
.mail-preview { width: 100%; min-width: 320px; height: 520px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-top: 8px; background: #f3f2ee; }
/* Bulk actions + data tables */
.bulk-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--paper); }
.bulk-bar select { width: auto; }
.row-dim td { opacity: .62; }
.row-dim td:last-child, .row-dim td:first-child { opacity: 1; }
.icon-btn { min-width: 34px; padding-left: 9px; padding-right: 9px; }
.btn.outline.danger { color: var(--deal); border-color: color-mix(in srgb, var(--deal) 40%, var(--line)); background: transparent; }
td.r, th.r { text-align: right; }
th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
th[data-sort]::after { content: " ⇅"; color: var(--muted); font-size: .8em; }
th[data-sort].asc::after { content: " ↑"; color: var(--ink); }
th[data-sort].desc::after { content: " ↓"; color: var(--ink); }
.table-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table-tools input[type=search] { max-width: 280px; }
/* Shopper account */
.acct-tabs { margin-bottom: 4px; }
.addr-grid { display: flex; flex-wrap: wrap; gap: 14px; }
.addr-grid .addr-card { flex: 1 1 260px; max-width: 420px; }
.addr-card.is-default { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.addr-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.addr-pick > label { flex: 1 1 240px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; cursor: pointer; align-items: flex-start; }
.addr-pick > label:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.gst-box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--paper); }
/* Shipping & tracking */
.courier-grid { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.courier-grid > .courier { flex: 1 1 320px; max-width: 520px; }
.courier.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.courier-icon { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--paper); color: var(--brand); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; width: 40px; height: 22px; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; margin: 0; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgb(0 0 0 / 20%); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.track-events { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 10px; font-size: 1rem; }
.track-events li { position: relative; }
.track-events li::before { content: ""; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); border: 2px solid var(--surface); }
.track-events li:first-child::before { background: var(--brand); }
.track-box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--paper); display: flex; flex-direction: column; gap: 10px; }
/* Invoice register */
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 14px 16px; }
.filter-bar label { flex: 1 1 150px; max-width: 220px; }
.filter-bar .btn { flex: none; }
.stats { display: flex; flex-wrap: wrap; gap: 12px; }
.table.compact th, .table.compact td { padding: 9px 10px; font-size: 1rem; }
.table tfoot th { border-top: 2px solid var(--ink); padding: 11px 10px; text-align: left; background: var(--paper); }
.table tfoot th.r { text-align: right; }
.stats > .stat { flex: 1 1 150px; }
#inv-table td:first-child, #inv-table td:nth-child(3) { white-space: nowrap; }
label.switch { flex-direction: row; display: inline-flex; gap: 8px; align-items: center; }
label.switch input { width: 40px; min-height: 0; padding: 0; border: 0; }
.courier-grid > .courier { flex-basis: min(320px, 100%); min-width: 0; }
.courier input, .courier-grid .mono, .card .mono { overflow-wrap: anywhere; }
.card p { overflow-wrap: anywhere; }
body .addr-pick > label, body label.gst-box, body .gst-box, body .upload-box, body .track-box { border-radius: 12px; }
/* Theme preview bar */
.theme-preview-bar { background: #1d2125; color: #fff; text-align: center; padding: 9px 16px; font-size: 1rem; position: relative; z-index: 30; }
.theme-preview-bar a { color: #ffd76a; font-weight: 700; margin-left: 8px; }
.theme-shot { width: 64px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); flex: none; }
.theme-swatch { width: 44px; height: 44px; border-radius: 8px; border: 5px solid; flex: none; }
.theme-card .thumb.shot { padding: 0; background-size: cover; background-position: top center; }

/* Panel chrome v1.7: grouped menu, top bar, profile menu, store switch, fixed footer */
.panel-nav .nav-group { display: flex; flex-direction: column; }
.panel-nav .nav-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: var(--radius-sm); color: #d9dcdf; font-size: 1rem; font-weight: 500; user-select: none; }
.panel-nav .nav-group > summary::-webkit-details-marker { display: none; }
.panel-nav .nav-group > summary:hover { background: rgb(255 255 255 / 7%); color: #fff; }
.panel-nav .nav-group > summary.has-on { color: #fff; font-weight: 700; }
.panel-nav .nav-group > summary i { width: 1.25em; margin-right: 6px; opacity: .85; }
.panel-nav .nav-group > summary .caret { font-size: 1rem; margin: 0; transition: transform .15s; }
.panel-nav .nav-group[open] > summary .caret { transform: rotate(180deg); }
.panel-nav .nav-sub { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 6px 22px; padding-left: 10px; border-left: 1px solid rgb(255 255 255 / 12%); }
.panel-nav a.item.sub { padding: 7px 10px; font-size: 1rem; }
.panel-top { position: sticky; top: 0; z-index: 30; gap: 14px; flex-wrap: nowrap; }
.panel-top .top-context { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; flex: 1 1 auto; }
.panel-top .top-right { display: flex; align-items: center; gap: 14px; margin-left: auto; flex: 0 0 auto; }
.profile-menu { position: relative; }
.profile-menu > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px 4px 4px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); }
.profile-menu > summary::-webkit-details-marker { display: none; }
.profile-menu > summary:hover { border-color: #c9c6be; }
.profile-menu .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; overflow: hidden; flex: 0 0 auto; }
.profile-menu .avatar img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.profile-menu .who-name { font-size: 1rem; font-weight: 600; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-menu .caret { font-size: 1rem; color: var(--muted); }
.profile-menu .menu-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgb(0 0 0 / 12%); padding: 6px; display: flex; flex-direction: column; z-index: 40; }
.profile-menu .menu-head { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; }
.profile-menu .menu-pop a, .profile-menu .menu-pop button { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font: inherit; font-size: 1rem; background: none; border: 0; width: 100%; text-align: left; cursor: pointer; }
.profile-menu .menu-pop a:hover, .profile-menu .menu-pop button:hover { background: var(--paper); }
.profile-menu .menu-pop form { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.store-switch label { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; cursor: pointer; font-size: 1rem; font-weight: 600; white-space: nowrap; }
.store-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.store-switch .track { width: 42px; height: 24px; border-radius: 99px; background: #c9c6be; position: relative; transition: background .15s; flex: 0 0 auto; }
.store-switch .knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 25%); transition: transform .15s; }
.store-switch input:checked + .track { background: var(--good); }
.store-switch input:checked + .track .knob { transform: translateX(18px); }
.store-switch input:focus-visible + .track { outline: 3px solid var(--accent); outline-offset: 2px; }
.store-switch .state { color: var(--muted); }
.store-switch input:checked ~ .state { color: var(--good); }
.panel-main { padding-bottom: 72px; }
.panel-foot { position: fixed; left: 248px; right: 0; bottom: 0; z-index: 25; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 8px 24px; background: var(--surface); border-top: 1px solid var(--line); font-size: 1rem; }
.panel-foot .x { color: var(--accent); }
.panel-foot .push { margin-left: auto; }
.panel-foot a { color: inherit; }
@media (max-width: 860px) {
  .panel-nav { display: none; flex-direction: column; flex-wrap: nowrap; position: fixed; inset: 0 auto 0 0; width: 280px; height: 100vh; overflow-y: auto; z-index: 50; padding: 18px 12px; align-items: stretch; box-shadow: 0 0 40px rgb(0 0 0 / 35%); }
  body.nav-open .panel-nav { display: flex; }
  .panel-nav a.item { flex: none; }
  .menu-toggle { display: inline-flex; }
  .panel-top { flex-wrap: wrap; }
  .panel-top .top-context { order: 3; flex-basis: 100%; }
  .profile-menu .who-name { display: none; }
  .store-switch .state { display: none; }
  .panel-foot { left: 0; padding: 6px 16px; }
  .panel-foot .push { display: none; }
}
@media print { .panel-foot, .menu-toggle, .top-right { display: none !important; } }

/* Invoice print formats */
.inv-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; padding: 14px; }
.inv-toolbar .notice { flex-basis: 100%; max-width: 760px; }
.inv-logo { max-height: 56px; max-width: 200px; object-fit: contain; margin-bottom: 8px; }
.invoice.paper-a5 { max-width: 560px; padding: 22px; font-size: 11px; }
.invoice.paper-a5 h2 { font-size: 16px !important; }
@media print { .invoice { margin: 0; padding: 0; max-width: none; } }
.paper-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.paper-opt { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; }
.paper-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.paper-ico { display: inline-block; vertical-align: -4px; margin-right: 6px; border: 1.5px solid currentColor; border-radius: 2px; background: #fff; }
.paper-ico.paper-a4 { width: 14px; height: 19px; } .paper-ico.paper-a5 { width: 12px; height: 16px; }
.paper-ico.paper-80mm { width: 10px; height: 22px; border-bottom-style: dashed; } .paper-ico.paper-58mm { width: 7px; height: 22px; border-bottom-style: dashed; }

/* Email template editor */
.code-area { font-size: 1rem; line-height: 1.5; tab-size: 2; white-space: pre; overflow: auto; }
.ph-list { display: flex; flex-direction: column; gap: 4px; max-height: 420px; overflow: auto; }
.tpl-ph { flex: 0 0 auto; height: auto; min-height: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0; text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; cursor: pointer; font: inherit; }
.tpl-ph:hover { border-color: var(--brand); }
.tpl-ph code { font-size: 1rem; color: var(--brand); }
.tpl-ph span { font-size: 1rem; color: var(--muted); }

/* Offers: home carousel, cards, top bar */
.offer-carousel { position: relative; width: 100%; max-width: 100%; overflow: hidden; border-radius: var(--radius); isolation: isolate; }
.offer-carousel .oc-track { display: flex; width: 100%; transition: transform .5s ease; will-change: transform; }
.offer-carousel .oc-slide { flex: 0 0 100%; min-width: 0; position: relative; min-height: clamp(180px, 30vw, 340px); display: flex; align-items: center; background: var(--oc-bg); color: #fff; overflow: hidden; }
.offer-carousel .oc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.offer-carousel .oc-slide.has-img::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(0 0 0 / 62%) 0%, rgb(0 0 0 / 30%) 55%, rgb(0 0 0 / 0%) 100%); z-index: -1; }
.offer-carousel .oc-slide:not(.has-img) { background-image: radial-gradient(circle at 85% 30%, rgb(255 255 255 / 18%) 0 18%, transparent 19%), radial-gradient(circle at 95% 90%, rgb(255 255 255 / 10%) 0 22%, transparent 23%); background-color: var(--oc-bg); }
.offer-carousel .oc-text { padding: clamp(20px, 4vw, 48px) clamp(20px, 6vw, 72px); max-width: 640px; display: flex; flex-direction: column; gap: 10px; }
.offer-carousel h2 { font-size: clamp(1.5rem, 3.6vw, 2.6rem); color: #fff; line-height: 1.1; }
.offer-carousel p { margin: 0; font-size: clamp(.95rem, 1.6vw, 1.1rem); opacity: .92; }
.offer-carousel .oc-badge { align-self: flex-start; background: var(--accent, #f5b700); color: #16191c; font-weight: 800; font-size: 1rem; letter-spacing: .04em; padding: 4px 10px; border-radius: 99px; text-transform: uppercase; }
.offer-carousel .oc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.offer-carousel .oc-cta { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: #16191c; font-weight: 700; padding: 10px 18px; border-radius: 99px; text-decoration: none; }
.offer-carousel .oc-cta:hover { background: #f1efe9; color: #16191c; }
.offer-carousel .oc-code { display: inline-flex; align-items: center; gap: 8px; background: rgb(255 255 255 / 14%); color: #fff; border: 1.5px dashed rgb(255 255 255 / 70%); padding: 9px 14px; border-radius: 99px; font: inherit; font-size: 1rem; cursor: pointer; }
.offer-carousel .oc-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgb(255 255 255 / 85%); color: #16191c; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgb(0 0 0 / 20%); }
.offer-carousel .oc-nav.prev { left: 12px; } .offer-carousel .oc-nav.next { right: 12px; }
.offer-carousel .oc-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; }
.offer-carousel .oc-dots button { width: 9px; height: 9px; padding: 0; border-radius: 99px; border: 0; background: rgb(255 255 255 / 55%); cursor: pointer; transition: width .2s; }
.offer-carousel .oc-dots button[aria-selected="true"] { width: 26px; background: #fff; }
@media (max-width: 640px) { .offer-carousel .oc-nav { display: none; } .offer-carousel .oc-text { padding-bottom: 36px; } }
@media (prefers-reduced-motion: reduce) { .offer-carousel .oc-track { transition: none; } }
.offer-cards { display: flex; flex-direction: column; gap: 10px; }
.offer-card { display: flex; gap: 12px; align-items: flex-start; background: var(--surface, #fff); border: 1px solid var(--line, #e2e0da); border-left: 4px solid var(--oc-bg); border-radius: var(--radius-sm, 9px); padding: 12px; text-align: left; }
.offer-card .ocd-ico { flex: 0 0 auto; min-width: 44px; height: 44px; padding: 0 6px; border-radius: 10px; background: var(--oc-bg); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; text-align: center; line-height: 1.1; }
.offer-card .ocd-code { font: inherit; font-family: ui-monospace, Consolas, monospace; font-size: 1rem; font-weight: 700; border: 1.5px dashed var(--oc-bg); color: var(--ink, #16191c); background: transparent; padding: 3px 9px; border-radius: 6px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.offer-bar { position: relative; min-height: 2.2em; overflow: hidden; }
.offer-bar .ob-item { display: none; }
.offer-bar .ob-item.on { display: inline; animation: obIn .4s ease; }
.offer-bar a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.offer-bar .ob-code { font: inherit; font-weight: 800; letter-spacing: .03em; background: rgb(255 255 255 / 15%); color: inherit; border: 1px dashed currentColor; border-radius: 5px; padding: 0 6px; cursor: pointer; }
@keyframes obIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
[data-copy].copied::after { content: " ✓ Copied"; font-weight: 700; }
/* Back to top */
.to-top { visibility: hidden; pointer-events: none; position: fixed; right: 18px; bottom: 22px; z-index: 60; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; background: var(--brand, #0b5d57); color: #fff; box-shadow: 0 6px 18px rgb(0 0 0 / 22%); display: flex; align-items: center; justify-content: center; font-size: 1.05rem; opacity: 0; transform: translateY(12px); transition: opacity .2s, transform .2s; }
.to-top.show { opacity: 1; transform: none; visibility: visible; pointer-events: auto; }
.to-top:focus-visible { outline: 3px solid var(--accent, #f5b700); outline-offset: 3px; }
@media print { .to-top, .offer-carousel, .offer-bar { display: none !important; } }

.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 3px; gap: 2px; }
.seg a { padding: 7px 16px; border-radius: 99px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 1rem; display: inline-flex; gap: 6px; align-items: center; }
.seg a small { color: var(--muted); font-weight: 500; }
.seg a.on { background: var(--ink); color: #fff; }
.seg a.on small { color: #c9cdd1; }

.locked-field { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: var(--paper); font-weight: 600; }
.notice.warn { background: var(--accent-tint); border-color: #f0d68a; color: #5c4400; }

/* Plans */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.plan-card { gap: 10px; }
.plan-card.current { border: 2px solid var(--brand); }
.plan-card.popular:not(.current) { border-color: var(--accent); box-shadow: 0 6px 24px rgb(245 183 0 / 18%); }
.plan-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.plan-price strong { font-family: var(--font-display); font-size: 1.8rem; }
.plan-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.plan-list i { color: var(--good); width: 1.1em; }
.plan-list li.off { color: var(--muted); }
.plan-list li.off i { color: #b8b4ab; }
.plan-card .push { margin-top: auto; }
/* Keep focused/scrolled-to fields clear of the sticky top bar and fixed footer. */
html:has(body.has-panel) { scroll-padding-top: 96px; scroll-padding-bottom: 72px; }
.offer-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.offer-thumb { flex: 0 0 auto; width: 120px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; text-align: center; padding: 4px; }
.offer-thumb img { width: 100%; height: 100%; object-fit: cover; }
.offer-thumb:has(img) { padding: 0; }

/* In-page confirm dialog */
.bx-confirm { border: 0; padding: 0; border-radius: 16px; max-width: min(440px, calc(100vw - 32px)); width: 100%; box-shadow: 0 24px 60px rgb(0 0 0 / 28%); color: var(--ink, #16191c); background: var(--surface, #fff); }
.bx-confirm::backdrop { background: rgb(22 25 28 / 55%); backdrop-filter: blur(2px); }
.bx-confirm[open] { animation: bxPop .16s ease-out; }
@keyframes bxPop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.bx-confirm-box { display: grid; grid-template-columns: auto 1fr; gap: 14px 16px; padding: 22px; margin: 0; }
.bx-confirm-ico { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem; background: var(--brand-tint, #e7f0ef); color: var(--brand, #0b5d57); }
.bx-confirm-ico.danger { background: #fde8e6; color: #a0251a; }
.bx-confirm-body h2 { font-size: 1.15rem; margin: 2px 0 6px; }
.bx-confirm-body p { margin: 0; color: var(--muted, #5a6168); line-height: 1.5; }
.bx-confirm-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.btn.danger-solid { background: #a0251a; border-color: #a0251a; color: #fff; }
.btn.danger-solid:hover { background: #861d14; }
@media (prefers-reduced-motion: reduce) { .bx-confirm[open] { animation: none; } }

/* One-row toolbar (actions · filters · search) */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: thin; }
.toolbar > * { flex: 0 0 auto; }
.toolbar .tabs { flex-wrap: nowrap; }
.toolbar .tabs a { white-space: nowrap; padding: 6px 12px; }
.toolbar-sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 4px; }
.toolbar-search { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.toolbar-search input[type=search] { width: 200px; min-width: 140px; padding-top: 6px; padding-bottom: 6px; }
@media (max-width: 860px) { .toolbar { flex-wrap: wrap; overflow: visible; } .toolbar-sep { display: none; } .toolbar-search { margin-left: 0; flex: 1 1 100%; } .toolbar-search input[type=search] { flex: 1; width: auto; } }

/* Phones: iOS zooms into fields with text under 16px, so form fields stay 16px on touch screens. */
@supports (-webkit-touch-callout: none) { @media (pointer: coarse) { input, select, textarea { font-size: 16px; } } }
