:root {
    --bg: #07060b;
    --surface: #100d16;
    --surface-2: #171022;
    --surface-3: #21112f;
    --text: #f7f3ff;
    --muted: #9993a8;
    --brand: #a42cff;
    --brand-2: #c13cff;
    --border: rgba(174, 75, 255, .26);
    --success: #38d996;
    --danger: #ff5d73;
    --radius: 18px;
    --font-display: "Orbitron", sans-serif;
    --font-body: "Inter", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 78% 5%, color-mix(in srgb, var(--brand) 13%, transparent), transparent 32rem),
        var(--bg);
    font-family: var(--font-body);
    line-height: 1.55;
}
a { color: inherit; }
img { max-width: 100%; }
.container { width: min(1320px, calc(100% - 48px)); margin-inline: auto; }
.display { font-family: var(--font-display); letter-spacing: -.035em; }
.muted { color: var(--muted); }
.brand-text { color: var(--brand-2); text-shadow: 0 0 28px color-mix(in srgb, var(--brand) 55%, transparent); }

.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    border-bottom: 1px solid rgba(255,255,255,.04);
    backdrop-filter: blur(18px);
}
.nav { height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 21px; }
.logo img { width: 168px; height: 52px; object-fit: contain; object-position: left center; }
.logo-mark { color: var(--brand); font-size: 28px; filter: drop-shadow(0 0 10px var(--brand)); }
.nav-links, .nav-actions { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--muted); text-decoration: none; font-family: var(--font-display); font-size: 13px; }
.nav-links a:hover { color: var(--text); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    min-height: 46px; padding: 0 24px; border: 1px solid transparent; border-radius: 10px;
    text-decoration: none; cursor: pointer; font: 700 12px/1 var(--font-display); text-transform: uppercase;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: white; background: linear-gradient(110deg, var(--brand), var(--brand-2)); box-shadow: 0 12px 35px color-mix(in srgb, var(--brand) 35%, transparent); }
.btn-outline { color: var(--text); border-color: var(--border); background: rgba(255,255,255,.02); }
.btn-danger { color: white; background: rgba(255,93,115,.16); border-color: rgba(255,93,115,.4); }
.btn-sm { min-height: 36px; padding-inline: 15px; font-size: 10px; }

