:root {
    --bg: #14101f;
    --bg-card: #1e1830;
    --bg-card-hover: #251d3d;
    --purple: #6d28d9;
    --purple-light: #8b5cf6;
    --gold: #d4af37;
    --gold-light: #f0d878;
    --text: #f2eefa;
    --text-muted: #a89ec2;
    --border: #322850;
    --danger: #e15b5b;
    --radius: 12px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', 'Segoe UI', Roboto, -apple-system, sans-serif;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: linear-gradient(180deg, #1a1430, #14101f);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: none;
    line-height: 1;
}
.logo-art {
    display: block;
    width: 52px;
    height: 52px;
    flex: none;
    overflow: hidden;
    border: 1px solid rgba(255, 168, 54, .5);
    border-radius: 14px;
    background: #080505;
    box-shadow: 0 0 20px rgba(245, 120, 22, .2), inset 0 0 14px rgba(245, 120, 22, .16);
}
.logo-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.logo-type { display: flex; flex-direction: column; gap: 5px; }
.logo-type strong {
    display: block;
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -.04em;
    background: linear-gradient(90deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.logo-type small { color: #e9a95d; font-size: 9px; font-weight: 800; letter-spacing: .16em; white-space: nowrap; }

.main-nav a {
    color: var(--text-muted);
    font-weight: 600;
    margin: 0 12px;
}

.cart-link {
    position: relative;
    font-weight: 600;
    background: var(--bg-card);
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
}

.cart-badge {
    background: var(--gold);
    color: #14101f;
    font-size: 12px;
    font-weight: 800;
    border-radius: 999px;
    padding: 1px 7px;
    margin-left: 6px;
}

/* Layout */
.home-announcement[hidden], .home-hero[hidden], .home-hero-secondary[hidden], .home-hero-photo[hidden],
.home-hero-eyebrow[hidden], .home-hero-copy p[hidden] { display: none !important; }
.home-announcement {
    display: flex; align-items: center; justify-content: center; gap: 9px;
    min-width: 0; min-height: 34px; margin: 0; padding: 5px 14px;
    border-bottom: 1px solid #67441f; border-radius: 0;
    background: #21160c; color: #fff6e9;
    transition: background-color .2s ease;
}
.home-announcement:hover, .home-announcement:focus-visible { background-color: #32200f; }
.home-announcement-symbol {
    flex: none; color: #ffc45d; font-size: 14px; line-height: 1;
}
.home-announcement-copy { display: flex; min-width: 0; align-items: center; gap: 9px; }
.home-announcement-eyebrow { flex: none; color: #dcb57a; font-size: 9px; font-weight: 800; letter-spacing: .1em; white-space: nowrap; }
.home-announcement-eyebrow:empty, .home-announcement-text:empty { display: none; }
.home-announcement-copy strong { min-width: 0; overflow: hidden; color: #fff5e4; font-size: 11px; font-weight: 700; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.home-announcement-text { display: none; }
.home-announcement-action {
    display: inline-flex; flex: none; align-items: center; gap: 4px; color: #ffca70;
    font-size: 10px; font-weight: 800; white-space: nowrap;
}
.home-announcement-action > span:last-child { font-size: 14px; line-height: 1; }

.home-hero {
    display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(260px, .84fr);
    min-height: 390px; overflow: hidden; position: relative; color: #f2eefa;
    border: 1px solid #44345c; border-radius: 22px;
    background: radial-gradient(circle at 12% 90%, rgba(109,40,217,.31), transparent 48%),
                linear-gradient(120deg, #211630, #171324 64%, #261b38);
    box-shadow: 0 24px 60px rgba(9,5,20,.16);
}
.home-hero-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(28px, 5vw, 62px); position: relative; z-index: 1; }
.home-hero-eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--gold-light); font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.home-hero-eyebrow > span:first-child { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-light); box-shadow: 0 0 12px var(--gold); }
.home-hero h1 { max-width: 690px; margin: 16px 0; font-size: clamp(38px, 4.7vw, 66px); line-height: 1.03; letter-spacing: -.055em; }
.home-hero-copy p { max-width: 560px; margin: 0; color: #c8bddc; font-size: clamp(15px, 1.45vw, 17px); line-height: 1.6; }
.home-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.home-hero-actions .btn { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 16px; padding: 11px 19px; }
.home-hero-primary > span:last-child { font-size: 19px; line-height: 1; }
.home-hero-secondary { border: 1px solid rgba(240,216,120,.42); color: var(--gold-light); background: rgba(22,14,37,.35); }
.home-hero-secondary:hover { border-color: var(--gold-light); background: rgba(240,216,120,.08); }
.home-hero-visual {
    display: grid; position: relative; min-height: 390px; place-items: center; overflow: hidden;
    background: radial-gradient(circle at 52% 43%, rgba(139,92,246,.32), transparent 42%),
                linear-gradient(140deg, rgba(47,30,78,.24), rgba(12,9,22,.6));
}
.home-hero-visual::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #1e152f, transparent 32%); pointer-events: none; z-index: 1; }
.home-hero-visual.has-image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,16,31,.18), rgba(20,16,31,.02)); pointer-events: none; }
.home-hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home-hero-brand-art {
    position: relative; z-index: 0; width: min(88%, 420px); max-height: 92%; aspect-ratio: 1;
    object-fit: contain; mix-blend-mode: screen;
    -webkit-mask-image: radial-gradient(circle, #000 47%, transparent 74%);
    mask-image: radial-gradient(circle, #000 47%, transparent 74%);
    filter: drop-shadow(0 0 32px rgba(255, 133, 25, .32));
}
.home-hero-visual.has-brand { background: radial-gradient(circle at 50% 48%, rgba(244, 115, 20, .17), transparent 54%), #100c13; }
.home-hero-visual.has-brand .home-hero-monogram { display: none; }
.home-hero-orbit { position: absolute; width: 75%; aspect-ratio: 1; border: 1px solid rgba(240,216,120,.3); border-radius: 50%; transform: rotate(-24deg) scaleX(1.24); box-shadow: 0 0 60px rgba(139,92,246,.15), inset 0 0 60px rgba(139,92,246,.08); }
.home-hero-orbit-two { width: 57%; border-color: rgba(240,216,120,.14); transform: rotate(24deg) scaleX(1.45); }
.home-hero-monogram { color: var(--gold-light); font-size: clamp(150px, 22vw, 300px); font-weight: 800; line-height: 1; letter-spacing: -.1em; text-shadow: 0 20px 50px rgba(0,0,0,.4), 0 0 45px rgba(240,216,120,.22); transform: translateX(-.06em); }
.home-hero-signature { position: absolute; right: 24px; bottom: 22px; color: rgba(240,216,120,.6); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.home-hero-visual.has-image .home-hero-orbit, .home-hero-visual.has-image .home-hero-monogram, .home-hero-visual.has-image .home-hero-signature { display: none; }

#catalog { scroll-margin-top: 82px; }
.catalog-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 32px;
    padding: 32px 0 60px;
}

.catalog-filters h3 {
    color: var(--gold-light);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
}

.category-list { list-style: none; padding: 0; margin: 0; }
.category-list li { margin-bottom: 6px; }
.category-list a {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text-muted);
}
.category-list li.active a,
.category-list a:hover {
    background: var(--bg-card);
    color: var(--gold-light);
}

.catalog-grid h1, .catalog-grid h2.catalog-title { margin-top: 0; }

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .15s ease, background .15s ease;
    display: block;
}
.product-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-3px);
}

.product-image {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #241c3a;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-image img { width: 100%; height: 100%; object-fit: cover; }

.no-image {
    color: var(--gold);
    font-weight: 800;
    letter-spacing: 2px;
    opacity: .35;
    font-size: 14px;
}
.no-image.large { font-size: 22px; }
.no-image.small { font-size: 10px; }

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}
.badge-hit { background: var(--gold); color: #14101f; }
.badge-out { background: var(--danger); color: #fff; }

.product-info { padding: 14px; }
.product-cat { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.product-name { font-weight: 600; margin: 4px 0 8px; }
.product-price { color: var(--gold-light); font-weight: 700; }
.product-price.large { font-size: 26px; margin: 12px 0; }
.old-price { color: var(--text-muted); text-decoration: line-through; font-weight: 400; margin-left: 8px; font-size: .85em; }

.empty-state { text-align: center; padding: 60px 0; color: var(--text-muted); }

/* Buttons */
.btn {
    display: inline-block;
    border: none;
    border-radius: 999px;
    padding: 10px 22px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
}
.btn-primary {
    background: linear-gradient(90deg, var(--purple), var(--purple-light));
    color: #fff;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-lg { padding: 14px 30px; font-size: 16px; }

/* Product detail */
.breadcrumbs { color: var(--text-muted); font-size: 13px; margin: 20px 0; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--gold-light); }

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding-bottom: 60px;
}
.product-detail-image {
    background: var(--bg-card);
    border-radius: var(--radius);
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-detail-image img { width: 100%; height: 100%; object-fit: cover; }

.related-products { padding: 20px 0 60px; }
.related-products h2 { font-size: 20px; margin-bottom: 20px; }

.attributes-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.attributes-table td { padding: 8px 0; border-bottom: 1px solid var(--border); }
.attributes-table td:first-child { color: var(--text-muted); width: 40%; }

.product-description { color: var(--text-muted); margin: 16px 0; }

.add-to-cart-form { display: flex; align-items: flex-end; gap: 12px; margin: 20px 0 10px; flex-wrap: wrap; }
.add-to-cart-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-muted); }
.add-to-cart-form input[type=number] {
    width: 70px; padding: 10px; border-radius: 8px; border: 1px solid var(--border);
    background: var(--bg-card); color: var(--text);
}
.variant-select {
    padding: 10px; border-radius: 8px; border: 1px solid var(--border);
    background: var(--bg-card); color: var(--text); min-width: 220px;
}
.stock-info { color: var(--text-muted); font-size: 13px; }
.stock-status-out {
    display: inline-block; margin: 16px 0; padding: 10px 20px;
    background: rgba(225,91,91,.15); border: 1px solid var(--danger);
    color: var(--danger); font-weight: 700; border-radius: 8px; font-size: 15px;
}

/* Cart */
.cart-table { display: flex; flex-direction: column; gap: 12px; margin: 24px 0; }
.cart-row {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) 132px 120px 40px;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
}
.cart-row-image { width: 60px; height: 60px; border-radius: 8px; overflow: hidden; background: #241c3a; display: flex; align-items: center; justify-content: center; }
.cart-row-image img { width: 100%; height: 100%; object-fit: cover; }
.cart-row-name a { font-weight: 600; }
.cart-row-flavor { font-size: 12px; color: var(--gold-light); margin-top: 2px; }
.cart-row-price { color: var(--text-muted); font-size: 13px; }
.cart-row-qty { display: inline-flex; width: max-content; align-items: center; border: 1px solid var(--border); border-radius: 11px; background: var(--bg); overflow: hidden; }
.cart-qty-button { display: grid; width: 42px; height: 42px; place-items: center; padding: 0; border: 0; background: transparent; color: var(--text); cursor: pointer; font: inherit; font-size: 23px; line-height: 1; }
.cart-qty-button:disabled { color: var(--text-muted); opacity: .4; cursor: not-allowed; }
.cart-qty-value { min-width: 36px; text-align: center; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cart-update-status { margin: -10px 0 10px; color: var(--text-muted); font-size: 13px; }
.cart-update-status[hidden] { display: none; }
.cart-update-status.is-error { color: var(--danger); }
.cart-row-subtotal { font-weight: 700; color: var(--gold-light); text-align: right; }
.cart-row-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 16px; }
.cart-row-remove:hover { color: var(--danger); }

.cart-summary { display: flex; justify-content: space-between; align-items: center; padding: 20px 0 60px; }
.cart-total { font-size: 20px; }

/* Checkout */
.checkout-layout { display: grid; grid-template-columns: 1fr 340px; gap: 40px; padding-bottom: 60px; }
.checkout-form { display: flex; flex-direction: column; gap: 16px; }
.checkout-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-muted); }
.checkout-form input[type=text],
.checkout-form input[type=tel],
.checkout-form input[type=email],
.checkout-form input[type=search],
.checkout-form textarea {
    padding: 12px; border-radius: 8px; border: 1px solid var(--border);
    background: var(--bg-card); color: var(--text); font-size: 14px;
}
.delivery-fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.delivery-fieldset legend { color: var(--text-muted); padding: 0 6px; }
.radio-label { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; color: var(--text); }

