/* =========================================================================
   Digital Store — design system (storefront + shared components)
   Themes are driven by [data-theme] on <html>; every color is a token.
   ========================================================================= */

@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800; src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2-variations"), url("../fonts/manrope-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800; src: url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2-variations"), url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius-btn: 12px;
  --radius-card: 18px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --header-h: 68px;
  --nav-h: 68px;
  --container: 1240px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-fast: 140ms;
  --t-med: 240ms;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---- Dark (default) ---------------------------------------------------- */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #090B12;
  --bg-2: #111521;
  --card: #191E2D;
  --elevated: #22283A;
  --accent: #7144FF;
  --accent-2: #956CFF;
  --accent-text: #B197FF;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(113, 68, 255, .18);
  --accent-glow: rgba(113, 68, 255, .42);
  --text: #F8FAFC;
  --muted: #A1A8BA;
  --border: #2D3445;
  --border-soft: #232A3B;
  --success: #22C55E;
  --success-soft: rgba(34, 197, 94, .14);
  --danger: #EF4444;
  --danger-soft: rgba(239, 68, 68, .14);
  --warning: #F59E0B;
  --warning-soft: rgba(245, 158, 11, .14);
  --info: #38BDF8;
  --info-soft: rgba(56, 189, 248, .14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .75);
  --overlay: rgba(5, 6, 12, .72);
  --skeleton: #1C2132;
  --skeleton-hi: #272D42;
  --input-bg: #111521;
}

/* ---- Light ------------------------------------------------------------- */
[data-theme="light"] {
  color-scheme: light;
  --bg: #F7F8FC;
  --bg-2: #FFFFFF;
  --card: #FFFFFF;
  --elevated: #F0F2F8;
  --accent: #6738F5;
  --accent-2: #7444F7;
  --accent-text: #6738F5;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(103, 56, 245, .09);
  --accent-glow: rgba(103, 56, 245, .24);
  --text: #151827;
  --muted: #636B7E;
  --border: #E6E8F0;
  --border-soft: #EDEFF5;
  --success: #16A34A;
  --success-soft: rgba(22, 163, 74, .1);
  --danger: #DC2626;
  --danger-soft: rgba(220, 38, 38, .08);
  --warning: #B45309;
  --warning-soft: rgba(217, 119, 6, .1);
  --info: #0369A1;
  --info-soft: rgba(3, 105, 161, .08);
  --shadow-sm: 0 1px 2px rgba(21, 24, 39, .06);
  --shadow: 0 12px 32px -14px rgba(21, 24, 39, .16);
  --shadow-lg: 0 28px 64px -24px rgba(21, 24, 39, .28);
  --overlay: rgba(21, 24, 39, .45);
  --skeleton: #ECEEF4;
  --skeleton-hi: #F6F7FB;
  --input-bg: #FFFFFF;
}

/* ---- Base -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01";
}
/* Long unbroken strings (URLs, tokens, pasted text) wrap inside their container instead of widening the page.
   Numbers, buttons, badges and table cells keep their natural sizing; user-written tables inside .prose still wrap. */