.hero { min-height: 760px; display: grid; align-items: center; position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 35%; background: linear-gradient(transparent, color-mix(in srgb, var(--brand) 11%, transparent)); pointer-events: none; }
.hero-bg { position: absolute; inset: 0; background-position: center; background-size: cover; opacity: .92; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,6,11,.98) 0%, rgba(7,6,11,.74) 44%, rgba(7,6,11,.08) 77%); }
.hero-content { position: relative; z-index: 2; width: min(620px, 92%); padding-block: 90px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--brand-2); border: 1px solid var(--border); background: color-mix(in srgb, var(--brand) 10%, transparent); border-radius: 999px; padding: 7px 14px; font: 500 12px var(--font-display); }
.hero h1 { margin: 30px 0 20px; font: 800 clamp(48px, 6.4vw, 88px)/.98 var(--font-display); }
.hero p { color: var(--muted); max-width: 560px; font-size: 18px; margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.section { padding: 92px 0; }
.section-sm { padding: 54px 0; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 54px; }
.section-head h1, .section-head h2 { margin: 16px 0 10px; font: 700 clamp(34px, 4vw, 55px)/1.1 var(--font-display); }
.section-head p { color: var(--muted); }
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card { border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(145deg, color-mix(in srgb, var(--brand) 11%, var(--surface)), var(--surface)); overflow: hidden; }
.feature-card { padding: 32px; min-height: 220px; }
.feature-icon { width: 62px; height: 62px; display: grid; place-items: center; color: var(--brand-2); border: 1px solid var(--border); border-radius: 18px; background: color-mix(in srgb, var(--brand) 12%, transparent); font-size: 24px; }
.feature-card h3 { margin: 24px 0 10px; font: 600 18px var(--font-display); }
.feature-card p { color: var(--muted); margin: 0; }

.product-card { padding: 20px; display: flex; flex-direction: column; min-height: 100%; }
.product-image { aspect-ratio: 1; width: 100%; object-fit: cover; border-radius: 14px; background: #030205; }
.product-meta { padding-top: 20px; display: flex; flex-direction: column; flex: 1; }
.product-card h3 { margin: 0 0 10px; font: 600 16px/1.4 var(--font-display); text-transform: uppercase; }
.price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; color: var(--brand-2); font: 700 23px var(--font-display); }
.price-old { color: var(--muted); font: 400 12px var(--font-body); text-decoration: line-through; }
.product-meta .btn { margin-top: auto; width: 100%; }
.stock { font-size: 12px; color: var(--success); }

.catalog-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 28px; }
.search { display: flex; width: min(450px, 100%); }
.input, .select, .textarea {
    width: 100%; color: var(--text); background: #0d0912; border: 1px solid var(--border); border-radius: 10px;
    padding: 13px 15px; font: 14px var(--font-body); outline: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.textarea { min-height: 130px; resize: vertical; }
.label { display: block; margin-bottom: 8px; font-weight: 600; }
.form-group { margin-bottom: 20px; }

.product-detail { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: start; padding: 56px 0 90px; }
.product-gallery { padding: 16px; }
.product-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: #020203; }
.product-info { padding-top: 18px; }
.rating { color: var(--brand-2); letter-spacing: 6px; }
.product-info h1 { margin: 16px 0; font: 700 clamp(30px, 4vw, 48px)/1.15 var(--font-display); text-transform: uppercase; }
.flavors { display: flex; flex-wrap: wrap; gap: 12px; margin: 15px 0 25px; }
.flavor input { position: absolute; opacity: 0; pointer-events: none; }
.flavor span { display: block; min-width: 136px; padding: 14px 18px; color: var(--text); text-align: center; border: 1px solid var(--border); background: var(--surface-2); border-radius: 12px; cursor: pointer; }
.flavor small { display: block; margin-top: 4px; color: var(--muted); }
.flavor input:checked + span { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 22%, var(--surface-2)); box-shadow: 0 0 25px color-mix(in srgb, var(--brand) 22%, transparent); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: 16px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.07); vertical-align: middle; }
th { color: var(--muted); font: 600 11px var(--font-display); text-transform: uppercase; }
.cart-product { display: flex; align-items: center; gap: 14px; min-width: 270px; }
.cart-product img { width: 68px; height: 68px; object-fit: cover; border-radius: 10px; }
.summary { padding: 28px; }
.summary-row { display: flex; justify-content: space-between; padding: 11px 0; }

.store-card { position: relative; padding: 24px; text-decoration: none; transition: transform .25s, border-color .25s; }
.store-card:hover { transform: translateY(-7px); border-color: var(--brand); }
.store-cover { height: 180px; margin: -24px -24px 22px; background-size: cover; background-position: center; border-bottom: 1px solid var(--border); }
.store-logo { height: 56px; width: 180px; object-fit: contain; object-position: left center; }
.store-card h3 { font: 700 22px var(--font-display); margin: 16px 0 8px; }
.store-stats { color: var(--brand-2); font-size: 12px; font-weight: 700; }