.inpost-delivery {
    border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
    background: var(--bg-card);
}
.inpost-delivery-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.inpost-delivery-heading h2 { margin: 0 0 5px; font-size: 20px; color: var(--gold-light); }
.inpost-delivery-heading p, .inpost-help { margin: 0; color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.inpost-badge { background: var(--gold); color: #171022; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 800; }
.inpost-selected-point { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; margin-bottom: 12px; border: 1px solid #4ade80; border-radius: 8px; background: rgba(74, 222, 128, .08); }
.inpost-selected-point[hidden] { display: none; }
.inpost-selected-point strong { color: #4ade80; }
.inpost-selected-point span { color: var(--text-muted); font-size: 13px; }
.inpost-selected-point .inpost-selected-label { color: #4ade80; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.inpost-help { margin-top: 10px; }
.inpost-search { margin-bottom: 10px; }
.inpost-search > label { display: block; margin-bottom: 6px; color: var(--text-muted); font-size: 13px; }
.inpost-search-row { display: flex; gap: 8px; align-items: stretch; }
.inpost-search-row input { flex: 1; min-width: 0; }
.inpost-search-row .btn { white-space: nowrap; }
.inpost-map-status { min-height: 18px; margin: 0 0 8px; color: var(--text-muted); font-size: 12px; }
.inpost-map-shell { display: grid; grid-template-columns: minmax(0, 1fr) 230px; height: 440px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.inpost-map { height: 440px; min-height: 0; background: #171022; }
.inpost-map .leaflet-tile-pane { filter: invert(100%) hue-rotate(180deg) brightness(82%) contrast(90%); }
.inpost-points-panel { display: flex; min-width: 0; max-height: 440px; flex-direction: column; background: #171022; border-left: 1px solid var(--border); }
.inpost-points-panel-heading { padding: 12px; border-bottom: 1px solid var(--border); }
.inpost-points-panel-heading strong { display: block; color: var(--text); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.inpost-points-panel-heading span { display: block; margin-top: 3px; color: var(--text-muted); font-size: 10px; line-height: 1.35; }
.inpost-points-list { min-height: 0; padding: 8px; overflow-y: auto; }
.inpost-point-option { display: block; width: 100%; margin-bottom: 7px; padding: 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-card); color: var(--text); cursor: pointer; text-align: left; }
.inpost-point-option:hover, .inpost-point-option.is-selected { border-color: var(--gold); background: var(--bg-card-hover); }
.inpost-point-option strong, .inpost-point-option span, .inpost-point-option small { display: block; }
.inpost-point-option strong { color: var(--text); font-size: 12px; }
.inpost-point-option span { margin-top: 3px; color: var(--text-muted); font-size: 10px; line-height: 1.35; }
.inpost-point-option small { margin-top: 6px; color: var(--gold-light); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.inpost-list-empty { padding: 24px 8px; color: var(--text-muted); font-size: 11px; line-height: 1.45; text-align: center; }
.inpost-map-marker-wrap { background: transparent; border: 0; }
.inpost-map-marker { display: flex; width: 34px; height: 34px; align-items: center; justify-content: center; border: 3px solid #171022; border-radius: 50% 50% 50% 8px; background: var(--gold); color: #171022; font-size: 0; font-weight: 900; box-shadow: 0 4px 14px rgba(0,0,0,.45); transform: rotate(-45deg); }
.inpost-map-marker.is-selected { background: #4ade80; box-shadow: 0 0 0 4px rgba(74,222,128,.25), 0 4px 14px rgba(0,0,0,.45); }
.inpost-map-marker::after { content: 'P'; font-size: 14px; transform: rotate(45deg); }
.inpost-leaflet-popup .leaflet-popup-content-wrapper { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); border-radius: 10px; }
.inpost-leaflet-popup .leaflet-popup-tip { background: var(--bg-card); }
.inpost-leaflet-popup .leaflet-popup-content { line-height: 1.4; }
.inpost-leaflet-popup .leaflet-popup-content strong { display: block; margin-bottom: 3px; color: var(--gold-light); }
.inpost-popup-select { width: 100%; margin-top: 9px; padding: 8px 10px; border: 0; border-radius: 7px; background: var(--gold); color: #171022; cursor: pointer; font-weight: 800; }

.checkout-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    height: fit-content;
}
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.summary-total { border-bottom: none; font-weight: 700; font-size: 16px; color: var(--gold-light); }

.success-box { background: var(--bg-card); border: 1px solid var(--gold); border-radius: var(--radius); padding: 30px; text-align: center; margin: 30px 0; }
.error-box { background: rgba(225,91,91,.12); border: 1px solid var(--danger); border-radius: var(--radius); padding: 16px 20px; margin: 20px 0; }
.error-box ul { margin: 0; padding-left: 20px; color: var(--danger); }
.telegram-context-note { margin: -8px 0 2px; color: var(--gold-light); font-size: 13px; }
.telegram-context-note[hidden] { display: none; }
.telegram-write-access[hidden] { display: none; }

html.telegram-mini-app body { padding-bottom: max(env(safe-area-inset-bottom), var(--tg-content-safe-area-inset-bottom, 0px)); }
html.telegram-mini-app .site-header { background: var(--bg); }
html.telegram-mini-app body:not(.storefront-body) .btn-primary { background: var(--purple); color: var(--tg-button-text, #fff); }
html.telegram-mini-app .checkout-form input[readonly] { opacity: .78; }
html.telegram-mini-app.telegram-native-submit .checkout-form > button[type=submit] { display: none; }
html.telegram-mini-app .site-header { box-shadow: 0 1px 0 var(--border); }
html.telegram-mini-app .header-inner { min-height: 58px; padding-top: 10px; padding-bottom: 10px; }
html.telegram-mini-app .main-nav { display: none; }
html.telegram-mini-app .telegram-admin-link {
    padding: 8px 12px; border: 1px solid var(--gold); border-radius: 999px;
    color: var(--gold-light); font-size: 13px; font-weight: 700; white-space: nowrap;
}
html.telegram-mini-app .telegram-admin-link[aria-busy="true"] { opacity: .65; pointer-events: none; }
html.telegram-mini-app .catalog-layout { display: block; padding-top: 18px; }
html.telegram-mini-app .catalog-filters { margin-bottom: 22px; }
html.telegram-mini-app .catalog-filters h3 { margin: 0 0 10px; font-size: 11px; }
html.telegram-mini-app .category-list {
    display: flex; gap: 8px; margin: 0 -20px; padding: 0 20px 6px;
    overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
html.telegram-mini-app .category-list::-webkit-scrollbar { display: none; }
html.telegram-mini-app .category-list li { flex: none; margin: 0; }
html.telegram-mini-app .category-list a {
    width: max-content; padding: 9px 14px; border: 1px solid var(--border);
    border-radius: 999px; background: var(--bg-card); font-size: 13px; font-weight: 600;
}
html.telegram-mini-app .category-list li.active a {
    border-color: var(--gold); background: var(--bg-card-hover); color: var(--gold-light);
}
html.telegram-mini-app .catalog-grid h1, html.telegram-mini-app .catalog-grid h2.catalog-title { margin-bottom: 16px; font-size: clamp(22px, 5vw, 30px); }
html.telegram-mini-app .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
html.telegram-mini-app .product-card { min-width: 0; }
html.telegram-mini-app .product-info { padding: 11px; }
html.telegram-mini-app .product-name { line-height: 1.3; }
html.telegram-mini-app .product-price { font-size: 15px; }
html.telegram-mini-app .cart-summary { gap: 12px; flex-wrap: wrap; }
html.telegram-mini-app .checkout-layout { gap: 20px; }
html.telegram-mini-app .site-header,
html.telegram-mini-app main.container,
html.telegram-mini-app .site-footer,
html.telegram-mini-app .admin-shell,
html.telegram-mini-app .admin-login-form { transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
html.telegram-mini-app.telegram-swipe-active .site-header,
html.telegram-mini-app.telegram-swipe-active main.container,
html.telegram-mini-app.telegram-swipe-active .site-footer,
html.telegram-mini-app.telegram-swipe-active .admin-shell,
html.telegram-mini-app.telegram-swipe-active .admin-login-form {
    transform: translate3d(var(--tg-swipe-page-shift, 0px), 0, 0);
    transition: none;
    will-change: transform;
}
.tg-swipe-glow {
    position: fixed; z-index: 9997; inset: 0 auto 0 0; width: 110px;
    background: linear-gradient(90deg, rgba(240,216,120,.2), rgba(109,40,217,.08) 55%, transparent);
    opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.tg-swipe-preview {
    position: fixed; z-index: 9998; top: 50%; left: 0; width: 230px; min-height: 92px;
    display: grid; grid-template-columns: minmax(0, 1fr) 42px; align-items: center; gap: 9px 12px;
    padding: 15px 14px 12px 18px; border: 1px solid #6b527d; border-left: 0;
    border-radius: 0 20px 20px 0; background: linear-gradient(125deg, #281b40, #171322);
    box-shadow: 10px 10px 34px rgba(9,5,20,.34), inset 0 1px rgba(255,255,255,.08);
    color: #f2eefa; transform: translate3d(-100%, -50%, 0); opacity: 0;
    pointer-events: none; will-change: transform, opacity;
    transition: opacity .13s ease, border-color .16s ease, box-shadow .16s ease;
}
.tg-swipe-preview.is-visible { opacity: 1; }
.tg-swipe-preview.is-resetting { transition: transform .22s cubic-bezier(.2, .8, .2, 1), opacity .18s ease; }
.tg-swipe-preview.is-ready { border-color: var(--gold-light); box-shadow: 10px 10px 38px rgba(9,5,20,.42), 0 0 28px rgba(240,216,120,.18); }
.tg-swipe-copy { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.tg-swipe-caption { color: var(--gold-light); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.tg-swipe-copy strong { overflow: hidden; font-size: 15px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.tg-swipe-arrow {
    display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(240,216,120,.52);
    border-radius: 50%; color: var(--gold-light); font-size: 23px; line-height: 1;
    transition: color .18s ease, background .18s ease, transform .18s cubic-bezier(.2, 1.6, .3, 1);
}
.tg-swipe-preview.is-ready .tg-swipe-arrow { transform: scale(1.1); border-color: var(--gold-light); background: var(--gold-light); color: #1b1430; }
.tg-swipe-track { grid-column: 1 / -1; display: block; height: 3px; overflow: hidden; border-radius: 99px; background: rgba(240,216,120,.18); }
.tg-swipe-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--purple-light), var(--gold-light)); }
@media (prefers-reduced-motion: reduce) {
    html.telegram-mini-app .site-header,
    html.telegram-mini-app main.container,
    html.telegram-mini-app .site-footer,
    html.telegram-mini-app .admin-shell,
    html.telegram-mini-app .admin-login-form,
    .tg-swipe-preview, .tg-swipe-glow, .tg-swipe-arrow { transition-duration: .01ms !important; }
}
@media (max-width: 800px) {
    html.telegram-mini-app .checkout-summary { order: -1; }
}
@media (max-width: 700px) {
    .home-hero { grid-template-columns: 1fr; }
    .home-hero-copy { padding: 30px; }
    .home-hero h1 { font-size: clamp(36px, 8vw, 52px); }
    .home-hero-visual { min-height: 210px; }
    .home-hero-monogram { font-size: 175px; }
}
@media (max-width: 480px) {
    .home-announcement { min-height: 31px; justify-content: center; gap: 6px; padding: 4px 10px; }
    .home-announcement-symbol { font-size: 12px; }
    .home-announcement-eyebrow { display: none; }
    .home-announcement-copy strong { font-size: 10px; }
    .home-announcement-action-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
    .home-announcement-action > span:last-child { font-size: 12px; }
    .home-hero { border-radius: 18px; }
    .home-hero-copy { padding: 26px 22px; }
    .home-hero h1 { font-size: clamp(34px, 9vw, 43px); }
    .home-hero-actions { margin-top: 23px; }
    .home-hero-actions .btn { min-height: 43px; font-size: 13px; }
    .home-hero-visual { min-height: 155px; }
    .home-hero-monogram { font-size: 145px; }
}
@media (max-width: 480px) {
    html.telegram-mini-app .container { padding-right: 14px; padding-left: 14px; }
    html.telegram-mini-app .header-inner { gap: 8px; }
    html.telegram-mini-app .logo-art { width: 42px; height: 42px; border-radius: 12px; }
    html.telegram-mini-app .logo-type strong { font-size: 19px; }
    html.telegram-mini-app .logo-type small { display: none; }
    html.telegram-mini-app .cart-link { padding: 7px 11px; font-size: 13px; }
    html.telegram-mini-app .telegram-admin-link { padding: 7px 9px; font-size: 12px; }
    html.telegram-mini-app .category-list { margin-right: -14px; margin-left: -14px; padding-right: 14px; padding-left: 14px; }
    html.telegram-mini-app .product-grid { gap: 9px; }
    html.telegram-mini-app .product-info { padding: 10px; }
    html.telegram-mini-app .product-cat { font-size: 10px; }
    html.telegram-mini-app .product-name { font-size: 13px; }
    html.telegram-mini-app .old-price { display: block; margin-left: 0; }
    html.telegram-mini-app .inpost-delivery { padding: 12px; }
    html.telegram-mini-app .inpost-map-shell { grid-template-rows: 300px 220px; height: 520px; }
    html.telegram-mini-app .inpost-map { height: 300px; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 20px 0; color: var(--text-muted); font-size: 12px; text-align: center; }

/* Age gate 18+ */
.age-gate-overlay {
    position: fixed; inset: 0; z-index: 1000; overflow: hidden; isolation: isolate;
    width: 100%; height: 100vh; height: 100dvh; background: #060404; color: #fff9f1;
    transition: opacity .28s ease, visibility .28s ease;
}
.age-gate-overlay[hidden], .entry-skip .age-gate-overlay { display: none !important; }
.age-gate-overlay.is-leaving { opacity: 0; visibility: hidden; pointer-events: none; }
html.entry-locked { overflow: hidden; }
.entry-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #060404; }
.entry-shade {
    position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(90deg, rgba(5,3,5,.58), transparent 38%, rgba(5,3,5,.74) 90%),
                linear-gradient(0deg, rgba(5,3,5,.9), transparent 44%, rgba(5,3,5,.28));
}
.entry-layout {
    position: relative; display: flex; flex-direction: column; width: min(1280px, 100%); height: 100%;
    margin: 0 auto; padding: max(24px, env(safe-area-inset-top)) clamp(20px, 5vw, 70px) max(30px, env(safe-area-inset-bottom));
}
.entry-brand { display: flex; align-items: center; gap: 11px; width: 100%; font-size: 17px; font-weight: 800; letter-spacing: .08em; text-shadow: 0 1px 12px #000; }
.entry-brand img { width: 44px; height: 44px; object-fit: cover; border: 1px solid rgba(255, 179, 84, .55); border-radius: 12px; box-shadow: 0 0 24px rgba(255, 121, 28, .24); }
.entry-brand small { display: block; margin-top: 4px; color: #f2a75b; font-size: 8px; letter-spacing: .17em; }
.entry-brand-age { margin-left: auto; padding: 6px 10px; border: 1px solid rgba(255, 179, 84, .52); border-radius: 100px; color: #ffca86; font-size: 12px; letter-spacing: 0; }
.entry-bottom { display: flex; justify-content: flex-end; align-items: flex-end; flex: 1; width: 100%; }
.entry-intro { width: min(450px, 100%); padding: 20px 0; text-shadow: 0 3px 18px #000; }
.entry-eyebrow, .age-gate-kicker { color: #ffc57d; font-size: 10px; font-weight: 800; letter-spacing: .19em; }
.entry-intro h1 { margin: 14px 0 12px; font-size: clamp(36px, 4.4vw, 62px); line-height: 1.02; letter-spacing: -.06em; }
.entry-intro h1 em { color: #ffc06d; font-style: normal; }
.entry-intro p { margin: 0; color: #e5d5c3; font-size: 15px; }
.entry-progress { display: block; width: min(240px, 70%); height: 2px; margin-top: 27px; overflow: hidden; background: rgba(255, 190, 108, .3); }
.entry-progress > span { display: block; width: 40%; height: 100%; background: #ffc57d; box-shadow: 0 0 12px #ff8b20; animation: entry-loading 1.4s ease-in-out infinite alternate; }
@keyframes entry-loading { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.age-gate-box {
    width: min(430px, 100%); padding: clamp(22px, 3vw, 34px);
    border: 1px solid rgba(255, 173, 75, .5); border-radius: 22px;
    background: linear-gradient(150deg, rgba(30, 17, 13, .92), rgba(12, 8, 10, .9));
    box-shadow: 0 20px 70px rgba(0,0,0,.42), 0 0 55px rgba(229, 103, 18, .14);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.age-gate-box:focus { outline: none; }
.age-gate-box h2 { margin: 13px 0 12px; font-size: clamp(30px, 3.2vw, 43px); line-height: 1.06; letter-spacing: -.055em; }
.age-gate-box h2 span { color: #ffc06d; }
.age-gate-box p { margin: 0; color: #d9c9bf; font-size: 13px; line-height: 1.55; }
.age-gate-buttons { display: grid; gap: 9px; margin-top: 22px; }
.age-gate-buttons .btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 47px; border-radius: 12px; }
.age-gate-buttons .btn-primary { gap: 12px; background: linear-gradient(110deg, #f18a23, #ffc15c); color: #1a0c08; border: 0; box-shadow: 0 9px 24px rgba(248, 129, 28, .27); }
.age-gate-buttons .btn-primary:hover { filter: brightness(1.08); }
.age-gate-buttons .btn-ghost { border: 1px solid rgba(255, 187, 117, .3); color: #fff4e6; background: rgba(255,255,255,.04); }
.age-gate-box .age-gate-footnote { margin-top: 16px; text-align: center; color: #ad988b; font-size: 11px; }
.entry-intro { display: none; }
.entry-js .age-gate-overlay.is-loading .entry-intro { display: block; }
.entry-js .age-gate-overlay.is-loading .age-gate-box { display: none; }
/* The portrait film occupies its own column on desktop, never behind the form. */
@media (min-width: 701px) {
    .age-gate-overlay { overflow-y: auto; background: #090807; }
    .entry-video {
        inset: 88px auto 24px max(24px, calc(50% - 550px));
        width: min(44vw, 540px); height: calc(100% - 112px);
        object-fit: contain; object-position: center; background: transparent;
    }
    .entry-shade {
        position: fixed;
        background: linear-gradient(90deg, transparent 34%, #090807 58%),
                    linear-gradient(0deg, #090807, transparent 12%, transparent 88%, #090807);
    }
    .entry-layout {
        width: min(1180px, 100%); min-height: 560px;
        padding: 28px 40px; gap: 24px;
    }
    .entry-brand { font-size: 16px; }
    .entry-bottom {
        display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: center; column-gap: clamp(32px, 5vw, 80px);
        padding-bottom: 24px;
    }
    .entry-intro, .age-gate-box { grid-column: 2; justify-self: end; width: 100%; max-width: 440px; }
    .age-gate-box {
        padding: clamp(24px, 3vw, 36px); border-radius: 24px;
        border-color: rgba(255, 187, 117, .25); background: #15110e;
        box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
    }
    .age-gate-kicker { font-size: 10px; letter-spacing: .13em; }
    .age-gate-box h2 { margin: 18px 0 16px; font-size: clamp(30px, 3.3vw, 44px); line-height: 1.12; letter-spacing: -.04em; }
    .age-gate-box h2 span { white-space: nowrap; }
    .age-gate-box p { font-size: 14px; line-height: 1.6; }
    .age-gate-buttons { margin-top: 28px; gap: 12px; }
    .age-gate-buttons .btn { min-height: 52px; font-size: 15px; }
    .age-gate-buttons .btn-primary { box-shadow: none; }
    .age-gate-box .age-gate-footnote { margin-top: 20px; font-size: 12px; }
}
@media (max-width: 700px) {
    .entry-video { object-fit: cover; object-position: center 42%; }
    .entry-shade { background: linear-gradient(180deg, rgba(5,3,5,.94), rgba(5,3,5,.84) 64px, transparent 112px), linear-gradient(0deg, rgba(5,3,5,.95), rgba(5,3,5,.55) 29%, transparent 64%, rgba(5,3,5,.26)); }
    .entry-layout { padding: max(16px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)); }
    .entry-brand { font-size: 13px; }
    .entry-brand img { width: 37px; height: 37px; border-radius: 10px; }
    .entry-brand small { font-size: 7px; }
    .entry-bottom { justify-content: center; }
    .entry-intro { text-align: center; padding-bottom: 18px; }
    .entry-intro h1 { font-size: clamp(33px, 9vw, 48px); }
    .entry-intro p { font-size: 13px; }
    .entry-progress { margin: 22px auto 0; }
    .age-gate-box { width: min(430px, 100%); padding: 20px 19px; border-radius: 19px; }
    .age-gate-box h2 { font-size: 30px; }
    .age-gate-buttons { margin-top: 17px; }
    .age-gate-buttons .btn { min-height: 44px; }
    .age-gate-box .age-gate-footnote { margin-top: 11px; }
}
@media (max-width: 600px) {
    .header-inner { gap: 9px; }
    .logo-art { width: 43px; height: 43px; border-radius: 11px; }
    .logo-type strong { font-size: 19px; }
    .logo-type small { display: none; }
    .main-nav { display: none; }
}
@media (max-width: 700px) and (max-height: 720px) {
    .entry-video { transform: translateY(-28px) scale(1.04); }
    .age-gate-box { padding: 17px 18px; }
    .age-gate-box h2 { margin: 9px 0; }
    .age-gate-buttons { margin-top: 13px; gap: 7px; }
    .age-gate-box .age-gate-footnote { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .age-gate-overlay { transition: none; }
    .entry-progress > span { animation: none; }
}

@media (max-width: 800px) {
    .catalog-layout, .product-detail, .checkout-layout { grid-template-columns: 1fr; }
    .cart-row { grid-template-columns: 60px minmax(0, 1fr) auto; grid-template-areas: "img name remove" "qty qty subtotal"; gap: 8px 10px; }
    .cart-row-image { grid-area: img; }
    .cart-row-name { grid-area: name; min-width: 0; }
    .cart-row-qty { grid-area: qty; }
    .cart-row-subtotal { grid-area: subtotal; white-space: nowrap; }
    .cart-row-remove { grid-area: remove; }
    .inpost-map-shell { grid-template-columns: 1fr; grid-template-rows: 380px 260px; height: 640px; }
    .inpost-map { height: 380px; min-height: 0; }
    .inpost-points-panel { height: 260px; max-height: none; border-top: 1px solid var(--border); border-left: 0; }
    .inpost-search-row { flex-wrap: wrap; }
    .inpost-search-row input { flex-basis: 100%; }
}