main, .site-header, .site-footer, .modal, .toasts, .admin-main { overflow-wrap: anywhere; }
.num, .price, .btn, .badge, .chip, .page-link, .qty, .tabs button, th, td { overflow-wrap: normal; }
.prose td, .prose th { overflow-wrap: anywhere; }
html.theme-ready body { transition: background-color var(--t-med) var(--ease), color var(--t-med) var(--ease); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-text); }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; letter-spacing: -.02em; font-weight: 800; }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h2 { font-size: clamp(1.25rem, 2.2vw, 1.55rem); }
h3 { font-size: 1.1rem; }
button, input, select, textarea { font: inherit; color: inherit; }
/* iOS Safari zooms the whole page when a field under 16px gets focus; touch devices therefore use 16px fields (pinch-zoom stays available). */
@media (pointer: coarse) { input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px; } }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent); color: #fff; }
.num, .price { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.hidden { display: none !important; }

.icon { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border-radius: var(--radius-btn); border: 1px solid transparent;
  font-weight: 700; font-size: .95rem; cursor: pointer; white-space: nowrap;
  background: var(--elevated); color: var(--text);
  transition: transform var(--t-fast) var(--ease), background var(--t-fast), box-shadow var(--t-fast), opacity var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { color: var(--text); background: var(--border); }
.btn:active { transform: scale(.97); }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  box-shadow: 0 8px 22px -10px var(--accent-glow);
}
.btn-primary:hover { color: var(--accent-ink); background: linear-gradient(135deg, var(--accent-2), var(--accent)); box-shadow: 0 10px 26px -8px var(--accent-glow); }
.btn-outline { background: transparent; border-color: var(--border); }
.btn-outline:hover { background: var(--accent-soft); border-color: var(--accent); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--elevated); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger); color: #fff; opacity: .9; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: var(--success); color: #fff; opacity: .9; }
.btn-whatsapp { background: #25D366; color: #06210f; }
.btn-whatsapp:hover { background: #22c35e; color: #06210f; }
.btn-telegram { background: #229ED9; color: #fff; }
.btn-telegram:hover { background: #1c8cc1; color: #fff; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: .85rem; border-radius: calc(var(--radius-btn) - 2px); }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; padding: 0; }
.btn-icon.btn-sm { width: 36px; }
.btn .spinner { width: 18px; height: 18px; }

.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Forms ------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > label, .label { font-weight: 700; font-size: .875rem; }
.field .hint { font-size: .8rem; color: var(--muted); }
.field .error { font-size: .8rem; color: var(--danger); }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 10px 14px;
  background: var(--input-bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
textarea.input { min-height: 110px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--muted); opacity: .8; }
.input-group { display: flex; align-items: stretch; }
.input-group > .input { border-radius: 0; flex: 1; min-width: 0; }
.input-group > :first-child { border-top-left-radius: var(--radius-sm); border-bottom-left-radius: var(--radius-sm); }
.input-group > :last-child { border-top-right-radius: var(--radius-sm); border-bottom-right-radius: var(--radius-sm); }
.input-group > select.input { flex: 0 0 auto; width: auto; border-right: 0; padding-right: 8px; }
.input-group > .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 46px; }
.input-wrap .toggle-pass { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); width: 40px; height: 40px; cursor: pointer; display: grid; place-items: center; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .9rem; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin-top: 2px; flex-shrink: 0; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.qty button { width: 42px; height: 44px; border: 0; background: var(--elevated); cursor: pointer; display: grid; place-items: center; }
.qty input { width: 56px; height: 44px; text-align: center; border: 0; background: var(--input-bg); -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ---- Cards, badges, alerts -------------------------------------------- */
.card { background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius-card); padding: 20px; box-shadow: var(--shadow-sm); }
.card-title { font-size: 1.05rem; font-weight: 800; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--radius-pill); font-size: .75rem; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-muted { background: var(--elevated); color: var(--muted); }
.badge-accent { background: var(--accent-soft); color: var(--accent-text); }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); font-size: .9rem; margin-bottom: 16px; border: 1px solid transparent; }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-warning { background: var(--warning-soft); color: var(--warning); }
.alert-info { background: var(--info-soft); color: var(--info); }

/* ---- Announcement + header -------------------------------------------- */
.announce { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #fff; text-align: center; font-size: .85rem; font-weight: 600; padding: 8px 16px; }
.announce a { color: #fff; text-decoration: underline; }
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; flex-shrink: 0; }
.logo img { height: auto; width: auto; max-height: 44px; max-width: min(250px, 52vw); object-fit: contain; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; color: #fff; }
.logo-mark .icon { width: 18px; height: 18px; }
.logo .logo-dark { display: none; }
[data-theme="dark"] .logo .logo-light-only { display: none; }
[data-theme="dark"] .logo .logo-dark { display: block; }
[data-theme="light"] .logo .logo-dark-only { display: none; }
.main-nav { display: flex; gap: 4px; }
.main-nav a, .nav-dropdown > button { padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: .92rem; color: var(--muted); background: none; border: 0; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.main-nav a:hover, .main-nav a.active, .nav-dropdown > button:hover { color: var(--text); background: var(--elevated); }
.nav-dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px; z-index: 60;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 6px;
  box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity var(--t-fast), transform var(--t-fast), visibility var(--t-fast);
}
.dropdown-menu.align-right { left: auto; right: 0; }
.is-open > .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: .9rem; background: none; border: 0; cursor: pointer; text-align: left; color: var(--text); }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--elevated); color: var(--text); }
.dropdown-menu hr { border: 0; border-top: 1px solid var(--border-soft); margin: 6px 0; }
.dropdown-head { padding: 10px 12px; }
.dropdown-head strong { display: block; }

.header-search { flex: 1; max-width: 420px; position: relative; }
.header-search .input { padding-left: 42px; min-height: 42px; background: var(--bg-2); border-radius: var(--radius-pill); }
.header-search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.wallet-chip { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 6px 0 14px; border-radius: var(--radius-pill); background: var(--bg-2); border: 1px solid var(--border-soft); font-weight: 700; font-size: .9rem; }
.wallet-chip .btn { min-height: 32px; height: 32px; padding: 0 12px; border-radius: var(--radius-pill); font-size: .8rem; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border-soft); background: var(--bg-2); display: inline-grid; place-items: center; cursor: pointer; position: relative; color: var(--text); }
.icon-btn:hover { border-color: var(--border); color: var(--text); }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: inline; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.avatar, .nav-dropdown > button.avatar { width: 42px; padding: 0; color: #fff; justify-content: center; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; display: grid; place-items: center; font-weight: 800; border: 0; cursor: pointer; }
.mobile-only { display: none; }
.mobile-search { display: none; padding: 0 0 12px; }
.mobile-search.is-open { display: block; }

@media (max-width: 380px) {
  .logo img { max-height: 36px; max-width: 44vw; }
  .header-actions { gap: 6px; }
  .header-actions .icon-btn { width: 38px; height: 38px; }
}
@media (max-width: 960px) {
  .main-nav, .header-search, .desktop-only { display: none !important; }
  .mobile-only { display: inline-grid; }
  .header-inner { gap: 10px; }
  :root { --header-h: 60px; }
  .logo-text { font-size: 1.05rem; }
}

/* ---- Hero slider ------------------------------------------------------- */
.hero { margin: 20px auto 8px; }
/* Image-only slider: slides share one grid cell (height = tallest slide, so switching never shifts the page);
   each image keeps its own aspect ratio (width:100%; height:auto — no crop, no stretch). */
.slider { position: relative; border-radius: calc(var(--radius-card) + 6px); overflow: hidden; background: var(--card); }
.slides { display: grid; }
.slide { grid-area: 1 / 1; align-self: center; opacity: 0; visibility: hidden; transition: opacity 600ms var(--ease), visibility 0s linear 600ms; }
.slide.is-active { opacity: 1; visibility: visible; transition: opacity 600ms var(--ease), visibility 0s; }
.slide a { display: block; }
.slide picture, .slide img { display: block; width: 100%; height: auto; }
.slider-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 2; }
.slider-dots button { width: 8px; height: 8px; border-radius: 4px; border: 0; background: rgba(255, 255, 255, .45); cursor: pointer; padding: 0; transition: width var(--t-med) var(--ease), background var(--t-med); }
.slider-dots button.active { width: 26px; background: #fff; }
.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .35); color: #fff; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(6px); }
.slider-arrow.prev { left: 14px; }
.slider-arrow.next { right: 14px; }
.hero-fallback { border-radius: calc(var(--radius-card) + 6px); padding: clamp(28px, 6vw, 64px); background: radial-gradient(120% 140% at 100% 0%, var(--accent-glow), transparent 55%), var(--card); border: 1px solid var(--border-soft); }
.hero-fallback h1 { font-size: clamp(1.7rem, 4.2vw, 3rem); max-width: 16ch; letter-spacing: -.035em; }
.hero-fallback p { color: var(--muted); max-width: 52ch; font-size: 1.05rem; }
@media (max-width: 960px) {
  .slider { border-radius: var(--radius-card); }
  .slider-arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) { .slide, .slide.is-active { transition: none; } }

