/* =====================================================================
   Storefront — merchant web & public pages
   ===================================================================== */

/* ---------- header ---------- */
.topbar { position: sticky; top: 0; z-index: 500; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.topbar.scrolled { box-shadow: var(--shadow); }
.topbar .bar { display: flex; align-items: center; gap: 16px; height: 68px; }
.topbar .bar > :not(.search-trigger):not(.nav) { flex: none; }
.brand { display: flex; align-items: center; gap: 11px; flex: none; color: var(--text); }
.brand .logo { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--navy); flex: none; }
.brand .logo svg { width: 28px; height: auto; fill: #fff; }
.brand b { display: block; font-size: 16px; font-weight: 700; line-height: 1.15; white-space: nowrap; }
.brand small { display: block; font-size: 9.5px; letter-spacing: 2.5px; color: var(--muted); font-family: system-ui, sans-serif; margin-top: 2px; }

.nav { position: relative; display: flex; align-items: stretch; gap: 4px; height: 68px; margin-inline-start: 18px; }
.nav a { position: relative; z-index: 1; display: flex; align-items: center; gap: 7px; padding: 0 12px; color: var(--muted); font-size: 14.5px; font-weight: 500; white-space: nowrap; transition: color .15s; }
.nav a .icon { width: 17px; height: 17px; }
.nav a:hover, .nav a.active { color: var(--text); }
.nav a.active { font-weight: 600; }
.nav .ind { position: absolute; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--primary); transition: left .3s var(--ease), width .3s var(--ease); }
[data-theme="dark"] .nav .ind { background: var(--sky); }
.nav .hover-ind { display: none; }

.search-trigger { flex: 1; min-width: 40px; max-width: 380px; height: 40px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; padding: 0 12px; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; margin-inline-start: auto; }
.search-trigger:hover { border-color: var(--line-2); background: var(--surface); }
.search-trigger span { flex: 1; text-align: start; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.credit-chip { height: 32px; padding: 0 12px; border-radius: var(--r-sm); background: var(--amber-bg); color: var(--amber); font-size: 13px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.icon-btn { width: 40px; height: 40px; border-radius: var(--r); display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); position: relative; cursor: pointer; transition: background .15s, border-color .15s; }
.icon-btn:hover { background: var(--surface-2); border-color: var(--line-2); }
.icon-btn .dot { position: absolute; top: 8px; inset-inline-end: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--surface); }
.cart-btn { display: inline-flex; align-items: center; gap: 8px; }
.cart-btn .label { display: inline; margin: 0; color: inherit; font-size: 14.5px; font-weight: 600; }
.search-trigger kbd { white-space: nowrap; }
@media (min-width: 1081px) { .search-trigger { min-width: 170px; } }
@media (max-width: 1520px) { .credit-chip { display: none; } }
@media (max-width: 1360px) { .nav a .icon, .search-trigger kbd { display: none; } .nav { margin-inline-start: 8px; gap: 0; } }
.cart-btn .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #fff; color: var(--primary); font-size: 12px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.topbar .btn { --h: 40px !important; padding: 0 16px !important; }

/* notifications popover */
.popover { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; width: 360px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 6px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(-4px); pointer-events: none; transition: .18s var(--ease); z-index: 600; }
.popover.open { opacity: 1; transform: none; pointer-events: auto; }
.notif { display: flex; gap: 12px; padding: 10px; border-radius: var(--r); font-size: 14px; }
.notif:hover { background: var(--surface-2); }
.notif .ni { width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--primary-soft); color: var(--sky); display: grid; place-items: center; flex: none; }
.notif.unread b::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); margin-inline-start: 8px; vertical-align: middle; }
.notif small { color: var(--muted); display: block; font-size: 12.5px; }

