/* Groshi — общие стили для всех страниц */
:root {
    --text: #fff;
    --muted: #94a3b8;
    --blue: #1d4ed8;
    --mid: #2563eb;
    --cyan: #22d3ee;
    --card: #1e2028;
    --line: #2e323f;
    --panel: rgba(20, 23, 33, .88);
    --ov1: .55;               /* затемнение фона сверху */
    --ov2: .72;               /* затемнение фона снизу */
    --idle-opacity: .55;      /* прозрачность кнопок «Каталог/Регистрация» на главной (было .3) */
    --grad: linear-gradient(90deg, var(--cyan) 0%, var(--mid) 34%, var(--blue) 50%, var(--mid) 66%, var(--cyan) 100%);
    --grad-diag: linear-gradient(110deg, var(--mid), var(--cyan));
    color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: #0d0e12;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}
/* Базовый градиент фона; кубики и затемнение — ниже, блок .cubes */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background: radial-gradient(ellipse at 15% 0%, #2a2540 0%, transparent 55%), linear-gradient(#171a2b, #0d0e12);
}
.page-home { --ov1: .15; --ov2: .32; }

a, button, select, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Фон: кубики, нарисованные на CSS ---------- */
.cubes { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.cubes::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(8, 10, 18, var(--ov1)), rgba(8, 10, 18, var(--ov2))); }
.cubes i { position: absolute; display: block; width: clamp(34px, calc(var(--s) * 1vmin), 250px); aspect-ratio: .866;
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    background: linear-gradient(135deg, rgba(255, 255, 255, .16), transparent 55%),
                conic-gradient(from -60deg, var(--t) 0 120deg, var(--r) 120deg 240deg, var(--l) 240deg 360deg);
    transform: rotate(var(--a)); }