/* ---- Sections ---------------------------------------------------------- */
.section { margin: 36px auto; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.section-head .see-all { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: .9rem; color: var(--accent-text); white-space: nowrap; }
.rail-controls { display: flex; gap: 6px; }
.rail-controls button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); cursor: pointer; display: grid; place-items: center; color: var(--text); }
.rail-controls button:disabled { opacity: .35; cursor: default; }

/* Horizontal rail (carousel) — native scroll-snap, swipeable on touch */
.rail {
  display: grid; grid-auto-flow: column; gap: 16px;
  grid-auto-columns: calc((100% - (var(--cols, 5) - 1) * 16px) / var(--cols, 5));
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 4px 2px 12px; margin: -4px -2px 0; scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); }
@media (max-width: 1100px) { .rail, .grid { --cols: 4 !important; } }
@media (max-width: 860px) { .rail, .grid { --cols: 3 !important; } }
@media (max-width: 640px) {
  .grid { --cols: 2 !important; gap: 12px; }
  .rail { grid-auto-columns: 46%; gap: 12px; --cols: 2 !important; }
  .rail-controls { display: none; }
}

/* ---- Categories (round) ------------------------------------------------ */
.cat-rail { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 2px 10px; scrollbar-width: none; }
.cat-rail::-webkit-scrollbar { display: none; }
.cat-item { flex: 0 0 auto; width: 96px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; scroll-snap-align: start; }
.cat-circle {
  width: 88px; height: 88px; border-radius: 50%; overflow: hidden; position: relative;
  background: var(--card); border: 1px solid var(--border-soft);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med), border-color var(--t-med);
}
.cat-circle img { width: 100%; height: 100%; object-fit: cover; }
.cat-circle .icon { position: absolute; inset: 0; margin: auto; width: 32px; height: 32px; color: var(--accent-text); }
.cat-item:hover .cat-circle { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 10px 24px -12px var(--accent-glow); }
.cat-item span { font-weight: 700; font-size: .85rem; line-height: 1.25; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 640px) { .cat-item { width: 76px; } .cat-circle { width: 68px; height: 68px; } .cat-rail { gap: 14px; } }