.flash { position: fixed; z-index: 80; top: 92px; right: 24px; max-width: 420px; padding: 15px 18px; border-radius: 12px; border: 1px solid var(--border); background: #171020; box-shadow: 0 18px 50px rgba(0,0,0,.4); }
.flash-success { border-color: rgba(56,217,150,.45); }
.flash-error { border-color: rgba(255,93,115,.5); }

.site-footer { border-top: 1px solid var(--border); background: #0c0b12; padding: 62px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr .7fr .8fr; gap: 60px; }
.footer-grid h4 { font: 600 17px var(--font-display); }
.footer-links { display: grid; gap: 10px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.copyright { margin-top: 45px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.06); color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; }
.age-badge { color: #ff656f; border: 1px solid rgba(255,80,94,.35); background: rgba(255,50,70,.08); padding: 7px 12px; border-radius: 999px; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 32px; background: radial-gradient(circle at 50% 12%, rgba(145,35,255,.24), transparent 36rem), var(--bg); }
.auth-card { width: min(450px, 100%); padding: 34px; }
.auth-brand { justify-content: center; width: 100%; margin-bottom: 18px; }
.auth-card h1 { text-align: center; font: 600 22px var(--font-display); margin: 8px 0; }
.auth-card > p { text-align: center; color: var(--muted); margin: 0 0 28px; }
.auth-card .btn { width: 100%; }
.auth-switch { text-align: center; color: var(--muted); margin: 20px 0 0; font-size: 13px; }
.auth-switch a { color: var(--brand-2); }

.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 20px; background: #0b0910; border-right: 1px solid var(--border); }
.admin-menu { display: grid; gap: 7px; margin-top: 32px; }
.admin-menu a { padding: 12px 14px; border-radius: 9px; text-decoration: none; color: var(--muted); }
.admin-menu a:hover, .admin-menu a.active { color: white; background: color-mix(in srgb, var(--brand) 18%, transparent); }
.admin-menu form { margin: 0; }
.admin-menu-action { width: 100%; padding: 12px 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); text-align: left; font: inherit; cursor: pointer; }
.admin-menu-action:hover { color: #fff; background: color-mix(in srgb, #ff4664 15%, transparent); }
.admin-main { padding: 38px; min-width: 0; }
.page-title { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 28px; }
.page-title h1 { margin: 0; font: 700 clamp(26px, 3vw, 38px) var(--font-display); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 32px; }
.stat { padding: 22px; }
.stat strong { display: block; margin-top: 8px; font: 700 26px var(--font-display); color: var(--brand-2); }
.status { display: inline-flex; padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(255,255,255,.08); }
.status-paid, .status-delivered, .status-completed { color: var(--success); background: rgba(56,217,150,.1); }
.status-pending { color: #ffc557; background: rgba(255,197,87,.1); }

.age-gate { position: fixed; z-index: 100; inset: 0; display: none; place-items: center; padding: 24px; background: rgba(3,2,5,.9); backdrop-filter: blur(12px); }
.age-gate.show { display: grid; }
.age-card { width: min(480px, 100%); padding: 38px; text-align: center; }
.age-card strong { display: block; font: 800 54px var(--font-display); color: var(--brand-2); }
.age-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }

@media (max-width: 1050px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3, .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-links { display: none; }
    .product-detail { grid-template-columns: 1fr; }
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { position: static; height: auto; }
    .admin-menu { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 680px) {
    .container { width: min(100% - 28px, 1320px); }
    .nav { height: 68px; }
    .logo img { width: 128px; height: 44px; }
    .nav-actions .btn-outline { display: none; }
    .btn { padding-inline: 16px; }
    .hero { min-height: 670px; }
    .hero-bg { background-position: 66% center; opacity: .55; }
    .hero-bg::after { background: linear-gradient(90deg, rgba(7,6,11,.98), rgba(7,6,11,.66)); }
    .hero h1 { font-size: clamp(43px, 14vw, 64px); }
    .section { padding: 65px 0; }
    .grid-4, .grid-3, .stat-grid, .footer-grid { grid-template-columns: 1fr; }
    .catalog-toolbar, .page-title, .copyright { align-items: stretch; flex-direction: column; }
    .admin-main { padding: 24px 14px; }
    .admin-menu { grid-template-columns: repeat(2, 1fr); }
    .product-detail { gap: 20px; padding-top: 28px; }
    .age-actions { grid-template-columns: 1fr; }
}