/* ---------- mobile tab bar ---------- */
.dock { display: none; }
@media (max-width: 1080px) { .nav { display: none; } .search-trigger { flex: none; width: 40px; padding: 0; justify-content: center; } .search-trigger span, .search-trigger kbd { display: none; } }
@media (max-width: 860px) {
  .credit-chip, .cart-btn .label, .brand small { display: none; }
  .topbar .bar { height: 60px; gap: 8px; }
  .topbar .cart-btn { width: 40px; padding: 0 !important; }
  body.has-dock { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .dock { display: flex; position: fixed; z-index: 700; inset: auto 0 0 0; padding: 0 6px env(safe-area-inset-bottom); height: calc(64px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .dock .pill { display: none; }
  .dock a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 500; color: var(--muted); position: relative; }
  .dock a .ico { display: grid; place-items: center; height: 26px; }
  .dock a .ico .icon { width: 22px; height: 22px; }
  .dock a.active { color: var(--primary); font-weight: 700; }
  [data-theme="dark"] .dock a.active { color: var(--sky); }
  .dock a.active::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: currentColor; }
  .dock a .badge-n { position: absolute; top: 6px; inset-inline-end: calc(50% - 22px); min-width: 17px; height: 17px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
  .popover { position: fixed; top: 66px; left: 12px; right: 12px; width: auto; }
}

main.container { padding-top: 24px; }

/* ---------- page heads ---------- */
.page-head { margin: 4px 0 22px; }
.page-head h1 { margin: 0; font-size: 28px; font-weight: 700; }
.page-head p { margin: 4px 0 0; }
.sec-ico { width: 32px; height: 32px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--primary-soft); color: var(--sky); }
.sec-ico .icon { width: 17px; height: 17px; }

/* ---------- banners / offer slider ---------- */
.offer-slider { position: relative; overflow: hidden; border-radius: var(--r-xl); }
.offer-track { display: flex; transition: transform .6s var(--ease); }
.offer-track > * { flex: 0 0 100%; }
.offer-dots { position: absolute; bottom: 14px; left: 24px; display: flex; gap: 6px; z-index: 2; }
.offer-dots i { width: 6px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .45); transition: width .3s var(--ease), background .3s; }
.offer-dots i.on { width: 20px; background: #fff; }
.bnr { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 28px;
  min-height: 200px; padding: 34px 40px; border-radius: var(--r-xl); color: #fff; background: linear-gradient(120deg, var(--c1, #0b1b3f), var(--c2, #1f3c88)); }
.bnr::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: 36px 36px;
  mask-image: linear-gradient(to left, #000, transparent 70%); -webkit-mask-image: linear-gradient(to left, #000, transparent 70%); }
.bnr.has-img.bnr--cover { background: linear-gradient(to left, color-mix(in srgb, var(--c1) 94%, transparent) 30%, color-mix(in srgb, var(--c1) 50%, transparent) 58%, transparent 85%), var(--img) center / cover no-repeat, var(--c1); }
.bnr-copy { position: relative; z-index: 1; max-width: 620px; display: grid; justify-items: start; gap: 8px; }
.bnr-eyebrow { padding: 3px 10px; border-radius: 6px; background: rgba(255, 255, 255, .14); font-size: 12.5px; font-weight: 600; }
.bnr-title { margin: 0; font-size: clamp(22px, 2.6vw, 32px); font-weight: 700; line-height: 1.3; color: inherit; }
.bnr-sub { margin: 0; font-size: 15.5px; opacity: .85; }
.bnr-btn { margin-top: 10px; height: 42px; padding: 0 20px; border-radius: var(--r); display: inline-flex; align-items: center; background: #fff; color: #0b1b3f; font-weight: 700; font-size: 14.5px; transition: background .15s; }
.bnr-btn:hover { background: #eef2fb; }
.bnr-side { position: relative; z-index: 1; width: 34%; max-height: 180px; object-fit: cover; border-radius: var(--r-lg); }
.bnr--dark { color: #0b1b3f; }
.bnr--dark::before { opacity: 0; }
.bnr--dark .bnr-eyebrow { background: rgba(11, 27, 63, .08); }
.bnr--dark .bnr-btn { background: #0b1b3f; color: #fff; }
.bnr--dark.has-img.bnr--cover { background: linear-gradient(to left, color-mix(in srgb, var(--c1) 94%, transparent) 25%, color-mix(in srgb, var(--c2) 20%, transparent)), var(--img) center / cover no-repeat, var(--c1); }
@media (max-width: 640px) { .bnr { padding: 24px; min-height: 170px; } .bnr--side { flex-direction: column-reverse; align-items: stretch; } .bnr-side { width: 100%; max-height: 150px; } }
.hero { padding: 28px 32px; border-radius: var(--r-xl); display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 140px; }
.hero h1 { margin: 6px 0; font-size: clamp(22px, 3vw, 30px); color: #fff; }
.hero p { margin: 0; color: #c9d3ea; }
.hero .eyebrow { font-size: 13px; color: #a9c1ff; }
.hero > * { position: relative; z-index: 1; }
@media (max-width: 600px) { .hero { flex-direction: column; align-items: flex-start; padding: 22px; } .hero .btn { align-self: stretch; } }

/* ---------- merchant home ---------- */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 0 16px; }
.quick a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.quick a:hover { border-color: var(--line-2); box-shadow: var(--shadow-md); }
.quick .icon { width: 38px; height: 38px; padding: 9px; border-radius: var(--r); background: var(--primary-soft); color: var(--sky); }
.quick b { font-weight: 600; }
@media (max-width: 760px) { .quick { grid-template-columns: repeat(2, 1fr); gap: 10px; } .quick a { padding: 12px; } }
.home-section { margin-top: 6px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * 16px) / 5); gap: 16px; overflow-x: auto; padding: 2px 2px 12px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; }
@media (max-width: 1200px) { .rail { grid-auto-columns: calc((100% - 3 * 16px) / 4); } }
@media (max-width: 980px) { .rail { grid-auto-columns: 40%; } }
@media (max-width: 560px) { .rail { grid-auto-columns: 62%; gap: 12px; } }

/* ---------- catalog ---------- */
.catalog { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; }
.catalog > *, .checkout > *, .pdp > *, .account-grid > * { min-width: 0; }
.filters { position: sticky; top: 92px; padding: 16px; }
.filters h4 { margin: 2px 4px 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.filters .cat { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: var(--r-sm); color: var(--text-2); font-size: 14px; transition: background .12s; }
.filters .cat:hover { background: var(--surface-2); }
.filters .cat.active { background: var(--primary-soft); color: var(--sky); font-weight: 700; }
.filters .cat .count { font-size: 12px; color: var(--muted); }
.filters .cat.sub { padding-inline-start: 24px; font-size: 13.5px; }
.filters .check { padding: 2px 4px; }
@media (max-width: 980px) {
  .catalog { grid-template-columns: 1fr; gap: 14px; }
  .filters { position: static; padding: 0; background: none; border: 0; box-shadow: none; }
  .filters h4, .filters .divider, .filters form { display: none; }
  .filters .cats { display: flex; overflow-x: auto; gap: 8px; scrollbar-width: none; }
  .filters .cat { flex: none; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); gap: 8px; }
  .filters .cat.active { background: var(--navy); border-color: var(--navy); color: #fff; }
  .filters .cat.active .count { color: #c9d3ea; }
  .products { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .p-body { padding: 10px 11px 12px; }
  .p-name { font-size: 14px; }
  .p-price { font-size: 16px; }
  .p-price s { display: none; }
  .add-fab { width: 34px; height: 34px; }
}

/* ---------- product page ---------- */
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 12px; align-items: start; }
.gallery { border-radius: var(--r-xl); overflow: hidden; position: relative; aspect-ratio: 1/1; background: var(--surface-2); border: 1px solid var(--line); }
.gallery .slides { display: flex; height: 100%; transition: transform .5s var(--ease); }
.gallery .slides > * { flex: 0 0 100%; display: grid; place-items: center; position: relative; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery.p-art .art-orb { width: 40%; }
.gallery.p-art .slides .icon { width: 20%; max-width: 120px; }
.gallery .dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; padding: 6px 8px; border-radius: 999px; background: rgba(16, 24, 40, .35); }
.gallery .dots i { width: 7px; height: 7px; border-radius: 7px; background: rgba(255, 255, 255, .55); cursor: pointer; transition: .3s var(--ease); }
.gallery .dots i.on { width: 20px; background: #fff; }
.price-big { font-size: 38px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tier { text-align: center; padding: 12px 8px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); transition: .2s; }
.tier small { display: block; color: var(--muted); font-size: 12.5px; }
.tier b { font-size: 17px; }
.tier.on { background: var(--primary-soft); border-color: var(--primary); color: var(--sky); }
.buybar { display: flex; gap: 12px; align-items: center; margin-top: 22px; }
.buybar .btn-lg { --h: 52px !important; }
.stepper { display: flex; align-items: center; gap: 4px; height: 52px; padding: 4px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-2); }
.stepper button { width: 42px; height: 42px; border-radius: var(--r-sm); border: 0; background: var(--surface-2); color: var(--text); cursor: pointer; display: grid; place-items: center; transition: background .12s; }
.stepper button:hover { background: var(--surface-3); }
.stepper input { width: 56px; text-align: center; background: none; border: 0; outline: 0; font-size: 18px; font-weight: 700; }
.login-price { display: flex; align-items: center; gap: 14px; margin-top: 8px; padding: 16px 18px; }
.login-price > .icon { width: 26px; height: 26px; color: var(--sky); flex: none; }
.login-price div { flex: 1; display: grid; }
@media (max-width: 900px) { .pdp { grid-template-columns: 1fr; gap: 20px; } .price-big { font-size: 32px; } .pdp h1 { font-size: 24px !important; } }

/* ---------- cart & checkout ---------- */
.checkout { display: grid; grid-template-columns: 1.45fr 1fr; gap: 24px; margin-top: 8px; align-items: start; }
.line-item { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: opacity .25s, transform .25s; }
.line-item + .line-item { margin-top: 10px; }
.line-item .thumb { width: 72px; height: 72px; border-radius: var(--r); background: var(--surface-2); flex: none; overflow: hidden; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line); }
.line-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.line-item .info { flex: 1; min-width: 0; }
.line-item .info b { display: block; font-size: 15.5px; font-weight: 600; }
.line-item .mini-stepper { display: flex; align-items: center; gap: 2px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); padding: 3px; }
.line-item .mini-stepper button { width: 30px; height: 30px; border-radius: var(--r-sm); border: 0; background: var(--surface-2); color: var(--text); cursor: pointer; }
.line-item .mini-stepper input { width: 42px; text-align: center; background: none; border: 0; outline: 0; font-weight: 700; }
.line-item.removing { opacity: 0; transform: translateX(20px); }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.option { position: relative; cursor: pointer; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option .box { display: block; height: 100%; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-2); transition: .15s; }
.option .box b { display: block; font-size: 15.5px; }
.option .box small { color: var(--muted); }
.option input:checked + .box { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: var(--primary-soft); }
.option input:focus-visible + .box { box-shadow: var(--ring); }
.option input:disabled + .box { opacity: .45; cursor: not-allowed; }
.ship-bar { padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); }
.step-h { display: flex; align-items: center; gap: 10px; margin: 26px 0 12px; font-size: 17px; }
.step-h > .num { width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 13px; }
.step-h small { font-weight: 400; font-size: 13px; }
.coupon-row { display: flex; gap: 8px; }
.coupon-row .input { flex: 1; text-transform: uppercase; }
.pay-note { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 12px; font-size: 13px; color: var(--muted); }
.wallet-use { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); cursor: pointer; font-size: 14px; }
@media (max-width: 980px) { .checkout { grid-template-columns: 1fr; } }

/* ---------- orders ---------- */
.order-card { padding: 22px; }
.ship-box { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); margin: 16px 0; }
.ship-box .icon { color: var(--sky); width: 28px; height: 28px; }
.prev-order { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: border-color .15s; }
.prev-order:hover { border-color: var(--line-2); }
.prev-order + .prev-order { margin-top: 10px; }
.receipt-box { margin-top: 18px; display: grid; gap: 8px; }
.receipt-box img { max-height: 320px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface-2); }

/* ---------- account ---------- */
.account-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; margin-top: 8px; }
.credit-card { padding: 26px 28px; border-radius: var(--r-xl); }
.credit-card .big { font-size: 44px; font-weight: 700; line-height: 1.1; margin: 4px 0 16px; letter-spacing: -.02em; }
.ledger-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.ledger-row + .ledger-row { margin-top: 10px; }
.ledger-row .sign { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; font-weight: 700; flex: none; background: var(--surface-2); color: var(--text-2); }
.ledger-row .sign.plus { background: var(--green-bg); color: var(--green); }
.ledger-row .amt { margin-inline-start: auto; font-size: 17px; font-weight: 700; }
.points-card .how { display: grid; gap: 6px; margin: 14px 0 6px; font-size: 14px; color: var(--text-2); }
.points-card .how .icon { color: var(--green); width: 16px; height: 16px; }
.theme-pick { display: flex; gap: 4px; padding: 4px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.theme-pick button { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); cursor: pointer; font-size: 14px; }
.theme-pick button.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.tier-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 8px; }
.tier-chip { display: inline-flex; gap: 6px; align-items: baseline; padding: 4px 12px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }
.navy .tier-chip { border-color: rgba(255, 255, 255, .18); }
.tier-chip small { font-size: 12px; }
.tier-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.navy .tier-chip.on { background: #fff; border-color: #fff; color: var(--navy); }
.period-tabs { flex-wrap: wrap; gap: 8px; margin: 16px 0 6px; }
.period-tabs .chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.st-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.st-sum > div { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 16px; display: grid; gap: 2px; background: var(--surface); }
.st-sum b { font-size: 19px; }
.st-sum .due { background: var(--navy); color: #fff; border-color: transparent; }
.statement td small { font-size: 12px; }
@media (max-width: 980px) { .account-grid { grid-template-columns: 1fr; } .credit-card .big { font-size: 36px; } }

/* ---------- categories ---------- */
.cat-tree { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.cat-block { padding: 8px; }
.cat-main { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: var(--r); transition: background .12s; }
.cat-main:hover { background: var(--surface-2); }
.cat-main > span:nth-child(2) { flex: 1; display: grid; }
.cat-main b { font-size: 16.5px; font-weight: 700; }
.cat-main > .icon { color: var(--muted); }
.cat-ico { width: 52px; height: 52px; border-radius: var(--r); display: grid; place-items: center; overflow: hidden; flex: none; color: var(--sky); background: var(--primary-soft); }
.cat-ico img { width: 100%; height: 100%; object-fit: cover; }
.cat-subs { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 10px 10px; }
.cat-subs a, .cat-chips a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); font-size: 13.5px; transition: .12s; }
.cat-subs a:hover, .cat-chips a:hover { border-color: var(--primary); color: var(--sky); }
.cat-subs .num { color: var(--muted); font-size: 12px; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 560px) { .cat-tree { grid-template-columns: 1fr; } }

/* ---------- offers page ---------- */
.offer-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.offer-card { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; min-height: 210px; padding: 24px; border-radius: var(--r-xl); color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(120deg, #0b1b3f, #1f3c88); background-size: cover; background-position: center; }
.offer-card .tag-line { align-self: flex-start; padding: 3px 10px; border-radius: 6px; background: rgba(255, 255, 255, .14); color: #e4ecff; font-size: 12.5px; font-weight: 600; }
.offer-card h2 { margin: 10px 0 4px; font-size: 22px; line-height: 1.35; color: #fff; }
.offer-card p { margin: 0; color: #d3dcf0; font-size: 15px; }
.offer-card .rule { margin-top: 8px; font-size: 14px; color: #e4ecff; }
.offer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.offer-foot small { color: #c9d3ea; }
.code-chip { display: inline-block; margin-top: 12px; padding: 4px 12px; border-radius: var(--r-sm); border: 1px dashed rgba(255, 255, 255, .55); color: #fff; font-size: 14px; letter-spacing: .5px; }

/* ---------- pop-up ad ---------- */
.popup-ad { padding: 0; overflow: hidden; }
.popup-ad img { width: 100%; max-height: 280px; object-fit: cover; }
.popup-body { padding: 22px 24px 24px; }
.popup-body h3 { margin: 0 0 6px; }
.popup-body p { margin: 0 0 16px; color: var(--text-2); white-space: pre-line; }
.popup-x { position: absolute; top: 12px; inset-inline-end: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(16, 24, 40, .55); color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 2; }

/* =====================================================================
   Public pages: landing & about
   ===================================================================== */
main.public { padding-top: 0; }
.lp-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--navy); color: #fff; }
.lp-hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 48px 48px;
  mask-image: radial-gradient(80% 90% at 70% 40%, #000, transparent 75%); -webkit-mask-image: radial-gradient(80% 90% at 70% 40%, #000, transparent 75%); }
.lp-hero::after { content: ""; position: absolute; z-index: -1; width: 720px; height: 720px; inset-inline-start: -200px; bottom: -420px; border-radius: 50%; background: radial-gradient(circle, rgba(58, 99, 214, .45), transparent 65%); }
.lp-hero .container { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; padding: 72px 0 80px; }
.lp-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); color: #c9d6f5; font-size: 13px; font-weight: 500; }
.lp-eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: #e3c77a; }
.lp-hero h1 { margin: 18px 0 14px; font-size: clamp(32px, 4.6vw, 52px); line-height: 1.2; letter-spacing: -.02em; font-weight: 700; }
.lp-hero h1 span { color: #e3c77a; }
.lp-hero .lead { margin: 0 0 30px; max-width: 560px; color: #c9d3ea; font-size: 17.5px; line-height: 1.8; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-cta .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .28); }
.lp-cta .btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.lp-trust { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 30px; color: #a3b0cc; font-size: 14px; }
.lp-trust span { display: inline-flex; align-items: center; gap: 7px; }
.lp-trust .icon { width: 16px; height: 16px; color: #7fd1a6; }
.lp-panel { position: relative; background: #fff; color: var(--text); border-radius: var(--r-xl); padding: 26px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55); }
[data-theme="dark"] .lp-panel { background: var(--surface); }
.lp-panel-head { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.lp-panel-head .logo { width: 46px; height: 46px; border-radius: 12px; background: var(--navy); display: grid; place-items: center; flex: none; }
.lp-panel-head .logo svg { width: 34px; fill: #fff; }
.lp-panel-head b { display: block; font-size: 16.5px; }
.lp-panel-head small { color: var(--muted); }
.lp-list { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 14px; }
.lp-list li { display: flex; gap: 12px; align-items: flex-start; }
.lp-list li > .icon { width: 34px; height: 34px; padding: 8px; border-radius: var(--r); background: var(--primary-soft); color: var(--sky); box-sizing: border-box; }
.lp-list b { display: block; font-size: 14.5px; }
.lp-list small { color: var(--muted); font-size: 13px; }
.lp-panel .lock { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 12.5px; justify-content: center; }
.lp-panel .lock .icon { width: 14px; height: 14px; }

.lp-section { padding: 72px 0 0; }
.lp-head { max-width: 640px; margin: 0 auto 36px; text-align: center; }
.lp-head .kicker { color: var(--sky); font-size: 13.5px; font-weight: 700; letter-spacing: .3px; }
.lp-head h2 { margin: 6px 0 8px; font-size: clamp(24px, 3vw, 32px); font-weight: 700; }
.lp-head p { margin: 0; color: var(--muted); font-size: 16px; }
.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.perk { display: grid; align-content: start; gap: 4px; padding: 24px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.perk .icon { width: 44px; height: 44px; padding: 11px; border-radius: 12px; background: var(--primary-soft); color: var(--sky); margin-bottom: 12px; box-sizing: border-box; }
.perk b { font-size: 16.5px; }
.perk small { color: var(--muted); font-size: 14.5px; line-height: 1.7; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.step { display: grid; gap: 4px; align-content: start; padding: 24px; }
.step > .num { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 700; margin-bottom: 10px; }
.step b { font-size: 16px; }
.lp-band { margin-top: 72px; padding: 40px 44px; border-radius: var(--r-xl); background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; position: relative; overflow: hidden; isolation: isolate; }
.lp-band::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .6;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 36px 36px;
  mask-image: linear-gradient(to right, #000, transparent 60%); -webkit-mask-image: linear-gradient(to right, #000, transparent 60%); }
.lp-band h2 { margin: 0 0 6px; font-size: 24px; }
.lp-band p { margin: 0; color: #c9d3ea; }
.lp-band .row { flex-wrap: wrap; }
.lp-band .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .28); }
.lp-band .btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.join { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 30px; padding: 26px 30px; }
.join h2 { margin: 0 0 4px; font-size: 20px; }
.join p { margin: 0; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.contact-grid .card { display: flex; align-items: center; gap: 12px; padding: 16px 18px; }
.contact-grid .icon { width: 38px; height: 38px; padding: 9px; border-radius: var(--r); background: var(--primary-soft); color: var(--sky); box-sizing: border-box; }
@media (max-width: 980px) {
  .lp-hero .container { grid-template-columns: 1fr; gap: 36px; padding: 44px 0 52px; }
  .perks, .steps { grid-template-columns: 1fr; }
  .lp-section { padding-top: 52px; }
  .lp-band { margin-top: 52px; padding: 28px 24px; }
}
/* about page reuses the hero look in a card */
.landing { display: grid; grid-template-columns: 1fr minmax(160px, 240px); align-items: center; gap: 30px; padding: clamp(26px, 5vw, 52px); border-radius: var(--r-xl); position: relative; overflow: hidden; isolation: isolate; }
.landing::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 40px 40px;
  mask-image: linear-gradient(to left, #000, transparent 70%); -webkit-mask-image: linear-gradient(to left, #000, transparent 70%); }
.landing .eyebrow { display: inline-block; padding: 3px 10px; border-radius: 6px; background: rgba(255, 255, 255, .12); font-size: 13px; color: #d5dcec; }
.landing h1 { margin: 12px 0 10px; font-size: clamp(28px, 4vw, 42px); }
.landing p { margin: 0; max-width: 640px; color: #c9d3ea; font-size: 16.5px; line-height: 1.85; }
.landing .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .3); }
.landing-mark svg { width: 100%; height: auto; fill: #fff; opacity: .9; }
@media (max-width: 980px) { .landing { grid-template-columns: 1fr; } .landing-mark { display: none; } }

/* =====================================================================
   Auth (login, register, pending, admin login)
   ===================================================================== */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 5fr) 7fr; background: var(--surface); }
.auth .side { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; padding: 40px 44px; background: var(--navy); color: #fff; }
.auth .side::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 44px 44px;
  mask-image: radial-gradient(90% 70% at 30% 30%, #000, transparent 80%); -webkit-mask-image: radial-gradient(90% 70% at 30% 30%, #000, transparent 80%); }
.auth .side .bigmark { position: absolute; width: 75%; left: -18%; bottom: -14%; opacity: .05; pointer-events: none; z-index: -1; }
.auth .side .bigmark svg { width: 100%; height: auto; fill: #fff; }
.auth .side .brand { color: #fff; }
.auth .side .brand small { color: #a3b0cc; }
.auth .side .brand .logo { background: rgba(255, 255, 255, .1); }
.auth .side h2 { font-size: 32px; line-height: 1.3; margin: 0 0 12px; max-width: 440px; }
.auth .side p { color: #c3cde6; max-width: 420px; margin: 0; font-size: 16px; line-height: 1.8; }
.auth .side .feats { display: grid; gap: 12px; margin-top: 28px; }
.auth .side .feat { display: flex; gap: 12px; align-items: center; color: #dfe6f7; font-size: 15px; }
.auth .side .feat i { width: 34px; height: 34px; border-radius: var(--r); display: grid; place-items: center; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); font-style: normal; flex: none; }
.auth .side .muted { color: #8c9abb; font-size: 12.5px; }
.auth .side .credit { color: #8c9abb; }
.auth .side .credit b { color: #c9d6f5; }
.auth .main { display: flex; flex-direction: column; padding: 28px clamp(20px, 6vw, 72px); }
.auth .main > .row:first-child .brand b { font-size: 15px; }
.auth .form { width: 100%; max-width: 440px; margin: auto; padding: 24px 0; }
.auth h1 { font-size: 30px; margin: 0 0 6px; font-weight: 700; }
.auth .lead { color: var(--muted); font-size: 15.5px; margin: 0 0 26px; }
.auth .btn-lg { --h: 48px; }
@media (max-width: 980px) { .auth { grid-template-columns: 1fr; } .auth .side { display: none; } .auth h1 { font-size: 26px; } }
.step-panel { display: none; }
.step-panel.on { display: block; animation: fade-up .3s var(--ease); }

/* ---------- footer & credit ---------- */
.site-footer { margin-top: 72px; padding: 44px 0 22px; border-top: 1px solid var(--line); background: var(--surface); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; }
.foot-grid h4 { margin: 0 0 12px; font-size: 14px; font-weight: 700; }
.foot-grid div > a:not(.brand), .foot-grid div > span { display: block; padding: 3px 0; color: var(--muted); font-size: 14px; }
.foot-grid div > a:not(.brand):hover { color: var(--text); }
.foot-grid p { margin: 14px 0 0; font-size: 14px; max-width: 380px; line-height: 1.8; }
.foot-end { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); }
.credit { color: var(--muted); font-size: 12.5px; transition: color .15s; }
.credit b { color: var(--text-2); font-weight: 700; }
.credit:hover { color: var(--text); }
.side-credit { display: block; text-align: center; white-space: nowrap; }
.side-credit .credit { font-size: 11px; }
@media (max-width: 980px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- theme toggle & sound toggle ---------- */
[data-theme-toggle] .icon:first-child { display: block; }
[data-theme-toggle] .icon:last-child { display: none; }
[data-theme="dark"] [data-theme-toggle] .icon:first-child { display: none; }
[data-theme="dark"] [data-theme-toggle] .icon:last-child { display: block; }
[data-sound-toggle] .icon:last-child { display: none; }
[data-sound-toggle].off .icon:first-child { display: none; }
[data-sound-toggle].off .icon:last-child { display: block; color: var(--muted); }

/* ---------- print ---------- */
.invoice { max-width: 860px; margin: 8px auto; }
.invoice .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.invoice .head svg { width: 72px; fill: currentColor; }
@media print {
  body { background: #fff; color: #000; }
  .topbar, .dock, .no-print, .site-footer { display: none !important; }
  .card, .invoice { background: #fff !important; border-color: #ddd !important; color: #000; box-shadow: none !important; }
  .muted { color: #555; }
}