/* ---- Product card: the "license ticket" -------------------------------- */
.pcard {
  --notch: 9px;
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--card); border-radius: var(--radius-card);
  border: 1px solid var(--border-soft);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med), border-color var(--t-med);
}
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border); }
.pcard-media { position: relative; display: block; padding: 10px 10px 0; }
.pcard-media .img { aspect-ratio: 1 / 1; border-radius: calc(var(--radius-card) - 6px); overflow: hidden; background: var(--skeleton); }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease), opacity 300ms; }
.pcard:hover .pcard-media img { transform: scale(1.04); }
.pcard .discount { position: absolute; top: 18px; left: 18px; background: var(--danger); color: #fff; font-weight: 800; font-size: .75rem; padding: 3px 8px; border-radius: 8px; }
.pcard .delivery-tag { position: absolute; top: 18px; right: 18px; width: 28px; height: 28px; border-radius: 8px; background: rgba(0, 0, 0, .5); color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px); }
.pcard .delivery-tag .icon { width: 15px; height: 15px; }
.pcard-body { padding: 12px 14px 4px; flex: 1; }
.pcard-title { font-weight: 700; font-size: .93rem; line-height: 1.35; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.pcard-title a { color: var(--text); }
/* perforated stub divider with side notches */
.pcard-perf { position: relative; height: calc(var(--notch) * 2); margin: 6px 0 0; }
.pcard-perf::before { content: ""; position: absolute; left: calc(var(--notch) + 6px); right: calc(var(--notch) + 6px); top: 50%; border-top: 1.5px dashed var(--border); }
.pcard-perf::after, .pcard-perf > i {
  content: ""; position: absolute; top: 0; width: calc(var(--notch) * 2); height: calc(var(--notch) * 2);
  border-radius: 50%; background: var(--bg); border: 1px solid var(--border-soft);
}
.pcard-perf::after { right: calc(var(--notch) * -1 - 1px); clip-path: inset(0 50% 0 0); }
.pcard-perf > i { left: calc(var(--notch) * -1 - 1px); clip-path: inset(0 0 0 50%); }
.section-alt .pcard-perf::after, .section-alt .pcard-perf > i { background: var(--bg-2); }
.pcard-stub { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 14px 14px; }
.price-now { font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: .8rem; display: block; line-height: 1.1; }
.stock { font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; }
.stock::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.stock-in { color: var(--success); }
.stock-low { color: var(--warning); }
.stock-out { color: var(--danger); }
.pcard .buy { min-height: 38px; height: 38px; padding: 0 14px; font-size: .82rem; border-radius: 10px; }
.pcard.is-out .pcard-media img { opacity: .55; }
@media (max-width: 640px) {
  .pcard-body { padding: 10px 10px 2px; }
  .pcard-stub { padding: 4px 10px 10px; flex-direction: column; align-items: stretch; }
  .pcard .buy { width: 100%; }
  .price-now { font-size: .98rem; }
  .pcard-media { padding: 8px 8px 0; }
  .pcard .discount { top: 14px; left: 14px; }
  .pcard .delivery-tag { top: 14px; right: 14px; }
}

/* ---- Skeleton / lazy images ------------------------------------------- */
.skeleton, img.lazy { background: linear-gradient(90deg, var(--skeleton) 25%, var(--skeleton-hi) 37%, var(--skeleton) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
img.lazy { opacity: .01; }
img.is-loaded { opacity: 1; animation: none; background: none; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---- Empty state ------------------------------------------------------- */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .empty-icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; }
.empty .empty-icon .icon { width: 28px; height: 28px; }
.empty h3 { color: var(--text); }

/* ---- Listing page ------------------------------------------------------ */
.page-head { padding: 28px 0 8px; }
.page-head p { color: var(--muted); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .82rem; color: var(--muted); margin-bottom: 10px; }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs .icon { width: 14px; height: 14px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar .input { width: auto; min-height: 42px; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; padding: 8px 14px; border-radius: var(--radius-pill); border: 1px solid var(--border); font-weight: 600; font-size: .85rem; color: var(--muted); background: var(--card); }
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination { display: flex; gap: 6px; justify-content: center; margin: 28px 0 8px; flex-wrap: wrap; }
.page-link { min-width: 40px; height: 40px; padding: 0 10px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--border); font-weight: 700; font-size: .9rem; background: var(--card); }
.page-link.is-current { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---- Product page ------------------------------------------------------ */
.product-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; margin: 20px 0 40px; align-items: start; }
.gallery-main { position: relative; border-radius: calc(var(--radius-card) + 4px); overflow: hidden; background: var(--card); border: 1px solid var(--border-soft); aspect-ratio: 1 / 1; cursor: zoom-in; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.gallery-thumbs button { flex: 0 0 72px; height: 72px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: var(--card); }
.gallery-thumbs button.active { border-color: var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-info { position: sticky; top: calc(var(--header-h) + 20px); }
.product-info h1 { margin-bottom: 10px; }
.product-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; color: var(--muted); font-size: .88rem; margin-bottom: 16px; }
.stars { display: inline-flex; gap: 1px; color: #F5B301; }
.stars .icon { width: 16px; height: 16px; }
.stars .off { color: var(--border); }
.stars .on { fill: currentColor; }
.price-block { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 16px 0; padding: 16px 18px; border-radius: var(--radius-card); background: var(--bg-2); border: 1px solid var(--border-soft); }
.price-block .now { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
.price-block .was { color: var(--muted); text-decoration: line-through; }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.feature-list li { display: flex; gap: 10px; align-items: flex-start; }
.feature-list .icon { color: var(--success); margin-top: 2px; width: 18px; height: 18px; }
.buy-row { display: flex; gap: 12px; align-items: center; margin: 18px 0; flex-wrap: wrap; }
.buy-row .btn-primary { flex: 1; min-width: 180px; }
.assurances { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.assurances div { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--border-soft); font-size: .8rem; color: var(--muted); }
.assurances .icon { color: var(--accent-text); }
.prose { line-height: 1.75; }
.prose h2, .prose h3 { margin-top: 1.4em; }
.prose a { color: var(--accent-text); text-decoration: underline; }
.prose pre, .prose code { white-space: pre-wrap; overflow-wrap: anywhere; }
.prose img { height: auto; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose table { border-collapse: collapse; width: 100%; }
.prose td, .prose th { border: 1px solid var(--border); padding: 8px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs button { padding: 12px 16px; border: 0; background: none; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.active { color: var(--text); border-color: var(--accent); }
.review { padding: 16px 0; border-bottom: 1px solid var(--border-soft); }
.review:last-child { border-bottom: 0; }
.review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.rating-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rating-input input { position: absolute; opacity: 0; pointer-events: none; }
.rating-input label { cursor: pointer; color: var(--border); }
.rating-input label .icon { width: 28px; height: 28px; }
.rating-input input:checked ~ label, .rating-input label:hover, .rating-input label:hover ~ label { color: #F5B301; }
.rating-input input:checked ~ label .icon, .rating-input label:hover .icon, .rating-input label:hover ~ label .icon { fill: currentColor; }
.mobile-buybar { display: none; }
@media (max-width: 900px) {
  .product-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .product-info { position: static; }
  .gallery-main { border-radius: var(--radius-card); }
  .mobile-buybar {
    display: flex; gap: 12px; align-items: center;
    /* Same box as the bottom dock (10px inset, 640px max, centred), floating 6px above it. */
    position: fixed; left: 10px; right: 10px; margin-inline: auto; max-width: 640px; bottom: calc(var(--nav-h) + 16px + var(--safe-bottom)); z-index: 40;
    padding: 10px 10px 10px 16px;
    background: var(--card); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg);
  }
  .mobile-buybar .price-now { font-size: 1.1rem; }
  .mobile-buybar .btn { flex: 1; }
  .has-buybar main { padding-bottom: 90px; }
  /* The footer is the last thing on the page: leave room for the dock (nav-h + 10px) plus the buy bar (about 66px + 6px gap). */
  body.has-buybar .site-footer { padding-bottom: calc(var(--nav-h) + 96px + var(--safe-bottom)); }
}
@media (max-width: 480px) { .assurances { grid-template-columns: minmax(0, 1fr); } .assurances div { flex-direction: row; align-items: center; } }

/* ---- Modal ------------------------------------------------------------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200; background: var(--overlay);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  opacity: 0; transition: opacity var(--t-med) var(--ease);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.modal-backdrop.is-open { opacity: 1; }
.modal {
  width: 100%; max-width: 460px; max-height: calc(100dvh - 32px); overflow-y: auto;
  background: var(--card); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(.98); transition: transform var(--t-med) var(--ease);
  position: relative;
}
.modal-backdrop.is-open .modal { transform: none; }
.modal-lg { max-width: 820px; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 20px 22px 0; }
.modal-head h3 { margin: 0; font-size: 1.15rem; flex: 1; }
.modal-body { padding: 18px 22px 22px; }
.modal-close { width: 38px; height: 38px; border-radius: 12px; border: 0; background: var(--elevated); display: grid; place-items: center; cursor: pointer; color: var(--text); flex-shrink: 0; }
.modal-foot { display: flex; gap: 10px; padding: 0 22px 22px; }
.modal-foot .btn { flex: 1; }
@media (max-width: 640px) {
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { max-width: none; border-radius: 24px 24px 0 0; max-height: 92dvh; padding-bottom: var(--safe-bottom); transform: translateY(40px); }
}
.summary { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--border-soft); margin-bottom: 16px; }
.summary div { display: flex; justify-content: space-between; gap: 12px; font-size: .92rem; }
.summary div span:first-child { color: var(--muted); }
.summary div strong { font-variant-numeric: tabular-nums; }
.summary .total { border-top: 1px dashed var(--border); padding-top: 10px; font-size: 1.02rem; }
.summary .short { color: var(--danger); }
.modal-hero { text-align: center; padding: 8px 0 4px; }
.modal-hero .hero-icon { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; }
.hero-icon.warn { background: var(--warning-soft); color: var(--warning); }
.hero-icon.ok { background: var(--success-soft); color: var(--success); }
.hero-icon.accent { background: var(--accent-soft); color: var(--accent-text); }
.hero-icon .icon { width: 32px; height: 32px; }
.modal-hero h3 { font-size: 1.3rem; margin-bottom: 6px; }
.modal-hero p { color: var(--muted); }

/* delivered keys */
.keybox { display: flex; gap: 8px; align-items: flex-start; padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--bg-2); border: 1px dashed var(--accent); margin-bottom: 10px; }
.keybox pre { margin: 0; flex: 1; min-width: 0; white-space: pre-wrap; word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; }
.cred-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.cred-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border-soft); }
.cred-row span { color: var(--muted); font-size: .82rem; }
.cred-row code { font-family: ui-monospace, Menlo, Consolas, monospace; word-break: break-all; font-size: .9rem; }
@media (max-width: 480px) { .cred-row { grid-template-columns: minmax(0, 1fr) auto; } .cred-row span { grid-column: 1 / -1; } }
.copy-btn { border: 0; background: var(--elevated); color: var(--text); width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.copy-btn.copied { background: var(--success-soft); color: var(--success); }

/* success checkmark animation */
.check-anim { width: 84px; height: 84px; margin: 0 auto 14px; }
.check-anim circle { stroke: var(--success); stroke-width: 3; fill: var(--success-soft); stroke-dasharray: 240; stroke-dashoffset: 240; animation: draw 600ms var(--ease) forwards; }
.check-anim path { stroke: var(--success); stroke-width: 4.5; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw 360ms 480ms var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---- Account picker (individual accounts) ----------------------------- */
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.acc-card { background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.acc-card .img { aspect-ratio: 16 / 10; background: var(--skeleton); }
.acc-card .img img { width: 100%; height: 100%; object-fit: cover; }
.acc-card .body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.acc-card .body strong { font-size: .95rem; }
.acc-card .actions { display: flex; gap: 8px; padding: 0 14px 14px; }
.acc-card .actions .btn { flex: 1; }

/* ---- Verification countdown ------------------------------------------- */
.verify { text-align: center; padding: 6px 0; }
.ring { position: relative; width: 168px; height: 168px; margin: 4px auto 18px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--elevated); }
.ring .bar { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-center .time { font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ring-center .icon { color: var(--accent-text); width: 22px; height: 22px; animation: pulse 1.6s ease-in-out infinite; margin-bottom: 4px; }
@keyframes pulse { 0%, 100% { opacity: .45; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.06); } }
.verify-status { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: .85rem; margin-top: 4px; }
.verify-status .spinner { width: 14px; height: 14px; border-width: 2px; }

/* ---- Toasts ------------------------------------------------------------ */
.toasts { position: fixed; z-index: 300; top: 16px; right: 16px; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-size: .9rem; font-weight: 600; animation: toastIn 300ms var(--ease); }
.toast.leaving { animation: toastOut 220ms var(--ease) forwards; }
.toast .icon { margin-top: 1px; }
.toast-success .icon { color: var(--success); }
.toast-error .icon { color: var(--danger); }
.toast-info .icon { color: var(--accent-text); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }
@media (max-width: 640px) { .toasts { top: auto; bottom: calc(var(--nav-h) + 24px + var(--safe-bottom)); left: 16px; right: 16px; width: auto; } }

/* ---- Footer ------------------------------------------------------------ */
.site-footer { margin-top: 64px; background: var(--bg-2); border-top: 1px solid var(--border-soft); padding: 48px 0 24px; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-grid h4 { font-size: .95rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.footer-grid a { color: var(--muted); }
.footer-grid a:hover { color: var(--text); }
.footer-about p { color: var(--muted); max-width: 38ch; margin-top: 14px; }
.footer-social { display: flex; gap: 8px; margin-top: 14px; }
.dev-credit { flex-basis: 100%; text-align: center; font-size: .75rem; opacity: .75; }
.dev-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.dev-credit a:hover { opacity: 1; color: var(--accent); }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border-soft); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: .82rem; }
.contact-line { display: flex; gap: 8px; align-items: center; color: var(--muted); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 960px) { .site-footer { padding-bottom: calc(var(--nav-h) + 40px + var(--safe-bottom)); } }

/* ---- Mobile bottom navigation dock: exactly 5 items for guests and for customers (five equal columns) ---- */
.mobile-nav { display: none; }
@media (max-width: 960px) {
  body.has-mobile-nav main { padding-bottom: calc(var(--nav-h) + 28px + var(--safe-bottom)); }
  .mobile-nav {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: stretch; gap: 1px;
    position: fixed; z-index: 90; left: 10px; right: 10px; margin-inline: auto; max-width: 640px; bottom: calc(10px + var(--safe-bottom));
    height: var(--nav-h); padding: 6px 4px;
    background: color-mix(in srgb, var(--card) 94%, transparent);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg);
  }
  .mobile-nav a {
    min-width: 0; padding-inline: 2px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border-radius: 14px; color: var(--muted); font-size: .62rem; font-weight: 700; line-height: 1.1; white-space: nowrap;
    -webkit-tap-highlight-color: transparent; transition: color var(--t-fast), background var(--t-fast);
  }
  .mobile-nav .dock-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .mobile-nav .dock-ico { display: grid; place-items: center; }
  .mobile-nav a .icon { width: 21px; height: 21px; transition: transform var(--t-fast) var(--ease); }
  .mobile-nav a:active .icon { transform: scale(.86); }
  .mobile-nav a.active { color: var(--accent-text); background: color-mix(in srgb, var(--accent) 12%, transparent); }
  /* Add Fund is the centre item: a solid accent chip, kept inside the dock so scrolling never clips it. */
  .mobile-nav .dock-fund .dock-ico { width: 34px; height: 34px; border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 6px 14px -4px var(--accent-glow); }
  .mobile-nav .dock-fund { color: var(--text); }
  .mobile-nav .dock-fund.active { background: transparent; color: var(--accent-text); }
  /* The longer "Login / Signup" label may wrap to two lines instead of shrinking. */
  .mobile-nav .dock-auth .dock-label { white-space: normal; text-align: center; line-height: 1.05; }
  .mobile-nav.is-guest .dock-auth { color: var(--accent-text); }
}
/* Narrow phones (320–360px): the logo shrinks (ellipsis / smaller image) and the header controls compact, so Log in + Sign up always fit and the page never grows sideways. */
@media (max-width: 360px) {
  .header-inner { gap: 6px; }
  .logo { flex-shrink: 1; min-width: 0; gap: 6px; }
  .logo-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; }
  .logo img { max-width: 100%; }
  .logo-mark { flex-shrink: 0; width: 30px; height: 30px; }
  .header-actions { gap: 4px; flex-shrink: 0; }
  .header-actions .icon-btn { width: 34px; height: 34px; border-radius: 10px; }
  .site-header .header-login, .site-header .header-signup { padding-inline: 8px; font-size: .78rem; min-height: 34px; height: 34px; }
}
@media (min-width: 420px) and (max-width: 960px) { .mobile-nav a { font-size: .68rem; } }

/* ---- Floating help widget --------------------------------------------- */
.help-widget { position: fixed; z-index: 80; right: 18px; bottom: 22px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
.help-widget .help-toggle, .help-widget.is-open .help-panel { pointer-events: auto; }
@media (max-width: 960px) { body.has-mobile-nav .help-widget { bottom: calc(var(--nav-h) + 24px + var(--safe-bottom)); right: 14px; } }
/* Product pages: sit above the floating buy bar (which sits above the dock). */
@media (max-width: 900px) {
  body.has-buybar .help-widget { bottom: calc(96px + var(--safe-bottom)); }
  body.has-buybar.has-mobile-nav .help-widget { bottom: calc(var(--nav-h) + 100px + var(--safe-bottom)); }
}
.help-toggle { display: flex; align-items: center; gap: 8px; border: 0; cursor: pointer; padding: 0; background: none; }
.help-toggle .bubble { width: 54px; height: 54px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px -6px var(--accent-glow); transition: transform var(--t-med) var(--ease); }
.help-toggle .bubble .icon { width: 24px; height: 24px; }
.help-toggle .label { background: var(--card); border: 1px solid var(--border); color: var(--text); font-weight: 700; font-size: .8rem; padding: 6px 12px; border-radius: var(--radius-pill); box-shadow: var(--shadow); }
.help-widget.is-open .help-toggle .bubble { transform: rotate(90deg); }
.help-widget.is-open .help-toggle .label { display: none; }
.help-panel { width: 260px; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 14px; box-shadow: var(--shadow-lg); transform-origin: bottom right; transform: scale(.9); opacity: 0; visibility: hidden; transition: all var(--t-med) var(--ease); }
.help-widget.is-open .help-panel { transform: none; opacity: 1; visibility: visible; }
.help-panel h4 { margin: 0 0 4px; }
.help-panel p { color: var(--muted); font-size: .82rem; margin-bottom: 12px; }
.help-panel .btn { width: 100%; margin-top: 8px; justify-content: flex-start; }
@media (max-width: 640px) { .help-toggle .label { display: none; } .help-toggle .bubble { width: 50px; height: 50px; } }

/* ---- Auth -------------------------------------------------------------- */
.auth-wrap { min-height: calc(100dvh - var(--header-h) - 80px); display: grid; place-items: center; padding: 32px 0; }
.auth-card { width: 100%; max-width: 440px; padding: 30px; border-radius: 24px; background: var(--card); border: 1px solid var(--border-soft); box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.6rem; margin-bottom: 4px; }
.auth-card .sub { color: var(--muted); margin-bottom: 22px; }
.auth-foot { text-align: center; margin-top: 18px; color: var(--muted); font-size: .9rem; }
.auth-foot a { color: var(--accent-text); font-weight: 700; }
@media (max-width: 480px) { .auth-card { padding: 22px 18px; border-radius: 20px; } }

/* ---- Account area ------------------------------------------------------ */
.account-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; margin: 24px 0; align-items: start; }
.account-nav { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 2px; padding: 10px; }
.account-nav a { display: flex; gap: 10px; align-items: center; padding: 11px 12px; border-radius: 12px; font-weight: 600; font-size: .92rem; color: var(--muted); }
.account-nav a:hover { color: var(--text); background: var(--elevated); }
.account-nav a.active { color: var(--accent-text); background: var(--accent-soft); }
.account-nav .count { margin-left: auto; background: var(--danger); color: #fff; font-size: .7rem; padding: 1px 7px; border-radius: 10px; }
.account-tabs { display: none; }
.account-logout { display: none; }
.account-tabs form { display: contents; }
.account-tabs button.chip { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-family: inherit; }
.account-tabs button.chip .icon { width: 15px; height: 15px; }
@media (max-width: 900px) {
  .account-logout { display: block; margin-bottom: 24px; }
  .account-layout { grid-template-columns: minmax(0, 1fr); margin-top: 12px; }
  .account-nav { display: none; }
  .account-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 12px 0 4px; }
  .account-tabs::-webkit-scrollbar { display: none; }
}
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { padding: 18px; border-radius: var(--radius-card); background: var(--card); border: 1px solid var(--border-soft); }
.stat .stat-label { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .82rem; font-weight: 600; }
.stat .stat-label .icon { width: 16px; height: 16px; }
.stat .stat-value { font-size: 1.5rem; font-weight: 800; margin-top: 6px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat.feature { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: 0; color: #fff; }
.stat.feature .stat-label { color: rgba(255, 255, 255, .8); }
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 380px) { .stat .stat-value { font-size: 1.2rem; } .stat { padding: 14px; } }

/* list rows (orders / transactions) */
.list { display: grid; grid-template-columns: minmax(0, 1fr); }
.list-row { display: flex; gap: 14px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--border-soft); }
.list-row:last-child { border-bottom: 0; }
.list-row .thumb { width: 48px; height: 48px; border-radius: 12px; overflow: hidden; background: var(--elevated); flex-shrink: 0; display: grid; place-items: center; color: var(--muted); }
.list-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-row .main { flex: 1; min-width: 0; }
.list-row .main strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .main small { color: var(--muted); }
.list-row .end { text-align: right; flex-shrink: 0; }
.amount-in { color: var(--success); font-weight: 800; }
.amount-out { color: var(--text); font-weight: 800; }

/* order timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 28px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline li::after { content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 2px; background: var(--border-soft); }
.timeline li:last-child::after { display: none; }
.timeline small { color: var(--muted); display: block; }

/* tables (shared with admin) */
.table-wrap { overflow-x: auto; border-radius: var(--radius-card); border: 1px solid var(--border-soft); background: var(--card); }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .76rem; font-weight: 700; color: var(--muted); padding: 12px 14px; background: var(--bg-2); border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: color-mix(in srgb, var(--elevated) 40%, transparent); }

/* ---- Add fund ---------------------------------------------------------- */
.fund-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .fund-layout { grid-template-columns: minmax(0, 1fr); } }
.balance-hero { padding: 22px; border-radius: 22px; color: #fff; background: radial-gradient(120% 120% at 100% 0%, rgba(255, 255, 255, .18), transparent 50%), linear-gradient(135deg, var(--accent), var(--accent-2)); margin-bottom: 18px; }
.balance-hero { position: relative; overflow: hidden; isolation: isolate; box-shadow: 0 24px 48px -26px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, .22); }
.balance-hero::before { content: ""; position: absolute; z-index: -1; width: 220px; height: 220px; right: -60px; top: -100px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.balance-hero small { opacity: .8; font-weight: 600; }
.balance-hero .big { font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.amount-input { font-size: 1.6rem; font-weight: 800; min-height: 60px; letter-spacing: -.01em; }
.quick-amounts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.quick-amounts button { padding: 8px 14px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--bg-2); font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; }
.quick-amounts button:hover, .quick-amounts button.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.method-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.method-card { aspect-ratio: 1 / 1; border-radius: 18px; border: 2px solid var(--border-soft); background: var(--bg-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 12px; cursor: pointer; transition: border-color var(--t-fast), transform var(--t-fast); }
.method-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.method-card img { width: 56px; height: 56px; object-fit: contain; border-radius: 12px; }
.method-card .ph { width: 56px; height: 56px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; }
.method-card strong { font-size: .88rem; text-align: center; }
.method-card small { color: var(--muted); font-size: .72rem; }
.pay-detail { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--border-soft); margin-bottom: 10px; }
.pay-detail div { flex: 1; min-width: 0; }
.pay-detail small { color: var(--muted); display: block; font-size: .78rem; }
.pay-detail strong { word-break: break-all; }
.ref-input { font-size: 1.1rem; font-weight: 700; letter-spacing: .04em; min-height: 56px; text-transform: uppercase; }

/* ---- Utility responsiveness ------------------------------------------- */
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .section { margin: 26px auto; }
  .card { padding: 16px; }
}
/* ==== Premium layer (v2): ambient light, wallet card, live badges, polish ============ */
body:not(.admin-body) {
  background-image:
    radial-gradient(900px 380px at 50% -140px, var(--accent-soft), transparent 70%),
    radial-gradient(520px 320px at 100% 18%, color-mix(in srgb, var(--accent-soft) 55%, transparent), transparent 70%);
  background-repeat: no-repeat;
}
.site-header { box-shadow: 0 1px 0 var(--border-soft), 0 12px 30px -24px rgba(0, 0, 0, .45); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0) scale(.98); }
.btn:focus-visible, .input:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
.card { transition: border-color var(--t-med), box-shadow var(--t-med); }
.section-head h2 { display: flex; align-items: center; gap: 10px; }
.section-head h2::before { content: ""; width: 4px; height: 1.05em; border-radius: 4px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); }

/* Live status dot on in-progress badges */
.badge-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: live-dot 1.6s ease-in-out infinite; }
@keyframes live-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

/* Fintech-style wallet card */
.wallet-hero {
  position: relative; overflow: hidden; isolation: isolate; color: #fff;
  border-radius: calc(var(--radius-card) + 8px); padding: clamp(20px, 4vw, 30px);
  background: linear-gradient(135deg, #5B2FE0 0%, var(--accent) 45%, #9F7BFF 100%);
  box-shadow: 0 24px 48px -24px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, .22);
  display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr) auto; align-items: end;
}
.wallet-hero::before, .wallet-hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.wallet-hero::before { width: 280px; height: 280px; right: -70px; top: -120px; }
.wallet-hero::after { width: 190px; height: 190px; right: 90px; bottom: -120px; background: rgba(255, 255, 255, .07); }
.wallet-hero .wh-label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .85rem; opacity: .85; }
.wallet-hero .wh-amount { display: block; font-size: clamp(2rem, 7vw, 2.9rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.wallet-hero .wh-sub { font-size: .82rem; opacity: .78; }
.wallet-hero .wh-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.wallet-hero .btn { background: #fff; color: #3A1CA8; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .5); }
.wallet-hero .btn:hover { background: #F3EEFF; color: #3A1CA8; }
.wallet-hero .btn.btn-glass { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: none; border-color: rgba(255, 255, 255, .28); backdrop-filter: blur(6px); }
.wallet-hero .btn.btn-glass:hover { background: rgba(255, 255, 255, .26); color: #fff; }
@media (max-width: 640px) { .wallet-hero { grid-template-columns: minmax(0, 1fr); } .wallet-hero .wh-actions .btn { flex: 1; } }
.stats.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 520px) { .stats.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .stats-3 .stat { padding: 12px; } .stats-3 .stat-value { font-size: 1.2rem; } .stats-3 .stat-label { font-size: .72rem; } }
.quick-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.quick-actions a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border-radius: var(--radius-card); background: var(--card); border: 1px solid var(--border-soft); font-weight: 700; font-size: .8rem; text-align: center; transition: transform var(--t-fast) var(--ease), border-color var(--t-fast); }
.quick-actions a:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--text); }
.quick-actions .qa-ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------------------------------------
   Nigeria phone field (flag + fixed +234 prefix)
   --------------------------------------------------------------------------------------------- */
.phone-field { display: flex; align-items: stretch; min-width: 0; }
.phone-prefix { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--border); border-right: 0; border-radius: var(--radius-btn, 12px) 0 0 var(--radius-btn, 12px); background: var(--elevated); font-size: .95rem; white-space: nowrap; color: var(--text); }
.phone-prefix .flag { width: 24px; height: 16px; border-radius: 3px; box-shadow: 0 0 0 1px rgb(0 0 0 / .12); flex-shrink: 0; }
.phone-field .input { border-radius: 0 var(--radius-btn, 12px) var(--radius-btn, 12px) 0; min-width: 0; flex: 1; }

