/* FINOTECH MARKET — storefront + store manager styles (original design, brand colours from the FINOTECH logo) */
/* Inter, self-hosted (SIL Open Font License, see static/fonts/OFL.txt): no visitor IPs sent to Google (audit S4). */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.da03732a27e1.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-latin-500-normal.51205681a1ba.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.2ede57db1a3a.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-latin-700-normal.8ca0a5155296.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/inter-latin-800-normal.900ae45e40b8.woff2") format("woff2"); }
:root {
  --navy: #363062; --navy-700: #2b2652; --navy-900: #1f1b3d;
  --cream: #f5e8c7; --cream-600: #e9d6a3;
  --peri: #d0ddff; --peri-50: #eef2ff; --peri-100: #e2e9ff;
  --ink: #1b1838; --text: #2e2b4a; --muted: #625f7d; --line: #e3e4ee; --line-2: #d4d6e4;
  --bg: #f7f8fc; --card: #ffffff;
  --success: #17754a; --success-bg: #e6f4ec; --danger: #b42318; --danger-bg: #fdecea;
  --warn: #9a5b00; --warn-bg: #fff4e0; --info-bg: #eef2ff;
  --radius: 12px; --radius-sm: 8px; --shadow: 0 1px 2px rgba(27,24,56,.06), 0 4px 16px rgba(27,24,56,.06);
  --focus: 0 0 0 3px rgba(54,48,98,.35);
  --maxw: 1240px;
  /* sizing / spacing tokens (final polish pass) */
  --control-h: 44px; --control-h-sm: 36px; --radius-lg: 16px; --radius-pill: 999px;
  --header-h: 116px; --sticky-gap: 16px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px;
  --ease: cubic-bezier(.2,.7,.3,1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); line-height: 1.55; font-size: 15px; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--navy-900); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.55rem, 2.6vw, 2rem); letter-spacing: -.02em; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
