:root {
    --bg: #08090d;
    --panel: #12151c;
    --panel-2: #181c25;
    --border: rgba(255,255,255,.09);
    --border-strong: rgba(255,255,255,.16);
    --text: #f6f7fb;
    --muted: #a5adbb;
    --muted-2: #707989;
    --red: #ef3843;
    --red-dark: #b91924;
    --gold: #f0bd50;
    --green: #2ed47a;
    --blue: #58a6ff;
    --shadow: 0 24px 70px rgba(0,0,0,.38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 12% 0%, rgba(239,56,67,.14), transparent 27%),
        radial-gradient(circle at 90% 5%, rgba(240,189,80,.07), transparent 24%),
        linear-gradient(180deg, #08090d, #0d1016 52%, #08090d);
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; }
.container { width: min(1160px, calc(100% - 36px)); margin-inline: auto; }

.shop-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border);
    background: rgba(8,9,13,.88);
    backdrop-filter: blur(16px);
}
.shop-nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.shop-brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.shop-brand img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 8px 18px rgba(255,255,255,.06)); }
.shop-brand strong { display: block; font-size: 16px; }
.shop-brand small { display: block; margin-top: 3px; color: var(--muted-2); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.shop-links { display: flex; align-items: center; gap: 20px; }
.shop-links a { color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 850; }
.shop-links a:hover { color: #fff; }

.button, .button-primary, .button-secondary, .button-danger {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid var(--border-strong);
    border-radius: 13px;
    color: #fff;
    background: rgba(255,255,255,.045);
    text-decoration: none;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.button:hover, .button-primary:hover, .button-secondary:hover, .button-danger:hover { transform: translateY(-2px); }
.button-primary { border-color: rgba(239,56,67,.34); background: linear-gradient(135deg, var(--red), var(--red-dark)); box-shadow: 0 12px 28px rgba(239,56,67,.16); }
.button-secondary { background: rgba(88,166,255,.09); border-color: rgba(88,166,255,.24); }
.button-danger { background: rgba(239,56,67,.09); border-color: rgba(239,56,67,.28); color: #ff9da3; }
.button.disabled { pointer-events: none; opacity: .5; }

.store-hero { padding: 82px 0 42px; }
.store-hero-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(300px,.55fr); align-items: end; gap: 55px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; color: #ff9ca3; font-size: 10px; font-weight: 950; letter-spacing: .13em; text-transform: uppercase; }
.kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 15px var(--red); }
.store-hero h1 { margin: 15px 0 16px; font-size: clamp(43px, 7vw, 76px); line-height: .97; letter-spacing: -.062em; }
.store-hero h1 span { color: transparent; background: linear-gradient(90deg, #ff4d57, #ff8b68 55%, #f2c65a); background-clip: text; -webkit-background-clip: text; }
.store-hero p { max-width: 700px; margin: 0; color: var(--muted); line-height: 1.72; font-size: 16px; }
.hero-note { padding: 22px; border: 1px solid var(--border); border-radius: 20px; background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.018)); box-shadow: var(--shadow); }
.hero-note i { color: var(--red); font-size: 22px; }
.hero-note strong { display: block; margin: 13px 0 7px; font-size: 16px; }
.hero-note span { color: var(--muted); font-size: 12px; line-height: 1.55; }

.store-tools { padding: 20px 0 32px; }
.search-panel { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 13px; border: 1px solid var(--border); border-radius: 18px; background: rgba(255,255,255,.035); }
.search-panel input, .field input, .field select, .field textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    color: #fff;
    background: #0d1118;
}
.search-panel input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(239,56,67,.55); box-shadow: 0 0 0 3px rgba(239,56,67,.09); }
.category-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.category-chips a { padding: 9px 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.025); text-decoration: none; font-size: 10px; font-weight: 900; }
.category-chips a:hover, .category-chips a.active { color: #fff; border-color: rgba(239,56,67,.32); background: rgba(239,56,67,.10); }

.store-content { padding: 28px 0 90px; }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 24px; }
.section-title h2 { margin: 0; font-size: clamp(28px,4vw,42px); letter-spacing: -.045em; }
.section-title p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.results-count { color: var(--muted-2); font-size: 11px; font-weight: 850; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 17px; }
.product-card { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 22px; background: linear-gradient(150deg, rgba(255,255,255,.045), rgba(255,255,255,.012)), var(--panel); overflow: hidden; box-shadow: 0 18px 48px rgba(0,0,0,.22); transition: transform .2s ease, border-color .2s ease; }
.product-card:hover { transform: translateY(-5px); border-color: rgba(239,56,67,.3); }
.product-image { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle, rgba(239,56,67,.10), transparent 55%), #0b0d12; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.product-card:hover .product-image img { transform: scale(1.035); }
.product-placeholder { width: 98px !important; height: 98px !important; object-fit: contain !important; opacity: .42; filter: grayscale(.5); }
.product-badges { position: absolute; inset: 12px 12px auto 12px; display: flex; justify-content: space-between; gap: 8px; }
.badge { display: inline-flex; align-items: center; min-height: 26px; padding: 0 9px; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; color: #e8ebf1; background: rgba(7,8,12,.78); backdrop-filter: blur(9px); font-size: 9px; font-weight: 950; text-transform: uppercase; letter-spacing: .055em; }
.badge.featured { color: #2b2100; border-color: rgba(240,189,80,.4); background: var(--gold); }
.badge.sold { color: #fff; border-color: rgba(239,56,67,.35); background: rgba(185,25,36,.9); }
.product-body { flex: 1; display: flex; flex-direction: column; padding: 20px; }
.product-category { color: var(--red); font-size: 9px; font-weight: 950; letter-spacing: .11em; text-transform: uppercase; }
.product-card h3 { margin: 8px 0 0; font-size: 20px; line-height: 1.16; letter-spacing: -.035em; }
.product-card h3 a { text-decoration: none; }
.product-card p { margin: 11px 0 0; color: var(--muted); font-size: 12px; line-height: 1.58; }
.product-bottom { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 20px; }
.price small { display: block; margin-bottom: 3px; color: var(--muted-2); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.price strong { font-size: 19px; letter-spacing: -.035em; }
.card-arrow { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(135deg, var(--red), var(--red-dark)); }

.empty-store { padding: 48px 25px; border: 1px dashed var(--border-strong); border-radius: 22px; text-align: center; color: var(--muted); background: rgba(255,255,255,.02); }
.empty-store i { display: block; margin-bottom: 14px; color: var(--red); font-size: 30px; }
.empty-store h3 { margin: 0 0 8px; color: #fff; }

.product-page { padding: 60px 0 95px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 23px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 900; }
.back-link:hover { color: #fff; }
.product-layout { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(340px,.75fr); gap: 42px; align-items: start; }
.gallery-main { aspect-ratio: 4 / 3; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 24px; overflow: hidden; background: #0b0d12; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main img.product-placeholder { width: 150px; height: 150px; object-fit: contain; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(5,1fr); gap: 9px; margin-top: 10px; }
.gallery-thumb { padding: 0; aspect-ratio: 1; border: 1px solid var(--border); border-radius: 13px; overflow: hidden; background: #10131a; cursor: pointer; }
.gallery-thumb.active { border-color: var(--red); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-info { position: sticky; top: 100px; padding: 28px; border: 1px solid var(--border); border-radius: 24px; background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.017)), var(--panel); box-shadow: var(--shadow); }
.product-info h1 { margin: 11px 0 0; font-size: clamp(31px,4vw,48px); line-height: 1.02; letter-spacing: -.052em; }
.product-info .description { margin: 17px 0; color: var(--muted); line-height: 1.68; font-size: 14px; }
.product-price { padding: 19px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.product-price small { display: block; color: var(--muted-2); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.product-price strong { display: block; margin-top: 5px; font-size: 31px; letter-spacing: -.045em; }
.product-actions { display: grid; gap: 9px; margin-top: 19px; }
.product-actions .button-primary { min-height: 52px; }
.details-card { margin-top: 18px; padding: 21px; border: 1px solid var(--border); border-radius: 18px; background: rgba(255,255,255,.025); }
.details-card h2 { margin: 0 0 13px; font-size: 16px; }
.details-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.details-list li { display: flex; gap: 8px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.details-list li::before { content: "✓"; color: var(--green); font-weight: 950; }

.shop-footer { border-top: 1px solid var(--border); background: rgba(5,6,9,.55); }
.shop-footer-inner { min-height: 105px; display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.shop-footer strong { display: block; font-size: 13px; }
.shop-footer span, .shop-footer a { color: var(--muted-2); font-size: 10px; text-decoration: none; }
.shop-footer-links { display: flex; flex-wrap: wrap; gap: 15px; }
.shop-footer a:hover { color: #fff; }

.admin-main { padding: 48px 0 90px; }
.auth-wrap { width: min(480px, calc(100% - 30px)); margin: 70px auto; }
.panel { padding: 24px; border: 1px solid var(--border); border-radius: 21px; background: linear-gradient(145deg, rgba(255,255,255,.05), rgba(255,255,255,.015)), var(--panel); box-shadow: var(--shadow); }
.panel + .panel { margin-top: 18px; }
.panel h1, .panel h2 { margin: 0; letter-spacing: -.035em; }
.panel-sub { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 20px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #d7dbe3; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .065em; }
.field textarea { min-height: 112px; resize: vertical; }
.field small { color: var(--muted-2); font-size: 10px; line-height: 1.45; }
.check { display: flex; gap: 9px; align-items: center; color: var(--muted); font-size: 12px; }
.check input { accent-color: var(--red); }
.form-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.message { margin-bottom: 16px; padding: 13px 15px; border: 1px solid var(--border); border-radius: 13px; font-size: 12px; line-height: 1.5; }
.message.success { color: #9ef0c0; border-color: rgba(46,212,122,.28); background: rgba(46,212,122,.08); }
.message.error { color: #ffacb1; border-color: rgba(239,56,67,.3); background: rgba(239,56,67,.08); }
.admin-top { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.admin-top h1 { margin: 0; font-size: clamp(30px,4vw,46px); letter-spacing: -.05em; }
.admin-top p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.admin-layout { display: grid; grid-template-columns: minmax(0,1fr) 380px; gap: 18px; align-items: start; }
.admin-sidebar { position: sticky; top: 94px; }
.admin-list { display: grid; gap: 10px; margin-top: 18px; }
.admin-product { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 13px; padding: 11px; border: 1px solid var(--border); border-radius: 15px; background: rgba(255,255,255,.025); }
.admin-product-image { width: 72px; height: 58px; display: grid; place-items: center; border-radius: 11px; overflow: hidden; background: #0b0d12; }
.admin-product-image img { width: 100%; height: 100%; object-fit: cover; }
.admin-product-info strong { display: block; font-size: 13px; }
.admin-product-info span { display: block; margin-top: 4px; color: var(--muted-2); font-size: 10px; }
.admin-product-actions { display: flex; gap: 6px; }
.admin-product-actions .button, .admin-product-actions .button-danger { min-height: 35px; padding: 0 10px; font-size: 10px; }
.current-images { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.current-image { position: relative; }
.current-image img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.current-image label { position: absolute; inset: auto 5px 5px 5px; padding: 5px; border-radius: 7px; color: #fff; background: rgba(0,0,0,.78); font-size: 8px; text-align: center; }

@media (max-width: 930px) {
    .store-hero-grid, .product-layout, .admin-layout { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .product-info, .admin-sidebar { position: static; }
}

@media (max-width: 640px) {
    .container { width: min(100% - 24px,1160px); }
    .shop-nav { min-height: 66px; }
    .shop-brand img { width: 40px; height: 40px; }
    .shop-links a:not(.keep-mobile) { display: none; }
    .store-hero { padding: 55px 0 30px; }
    .store-hero h1 { font-size: 48px; }
    .search-panel { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: 1fr; }
    .section-title, .shop-footer-inner, .admin-top { align-items: flex-start; flex-direction: column; }
    .form-grid { grid-template-columns: 1fr; }
    .field.full { grid-column: auto; }
    .admin-product { grid-template-columns: 58px 1fr; }
    .admin-product-image { width: 58px; height: 52px; }
    .admin-product-actions { grid-column: 1 / -1; }
    .product-page { padding-top: 35px; }
    .product-info { padding: 21px; }
}