.cubes i:nth-child(2),.cubes i:nth-child(3),.cubes i:nth-child(4),.cubes i:nth-child(8),.cubes i:nth-child(14),.cubes i:nth-child(15),.cubes i:nth-child(21),.cubes i:nth-child(22),.cubes i:nth-child(24),.cubes i:nth-child(25) { --t: #7ee8fa; --r: #26b9d6; --l: #0f8caf; }
.cubes i:nth-child(1),.cubes i:nth-child(6),.cubes i:nth-child(16),.cubes i:nth-child(18) { --t: #4a8dff; --r: #2563eb; --l: #1a45b5; }
.cubes i:nth-child(5),.cubes i:nth-child(7),.cubes i:nth-child(9),.cubes i:nth-child(10),.cubes i:nth-child(11),.cubes i:nth-child(12),.cubes i:nth-child(13),.cubes i:nth-child(17),.cubes i:nth-child(19),.cubes i:nth-child(23),.cubes i:nth-child(26) { --t: #2749b8; --r: #1c3a94; --l: #142a6b; }
.cubes i:nth-child(20) { --t: #7377f5; --r: #4f46e5; --l: #3a33b0; }
.cubes i:nth-child(1){left:53.5%;top:32.0%;--s:19;--a:-17deg;opacity:1}
.cubes i:nth-child(2){left:-1.1%;top:-0.6%;--s:14;--a:12deg;opacity:1}
.cubes i:nth-child(3){left:79.7%;top:4.9%;--s:14;--a:-14deg;opacity:1}
.cubes i:nth-child(4){left:43.1%;top:13.7%;--s:12;--a:23deg;opacity:1}
.cubes i:nth-child(5){left:66.5%;top:67.1%;--s:16;--a:-24deg;opacity:1}
.cubes i:nth-child(6){left:50.1%;top:74.2%;--s:10;--a:7deg;opacity:0.8}
.cubes i:nth-child(7){left:84.4%;top:89.1%;--s:11;--a:29deg;opacity:0.8}
.cubes i:nth-child(8){left:24.2%;top:67.6%;--s:7;--a:4deg;opacity:0.55}
.cubes i:nth-child(9){left:13.8%;top:61.0%;--s:12;--a:-3deg;opacity:1}
.cubes i:nth-child(10){left:93.3%;top:64.6%;--s:11;--a:20deg;opacity:0.8}
.cubes i:nth-child(11){left:66.2%;top:-2.4%;--s:6;--a:-8deg;opacity:0.55}
.cubes i:nth-child(12){left:39.7%;top:53.0%;--s:12;--a:-28deg;opacity:1}
.cubes i:nth-child(13){left:9.4%;top:93.9%;--s:16;--a:31deg;opacity:1}
.cubes i:nth-child(14){left:20.8%;top:-1.1%;--s:9;--a:-19deg;opacity:0.8}
.cubes i:nth-child(15){left:22.1%;top:30.7%;--s:6;--a:10deg;opacity:0.55}
.cubes i:nth-child(16){left:78.8%;top:55.6%;--s:11;--a:-21deg;opacity:0.8}
.cubes i:nth-child(17){left:39.7%;top:97.1%;--s:11;--a:-7deg;opacity:0.8}
.cubes i:nth-child(18){left:39.3%;top:77.8%;--s:6;--a:13deg;opacity:0.55}
.cubes i:nth-child(19){left:99.8%;top:29.8%;--s:14;--a:33deg;opacity:1}
.cubes i:nth-child(20){left:64.2%;top:13.4%;--s:6;--a:36deg;opacity:0.55}
.cubes i:nth-child(21){left:8.0%;top:22.0%;--s:11;--a:-39deg;opacity:0.8}
.cubes i:nth-child(22){left:76.0%;top:29.1%;--s:7;--a:-17deg;opacity:0.55}
.cubes i:nth-child(23){left:95.2%;top:98.0%;--s:8;--a:-26deg;opacity:0.8}
.cubes i:nth-child(24){left:31.8%;top:25.1%;--s:6;--a:5deg;opacity:0.55}
.cubes i:nth-child(25){left:0.7%;top:40.2%;--s:9;--a:18deg;opacity:0.8}
.cubes i:nth-child(26){left:29.9%;top:97.2%;--s:6;--a:-12deg;opacity:0.55}
@media (max-width: 700px) { .cubes i:nth-child(n+16) { display: none; } }

/* ---------- Шапка ---------- */
.header {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 20px 40px;
    border-bottom: 1px solid var(--line);
    background: rgba(10, 12, 18, .5);
}
.brand-group { display: flex; align-items: center; gap: 22px; min-width: 0; }
.logo { color: var(--text); text-decoration: none; font-size: 28px; font-weight: 850; letter-spacing: -.8px; white-space: nowrap; }
.btn-marketplace {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 11px 18px; border: 1px solid transparent; border-radius: 10px;
    background: linear-gradient(rgba(13, 17, 29, .92), rgba(13, 17, 29, .92)) padding-box,
                linear-gradient(110deg, var(--blue), var(--cyan)) border-box;
    color: #eafaff; text-decoration: none; font-size: 15px; font-weight: 750; white-space: nowrap;
    transition: transform .2s, box-shadow .2s;
}
.btn-marketplace:hover { transform: translateY(-1px); box-shadow: 0 0 24px rgba(34, 211, 238, .2); }
.back-link { color: var(--muted); text-decoration: none; font-weight: 650; }
.back-link:hover { color: #fff; }

/* Выпадающее меню у логотипа (мост padding-top, чтобы курсор не «терял» меню) */
.dropdown { position: relative; display: inline-flex; }
.dropdown-menu { display: none; position: absolute; top: 100%; left: 0; padding-top: 14px; min-width: 200px; z-index: 10; }
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-inner { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); overflow: hidden; }
.dropdown-inner a, .dropdown-inner button {
    display: block; width: 100%; padding: 14px 20px; border: 0; background: none;
    color: var(--muted); text-align: left; text-decoration: none; font-weight: 500;
    transition: background .2s, color .2s;
}
.dropdown-inner a:hover, .dropdown-inner button:hover { background: var(--line); color: var(--text); }

.nav-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.lang-select {
    background: rgba(13, 14, 18, .7); color: var(--text); border: 1px solid var(--line);
    padding: 10px 14px; border-radius: 8px; font-size: 14px; font-weight: 600;
}
.lang-select option { background: var(--card); color: var(--text); }
.btn-login { color: var(--text); text-decoration: none; font-weight: 650; border: 2px solid #fff; padding: 10px 22px; border-radius: 8px; white-space: nowrap; transition: background .2s; }
.btn-login:hover { background: rgba(255, 255, 255, .1); }
.btn-balance {
    border: 0; background: var(--grad); color: #fff; padding: 12px 20px; border-radius: 8px;
    font-weight: 750; white-space: nowrap; box-shadow: 0 6px 22px rgba(37, 99, 235, .2);
    transition: filter .2s, transform .2s;
}
.btn-balance:hover { filter: brightness(1.12); transform: translateY(-1px); }

/* ---------- Главная ---------- */
.main-hero { flex: 1; display: flex; justify-content: center; align-items: center; padding: 48px 24px 56px; }
.search-container {
    display: flex; flex-direction: column; align-items: stretch;
    width: min(650px, 100%);
    border: 2px solid transparent; border-radius: 999px; overflow: hidden;
    background: linear-gradient(rgba(13, 17, 29, .96), rgba(13, 17, 29, .96)) padding-box, var(--grad) border-box;
    box-shadow: 0 0 30px rgba(37, 99, 235, .28);
    transition: box-shadow .25s;
}
.search-container:hover, .search-container:focus-within { box-shadow: 0 0 40px rgba(37, 99, 235, .45), 0 0 64px rgba(34, 211, 238, .2); }
.hero-action {
    display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; padding: 15px 28px;
    background: var(--grad); color: #fff; text-decoration: none; font-size: 18px; font-weight: 800;
    opacity: var(--idle-opacity); transition: opacity .25s, filter .25s;
}
.hero-action:hover, .hero-action:focus-visible { opacity: 1; filter: brightness(1.12); outline-offset: -4px; }
.search-box { position: relative; width: 100%; }
.search-input { display: block; width: 100%; padding: 22px 140px 22px 28px; background: #1e2028; border: 0; color: var(--text); font-size: 18px; outline: none; }
.search-input:focus { box-shadow: inset 0 0 0 2px rgba(34, 211, 238, .48); }
.search-input::placeholder { color: #8b96aa; }
.search-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: var(--grad); color: #fff; padding: 14px 30px; border-radius: 99px; font-weight: 800; font-size: 16px; transition: filter .2s; }
.search-btn:hover { filter: brightness(1.12); }
.footer { padding: 18px; text-align: center; }
.link-btn { border: 0; background: none; color: var(--muted); font-size: 14px; font-weight: 600; }
.link-btn:hover { color: #fff; }

/* ---------- Каталог ---------- */
.catalog { width: 100%; max-width: 1000px; margin: 0 auto; padding: 72px 24px; }
.intro { text-align: center; margin-bottom: 32px; }
.intro h1 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 12px; }
.intro p { color: var(--muted); line-height: 1.6; }
.search { display: flex; gap: 10px; max-width: 650px; margin: 24px auto 38px; }
.search input { flex: 1; min-width: 0; padding: 15px 18px; color: #fff; background: rgba(20, 23, 33, .92); border: 1px solid #3b4d73; border-radius: 12px; font-size: 16px; outline: none; }
.search input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .1); }
.search button { padding: 14px 22px; border: 0; border-radius: 12px; color: #fff; font-size: 15px; font-weight: 800; background: var(--grad); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tile { min-height: 150px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; padding: 24px; border: 1px solid rgba(34, 211, 238, .25); border-radius: 20px; background: var(--panel); box-shadow: 0 16px 45px rgba(0, 0, 0, .18); text-align: center; }
.tile .emoji { font-size: 32px; }
.tile h2 { font-size: 20px; }
.tile p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.notice { text-align: center; color: var(--muted); margin-top: 30px; font-size: 13px; }

/* ---------- Вход / регистрация ---------- */
.auth { flex: 1; display: flex; align-items: center; justify-content: center; padding: 28px 18px; }
.auth-card {
    width: 100%; max-width: 440px; padding: 36px;
    border: 1px solid rgba(148, 163, 184, .22); border-radius: 22px;
    background: var(--panel); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .32);
}
.auth-card h1 { font-size: 30px; margin-bottom: 10px; }
.subtitle { color: var(--muted); margin-bottom: 28px; line-height: 1.5; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.field input { width: 100%; padding: 14px 15px; border: 1px solid var(--line); border-radius: 10px; color: #fff; background: rgba(10, 12, 18, .75); outline: none; font-size: 16px; }
.field input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .12); }
.field input:user-invalid { border-color: #f87171; }
.field input::placeholder { color: #64748b; }
.submit-btn { width: 100%; margin-top: 8px; padding: 14px 18px; border: 0; border-radius: 10px; color: #07111b; background: var(--grad-diag); font-size: 16px; font-weight: 800; transition: filter .2s, transform .2s; }
.submit-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.alt-link { display: block; width: 100%; margin-top: 12px; padding: 13px 18px; border: 1px solid rgba(34, 211, 238, .7); border-radius: 10px; color: #e0f2fe; background: rgba(37, 99, 235, .08); text-align: center; text-decoration: none; font-weight: 700; transition: background .2s, transform .2s; }
.alt-link:hover { background: rgba(34, 211, 238, .13); transform: translateY(-1px); }
.switch-link { display: block; margin-top: 18px; color: #67e8f9; text-align: center; text-decoration: none; font-weight: 600; }
.switch-link:hover { color: #fff; }
.note { margin-top: 18px; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; }

/* ---------- Уведомление вместо alert() ---------- */
.toast {
    position: fixed; left: 50%; bottom: 28px; z-index: 50; max-width: min(92vw, 460px);
    padding: 14px 20px; border: 1px solid rgba(34, 211, 238, .4); border-radius: 12px;
    background: rgba(13, 17, 29, .96); color: #eafaff; font-size: 14px; line-height: 1.5; text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
    opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
    .header { padding: 18px 24px; gap: 18px; }
    .brand-group { gap: 14px; }
    .nav-actions { gap: 10px; }
    .btn-balance { padding: 11px 15px; }
}
@media (max-width: 700px) {
    .header { padding: 16px 18px; flex-wrap: wrap; }
    .brand-group { width: 100%; justify-content: space-between; }
    .logo { font-size: 26px; }
    .nav-actions { width: 100%; justify-content: space-between; flex-wrap: wrap; }
    .lang-select { flex: 1; min-width: 120px; }
    .btn-login, .btn-balance { text-align: center; flex: 1; }
    .main-hero { padding: 34px 18px 44px; }
    .hero-action { min-height: 50px; font-size: 16px; padding: 13px 20px; }
    .search-input { padding: 17px 100px 17px 19px; font-size: 16px; }
    .search-btn { right: 6px; padding: 12px 16px; font-size: 14px; }
    .catalog { padding: 48px 18px; }
    .grid { grid-template-columns: 1fr; }
    .search { flex-direction: column; }
    .btn-marketplace { padding: 9px 12px; font-size: 13px; }
    .auth-card { padding: 26px 22px; }
    .auth-card h1 { font-size: 26px; }
}
@media (max-width: 420px) {
    .brand-group { gap: 10px; }
    .nav-actions { gap: 8px; }
    .btn-login, .btn-balance { padding: 10px 12px; font-size: 13px; }
    .lang-select { padding: 10px 8px; font-size: 13px; }
    .search-input { padding-left: 16px; padding-right: 86px; }
    .search-btn { padding: 12px 13px; }
}
/* На сенсорных экранах нет hover — кнопки сразу полностью яркие */
@media (hover: none) { .hero-action { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Сторінка «Нічого не знайдено» ---------- */
.empty { max-width: 560px; margin: 0 auto; padding: 40px 32px; text-align: center; border: 1px solid rgba(34, 211, 238, .25); border-radius: 22px; background: var(--panel); box-shadow: 0 16px 45px rgba(0, 0, 0, .18); }
.empty[hidden] { display: none; }
.empty .emoji { font-size: 40px; margin-bottom: 12px; }
.empty h1 { font-size: clamp(26px, 4vw, 34px); margin-bottom: 12px; }
.empty .lead { color: var(--text); line-height: 1.6; overflow-wrap: anywhere; }
.tips { margin: 20px auto 0; padding-left: 20px; max-width: 360px; text-align: left; color: var(--muted); line-height: 1.7; font-size: 14px; }
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.btn-cta, .btn-ghost { display: inline-flex; align-items: center; justify-content: center; padding: 13px 22px; border-radius: 10px; text-decoration: none; font-weight: 800; transition: filter .2s, transform .2s, background .2s; }
.btn-cta { color: #07111b; background: var(--grad-diag); }
.btn-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { color: #e0f2fe; border: 1px solid rgba(34, 211, 238, .7); background: rgba(37, 99, 235, .08); }
.btn-ghost:hover { background: rgba(34, 211, 238, .13); transform: translateY(-1px); }
@media (max-width: 700px) { .empty { padding: 30px 20px; } .actions { flex-direction: column; } }

/* ---------- Акаунти: повідомлення, чекбокси, кабінет ---------- */
.form-msg { margin-bottom: 18px; padding: 12px 14px; border-radius: 10px; font-size: 14px; line-height: 1.5; }
.form-msg[hidden], .auth-card [hidden] { display: none; }
.form-msg.error { border: 1px solid rgba(248, 113, 113, .5); background: rgba(127, 29, 29, .3); color: #fecaca; }
.form-msg.success { border: 1px solid rgba(74, 222, 128, .45); background: rgba(20, 83, 45, .35); color: #bbf7d0; }
.form-msg.info { border: 1px solid rgba(34, 211, 238, .4); background: rgba(8, 47, 73, .45); color: #cffafe; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.check input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--mid); }
.check a, .link-row a { color: #67e8f9; }
.link-row { display: flex; justify-content: flex-end; margin: -6px 0 14px; font-size: 14px; }
.submit-btn:disabled, .btn-danger:disabled { opacity: .6; cursor: wait; transform: none; }
.acc-list { display: grid; gap: 14px; margin-bottom: 22px; }
.acc-list dt { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.acc-list dd { font-size: 16px; overflow-wrap: anywhere; }
.acc-actions { display: grid; gap: 10px; }
.acc-actions button { width: 100%; padding: 13px 18px; border-radius: 10px; font-weight: 700; color: #e0f2fe; border: 1px solid rgba(34, 211, 238, .7); background: rgba(37, 99, 235, .08); transition: background .2s; }
.acc-actions button:hover { background: rgba(34, 211, 238, .13); }
.danger-zone { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.danger-zone h2 { font-size: 16px; margin-bottom: 8px; }
.danger-zone p { color: var(--muted); font-size: 13px; line-height: 1.5; margin-bottom: 14px; }
.btn-danger { width: 100%; padding: 13px 18px; border-radius: 10px; font-weight: 700; color: #fecaca; border: 1px solid rgba(248, 113, 113, .6); background: rgba(127, 29, 29, .2); }
.btn-danger:hover { background: rgba(127, 29, 29, .4); }

/* ---------- Футер ---------- */
.footer { display: flex; justify-content: center; gap: 8px 22px; flex-wrap: wrap; }
.footer a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.footer a:hover { color: #fff; }
.catalog { flex: 1; }

/* ---------- Юридичні сторінки ---------- */
.legal { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 56px 24px; line-height: 1.7; }
.legal h1 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 8px; }
.legal h2 { font-size: 19px; margin: 28px 0 8px; }
.legal p, .legal li { color: #cbd5e1; font-size: 15px; }
.legal ul { padding-left: 22px; margin-top: 6px; }
.legal .updated { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.draft-banner { margin: 18px 0 8px; padding: 12px 14px; border: 1px solid rgba(250, 204, 21, .5); border-radius: 10px; background: rgba(113, 63, 18, .3); color: #fde68a; font-size: 14px; line-height: 1.5; }
html[lang="uk"] .legal [lang="en"], html[lang="en"] .legal [lang="uk"] { display: none; }


/* ---------- Динамічний каталог товарів ---------- */
.category-section, .products-section { margin-top: 34px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.section-heading h2, .products-heading { font-size: 22px; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.category-tile {
    min-height: 112px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    padding: 18px; border: 1px solid rgba(34, 211, 238, .22); border-radius: 16px;
    background: var(--panel); color: var(--text); cursor: pointer; text-align: center;
    transition: border-color .2s, background .2s, transform .2s;
}
.category-tile:hover { transform: translateY(-2px); border-color: rgba(34, 211, 238, .65); }
.category-tile.is-active, .category-all.is-active {
    border-color: var(--cyan); background: rgba(37, 99, 235, .18);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, .12);
}
.category-emoji { font-size: 30px; line-height: 1; }
.category-name { font-size: 15px; font-weight: 750; overflow-wrap: anywhere; }
.category-all {
    padding: 9px 16px; border: 1px solid var(--line); border-radius: 10px;
    background: rgba(20, 23, 33, .92); color: var(--text); font-weight: 700; cursor: pointer;
}
.category-all:hover { border-color: var(--cyan); }
.products-heading { margin-bottom: 18px; }
.catalog-status { margin: 18px 0; color: var(--muted); text-align: center; line-height: 1.6; }
.catalog-status[hidden] { display: none; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.product-card {
    min-width: 0; overflow: hidden; display: flex; flex-direction: column;
    border: 1px solid rgba(148, 163, 184, .2); border-radius: 18px;
    background: rgba(20, 23, 33, .94); box-shadow: 0 16px 40px rgba(0, 0, 0, .2);
}
.product-media {
    aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center;
    overflow: hidden; background: rgba(10, 12, 18, .72);
}
.product-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.product-placeholder { color: #e0f2fe; font-size: 54px; }
.product-body { flex: 1; display: flex; flex-direction: column; gap: 9px; padding: 17px; }
.product-title { font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
.product-platform { color: #67e8f9; font-size: 12px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.product-description { flex: 1; color: var(--muted); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.product-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.product-price { font-size: 18px; white-space: nowrap; }
.product-buy {
    padding: 10px 15px; border: 0; border-radius: 10px; color: #fff;
    background: var(--grad); font-size: 14px; font-weight: 800; white-space: nowrap;
}
.product-buy:hover { filter: brightness(1.12); }
.product-buy:disabled { opacity: .6; cursor: wait; }
@media (max-width: 900px) {
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .category-tile { min-height: 100px; padding: 14px 10px; }
    .product-grid { grid-template-columns: 1fr; gap: 14px; }
    .product-card { display: grid; grid-template-columns: minmax(105px, 34%) minmax(0, 1fr); }
    .product-media { aspect-ratio: auto; min-height: 150px; }
    .product-placeholder { font-size: 38px; }
    .product-body { padding: 13px; gap: 7px; }
    .product-title { font-size: 15px; }
    .product-description { font-size: 12px; }
    .product-footer { align-items: flex-start; flex-direction: column; }
    .product-price { font-size: 16px; }
    .product-buy { width: 100%; }
}
@media (max-width: 380px) {
    .product-card { grid-template-columns: 1fr; }
    .product-media { aspect-ratio: 16 / 9; min-height: 0; }
    .product-footer { flex-direction: row; align-items: center; }
    .product-buy { width: auto; }
}

/* ---------- Кабінет: баланс та історія ---------- */
.auth-card.acc-card { max-width: 720px; }
.acc-balance { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 18px 20px; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 14px; background: rgba(37, 99, 235, .08); }
.acc-balance span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.acc-balance strong { font-size: 26px; }
.acc-balance button { padding: 11px 18px; border-radius: 10px; font-weight: 700; color: #fff; border: 0; background: linear-gradient(135deg, var(--mid), var(--cyan)); }
.acc-section { margin-bottom: 22px; }
.acc-section h2 { font-size: 17px; margin-bottom: 10px; }
.acc-empty { color: var(--muted); font-size: 14px; padding: 14px 0; }
.acc-err { color: #fca5a5; font-size: 14px; }
.acc-rows { list-style: none; display: grid; gap: 8px; }
.acc-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(13, 14, 18, .45); }
.acc-row-title { font-weight: 650; overflow-wrap: anywhere; }
.acc-row-sum { font-weight: 750; text-align: right; white-space: nowrap; }
.acc-row-sum.plus { color: #4ade80; }
.acc-row-meta { color: var(--muted); font-size: 13px; }
.acc-badge { justify-self: end; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(148, 163, 184, .16); color: #cbd5e1; }
.acc-badge.ok { background: rgba(34, 197, 94, .16); color: #4ade80; }
.acc-badge.wait { background: rgba(234, 179, 8, .16); color: #facc15; }
.acc-badge.bad { background: rgba(239, 68, 68, .16); color: #f87171; }