h1, h2, h3 { text-wrap: balance; overflow-wrap: anywhere; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
.hero :focus-visible, .site-footer :focus-visible, .mgr-side :focus-visible { outline-color: var(--cream); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 12px; z-index: 100; border-radius: 6px; }
.skip-link:focus { left: 8px; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .xs { font-size: .78rem; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: 8px } .mt-2 { margin-top: 16px } .mt-3 { margin-top: 24px } .mt-4 { margin-top: 40px }
.mb-0 { margin-bottom: 0 } .mb-2 { margin-bottom: 16px }
.hidden { display: none !important; }

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.header-main { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand img { height: 34px; width: auto; }
.brand .wordmark { font-weight: 800; letter-spacing: .02em; font-size: 1.02rem; line-height: 1; }
.brand .wordmark small { display: block; font-weight: 600; font-size: .62rem; letter-spacing: .28em; color: var(--muted); margin-top: 3px; }
.search-form { flex: 1; display: flex; max-width: 640px; }
.search-form input { flex: 1; min-width: 0; height: 44px; border: 1.5px solid var(--line-2); border-right: 0; border-radius: 999px 0 0 999px; padding: 0 18px; font: inherit; background: var(--bg); }
.search-form input:focus { border-color: var(--navy); background: #fff; outline: none; }
.search-form button { height: 44px; border: 0; border-radius: 0 999px 999px 0; background: var(--navy); color: #fff; padding: 0 18px; cursor: pointer; display: flex; align-items: center; }
.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.icon-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; min-width: 40px; justify-content: center; padding: 8px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: .9rem; background: none; border: 0; cursor: pointer; font-family: inherit; }
.icon-btn:hover { background: var(--peri-50); color: var(--ink); }
.icon-btn svg { width: 22px; height: 22px; }
.ico { position: relative; display: inline-flex; }
.badge-count { position: absolute; top: -7px; right: -9px; background: var(--navy); color: #fff; font-size: .68rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 5px; box-shadow: 0 0 0 2px #fff; line-height: 1; }
.cat-nav { border-top: 1px solid var(--line); background: #fff; }
.cat-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.cat-nav ul::-webkit-scrollbar { display: none; }
@media (min-width: 861px) {
  .cat-nav ul { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); padding-right: 40px; }
  .cat-nav a { padding-inline: 10px; }
}
.cat-nav a { display: block; padding: 11px 12px; white-space: nowrap; text-decoration: none; color: var(--text); font-size: .9rem; font-weight: 500; border-bottom: 2px solid transparent; }
.cat-nav a:hover, .cat-nav a.active { color: var(--navy); border-bottom-color: var(--navy); }
.menu-btn { display: none; }
.mobile-search { display: none; padding-bottom: 12px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--control-h); padding: 0 20px; border-radius: var(--radius-pill); font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.2; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s, transform .1s var(--ease); white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn svg { flex-shrink: 0; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-900); color: #fff; }
.btn-accent { background: var(--cream); color: var(--navy-900); border-color: var(--cream-600); }
.btn-accent:hover { background: var(--cream-600); color: var(--navy-900); }
.btn-secondary { background: #fff; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--peri-50); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--peri-50); }
.btn-danger { background: #fff; color: var(--danger); border-color: #f1b8b2; }
.btn-danger:hover { background: var(--danger-bg); }
.btn-sm { min-height: var(--control-h-sm); padding: 0 14px; font-size: .85rem; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 1.02rem; }
.btn-block, .btn-lg { width: 100%; white-space: normal; text-align: center; }
.btn-lg:not(.btn-block) { width: auto; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-color: rgba(255,255,255,.45); border-top-color: #fff; animation: spin .8s linear infinite; }
.btn-secondary.is-loading::after, .btn-ghost.is-loading::after, .btn-accent.is-loading::after, .btn-danger.is-loading::after { border-color: rgba(54,48,98,.25); border-top-color: var(--navy); }
.link-btn { background: none; border: 0; padding: 0; color: var(--navy); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link-btn:hover { color: var(--navy-900); }

/* ---------- Placeholders (structural content slots) ---------- */
.ph { background: repeating-linear-gradient(135deg, var(--peri-50), var(--peri-50) 10px, #e7ecff 10px, #e7ecff 20px); color: #7b7fa6; display: grid; place-items: center; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-align: center; border-radius: var(--radius-sm); }
.ph-text { color: #8a8eb2; font-style: normal; letter-spacing: .04em; }

/* ---------- Page sections ---------- */
main { min-height: 60vh; }
.section { padding-block: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; font-size: .9rem; white-space: nowrap; }
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-900) 100%); color: #fff; border-radius: 0 0 28px 28px; overflow: hidden; position: relative; }
.hero::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 340px; height: 340px; background: url("../img/logo-mark.7ceaae057f4a.png") no-repeat center / contain; opacity: .12; }
.hero-inner { padding: 56px 0 52px; position: relative; z-index: 1; max-width: 900px; }
.hero h1 { color: #fff; font-size: clamp(1.75rem, 4vw, 2.6rem); line-height: 1.15; margin: 0 0 12px; }
.hero p { color: #d9dcf5; font-size: 1.05rem; line-height: 1.5; margin: 0; max-width: 60ch; }
.hero .search-form { max-width: 640px; margin-top: 28px; box-shadow: 0 8px 24px rgba(15,12,40,.28); border-radius: var(--radius-pill); }
.hero .search-form input { background: #fff; border-color: #fff; height: 54px; padding: 0 22px; font-size: 1rem; }
.hero .search-form button { height: 54px; background: var(--cream); color: var(--navy-900); font-weight: 700; font-size: .95rem; gap: 8px; padding: 0 26px; transition: background .15s; }
.hero .search-form button:hover { background: var(--cream-600); }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: var(--radius-pill); background: rgba(255,255,255,.08); color: #fff; text-decoration: none; font-size: .875rem; font-weight: 500; line-height: 1; border: 1px solid rgba(255,255,255,.2); white-space: nowrap; transition: background .15s, border-color .15s; }
.chip:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.35); color: #fff; }
.chip-light { background: #fff; color: var(--text); border: 1px solid var(--line-2); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip-light:hover, .chip-light.active { background: var(--peri-50); color: var(--navy); border-color: var(--navy); }

.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.cat-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 10px; transition: border-color .15s, transform .15s; min-height: 118px; }
.cat-tile:hover { border-color: var(--navy); transform: translateY(-2px); color: var(--ink); }
.cat-tile .cat-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--peri-50); display: grid; place-items: center; color: var(--navy); }
.cat-tile strong { font-size: .95rem; }
.cat-tile span { font-size: .78rem; color: var(--muted); }

/* ---------- Product grid & card ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.listing .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.product-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--line-2); }
.product-card:focus-within { box-shadow: 0 0 0 2px var(--navy); }
.product-card h3 a:focus-visible { outline: none; }
.product-card .thumb { aspect-ratio: 4 / 3; background: var(--peri-50); position: relative; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .thumb .ph { position: absolute; inset: 0; border-radius: 0; }
.product-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .ptype { font-size: .72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.product-card h3 { font-size: .96rem; font-weight: 650; line-height: 1.3; margin: 0; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-wrap: pretty; }
.product-card h3 a { color: var(--ink); text-decoration: none; }
.product-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.product-card .price-row { margin-top: auto; padding-top: 6px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price { font-weight: 700; color: var(--ink); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: .88rem; }
.price-sale { color: var(--danger); }
.digital-tag { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; color: var(--success); font-weight: 600; }
.card-badges { position: absolute; top: 10px; left: 10px; right: 58px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 2; pointer-events: none; }
.badge { display: inline-flex; align-items: center; min-height: 22px; line-height: 1; padding: 3px 9px; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .03em; background: #fff; color: var(--navy); border: 1px solid var(--line-2); }
.badge-featured { background: var(--navy); color: #fff; border-color: var(--navy); }
.badge-best { background: var(--cream); color: var(--navy-900); border-color: var(--cream-600); }
.badge-new { background: var(--success-bg); color: var(--success); border-color: #bfe3cf; }
.badge-sale { background: var(--danger-bg); color: var(--danger); border-color: #f5c2bc; }
.fav-btn { position: absolute; top: 8px; right: 8px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.95); display: grid; place-items: center; cursor: pointer; color: var(--navy); box-shadow: 0 1px 4px rgba(0,0,0,.12); transition: transform .15s var(--ease), background .15s; }
.fav-btn:hover { background: #fff; transform: scale(1.06); }
.is-popping svg { animation: pop .32s var(--ease); }
@keyframes pop { 40% { transform: scale(1.28); } }
.fav-btn svg { width: 20px; height: 20px; }
.fav-btn[aria-pressed="true"] svg { fill: #d0364a; stroke: #d0364a; }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; color: var(--text); }
.stars { color: #d49b00; letter-spacing: 1px; font-size: .9rem; }
.stars .off { color: #d8d8e2; }

/* ---------- Layout with filters ---------- */
.breadcrumb { font-size: .84rem; padding: 14px 0 4px; color: var(--muted); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: #aaa; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--navy); }
.listing { display: grid; grid-template-columns: 250px 1fr; gap: 28px; align-items: start; padding-bottom: 40px; }
.filters { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px 16px; }
.filters fieldset { border: 0; padding: 14px 0; margin: 0; border-bottom: 1px solid var(--line); min-width: 0; }
.filters fieldset:last-of-type { border-bottom: 0; }
.filters legend:not(.sr-only) { float: left; width: 100%; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); padding: 0; margin-bottom: 10px; }
.filters legend:not(.sr-only) + * { clear: both; }
.filters label { display: flex; align-items: center; gap: 10px; font-size: .9rem; font-weight: 400; color: var(--text); padding: 4px 0; cursor: pointer; }
.filters label:hover { color: var(--ink); }
.filters select, .filters input[type=number] { width: 100%; }
.filter-toggle { display: none; }
.listing-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.listing-bar select { width: auto; min-width: 180px; }
.listing-bar .row { gap: 10px; }
.pagination { display: flex; gap: 6px; justify-content: center; margin: 32px 0 8px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: #fff; text-decoration: none; padding: 0 10px; font-size: .9rem; }
.pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }
.empty { text-align: center; padding: 48px 20px; background: #fff; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); }
.empty h2 { font-size: 1.15rem; margin-bottom: 6px; }
.empty p { max-width: 44ch; margin: 0 auto 20px; }
.empty .empty-ic { width: 56px; height: 56px; border-radius: 50%; background: var(--peri-50); color: var(--navy); display: grid; place-items: center; margin: 0 auto 14px; }
.empty .empty-ic svg { width: 26px; height: 26px; }

/* ---------- Forms ---------- */
label { font-weight: 600; font-size: .88rem; color: var(--ink); }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=url], input[type=search], input[type=date], input[type=datetime-local], select, textarea {
  width: 100%; min-height: var(--control-h); border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); padding: 9px 12px; font: inherit; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: #8b89a3; opacity: 1; }
input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: #bfc2d6; }
textarea { min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--navy); outline: none; box-shadow: var(--focus); }
input[disabled], select[disabled], textarea[disabled] { background: var(--bg); color: var(--muted); cursor: not-allowed; }
input[type=file] { width: 100%; font: inherit; font-size: .88rem; padding: 10px; min-height: var(--control-h); border: 1.5px dashed var(--line-2); border-radius: var(--radius-sm); background: var(--bg); cursor: pointer; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; margin-right: 12px; padding: 6px 14px; border-radius: var(--radius-pill); border: 1.5px solid var(--navy); background: #fff; color: var(--navy); cursor: pointer; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--navy); }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; }
.field .req { color: var(--danger); font-weight: 700; }
.field .help { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.errorlist { list-style: none; padding: 0; margin: 6px 0 0; color: var(--danger); font-size: .84rem; font-weight: 500; }
.errorlist li { display: flex; gap: 6px; align-items: flex-start; }
.errorlist li::before { content: "!"; flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; background: var(--danger); color: #fff; font-size: .68rem; font-weight: 800; display: grid; place-items: center; }
.field.has-error input, .field.has-error select, .field.has-error textarea, [aria-invalid="true"] { border-color: var(--danger); }
.field.has-error input:focus, .field.has-error select:focus, .field.has-error textarea:focus { box-shadow: 0 0 0 3px rgba(180,35,24,.18); }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; cursor: pointer; }
.checkbox-row input { margin-top: 2px; flex-shrink: 0; }
.form-error-summary { display: flex; gap: 10px; align-items: flex-start; }
.form-error-summary:focus { outline: none; }
.form-card { max-width: 440px; margin: 40px auto; padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.form-card .brand { justify-content: center; margin-bottom: 18px; }
.form-card h1 { text-align: center; font-size: 1.4rem; }

/* ---------- Alerts ---------- */
.messages { margin: 16px auto 0; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 10px; border: 1px solid; border-left-width: 4px; font-size: .92rem; line-height: 1.5; overflow-wrap: anywhere; }
.messages .alert { animation: slide-in .25s var(--ease); }
@keyframes slide-in { from { opacity: 0; transform: translateY(-4px); } }
.alert-success { background: var(--success-bg); border-color: #bfe3cf; color: #0f5132; }
.alert-error, .alert-danger { background: var(--danger-bg); border-color: #f5c2bc; color: #7a1a12; }
.alert-warning { background: var(--warn-bg); border-color: #f5d49a; color: #6b3f00; }
.alert-info { background: var(--info-bg); border-color: #cdd8ff; color: var(--navy-900); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--peri-50); color: var(--navy); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-paid, .pill-succeeded, .pill-active, .pill-approved, .pill-published, .pill-fulfilled, .pill-completed, .pill-resolved, .pill-verified { background: var(--success-bg); color: var(--success); }
.pill-failed, .pill-revoked, .pill-hidden, .pill-rejected, .pill-archived, .pill-expired { background: var(--danger-bg); color: var(--danger); }
.pill-pending, .pill-payment_pending, .pill-initiated, .pill-created, .pill-requested, .pill-open, .pill-draft, .pill-in_progress, .pill-processed, .pill-not_started { background: var(--warn-bg); color: var(--warn); }
.pill-refunded, .pill-partially_refunded, .pill-cancelled, .pill-paused, .pill-closed { background: #efeff4; color: #555; }

/* ---------- Product detail ---------- */
.pdp { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 36px; padding: 8px 0 24px; align-items: start; }
.gallery-main { aspect-ratio: 4 / 3; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: grid; place-items: center; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-main .ph { width: 100%; height: 100%; border-radius: 0; font-size: .9rem; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.gallery-thumbs button { flex: 0 0 76px; height: 60px; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; padding: 0; background: #fff; cursor: pointer; }
.gallery-thumbs button[aria-current="true"] { border-color: var(--navy); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.buy-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; position: sticky; top: calc(var(--header-h) + var(--sticky-gap)); box-shadow: var(--shadow); }
.buy-box h1 { font-size: clamp(1.3rem, 2vw, 1.55rem); line-height: 1.2; margin: 4px 0 8px; }
.buy-box .price { font-size: 1.75rem; }
.price-lead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 14px 0 4px; }
.price-lead .from { font-size: .82rem; color: var(--muted); font-weight: 600; }
.buy-box .kicker { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--muted); margin: 0; }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.trust-tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: var(--peri-50); color: var(--navy); font-size: .8rem; font-weight: 600; }
.trust-tag.ok { background: var(--success-bg); color: var(--success); }
.license-options { display: grid; gap: 8px; margin: 14px 0 4px; min-width: 0; }
.license-options legend { margin-bottom: 8px; }
.license-option { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line-2); border-radius: 10px; padding: 12px 14px; cursor: pointer; font-weight: 500; transition: border-color .15s, background .15s; }
.license-option:hover { border-color: #bfc2d6; }
.license-option:has(input:checked) { border-color: var(--navy); background: var(--peri-50); }
.license-option:has(input:focus-visible) { box-shadow: var(--focus); }
.license-option > span:nth-child(2) { min-width: 0; line-height: 1.35; }
.license-option .lp { margin-left: auto; font-weight: 700; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.buy-actions { display: grid; gap: 10px; margin-top: 18px; }
.buy-actions .row .btn { flex: 1; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 18px 0 0; font-size: .84rem; }
.facts div { background: var(--bg); border-radius: 8px; padding: 10px 12px; min-width: 0; }
.facts dt { color: var(--muted); font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.facts dd { margin: 2px 0 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.pdp-tabs { position: sticky; top: calc(var(--header-h) - 1px); z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); margin: 12px 0 0; }
.pdp-tabs ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; overflow-x: auto; }
.pdp-tabs a { display: block; padding: 12px 14px; white-space: nowrap; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .9rem; border-bottom: 2px solid transparent; }
.pdp-tabs a:hover { color: var(--navy); border-bottom-color: var(--line-2); }
.pdp-section { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; margin-top: 18px; scroll-margin-top: calc(var(--header-h) + 64px); }
.pdp-section h2 { font-size: 1.15rem; margin-bottom: 14px; }
.pdp-section h3 { font-size: 1rem; margin-bottom: 8px; }
.spec-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.spec-table th { text-align: left; width: 38%; color: var(--muted); font-weight: 600; padding: 10px 12px 10px 0; vertical-align: top; }
.spec-table td { padding: 10px 0; color: var(--ink); }
.spec-table.items th { width: auto; color: var(--ink); }
.spec-table.items td { text-align: right; white-space: nowrap; padding-left: 12px; }
.success-hero p { overflow-wrap: anywhere; }
.spec-table tr + tr th, .spec-table tr + tr td { border-top: 1px solid var(--line); }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list li::before { content: "✓"; color: var(--success); font-weight: 800; flex-shrink: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.sample-list { display: grid; gap: 8px; }
.sample-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; flex-wrap: wrap; }
.sample-item .grow { min-width: 160px; }
.file-ico { width: 40px; height: 40px; border-radius: 8px; background: var(--peri-50); display: grid; place-items: center; font-size: .7rem; font-weight: 800; color: var(--navy); text-transform: uppercase; flex-shrink: 0; }
.review { padding: 16px 0; border-top: 1px solid var(--line); }
.review:first-child { border-top: 0; }
.verified { color: var(--success); font-size: .78rem; font-weight: 700; }
.rating-summary { display: grid; grid-template-columns: 160px 1fr; gap: 24px; align-items: center; margin-bottom: 12px; }
.rating-big { font-size: 2.6rem; font-weight: 800; color: var(--ink); line-height: 1; }
.bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: #d49b00; }
.bar-row { display: grid; grid-template-columns: 40px 1fr 30px; gap: 8px; align-items: center; font-size: .8rem; }
.disclaimer { background: var(--warn-bg); border: 1px solid #f5d49a; border-radius: 10px; padding: 12px 14px; font-size: .86rem; color: #5b3a00; }
.video-wrap { aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #000; }
.video-wrap iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Cart / checkout ---------- */
.two-pane { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; padding: 8px 0 40px; }
.summary { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; position: sticky; top: calc(var(--header-h) + var(--sticky-gap)); }
.checkout .summary { top: 24px; }
.summary h2 { font-size: 1.1rem; margin-bottom: 14px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: .95rem; font-variant-numeric: tabular-nums; }
.summary-note { font-size: .78rem; color: var(--muted); margin: 10px 0 0; line-height: 1.45; }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.sum-row.discount { color: var(--success); }
.line-item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 16px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; align-items: start; }
.line-item .li-img { aspect-ratio: 4/3; border-radius: 8px; overflow: hidden; background: var(--peri-50); }
.line-item .li-img img { width: 100%; height: 100%; object-fit: cover; }
.line-item h3 { font-size: 1rem; margin-bottom: 4px; }
.line-item h3 a { color: var(--ink); text-decoration: none; }
.li-actions { display: flex; gap: 16px; margin-top: 10px; flex-wrap: wrap; font-size: .85rem; }
.li-actions .link-btn { padding: 4px 0; }
.li-license { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.li-license select { width: auto; min-width: 200px; min-height: 38px; padding-block: 6px; }
.li-actions form { display: inline; }
.li-price { text-align: right; }
.mini-lines { display: grid; gap: 10px; margin-bottom: 12px; }
.mini-line { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; line-height: 1.4; }
.mini-line span:first-child { color: var(--ink); font-weight: 500; min-width: 0; }
.mini-line span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Coupon: one joined control (input + action share border, height and radius) */
.coupon { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line-2); }
.coupon-label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.coupon-form { display: flex; align-items: stretch; height: var(--control-h); border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); background: #fff; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.coupon-form:hover { border-color: #bfc2d6; }
.coupon-form:focus-within { border-color: var(--navy); box-shadow: var(--focus); }
.coupon-form.is-invalid { border-color: var(--danger); }
.coupon-form.is-invalid:focus-within { box-shadow: 0 0 0 3px rgba(180,35,24,.18); }
.coupon-form input, .coupon-form input:focus { flex: 1; min-width: 0; height: 100%; min-height: 0; border: 0; border-radius: 0; box-shadow: none; padding: 0 12px; background: transparent; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; font-size: .9rem; }
.coupon-form input::placeholder { text-transform: none; letter-spacing: 0; font-weight: 400; }
.coupon-form button { flex-shrink: 0; border: 0; border-left: 1.5px solid var(--line-2); background: var(--peri-50); color: var(--navy); font: inherit; font-weight: 700; font-size: .88rem; padding: 0 18px; cursor: pointer; transition: background .15s; }
.coupon-form button:hover { background: var(--peri-100); }
.coupon-form button:focus-visible { outline: 2px solid var(--navy); outline-offset: -3px; }
.coupon-msg { display: flex; gap: 6px; align-items: flex-start; font-size: .82rem; margin: 8px 0 0; line-height: 1.4; }
.coupon-msg.error { color: var(--danger); }
.coupon-applied { display: flex; align-items: center; gap: 10px; min-height: var(--control-h); padding: 6px 6px 6px 12px; border: 1.5px solid #bfe3cf; background: var(--success-bg); border-radius: var(--radius-sm); color: #0f5132; font-size: .88rem; }
.coupon-applied .tick { width: 22px; height: 22px; border-radius: 50%; background: var(--success); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.coupon-applied .tick svg { width: 14px; height: 14px; }
.coupon-applied code { font-family: inherit; font-weight: 800; letter-spacing: .06em; }
.coupon-applied form { margin-left: auto; }
.coupon-applied .link-btn { color: #0f5132; font-size: .82rem; padding: 6px 8px; border-radius: 6px; }
.coupon-applied .link-btn:hover { background: rgba(23,117,74,.1); }
.checkout-header { background: #fff; border-bottom: 1px solid var(--line); }
.checkout-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; font-size: .8rem; font-weight: 600; color: var(--muted); }
.steps li { display: flex; align-items: center; gap: 6px; }
.steps li + li::before { content: ""; width: 18px; height: 1px; background: var(--line-2); }
.steps .done, .steps .current { color: var(--navy); }
.steps .num { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid currentColor; font-size: .72rem; }
.steps .current .num { background: var(--navy); color: #fff; border-color: var(--navy); }
.steps .done .num { background: var(--peri-50); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 18px; }
.panel h2 { font-size: 1.1rem; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.panel h2 .n { width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .8rem; display: grid; place-items: center; flex-shrink: 0; }
.panel > :last-child { margin-bottom: 0; }
.pay-methods { display: grid; gap: 10px; }
.pay-method { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1.5px solid var(--line-2); border-radius: 12px; cursor: pointer; min-height: 64px; font-weight: 400; transition: border-color .15s, background .15s; }
.pay-method:hover { border-color: #bfc2d6; }
.pay-method:has(input:checked) { border-color: var(--navy); background: var(--peri-50); }
.pay-method:has(input:focus-visible) { box-shadow: var(--focus); }
.pay-method strong { font-weight: 700; color: var(--ink); }
.pay-method .xs { font-weight: 400; line-height: 1.4; display: inline-block; margin-top: 2px; }
.pay-method .pm-logo { margin-left: auto; font-weight: 800; font-size: .9rem; color: var(--navy); }
.pay-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.pay-tab { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 12px; text-align: center; line-height: 1.2; transition: border-color .15s, background .15s; border: 1.5px solid var(--line-2); border-radius: 12px; background: #fff; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; text-decoration: none; }
.pay-tab[aria-selected="true"] { border-color: var(--navy); background: var(--peri-50); color: var(--navy); }
.pay-box { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: var(--bg); }
.pay-state { text-align: center; padding: 20px 10px; }
.pay-state .icon { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; }
.pay-state.ok .icon { background: var(--success-bg); color: var(--success); }
.pay-state.bad .icon { background: var(--danger-bg); color: var(--danger); }
.pay-state.wait .icon { background: var(--warn-bg); color: var(--warn); }
.pay-tab:hover { border-color: #bfc2d6; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--peri); border-top-color: var(--navy); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.secure-note { display: flex; gap: 8px; align-items: center; font-size: .8rem; color: var(--muted); margin-top: 12px; justify-content: center; text-align: center; line-height: 1.4; }
.secure-note svg { flex-shrink: 0; }
.dev-sim { border: 2px dashed #c9a13b; background: #fffaf0; border-radius: 12px; padding: 14px; margin-top: 14px; }
.dev-sim strong { color: #7a5200; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.dev-sim .row { margin-top: 8px; }
.success-hero { text-align: center; padding: 36px 16px 20px; }
.success-hero .icon { width: 72px; height: 72px; border-radius: 50%; background: var(--success-bg); color: var(--success); display: grid; place-items: center; margin: 0 auto 14px; font-size: 2rem; }
.order-no { display: inline-block; font-family: ui-monospace, "SF Mono", Menlo, monospace; background: var(--peri-50); padding: 6px 12px; border-radius: 8px; font-weight: 700; color: var(--navy); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data td a { text-underline-offset: 3px; }
table.data th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 11px 14px; background: #fafbfe; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: #fbfbfe; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .84rem; }
table.data .mono, table.data td:first-child a { white-space: nowrap; }

/* ---------- Account ---------- */
.account { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; padding-block: 24px 48px; align-items: start; }
.account-nav { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px; position: sticky; top: calc(var(--header-h) + var(--sticky-gap)); }
.account-nav form { margin: 0; }
.account-nav a, .account-nav button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--text); font-weight: 500; font-size: .92rem; width: 100%; background: none; border: 0; font-family: inherit; cursor: pointer; text-align: left; }
.account-nav a:hover, .account-nav button:hover { background: var(--peri-50); color: var(--navy); }
.account-nav a.active { background: var(--navy); color: #fff; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
a.stat:hover { border-color: var(--navy); box-shadow: var(--shadow); }
.stat .v { font-size: 1.6rem; font-weight: 800; color: var(--ink); }
.stat .l { font-size: .8rem; color: var(--muted); font-weight: 600; }
.lib-item { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.lib-item .li-img { aspect-ratio: 4/3; border-radius: 8px; overflow: hidden; }
.lib-item .li-img img { width: 100%; height: 100%; object-fit: cover; }
.lib-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .82rem; color: var(--muted); margin-top: 4px; }
.update-flag { background: var(--cream); color: var(--navy-900); font-weight: 700; font-size: .72rem; padding: 3px 8px; border-radius: 6px; }
.file-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.file-row .grow { min-width: 0; overflow-wrap: anywhere; }
.file-row:first-child { border-top: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #c7c9e6; margin-top: 48px; padding: 44px 0 90px; font-size: .9rem; }
.site-footer a { color: #e4e6fb; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.site-footer h4 { color: #fff; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 32px; padding-top: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .8rem; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.why-item { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; gap: 12px; align-items: flex-start; }
.why-item .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--cream); color: var(--navy); display: grid; place-items: center; flex-shrink: 0; font-weight: 800; }
.promo { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; background: var(--cream); border: 1px solid var(--cream-600); border-radius: 16px; padding: 22px 24px; }
.promo h3 { font-size: 1.2rem; margin-bottom: 4px; }
.promo code { background: #fff; padding: 3px 8px; border-radius: 6px; font-weight: 800; color: var(--navy); }

/* ---------- Mobile bottom nav ---------- */
.bottom-nav { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .listing .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .listing { grid-template-columns: 220px minmax(0, 1fr); gap: 20px; }
  .header-main { gap: 12px; }
  .header-actions .icon-btn { padding-inline: 8px; }
  .two-pane { grid-template-columns: minmax(0,1fr) 320px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .header-main { height: 60px; gap: 4px; }
  .header-actions { gap: 0; }
  .header-main .search-form { display: none; }
  .mobile-search { display: block; }
  .mobile-search .search-form { max-width: none; }
  .menu-btn { display: inline-flex; }
  .icon-btn .lbl { display: none; }
  .brand img { height: 30px; }
  .cat-nav { display: none; }
  .cat-nav.open { display: block; }
  .cat-nav.open ul { flex-direction: column; padding: 4px 0 8px; }
  .cat-nav.open a { border-bottom: 0; border-left: 3px solid transparent; padding: 12px 14px; }
  .cat-nav.open a.active { border-left-color: var(--navy); }
  .page-home .mobile-search { display: none; }
  .listing, .pdp, .two-pane, .account { grid-template-columns: minmax(0, 1fr); }
  .filters { position: static; max-height: none; display: none; }
  .filters.open { display: block; }
  .filter-toggle { display: inline-flex; }
  .buy-box, .summary, .account-nav { position: static; }
  .buy-box { box-shadow: none; padding: 20px; }
  .pdp { gap: 20px; }
  .pdp-tabs { position: static; margin-inline: -16px; padding-inline: 8px; }
  .hero-inner { padding: 36px 0 34px; }
  .hero .search-form { margin-top: 22px; }
  .hero .search-form button { padding: 0 18px; }
  .hero-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 2px 16px 4px; scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent); }
  .hero-chips::-webkit-scrollbar { display: none; }
  .hero-chips .chip { scroll-snap-align: start; min-height: 40px; }
  .chip-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 0 16px 4px; }
  .chip-row::-webkit-scrollbar { display: none; }
  .chip-row .chip { min-height: 40px; }
  .listing-bar { align-items: stretch; }
  .listing-bar > form { width: 100%; }
  .listing-bar > form select { flex: 1; }
  .account { gap: 16px; padding-top: 16px; }
  .account-nav { display: flex; overflow-x: auto; gap: 4px; scrollbar-width: none; scroll-snap-type: x proximity; }
  .account-nav::-webkit-scrollbar { display: none; }
  .account-nav a, .account-nav button { white-space: nowrap; width: auto; min-height: 40px; scroll-snap-align: start; }
  .two-col, .rating-summary { grid-template-columns: 1fr; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); z-index: 50; padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; font-size: .68rem; font-weight: 600; color: var(--muted); text-decoration: none; position: relative; }
  .bottom-nav a.active { color: var(--navy); }
  .bottom-nav svg { width: 22px; height: 22px; }
  .bottom-nav .badge-count { top: -6px; right: -10px; }
  .bottom-nav a { min-height: 52px; justify-content: center; }
  .hide-mobile { display: none !important; }
  .btn-sm { min-height: 40px; }
  .li-actions .link-btn, .link-btn.touch { min-height: 40px; display: inline-flex; align-items: center; }
  .fav-btn { width: 40px; height: 40px; }
  .li-license select { min-height: var(--control-h); }
  .coupon-applied .link-btn { min-height: 40px; }
  body.has-bottom-nav { padding-bottom: 64px; }
  .site-footer { padding-bottom: 100px; }
}
@media (max-width: 560px) {
  .product-grid, .product-grid.cols-3, .listing .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-card .body { padding: 10px 12px 12px; gap: 4px; }
  .product-card h3 { font-size: .88rem; }
  .product-card .ptype { font-size: .66rem; }
  .card-badges { top: 8px; left: 8px; right: 52px; }
  .badge { font-size: .64rem; padding: 2px 7px; min-height: 20px; }
  .cat-tiles { grid-template-columns: repeat(2, 1fr); }
  .line-item { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; }
  .line-item .li-price { grid-column: 2; text-align: left; display: flex; gap: 8px; align-items: baseline; }
  .li-license select { min-width: 0; width: 100%; }
  .coupon-form button { padding: 0 14px; }
  .pay-tab { padding: 0 8px; font-size: .88rem; white-space: nowrap; gap: 6px; }
  .panel, .summary { padding: 18px; }
  .empty { padding: 36px 16px; }
  .lib-item { grid-template-columns: 64px minmax(0, 1fr); align-items: start; }
  .lib-item > :last-child { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .promo { grid-template-columns: 1fr; }
  .steps .lbl { display: none; }
  .sample-item .btn { width: 100%; }
  .file-row .btn { width: 100%; }
  .form-card { margin: 16px auto; padding: 20px; border-radius: 12px; }
}

/* ======================================================================
   STORE MANAGER (admin)
   ====================================================================== */
.mgr { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; background: #f4f5fa; }
.mgr-side { background: var(--navy-900); color: #c7c9e6; padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.mgr-side .brand { color: #fff; padding: 4px 8px 16px; }
.mgr-side .brand .wordmark small { color: #a7a9cf; }
.mgr-side h6 { margin: 16px 10px 6px; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: #8d90bb; font-weight: 700; }
.mgr-side a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #dfe1f7; text-decoration: none; font-size: .88rem; }
.mgr-side a:hover { background: rgba(255,255,255,.08); color: #fff; }
.mgr-side a.active { background: rgba(208,221,255,.16); color: #fff; font-weight: 600; }
.mgr-side .sub a { padding-left: 28px; font-size: .84rem; color: #b9bce0; }
.mgr-top { background: #fff; border-bottom: 1px solid var(--line); height: 60px; display: flex; align-items: center; gap: 16px; padding: 0 24px; position: sticky; top: 0; z-index: 20; }
.mgr-top form { flex: 1; max-width: 420px; }
.mgr-top input { min-height: 40px; border-radius: var(--radius-pill); background: var(--bg); }
.mgr-main { padding: 24px; min-width: 0; }
.mgr-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.mgr-head h1 { margin: 0; font-size: 1.45rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; min-width: 0; }
.kpi .l { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.kpi .v { font-size: 1.55rem; font-weight: 800; color: var(--ink); margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: .78rem; color: var(--muted); }
.mgr-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.mgr-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 18px; min-width: 0; }
.mgr-card h2 { font-size: 1rem; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mgr-card .table-wrap { border: 0; border-radius: 0; margin: 0 -18px -18px; }
.chart-bars { display: flex; align-items: flex-end; gap: 3px; height: 180px; padding-top: 8px; border-bottom: 1px solid var(--line); }
.chart-bars .b { flex: 1; background: var(--navy); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; opacity: .9; }
.chart-bars .b:hover { opacity: 1; background: var(--navy-900); }
.chart-axis { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-top: 6px; }
.funnel { display: grid; gap: 10px; }
.funnel-row { display: grid; grid-template-columns: 150px 1fr 90px; gap: 10px; align-items: center; font-size: .86rem; }
.funnel-row .bar { height: 22px; border-radius: 6px; background: var(--peri-50); }
.funnel-row .bar > span { background: var(--navy); border-radius: 6px; }
.filters-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters-bar input, .filters-bar select { width: auto; min-height: 40px; max-width: 100%; }
.filters-bar select { min-width: 0; }
.filters-bar .btn { min-height: 40px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .88rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--navy); border-bottom-color: var(--navy); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
.editor-section { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.editor-section > h2 { font-size: 1rem; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 16px; }
.sticky-actions { position: sticky; bottom: 0; background: rgba(244,245,250,.95); backdrop-filter: blur(6px); padding: 12px 0; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line); z-index: 5; }
.recon-flag { color: var(--danger); font-weight: 700; }
.recon-ok { color: var(--success); font-weight: 700; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; font-size: .9rem; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; color: var(--ink); word-break: break-word; }
.event-list { list-style: none; padding: 0; margin: 0; font-size: .85rem; }
.event-list li { padding: 8px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 150px 220px 1fr; gap: 10px; }
.event-list li:first-child { border-top: 0; }
details.raw summary { cursor: pointer; color: var(--navy); font-size: .8rem; }
details.raw pre { background: #0f0d24; color: #d8dbf8; padding: 10px; border-radius: 8px; overflow: auto; max-height: 280px; font-size: .75rem; }
.mgr-menu-btn { display: none; }
.mgr-main .empty { padding: 36px 16px; }
@media (max-width: 960px) {
  .mgr-top { padding: 0 12px; gap: 8px; }
  .mgr-top .row { gap: 4px; }
  .mgr-side.open { box-shadow: 0 0 0 100vmax rgba(15,12,40,.45); }
  .table-wrap table.data { min-width: 720px; }
  table.data td > a:only-child { display: inline-block; min-width: 140px; }
  .filters-bar > input, .filters-bar > select { flex: 1 1 160px; }
  .btn-sm { min-height: 40px; }
  .sticky-actions { flex-wrap: wrap; }
  .mgr-main .link-btn { min-height: 40px; display: inline-flex; align-items: center; }
  .sticky-actions .btn { flex: 1 1 auto; }
  .mgr { grid-template-columns: 1fr; }
  .mgr-side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  .mgr-side.open { transform: none; }
  .mgr-menu-btn { display: inline-flex; }
  .mgr-grid, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .mgr-main { padding: 16px; }
  .kv { grid-template-columns: 1fr; }
  .event-list li { grid-template-columns: 1fr; }
  .funnel-row { grid-template-columns: 110px 1fr 70px; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .spinner, .btn.is-loading::after { animation-duration: 1.6s !important; animation-iteration-count: infinite !important; }
  .product-card:hover, .cat-tile:hover { transform: none; }
}
html { scroll-behavior: smooth; }

/* ===== Custom Solutions — one-message chat (prefix cs-) ===== */
.cs-page { max-width: 760px; }
.cs-intro { text-align: center; margin-bottom: var(--space-5); }
.cs-intro p { max-width: 560px; margin: 0 auto; }
.cs-chat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.cs-head { display: flex; align-items: center; gap: var(--space-3); padding: 12px 16px; background: var(--navy); color: #fff; }
.cs-avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.cs-who { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.cs-who strong { color: #fff; font-size: 1rem; }
.cs-status { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--peri); }
.cs-dot { width: 8px; height: 8px; border-radius: 50%; background: #3ccf7e; box-shadow: 0 0 0 2px rgba(60,207,126,.25); }
.cs-learn { flex: none; display: inline-flex; align-items: center; gap: 4px; color: var(--cream); font-size: .8rem; font-weight: 500; text-decoration: none; }
.cs-learn:hover { color: #fff; text-decoration: underline; }
.cs-thread { display: flex; flex-direction: column; gap: 8px; padding: var(--space-4); min-height: 240px;
  background-color: var(--peri-50); background-image: radial-gradient(rgba(54,48,98,.07) 1px, transparent 1px); background-size: 18px 18px; }
.cs-day { align-self: center; margin-bottom: 4px; }
.cs-day span { display: inline-block; font-size: .75rem; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 2px 12px; }
.cs-bubble { position: relative; max-width: min(85%, 560px); padding: 8px 12px 6px; border-radius: 14px; box-shadow: 0 1px 1px rgba(27,24,56,.08); overflow-wrap: anywhere; font-size: .95rem; }
.cs-bubble p { margin: 0 0 .45em; }
.cs-bubble p:last-of-type { margin-bottom: 0; }
.cs-in { align-self: flex-start; background: #fff; color: var(--text); border-top-left-radius: 4px; }
.cs-out { align-self: flex-end; background: var(--navy); color: #fff; border-top-right-radius: 4px; }
.cs-out a { color: var(--cream); }
.cs-meta { display: block; margin-top: 2px; text-align: right; font-size: .7rem; opacity: .7; }
.cs-ticks { color: #8fd3ff; letter-spacing: -3px; margin-left: 2px; }
.cs-aside { font-size: .85rem; color: var(--muted); }
.cs-sys { align-self: stretch; max-width: none; background: var(--danger-bg); color: var(--danger); border-radius: var(--radius-sm); box-shadow: none; font-size: .875rem; }
.cs-composer { display: flex; flex-direction: column; gap: 10px; padding: 12px 12px 10px; border-top: 1px solid var(--line); background: var(--card); }
.cs-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.cs-chips legend:not(.sr-only) { float: left; width: 100%; margin-bottom: 6px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.cs-chip { position: relative; }
.cs-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cs-chip span { display: inline-flex; align-items: center; min-height: var(--control-h-sm); padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--radius-pill); background: #fff; color: var(--text); font-size: .875rem; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.cs-chip span:hover { border-color: var(--navy); }
.cs-chip input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.cs-chip input:focus-visible + span { box-shadow: var(--focus); }
.cs-chip-sm span { min-height: 32px; padding: 0 12px; font-size: .8rem; }
.cs-details { border: 1px dashed var(--line-2); border-radius: var(--radius-sm); padding: 8px 12px; }
.cs-details summary { cursor: pointer; font-size: .875rem; font-weight: 600; color: var(--navy); }
.cs-details .cs-chips { margin-top: 10px; }
@supports selector(:has(*)) {
  .cs-composer:not(:has(input[name="kind"][value="project"]:checked)) .cs-details { display: none; }
}
.cs-as { margin: 0; font-size: .85rem; color: var(--muted); }
.cs-ident { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cs-ident input, .cs-input textarea { width: 100%; min-height: var(--control-h); padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 22px; background: var(--bg); color: var(--ink); font: inherit; }
.cs-ident input:focus, .cs-input textarea:focus { outline: none; border-color: var(--navy); box-shadow: var(--focus); background: #fff; }
.cs-input { display: flex; align-items: flex-end; gap: 8px; }
.cs-input textarea { resize: none; line-height: 1.45; max-height: 40vh; field-sizing: content; }
.cs-send { flex: none; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .15s, transform .1s; }
.cs-send:hover { background: var(--navy-700); }
.cs-send:active { transform: scale(.96); }
.cs-send:focus-visible { outline: none; box-shadow: var(--focus); }
.cs-send[disabled] { opacity: .6; cursor: progress; }
.cs-err { margin: 4px 0 0 12px; color: var(--danger); font-size: .8rem; }
.cs-note { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 0; font-size: .75rem; color: var(--muted); }
.cs-hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.cs-done { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.cs-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; margin-top: var(--space-5); padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--peri-50); }
.cs-cta p { margin: 0; }
@media (max-width: 560px) {
  .cs-ident { grid-template-columns: 1fr; }
  .cs-head { flex-wrap: wrap; }
  .cs-learn { width: 100%; padding-left: 56px; }
  .cs-bubble { max-width: 92%; }
}

/* Store Manager: red counter for payments that need attention (audit P2) */
.alert-counter { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 8px; margin-right: 6px; border-radius: 999px; background: #c62828; color: #fff; font-weight: 700; font-size: .85rem; }

/* Draft policy pages (staff preview): blanks still to fill */
mark.to-confirm { background: #fff1c2; color: #5c4400; padding: 0 3px; border-radius: 3px; font-weight: 600; }
.seller-id { font-size: .85rem; line-height: 1.5; margin: 8px 0 12px; }