/* Single active payment method header */
.pay-head { margin-bottom: 14px; }
.pay-name { display: flex; align-items: center; gap: 10px; }
.pay-name h3 { margin: 0; font-size: 1.35rem; line-height: 1.2; }
.pay-name img { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; flex: none; }

/* Customer notification popup */
.popup-notice .modal { max-width: 420px; text-align: center; overflow: hidden; }
.popup-notice .modal-body { padding-top: 6px; }
.popup-img { display: block; width: calc(100% + 44px); max-width: none; margin: -6px -22px 16px; height: auto; max-height: 220px; object-fit: cover; }
.popup-ico { width: 68px; height: 68px; border-radius: 50%; margin: 6px auto 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); animation: popup-pop .5s cubic-bezier(.2,1.4,.4,1) both; }
.popup-ico .icon { width: 30px; height: 30px; }
.popup-success .popup-ico { background: var(--success-soft); color: var(--success); }
.popup-warning .popup-ico { background: var(--warning-soft); color: var(--warning); }
.popup-title { margin: 0 0 8px; font-size: 1.25rem; }
.popup-msg { margin: 0 0 18px; color: var(--muted); white-space: pre-line; line-height: 1.6; }
.popup-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@keyframes popup-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .popup-ico { animation: none; } }

/* Individual account cards: compact on phones */
.acc-card .acc-host { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) {
  .acc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .acc-card .body { padding: 10px 10px 6px; }
  .acc-card .body strong { font-size: .86rem; overflow-wrap: anywhere; }
  .acc-card .actions { flex-direction: column; padding: 0 10px 10px; gap: 6px; }
}

/* Admin-written payment instructions inside the Add Fund payment window (sanitised HTML). */
.pay-instructions { min-width: 0; overflow-wrap: anywhere; line-height: 1.6; }
.pay-instructions > :first-child { margin-top: 0; }
.pay-instructions > :last-child { margin-bottom: 0; }
.pay-instructions p, .pay-instructions ul, .pay-instructions ol { margin: 0 0 .6em; }
.pay-instructions ul, .pay-instructions ol { padding-left: 1.3em; }
.pay-instructions a { color: inherit; text-decoration: underline; font-weight: 700; }

/* Narrow phones: a button label longer than its card (e.g. "Contact support on WhatsApp" at 320px) wraps instead of pushing the page wider. */
@media (max-width: 400px) {
  .btn { max-width: 100%; white-space: normal; text-align: center; padding-block: 8px; line-height: 1.25; }
}
