/* DigiMaroc storefront + admin. Layout: midnight header with a wide search, white category bar, dense product grid, sticky buy box. */
:root {
  --bg: #F3F4F9; --surface: #FFFFFF; --sunk: #ECEEF5; --ink: #14162B; --muted: #5D6282; --line: #E1E4EE;
  --brand: #6D29D9; --brand-2: #2B4DE0; --brand-hover: #5B1FC0; --brand-soft: #EFE8FD; --on-brand: #FFFFFF; --link: #5B1FD0;
  --gold: #F5A524; --ok: #0B7F62; --ok-soft: #E2F5EF; --bad: #D4264A; --bad-soft: #FDE8EC; --warn-soft: #FFF3D9; --warn: #8A5A00;
  --head: #14162B; --head-2: #1E2140; --on-head: #FFFFFF; --on-head-muted: #B4B9D9; --wa: #1FAF57;
  --lg1: #9B6BFF; --lg2: #5B8CFF;
  --shadow: 0 10px 30px rgba(20, 22, 43, .12);
  --display: Outfit, Inter, Cairo, system-ui, sans-serif; --body: Inter, Cairo, system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 12px; --r-sm: 8px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0C1A; --surface: #15172C; --sunk: #0F1123; --ink: #EEF0FF; --muted: #A0A6C8; --line: #272B4B;
    --brand: #7C3FEA; --brand-hover: #8D55F2; --brand-soft: #231A4A; --link: #B79CFF;
    --ok: #3DD6A6; --ok-soft: #0F2E28; --bad: #FF6B88; --bad-soft: #3A1420; --warn-soft: #3A2C0C; --warn: #FFC15A;
    --head: #0F1124; --head-2: #1B1E3B; --shadow: 0 10px 30px rgba(0, 0, 0, .5); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B0C1A; --surface: #15172C; --sunk: #0F1123; --ink: #EEF0FF; --muted: #A0A6C8; --line: #272B4B;
  --brand: #7C3FEA; --brand-hover: #8D55F2; --brand-soft: #231A4A; --link: #B79CFF;
  --ok: #3DD6A6; --ok-soft: #0F2E28; --bad: #FF6B88; --bad-soft: #3A1420; --warn-soft: #3A2C0C; --warn: #FFC15A;
  --head: #0F1124; --head-2: #1B1E3B; --shadow: 0 10px 30px rgba(0, 0, 0, .5); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; scroll-padding-top: 150px; }
/* the page itself never scrolls sideways (wide rows such as product rails scroll inside their own box) */
html, body { max-width: 100%; overflow-x: hidden; }
@supports (overflow-x: clip) { html, body { overflow-x: clip; } }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
[dir=rtl] body { font-family: Cairo, Inter, system-ui, sans-serif; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--head); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; text-wrap: balance; letter-spacing: -.01em; }
[dir=rtl] h1, [dir=rtl] h2, [dir=rtl] h3 { font-family: Cairo, Inter, sans-serif; letter-spacing: 0; }
img { max-width: 100%; display: block; }
svg.ic { flex: none; vertical-align: -3px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1280px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.muted { color: var(--muted); } .num { font-variant-numeric: tabular-nums; }
.stack { display: grid; gap: 12px; } .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }

/* ── buttons, fields ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { border-color: var(--muted); } .btn:active { transform: scale(.98); } .btn[disabled] { opacity: .55; pointer-events: none; }
.btn.pri { background: var(--brand); border-color: var(--brand); color: var(--on-brand); } .btn.pri:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.wa { background: var(--wa); border-color: var(--wa); color: #fff; } .btn.wa:hover { filter: brightness(.94); }
.btn.ghost { background: transparent; } .btn.danger { color: var(--bad); }
.btn.lg { min-height: 52px; font-size: 16px; padding: 0 22px; } .btn.sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; } .btn.block { width: 100%; }
.field { display: grid; gap: 6px; } .field > span { font-weight: 600; font-size: 13.5px; } .field small { color: var(--muted); font-size: 12.5px; }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=search], input[type=number], input[type=date], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); }
textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
.note { border-inline-start: 3px solid var(--brand); padding: 8px 12px; background: var(--brand-soft); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 13.5px; }
[dir=rtl] .note { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.note.warn { border-color: var(--gold); background: var(--warn-soft); color: var(--warn); } .note.bad { border-color: var(--bad); background: var(--bad-soft); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--sunk); color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.bad { background: var(--bad-soft); color: var(--bad); } .pill.brand { background: var(--brand-soft); color: var(--link); } .pill.warn { background: var(--warn-soft); color: var(--warn); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }

/* ── header ── */
.ann { background: var(--brand); color: #fff; font-size: 13px; text-align: center; padding-block: 7px; }
.hd { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--head); color: var(--on-head); }
.hd-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 8px; align-items: center; padding-block: 10px; }
.logo { display: block; min-width: 0; } .logo svg { height: 34px; width: auto; max-width: 100%; display: block; }
[dir=rtl] .hd .logo svg { margin-inline-start: 0; }
.hd-act { display: flex; gap: 2px; justify-content: flex-end; align-items: center; }
.hb { position: relative; display: inline-flex; align-items: center; gap: 8px; min-width: 42px; height: 42px; padding: 0 10px; justify-content: center; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--on-head); font-weight: 600; font-size: 13.5px; }
.hb:hover { background: var(--head-2); } .hb span { display: none; }
.hb i { position: absolute; top: 2px; inset-inline-end: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--gold); color: #14162B; font: 700 11px/18px var(--body); text-align: center; }
.search { grid-column: 1 / -1; position: relative; display: flex; }
.search input { height: 46px; min-height: 0; border: 0; border-radius: var(--r-sm); padding-inline: 14px 54px; background: #fff; color: #14162B; }
.search input::placeholder { color: #6A6F88; }
.search button { position: absolute; inset-block: 4px; inset-inline-end: 4px; width: 44px; border: 0; border-radius: 6px; background: var(--brand); color: #fff; display: grid; place-items: center; }
.sug { position: absolute; inset-inline: 0; top: 52px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow); overflow: hidden; z-index: 5; }
.sug a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; } .sug a:hover { background: var(--sunk); } .sug b { margin-inline-start: auto; white-space: nowrap; }
.sug .mono, .mono { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: #fff; font-weight: 800; font-size: 13px; flex: none; background: linear-gradient(135deg, var(--a), var(--b)); }
.catbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.catbar .wrap { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; } .catbar .wrap::-webkit-scrollbar { display: none; }
.catbar a { display: inline-flex; align-items: center; gap: 7px; padding: 12px 12px; font-weight: 600; font-size: 14px; white-space: nowrap; border-bottom: 2px solid transparent; color: var(--muted); }
.catbar a:hover, .catbar a.on { color: var(--link); border-color: var(--brand); } .catbar .end { margin-inline-start: auto; }

/* ── home ── */
main { min-height: 60vh; padding-block: 16px 40px; }
.hero { display: grid; gap: 12px; } .hero > * { min-width: 0; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--r); } .slides::-webkit-scrollbar { display: none; }
.slide, .tile { position: relative; overflow: hidden; color: #fff; background: linear-gradient(120deg, var(--a), var(--b)); display: flex; align-items: center; isolation: isolate; }
.slide { flex: 0 0 100%; scroll-snap-align: center; min-height: 230px; }
.slide::before, .tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 85% 10%, rgba(255, 255, 255, .26), transparent 48%), radial-gradient(circle at 0% 100%, rgba(0, 0, 0, .28), transparent 55%); }
.slide > img, .tile > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.slide.has-img::before, .tile.has-img::before { background: linear-gradient(90deg, rgba(8, 10, 30, .82), rgba(8, 10, 30, .15)); opacity: 1; }
[dir=rtl] .slide.has-img::before, [dir=rtl] .tile.has-img::before { background: linear-gradient(270deg, rgba(8, 10, 30, .82), rgba(8, 10, 30, .15)); }
.slide-t { padding: 24px 20px; display: grid; gap: 10px; justify-items: start; max-width: 62%; position: relative; z-index: 2; }
.slide-t h2 { font-size: 22px; } .slide-t p { font-size: 14px; opacity: .92; }
.slide .btn, .tile .btn { background: #fff; color: #14162B; border-color: #fff; }
.fan { position: absolute; inset-inline-end: -10px; top: 50%; width: 46%; height: 0; z-index: 1; }
.fan .cv { position: absolute; width: 46%; top: 0; box-shadow: 0 14px 30px rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .25); }
.fan .cv:nth-child(1) { inset-inline-start: 0; transform: translateY(-46%) rotate(-8deg); } .fan .cv:nth-child(2) { inset-inline-start: 27%; transform: translateY(-56%) rotate(2deg); z-index: 2; } .fan .cv:nth-child(3) { inset-inline-start: 54%; transform: translateY(-44%) rotate(10deg); }
.hero-nav { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 8px; }
.dots { display: flex; gap: 6px; } .dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--line); transition: width .2s, background .2s; } .dots i.on { width: 22px; background: var(--brand); }
.arr { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: none; place-items: center; }
[dir=rtl] .arr svg, [dir=rtl] .flip { transform: scaleX(-1); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { border-radius: var(--r); min-height: 130px; padding: 16px; align-items: flex-end; } .tile div { display: grid; gap: 4px; justify-items: start; } .tile h3 { font-size: 17px; } .tile p { font-size: 12.5px; opacity: .9; } .tile .btn { margin-top: 6px; }
.trust { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-top: 16px; }
.trust div { background: var(--surface); padding: 14px; display: flex; gap: 12px; align-items: center; } .trust svg { color: var(--brand); } .trust b { display: block; font-size: 13.5px; line-height: 1.3; } .trust small { color: var(--muted); font-size: 12px; line-height: 1.3; display: block; }
.sec { margin-top: 30px; } .sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; } .sec-h h2 { font-size: 20px; } .sec-h a { color: var(--link); font-weight: 600; font-size: 14px; white-space: nowrap; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; } .rail::-webkit-scrollbar { display: none; } .rail > * { flex: 0 0 158px; scroll-snap-align: start; }
.cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cat { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); font-weight: 600; line-height: 1.25; } .cat:hover { border-color: var(--brand); }
.cat i { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--brand-soft); color: var(--link); flex: none; } .cat small { display: block; color: var(--muted); font-weight: 500; font-size: 12.5px; }
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; counter-reset: s; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; } .step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--surface); font-weight: 700; margin-bottom: 10px; } .step p { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
details.qa { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; } details.qa + details.qa { margin-top: 8px; } details.qa summary { font-weight: 600; cursor: pointer; } details.qa p { color: var(--muted); margin-top: 8px; white-space: pre-line; }

/* ── product card + generated cover ── */
.cv { position: relative; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; color: #fff; background: linear-gradient(150deg, var(--a), var(--b)); container-type: inline-size; }
.cv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cv-arch { position: absolute; inset: 9% 16% -8%; border-radius: 50% 50% 0 0 / 38% 38% 0 0; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .3); }
.cv-m { position: absolute; top: 26%; left: 50%; transform: translateX(-50%); display: grid; place-items: center; width: 36%; aspect-ratio: 1; border-radius: 24%; background: #fff; color: var(--a); font: 800 15cqw/1 var(--display); box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
.cv-n { position: absolute; inset-inline: 8%; top: 60%; text-align: center; font: 700 7.4cqw/1.2 var(--display); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cv-t { position: absolute; inset: auto 0 0; padding: 5% 8%; text-align: center; font-size: 5.6cqw; font-weight: 600; background: rgba(0, 0, 0, .28); }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.card.is-out .cv { filter: grayscale(.9); opacity: .7; }
.off { position: absolute; top: 14px; inset-inline-start: 14px; z-index: 2; background: var(--gold); color: #14162B; font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.card-b { display: grid; gap: 3px; padding: 10px 4px 4px; flex: 1; align-content: start; }
.card-c { font-size: 12px; color: var(--muted); } .card-n { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.card-r { font-size: 12.5px; font-weight: 600; } .card-r svg { color: var(--gold); } .card-r small { color: var(--muted); font-weight: 500; }
.card-p { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: 2px; } .card-p b { font: 700 17px var(--display); } .card-p s, .card-p small { color: var(--muted); font-size: 12.5px; }
.tagx { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; } .tagx.ok { color: var(--ok); } .tagx.bad { color: var(--bad); }

/* ── catalog ── */
.bc { color: var(--muted); font-size: 13.5px; margin-bottom: 12px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .bc a:hover { color: var(--link); }
.cat-h { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 14px; } .cat-h h1 { font-size: 24px; margin-inline-end: auto; } .cat-h select { width: auto; min-height: 40px; padding-block: 6px; }
.shop { display: grid; gap: 16px; }
.flt { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); } .flt > summary { list-style: none; padding: 12px 14px; font-weight: 600; cursor: pointer; display: flex; gap: 8px; align-items: center; } .flt > summary::-webkit-details-marker { display: none; }
.flt-b { padding: 4px 14px 14px; display: grid; gap: 16px; } .flt h4 { font-size: 13px; margin-bottom: 8px; }
.chk { display: flex; gap: 9px; align-items: center; padding: 5px 0; cursor: pointer; font-size: 14px; } .chk input { width: 18px; height: 18px; accent-color: var(--brand); } .chk small { margin-inline-start: auto; color: var(--muted); }
input[type=range] { width: 100%; accent-color: var(--brand); }
.empty { text-align: center; padding: 50px 16px; display: grid; gap: 12px; justify-items: center; color: var(--muted); } .empty svg { color: var(--line); }

/* ── product page ── */
.pd { display: grid; gap: 16px; }
.pd-media .cv { max-width: 320px; margin-inline: auto; border-radius: 16px; }
.pd-info h1 { font-size: 26px; } .pd-info .lead { color: var(--muted); margin-top: 6px; }
.stars { color: var(--gold); display: inline-flex; gap: 1px; } .rate { display: flex; gap: 8px; align-items: center; font-size: 14px; margin-top: 8px; }
.attrs { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; margin-top: 16px; } .attrs div { background: var(--surface); padding: 10px 12px; } .attrs dt { font-size: 12px; color: var(--muted); } .attrs dd { font-weight: 600; font-size: 14px; }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-top: 8px; }
.opt { text-align: start; padding: 10px 12px; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: var(--surface); display: grid; gap: 2px; } .opt b { font-family: var(--display); } .opt small { color: var(--muted); font-size: 12.5px; }
.opt.on { border-color: var(--brand); background: var(--brand-soft); } .opt[disabled] { opacity: .5; }
.buy { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 12px; align-content: start; }
.price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; } .price b { font: 700 32px/1 var(--display); } .price s { color: var(--muted); } .price .off { position: static; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); } .qty button { width: 40px; height: 40px; border: 0; background: none; display: grid; place-items: center; } .qty span { min-width: 28px; text-align: center; font-weight: 600; }
.assure { display: grid; gap: 8px; font-size: 13.5px; padding-top: 12px; border-top: 1px solid var(--line); } .assure li { display: flex; gap: 8px; align-items: flex-start; list-style: none; } .assure svg { color: var(--ok); margin-top: 2px; } .assure { padding-inline-start: 0; }
.paym { display: flex; gap: 6px; flex-wrap: wrap; } .paym span { border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px; font-size: 12.5px; font-weight: 600; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin-top: 26px; } .tabs button { padding: 12px 14px; border: 0; background: none; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; } .tabs button.on { color: var(--link); border-color: var(--brand); }
.tabp { padding-block: 16px; max-width: 76ch; white-space: pre-line; } .tabp.plain { white-space: normal; }
.rev { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px; display: grid; gap: 6px; } .rev + .rev { margin-top: 8px; } .rev small { color: var(--muted); }
.revs { display: grid; grid-template-columns: 1fr; gap: 10px; } .revs .rev + .rev { margin-top: 0; }
.sticky-buy { position: fixed; inset: auto 0 0; z-index: 45; background: var(--surface); border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.sticky-buy b { font: 700 19px var(--display); margin-inline-end: auto; } .sticky-buy .btn.wa { padding: 0; width: 52px; }

/* ── cart, checkout, order ── */
.two { display: grid; gap: 16px; align-items: start; } .two > *, .stack > *, .cols2 > *, .choice > * { min-width: 0; } select { max-width: 100%; text-overflow: ellipsis; } .page-h { font-size: 26px; margin-bottom: 14px; }
.line { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding-block: 12px; border-bottom: 1px solid var(--line); } .line:last-child { border: 0; } .line .cv { border-radius: 8px; } .line small { color: var(--muted); display: block; } .line .r { text-align: end; display: grid; gap: 6px; justify-items: end; }
.sum { display: grid; gap: 10px; } .sum > div { display: flex; justify-content: space-between; gap: 10px; } .sum .tot { font: 700 20px var(--display); padding-top: 10px; border-top: 1px solid var(--line); }
.stepper { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13.5px; margin-bottom: 16px; flex-wrap: wrap; } .stepper b { color: var(--ink); } .stepper i { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--sunk); font-style: normal; font-weight: 700; font-size: 12px; margin-inline-end: 6px; } .stepper .on i { background: var(--brand); color: #fff; } .stepper .ok i { background: var(--ok); color: #fff; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); cursor: pointer; background: var(--surface); } .choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); } .choice input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--brand); flex: none; } .choice small { color: var(--muted); display: block; }
.choice.inline { align-items: center; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tl { display: grid; grid-template-columns: repeat(4, 1fr); margin-block: 6px; } .tl div { text-align: center; font-size: 12px; color: var(--muted); position: relative; padding-top: 38px; line-height: 1.3; }
.tl div::before { content: ""; position: absolute; top: 14px; inset-inline: 0; height: 3px; background: var(--line); } .tl div:first-child::before { inset-inline-start: 50%; } .tl div:last-child::before { inset-inline-end: 50%; }
.tl i { position: absolute; top: 0; left: 50%; transform: translateX(-50%); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--sunk); border: 2px solid var(--line); color: var(--muted); font-style: normal; font-weight: 700; z-index: 1; }
.tl .on { color: var(--ink); font-weight: 600; } .tl .on i { background: var(--ok); border-color: var(--ok); color: #fff; } .tl .on::before { background: var(--ok); }
.kv { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; } .kv div { background: var(--surface); display: flex; gap: 10px; align-items: center; padding: 10px 12px; } .kv dt { color: var(--muted); font-size: 13px; min-width: 92px; } .kv dd { font-weight: 600; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.copy { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; width: 34px; height: 34px; display: grid; place-items: center; flex: none; } .copy:hover { border-color: var(--brand); color: var(--link); }
.dl { background: var(--ok-soft); border: 1px dashed var(--ok); border-radius: var(--r-sm); padding: 14px; white-space: pre-wrap; overflow-wrap: anywhere; font: 600 15px/1.6 ui-monospace, Menlo, Consolas, monospace; }
.rate-in { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; } .rate-in input { position: absolute; opacity: 0; } .rate-in label { color: var(--line); cursor: pointer; } .rate-in input:checked ~ label, .rate-in label:hover, .rate-in label:hover ~ label { color: var(--gold); }
.prose { max-width: 72ch; } .prose h1 { font-size: 28px; margin-bottom: 16px; } .prose p { margin-bottom: 14px; color: var(--muted); white-space: pre-line; }

/* ── footer, mobile bars ── */
footer { background: var(--head); color: var(--on-head-muted); font-size: 14px; padding-block: 32px 110px; margin-top: 30px; }
.ft { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 20px; } .ft > div:first-child { grid-column: 1 / -1; } .ft h4 { color: #fff; margin-bottom: 10px; font-size: 14px; } .ft a { display: block; padding: 4px 0; } .ft a:hover { color: #fff; } .ft .logo svg { height: 38px; }
.ft .paym span { border-color: rgba(255, 255, 255, .2); color: #fff; } .legal { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 26px; padding-top: 16px; font-size: 12.5px; display: flex; gap: 8px 20px; flex-wrap: wrap; justify-content: space-between; }
.tabbar { position: fixed; inset: auto 0 0; z-index: 44; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabbar a { position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 0 7px; font-size: 11px; font-weight: 600; color: var(--muted); } .tabbar a.on { color: var(--link); } .tabbar .wa-c { color: var(--wa); }
.tabbar i { position: absolute; top: 3px; inset-inline-start: calc(50% + 6px); min-width: 17px; height: 17px; border-radius: 99px; background: var(--gold); color: #14162B; font: 700 10.5px/17px var(--body); text-align: center; padding: 0 4px; }
.fab { display: none; position: fixed; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); inset-inline-end: calc(24px + env(safe-area-inset-right, 0px)); z-index: 44; width: 56px; height: 56px; border-radius: 50%; background: var(--wa); color: #fff; place-items: center; box-shadow: 0 10px 24px rgba(31, 175, 87, .4); }
#toast { position: fixed; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); background: #14162B; color: #fff; padding: 10px 18px; border-radius: 99px; opacity: 0; transition: opacity .25s; z-index: 90; pointer-events: none; max-width: 90vw; text-align: center; font-size: 14px; border: 1px solid rgba(255, 255, 255, .15); }
.splash { display: grid; place-items: center; min-height: 100vh; }

/* ── admin ── */
.adm { display: grid; min-height: 100vh; background: var(--bg); }
.adm-side { background: var(--head); color: var(--on-head-muted); padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); display: flex; gap: 6px; align-items: center; overflow-x: auto; scrollbar-width: none; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; }
.adm-side .logo { margin-inline-end: 8px; flex: none; } .adm-side .logo svg { height: 28px; }
.adm-side a, .adm-side button { display: inline-flex; gap: 9px; align-items: center; padding: 9px 12px; border-radius: var(--r-sm); font-weight: 600; font-size: 14px; white-space: nowrap; border: 0; background: none; color: inherit; }
.adm-side a:hover, .adm-side button:hover { background: var(--head-2); color: #fff; } .adm-side a.on { background: var(--brand); color: #fff; } .adm-side em { font-style: normal; background: var(--gold); color: #14162B; border-radius: 99px; font-size: 11.5px; padding: 0 7px; font-weight: 700; }
.adm-main { padding-block: 20px 60px; min-width: 0; } .adm-main > .wrap { max-width: 1180px; }
.adm-h { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; } .adm-h h1 { font-size: 24px; margin-inline-end: auto; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; } .kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; } .kpi small { color: var(--muted); } .kpi b { display: block; font: 700 24px var(--display); }
.tbl { width: 100%; border-collapse: collapse; background: var(--surface); } .tbl-w { border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; background: var(--surface); }
.tbl th { text-align: start; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; } .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; } .tbl tr:last-child td { border: 0; } .tbl tbody tr { cursor: pointer; } .tbl tbody tr:hover { background: var(--sunk); }
.seg { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; } .seg button { padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13.5px; white-space: nowrap; } .seg button.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.form { display: grid; gap: 14px; } .form h3 { font-size: 16px; margin-top: 6px; } .form .cols2 > * { min-width: 0; }
.rowcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; display: grid; gap: 10px; } .rowcard-h { display: flex; gap: 8px; align-items: center; } .rowcard-h b { margin-inline-end: auto; }
.optrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-sm); } .optrow .full { grid-column: 1 / -1; }
.thumb { width: 44px; flex: none; } .thumb .cv { border-radius: 6px; }
.logrow { border-top: 1px solid var(--line); padding-top: 8px; font-size: 13.5px; } .logrow pre { white-space: pre-wrap; background: var(--sunk); border-radius: 6px; padding: 10px; margin-top: 6px; font: 13px/1.5 var(--body); overflow-wrap: anywhere; }
.savebar { position: sticky; bottom: 0; background: var(--bg); padding-block: 12px; display: flex; gap: 10px; border-top: 1px solid var(--line); margin-top: 6px; z-index: 5; }
.imgpick { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .imgpick img { width: 120px; border-radius: 8px; border: 1px solid var(--line); }
input[type=color] { width: 100%; min-height: 46px; padding: 4px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); }
.login { max-width: 380px; margin: 12vh auto 0; }

/* ── tablet and laptop ── */
@media (max-width: 699px) { .slide-t { max-width: 60%; } .fan { width: 40%; inset-inline-end: -18px; } }
@media (max-width: 379px) { .rail { margin-inline: -12px; padding-inline: 12px; } .choice.inline { padding: 12px 10px; gap: 8px; } .hb { min-width: 36px; height: 38px; padding: 0 6px; } .hd .logo svg { height: 30px; } .wrap { padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); } }
@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .steps { grid-template-columns: repeat(4, 1fr); }
  .trust { grid-template-columns: repeat(4, 1fr); } .revs { grid-template-columns: 1fr 1fr; } .kpis { grid-template-columns: repeat(4, 1fr); }
  .optrow { grid-template-columns: 1.2fr 1.2fr .7fr .7fr auto; } .optrow .full { grid-column: auto; }
}
@media (min-width: 980px) {
  body { font-size: 15.5px; }
  .hd-in { grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; padding-block: 12px; } .hd-act { gap: 6px; } .search { grid-column: auto; grid-row: 1; grid-column-start: 2; max-width: 720px; width: 100%; margin-inline: auto; } .hd-act { grid-column: 3; } .logo svg { height: 38px; }
  .hb span { display: inline; } .hb { padding: 0 12px; }
  main { padding-block: 22px 60px; }
  .hero { grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr); } .hero > div:first-child { min-width: 0; } .slide { min-height: 360px; } .slide-t { padding: 44px 48px; max-width: 54%; gap: 14px; } .slide-t h2 { font-size: 38px; } .slide-t p { font-size: 17px; }
  .tiles { grid-template-columns: 1fr; } .tile { min-height: 0; padding: 22px; } .tile h3 { font-size: 21px; } .tile p { font-size: 14px; } .arr { display: grid; }
  .sec { margin-top: 44px; } .sec-h h2 { font-size: 26px; }
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; } .grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .rail { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; overflow: visible; margin: 0; padding: 0; } .rail > :nth-child(n+7) { display: none; }
  .cats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .shop { grid-template-columns: 250px minmax(0, 1fr); align-items: start; } .flt { position: sticky; top: 132px; } .flt > summary { pointer-events: none; }
  .pd { grid-template-columns: 300px minmax(0, 1fr) 340px; gap: 28px; align-items: start; } .pd-media .cv { max-width: none; } .buy { position: sticky; top: 132px; } .pd-info h1 { font-size: 32px; }
  .sticky-buy, .tabbar { display: none; } .fab { display: grid; } footer { padding-bottom: 32px; } #toast { bottom: 30px; }
  .two { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; } .two > aside { position: sticky; top: 132px; }
  .ft { grid-template-columns: 1.5fr 1fr 1fr 1fr; } .ft > div:first-child { grid-column: auto; }
  .revs { grid-template-columns: repeat(3, 1fr); }
  .adm { grid-template-columns: 232px minmax(0, 1fr); } .adm .two > aside { top: 20px; } .adm-side { flex-direction: column; align-items: stretch; padding: 18px 12px; height: 100vh; top: 0; overflow-y: auto; } .adm-side .logo { margin: 0 6px 16px; } .adm-side .sp { margin-top: auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
