﻿/* =========================================
   ВКУСНЫЕ ИСТОРИИ — MAIN STYLES
   ========================================= */

:root {
    --bg: #1C120E; --bg2: #241813;
    --surface: #2B1D17; --surface2: #33231B;
    --line: rgba(241,227,214,.14); --line2: rgba(241,227,214,.22);
    --ink: #F6EFE8; --muted: rgba(255,235,215,.82); --muted2: rgba(246,239,232,.55);
    --beige: #F1E3D6; --sand: #E9D3BF; --gold: #FFCF8B;
    --ember: #F28C28; --ember2: #E06C12; --cocoa: #3B1D17; --smoke: #070707;
    --brand-orange: #F28C28;
    --header-row-h: 34px; --bottom-nav-h: 62px;
}

html, body {
    overflow-x: clip;
    width: 100%;
    max-width: 100vw;
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
}

html {
    background:
        radial-gradient(1200px 600px at 50% -15%, rgba(255,180,100,.28), transparent 70%),
        radial-gradient(800px 500px at 20% 0%, rgba(255,150,80,.18), transparent 65%),
        radial-gradient(800px 500px at 80% 10%, rgba(255,180,100,.15), transparent 70%),
        linear-gradient(180deg, #2A1B14 0%, #24160F 50%, #1C120D 100%);
    min-height: 100vh;
}

body {
    background: transparent; /* Оставляем body прозрачным, чтобы просвечивал фон из html */
    color: var(--ink);
    -webkit-tap-highlight-color: transparent;
    padding-bottom: env(safe-area-inset-bottom);
}


.min-h-screen { min-height: 100dvh !important; }
@supports (-webkit-touch-callout: none) { body { min-height: -webkit-fill-available; } }

/* Tailwind Overrides */
.text-gray-900, .text-gray-800, .text-grayDark { color: var(--ink) !important; }
.text-gray-700 { color: var(--muted) !important; }
.text-gray-600, .text-gray-500 { color: var(--muted2) !important; }
.text-gray-400 { color: rgba(246,239,232,.45) !important; }
.border-gray-200, .border-grayLight { border-color: var(--line) !important; }
.border-gray-300 { border-color: var(--line2) !important; }
.bg-white { background-color: var(--surface) !important; }
.bg-grayLight { background-color: rgba(241,227,214,.08) !important; }
.bg-secondary { background: transparent !important; }
.text-orange-600, .text-primary { color: var(--gold) !important; }
.hover\:text-primary:hover { color: var(--gold) !important; }

/* Header Desktop */
header {
    background: linear-gradient(180deg, rgba(42,26,19,.96) 0%, rgba(34,20,15,.95) 100%) !important;
    backdrop-filter: blur(12px); border-bottom: 1px solid var(--line) !important;
    box-shadow: 0 0 60px rgba(255,160,80,.12), 0 20px 50px rgba(0,0,0,.35);
}
header .header-inner { display: grid; grid-template-columns: max-content minmax(0,1fr) max-content; align-items: center; column-gap: .70rem; }
.header-left { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.logo-wrap { line-height: 0; }
header img { display: block; }
.header-city { height: var(--header-row-h); display: flex; align-items: center; line-height: 1; }
.header-city svg { margin-top: 0 !important; }
.header-right { display: flex; align-items: center; gap: .5rem; flex-wrap: nowrap !important; }

.oki-navwrap { height: var(--header-row-h); display: flex; align-items: center; justify-content: center; min-width: 0; gap: .30rem; }
.oki-nav { height: var(--header-row-h); display: flex; align-items: center; gap: .72rem; overflow-x: auto; scroll-behavior: smooth; padding: .08rem .08rem .22rem; min-width: 0; white-space: nowrap; -ms-overflow-style: none; scrollbar-width: none; }
.oki-nav::-webkit-scrollbar { display: none; }

.nav-link { position: relative; transition: color 0.22s ease; color: rgba(246,239,232,.76); font-size: .88rem; display: inline-flex; align-items: center; height: var(--header-row-h); line-height: 1; margin: 0; }
.nav-link::after { content: ""; position: absolute; bottom: -4px; left: 0; width: 0%; height: 2px; background-color: var(--gold); transition: width 0.22s ease; border-radius: 999px; box-shadow: 0 10px 24px rgba(255,207,139,.18); }
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--gold); text-shadow: 0 0 8px rgba(255,170,90,.45); }

.oki-nav-arrow { width: 28px; height: 28px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(241,227,214,.18); background: rgba(0,0,0,.22); color: rgba(246,239,232,.88); transition: all .16s ease; flex: 0 0 auto; }
.oki-nav-arrow svg { width: 14px; height: 14px; }
.oki-nav-arrow:hover { background: rgba(241,227,214,.08); border-color: rgba(255,207,139,.28); transform: translateY(-1px); }
.oki-nav-arrow.is-gone { opacity: 0; pointer-events: none; transform: none; }

/* Buttons & Badges */
.oki-btn { display: inline-flex; align-items: center; gap: .45rem; padding: .48rem .88rem; border-radius: 9999px; border: 1px solid var(--line2); background-color: rgba(20,18,16,.78); color: rgba(246,239,232,.88); font-size: .90rem; font-weight: 650; box-shadow: 0 10px 26px rgba(0,0,0,.28); transition: all .18s ease; white-space: nowrap; }
.oki-btn:hover { border-color: rgba(255,200,120,.55); color: #fff; background: linear-gradient(180deg, rgba(255,190,120,.18), rgba(255,150,80,.15)); transform: translateY(-1px); }
.oki-btn-icon { width: 18px; height: 18px; opacity: .80; transition: opacity .18s ease; }
.oki-btn:hover .oki-btn-icon { opacity: 1; }

.oki-accent, .bg-primary { background: linear-gradient(180deg, #FFA64D, #FF8C3A) !important; border-color: rgba(242,140,40,.55) !important; color: #fff !important; box-shadow: 0 0 35px rgba(255,150,70,.35), 0 18px 44px rgba(242,140,40,.25) !important; }
.oki-accent .oki-btn-icon { opacity: .95; }
.oki-accent:hover, .bg-primary:hover, #checkoutBtn:hover, #getCodeBtn:hover, #submitCodeBtn:hover, #addToCartBtn:hover { background: linear-gradient(180deg, #FFB86A, #FFA050) !important; transform: translateY(-1px); filter: saturate(1.05); }

.oki-badge { position: absolute; top: -0.4rem; right: -0.4rem; background-color: var(--gold); color: rgba(15,14,13,.92); font-size: .72rem; font-weight: 900; padding: .1rem .38rem; border-radius: 9999px; box-shadow: 0 14px 26px rgba(255,207,139,.22); border: 1px solid rgba(241,227,214,.25); }

/* Inputs */
input, textarea { background: rgba(10,9,9,.55) !important; border-color: rgba(241,227,214,.18) !important; color: var(--ink) !important; }
textarea { resize: none; }
input::placeholder, textarea::placeholder { color: rgba(246,239,232,.55); }
input:focus, textarea:focus { outline: none !important; box-shadow: 0 0 0 3px rgba(255,207,139,.18) !important; border-color: rgba(255,207,139,.35) !important; }

/* Modals & Cookie Banner */
#cartDrawer, #ordersDrawer, #productModal, #cityModal, #loginModal, #deliveryAddressModal, #pickupAddressModal, #timeModal, #confirmDeleteModal, #confirmCancelModal { background-color: rgba(0,0,0,.62) !important; backdrop-filter: blur(4px); }

#cartDrawer .bg-white, #ordersDrawer .bg-white, #productModalPanel, #cityModal .bg-white, #loginModal .bg-white, #deliveryAddressModal > div, #pickupAddressModal > div, #timeModal > div, #confirmDeleteModal > div, #confirmCancelModal > div {
    border: 1px solid var(--line); box-shadow: 0 30px 90px rgba(0,0,0,.62);
    background: radial-gradient(900px 320px at 10% 0%, rgba(255,207,139,.08), transparent 60%), linear-gradient(180deg, rgba(20,18,16,.98), rgba(20,18,16,.92)) !important;
}
#checkoutBtn, #getCodeBtn, #submitCodeBtn, #addToCartBtn { background: linear-gradient(180deg, var(--ember), var(--ember2)) !important; border: 1px solid rgba(242,140,40,.55) !important; box-shadow: 0 18px 48px rgba(242,140,40,.22); }
.cookie-card { border: 1px solid rgba(241,227,214,.18); background: radial-gradient(900px 320px at 10% 0%, rgba(255,207,139,.10), transparent 60%), linear-gradient(180deg, rgba(20,18,16,.95), rgba(20,18,16,.90)); backdrop-filter: blur(10px); box-shadow: 0 25px 70px rgba(0,0,0,.55), 0 0 35px rgba(255,170,90,.15); }
.cookie-link { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.cookie-btn { padding: .55rem 1.2rem; border-radius: 9999px; font-size: .85rem; font-weight: 700; background: linear-gradient(180deg, var(--ember), var(--ember2)); border: 1px solid rgba(242,140,40,.55); box-shadow: 0 0 20px rgba(255,170,90,.25), 0 12px 30px rgba(242,140,40,.30); transition: all .2s ease; }
.cookie-btn:hover { transform: translateY(-1px); box-shadow: 0 0 30px rgba(255,170,90,.35), 0 18px 50px rgba(242,140,40,.40); }

/* Плавный переход между страницами (MPA-навигация): вместо "бланка"/мигания браузер
   делает кросс-фейд старой/новой страницы, а помеченные view-transition-name элементы
   (нижняя навигация) морфятся друг в друга, а не пропадают/появляются заново. */
@view-transition {
    navigation: auto;
}

/* Bottom Navigation */
/* Фон контейнера заливает зону safe-area под баром — иначе под навигацией виден прозрачный
   «пустой» промежуток с контентом страницы (особенно на телефонах с жестовой полосой). */
#mobileBottomNav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20000; padding-bottom: env(safe-area-inset-bottom); background: linear-gradient(180deg, rgba(28,18,14,.96), rgba(28,18,14,.99)); view-transition-name: bottom-nav; }
@media (min-width: 769px) { #mobileBottomNav { display: none !important; } }

/* В приложении нижнюю safe-area закрывает нативная плашка RN — поэтому в app-режиме
   убираем env()-отступ у бара (иначе двойной отступ и «прыжок» при навигации).
   Класс is-app выставляется до первой отрисовки страницы, так что прыжка нет. */
html.is-app #mobileBottomNav { padding-bottom: 0 !important; }
html.is-app body { padding-bottom: var(--bottom-nav-h, 56px) !important; }
html.is-app header { padding-top: 0 !important; }
html.is-app #cartDrawer .absolute,
html.is-app #ordersDrawer .absolute { padding-bottom: var(--bottom-nav-h, 56px) !important; }

/* В приложении корзина и заказы — отдельный полноэкранный экран ПОВЕРХ нижней навигации
   (на сайте они z-50, а навбар z-20000 — навбар перекрывал корзину, отсюда баги/лаги).
   Поднимаем drawer над навбаром и прячем сам навбар, пока корзина открыта: меню и корзина
   больше никогда не наложены друг на друга. */
html.is-app #cartDrawer:not(.hidden),
html.is-app #ordersDrawer:not(.hidden) { z-index: 21000 !important; }
html.is-app body:has(#cartDrawer:not(.hidden)) #mobileBottomNav,
html.is-app body:has(#ordersDrawer:not(.hidden)) #mobileBottomNav { display: none !important; }
html.is-app body:has(#cartDrawer:not(.hidden)) #cartDrawer .absolute,
html.is-app body:has(#ordersDrawer:not(.hidden)) #ordersDrawer .absolute { padding-bottom: 0 !important; }

/* Модалка логина должна быть выше открытой корзины/заказов в приложении — иначе
   при клике "Оформить заказ" неавторизованным пользователем модалка открывается,
   но визуально скрыта за корзиной (z-index 21000). */
html.is-app #loginModal:not(.hidden) { z-index: 21500 !important; }
#mobileBottomNav .nav-shell { height: var(--bottom-nav-h, 56px); border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(28,18,14,.78), rgba(28,18,14,.96)); backdrop-filter: blur(14px); }
#mobileBottomNav .nav-btn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; flex: 1; height: 100%; color: rgba(246,239,232,.82); font-weight: 650; font-size: 10px; user-select: none; transition: color 0.2s ease, flex 0.3s ease; }
#mobileBottomNav .nav-btn:active { transform: scale(.98); }
#mobileBottomNav .nav-ico { width: 22px; height: 22px; opacity: .92; }
#mobileBottomNav .nav-btn.is-accent { color: var(--gold); }
#mobileBottomNav .nav-btn.hidden { display: none !important; }
#mobileBottomNav .nav-badge { position: absolute; top: 4px; right: 50%; margin-right: -18px; min-width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; border-radius: 999px; background: var(--gold); color: rgba(15,14,13,.92); font-size: 9px; font-weight: 900; border: 1px solid rgba(241,227,214,.25); }

/* ════ CART PAGE MODE (/{slug}/cart, только в приложении) ════ */
/* Корзина рендерится сразу видимой на отдельной странице — без JS-toggle и без
   мелькания шапки/меню/корзины при загрузке. */
html.cart-page-mode header,
html.cart-page-mode main,
html.cart-page-mode #mobileMenuOverlay,
html.cart-page-mode #mobileMenuDrawer { display: none !important; }

html.cart-page-mode body { overflow: hidden; }

.cart-page-mode #cartDrawer.hidden {
    display: block !important;
    position: fixed;
    inset: 0;
    background: transparent !important;
    backdrop-filter: none !important;
    z-index: 100;
}
.cart-page-mode #cartDrawer.hidden > div {
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    padding-bottom: var(--bottom-nav-h, 56px);
    overscroll-behavior: contain;
}
/* Кнопка закрытия (×) не нужна — для возврата в меню есть bottomNavMenu */
.cart-page-mode #cartDrawer [data-role="toggle-cart"] { display: none !important; }

/* --- SPECIFIC PAGES ELEMENTS --- */
/* Footer */
footer { background: rgba(12,11,11,.65) !important; border-top: 1px solid var(--line) !important; }

/* Home / City Page */
.product-card { border-radius: 1.25rem; border: 1px solid var(--line); background: radial-gradient(600px 250px at 10% 0%, rgba(255,180,110,.18), transparent 60%), linear-gradient(180deg, #3A261E 0%, #2E1F18 100%); box-shadow: 0 18px 46px rgba(0,0,0,.35); transition: all 0.18s ease; overflow: hidden; }
.product-card:hover { box-shadow: 0 0 35px rgba(255,170,90,.18), 0 26px 70px rgba(0,0,0,.40); border-color: rgba(255,200,140,.35); transform: translateY(-3px); background: radial-gradient(700px 260px at 12% 0%, rgba(255,200,130,.25), transparent 60%), linear-gradient(180deg, #4A3025 0%, #3A261E 100%); }
.product-card img { background: var(--smoke); border: 1px solid rgba(241,227,214,.16); box-shadow: 0 18px 40px rgba(0,0,0,.40); }
.oki-hero { border-radius: 1.75rem; color: #fff; border: 1px solid rgba(255,210,160,.22); background: radial-gradient(1100px 600px at 50% -10%, rgba(255,210,150,.32), transparent 70%), radial-gradient(800px 500px at 15% 0%, rgba(255,170,100,.20), transparent 65%), linear-gradient(180deg, #4A3025 0%, #3A261E 100%); box-shadow: 0 18px 52px rgba(0,0,0,.26); overflow: hidden; }
.oki-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem; border-radius: 999px; border: 1px solid rgba(241,227,214,.20); background: rgba(0,0,0,.22); color: rgba(246,239,232,.92); font-weight: 750; font-size: .85rem; }
.oki-hero-media { border-radius: 1.25rem; border: 1px solid rgba(241,227,214,.16); background: radial-gradient(110% 140% at 0% 0%, rgba(255,207,139,.16), rgba(0,0,0,.10)); box-shadow: 0 18px 46px rgba(0,0,0,.45); overflow: hidden; }
.pizza-showcase { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.18fr); gap: 1.5rem; align-items: stretch; }
.pizza-showcase-copy { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.pizza-showcase-chip { width: fit-content; }
.pizza-showcase-text { position: relative; border: 1px solid rgba(241,227,214,.16); background: linear-gradient(180deg, rgba(31,21,16,.78), rgba(18,12,10,.44)); backdrop-filter: blur(16px); padding: 1.1rem 1.15rem; border-radius: 1.25rem; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); overflow: hidden; }
.pizza-showcase-text::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,214,160,.16), transparent 35%, transparent 70%, rgba(255,214,160,.08)); opacity: .9; pointer-events: none; }
.pizza-showcase-copy-shell { position: relative; }
.pizza-showcase-copy-lead, .pizza-showcase-copy-note { position: relative; z-index: 1; }
.pizza-showcase-copy-kicker { display: inline-flex; align-items: center; gap: .45rem; margin-bottom: .7rem; padding: .34rem .72rem; border-radius: 999px; border: 1px solid rgba(255,223,179,.18); background: rgba(255,210,150,.08); color: rgba(255,237,214,.92); font-size: .74rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.pizza-showcase-copy-note { display: flex; gap: .75rem; align-items: flex-start; margin-top: .15rem; padding-top: .9rem; border-top: 1px solid rgba(241,227,214,.10); color: rgba(255,245,234,.90); }
.pizza-showcase-copy-dot { width: .58rem; height: .58rem; margin-top: .5rem; border-radius: 999px; flex: 0 0 auto; background: radial-gradient(circle at 35% 35%, rgba(255,244,226,.95), rgba(255,182,85,.88)); box-shadow: 0 0 0 5px rgba(255,182,85,.08); }
.pizza-showcase-copy-note p, .pizza-showcase-copy-lead p { margin: 0; }
.pizza-showcase-panel { position: relative; min-width: 0; border-radius: 1.4rem; border: 1px solid rgba(241,227,214,.12); background: radial-gradient(120% 150% at 0% 0%, rgba(255,207,139,.11), transparent 58%), linear-gradient(180deg, rgba(20,14,11,.76), rgba(20,14,11,.56)); box-shadow: inset 0 1px 0 rgba(255,255,255,.03); padding: 1rem; overflow: hidden; }
.pizza-showcase-panel::before, .pizza-showcase-panel::after { content: ""; position: absolute; top: 0; bottom: 0; width: 42px; pointer-events: none; z-index: 2; transition: opacity .18s ease; }
.pizza-showcase-panel::before { left: 0; background: linear-gradient(90deg, rgba(33,21,16,.92), transparent); }
.pizza-showcase-panel::after { right: 0; background: linear-gradient(270deg, rgba(33,21,16,.92), transparent); }
.pizza-showcase-static .pizza-showcase-panel::before, .pizza-showcase-static .pizza-showcase-panel::after { opacity: 0; }
.pizza-showcase-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.pizza-showcase-eyebrow { margin: 0; color: rgba(246,239,232,.54); font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.pizza-showcase-title { margin: .3rem 0 0; color: var(--ink); font-size: 1.15rem; font-weight: 800; line-height: 1.15; }
.pizza-showcase-controls { display: inline-flex; align-items: center; gap: .55rem; flex: 0 0 auto; }
.pizza-showcase-arrow { width: 2.5rem; height: 2.5rem; border-radius: 999px; border: 1px solid rgba(241,227,214,.16); background: rgba(0,0,0,.18); color: rgba(246,239,232,.9); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 8px 18px rgba(0,0,0,.16); transition: transform .18s ease, opacity .18s ease, border-color .18s ease, background .18s ease; }
.pizza-showcase-arrow svg { width: 1.15rem; height: 1.15rem; }
.pizza-showcase-arrow:hover { transform: translateY(-1px); border-color: rgba(255,207,139,.35); background: rgba(255,207,139,.10); }
.pizza-showcase-arrow[disabled], .pizza-showcase-arrow.is-hidden { opacity: .35; pointer-events: none; }
.pizza-showcase-carousel { overflow-x: auto; overflow-y: hidden; scroll-behavior: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; padding-bottom: .35rem; }
.pizza-showcase-carousel::-webkit-scrollbar { display: none; }
.pizza-showcase-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(196px, 224px); gap: .85rem; }
.pizza-showcase-card { min-width: 0; display: flex; flex-direction: column; gap: .82rem; padding: .8rem; border-radius: 1.15rem; border: 1px solid rgba(241,227,214,.12); background: linear-gradient(180deg, rgba(57,38,29,.92), rgba(35,22,17,.94)); box-shadow: 0 10px 22px rgba(0,0,0,.16); text-align: left; color: inherit; scroll-snap-align: start; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.pizza-showcase-card:hover { transform: translateY(-3px); border-color: rgba(255,207,139,.30); box-shadow: 0 14px 28px rgba(0,0,0,.18), 0 0 16px rgba(255,172,92,.10); }
.pizza-showcase-card-media { position: relative; aspect-ratio: 1 / 1; border-radius: .95rem; overflow: hidden; background: rgba(0,0,0,.18); border: 1px solid rgba(241,227,214,.12); }
.pizza-showcase-card-media img { width: 100%; height: 100%; object-fit: cover; }
.pizza-showcase-card-body { display: flex; flex-direction: column; gap: .55rem; min-width: 0; }
.pizza-showcase-card-body h3 { margin: 0; color: var(--ink); font-size: 1rem; font-weight: 750; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pizza-showcase-card-meta { display: flex; align-items: center; justify-content: space-between; gap: .65rem; min-width: 0; }
.pizza-showcase-card-weight { color: rgba(246,239,232,.60); font-size: .82rem; white-space: nowrap; }
.pizza-showcase-card-weight.hidden { display: none; }
.pizza-showcase-card-price { color: var(--gold); font-size: .96rem; font-weight: 800; white-space: nowrap; margin-left: auto; }
#productModalPanel .lg\:w-1\/2:last-child { background: linear-gradient(180deg, rgba(35,22,17,.98), rgba(25,16,12,.95)); }
#productName { color: var(--gold) !important; text-shadow: 0 0 10px rgba(255,170,90,.25); }
#productDesc { color: rgba(246,239,232,.75) !important; }
#nutritionInfoBtn { background: rgba(0,0,0,.35); border-color: rgba(241,227,214,.18) !important; color: var(--gold) !important; }
#sizeButtons button { background: rgba(10,9,9,.45); border-color: rgba(241,227,214,.18) !important; color: var(--ink); }
#sizeButtons button.bg-orange-500 { background: linear-gradient(180deg, var(--ember), var(--ember2)) !important; border-color: rgba(242,140,40,.55) !important; }
#selectedChips .bg-gray-100 { background: rgba(241,227,214,.08) !important; border: 1px solid rgba(241,227,214,.14); }
#addIngredients button { background: rgba(15,12,10,.55); border-color: rgba(241,227,214,.16); }
#addIngredients button.border-orange-500 { background: linear-gradient(180deg, rgba(255,160,80,.22), rgba(255,120,60,.18)); }

/* Profile Page */
.profile-card { border-radius: 1.5rem; border: 1px solid var(--line); background: radial-gradient(900px 320px at 10% 0%, rgba(255,207,139,.06), transparent 60%), linear-gradient(180deg, rgba(20,18,16,.92), rgba(20,18,16,.86)); box-shadow: 0 22px 70px rgba(0,0,0,.42); }
.profile-title { color: var(--gold); text-shadow: 0 0 10px rgba(255,170,90,.22); }
.muted { color: var(--muted2); }
.oki-switch { width: 46px; height: 26px; border-radius: 999px; background: rgba(241,227,214,.14); border: 1px solid rgba(241,227,214,.18); position: relative; transition: all .18s ease; flex: 0 0 auto; }
.oki-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 999px; background: rgba(246,239,232,.85); transition: all .18s ease; box-shadow: 0 10px 22px rgba(0,0,0,.35); }
input[type="checkbox"]:checked + .oki-switch { background: rgba(242,140,40,.35); border-color: rgba(242,140,40,.55); }
input[type="checkbox"]:checked + .oki-switch::after { transform: translateX(20px); background: var(--gold); }

/* Order & Checkout */
main > section.bg-white, main > aside.bg-white { border: 1px solid var(--line); box-shadow: 0 30px 90px rgba(0,0,0,.35); }
#orderItems > div { background: radial-gradient(600px 250px at 10% 0%, rgba(255,180,110,.14), transparent 60%), linear-gradient(180deg, #3A261E 0%, #2E1F18 100%) !important; border-color: var(--line) !important; box-shadow: 0 18px 46px rgba(0,0,0,.22) !important; }
#orderItems img { background: var(--smoke); border: 1px solid rgba(241,227,214,.16); box-shadow: 0 18px 40px rgba(0,0,0,.32); }
.step-item {
    min-width: 0;
}
.step-item .step-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 999px;
    border: 1.5px solid rgba(241,227,214,.22) !important;
    background: linear-gradient(180deg, rgba(18,14,12,.96), rgba(38,26,21,.92)) !important;
    color: rgba(246,239,232,.72) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 8px 20px rgba(0,0,0,.22);
    transition: all 0.25s ease;
}
.step-item .step-text,
.step-item span {
    color: rgba(246,239,232,.64) !important;
    transition: color 0.25s ease, opacity 0.25s ease;
}
.step-item.completed .step-circle {
    background: linear-gradient(180deg, #FFA64D, #F28C28) !important;
    border-color: rgba(255,180,90,.8) !important;
    color: #fff !important;
    box-shadow: 0 0 18px rgba(242,140,40,.24), 0 10px 28px rgba(0,0,0,.24);
}
.step-item.active .step-circle {
    background: radial-gradient(circle at 50% 35%, rgba(255,223,170,.26), rgba(255,175,90,.16) 45%, rgba(38,26,21,.96) 100%) !important;
    color: var(--gold) !important;
    border-color: rgba(255,207,139,.85) !important;
    transform: scale(1.06);
    box-shadow: 0 0 0 4px rgba(255,207,139,.08), 0 0 18px rgba(255,207,139,.20), 0 10px 26px rgba(0,0,0,.24);
}
.step-item.completed .step-text,
.step-item.completed span,
.step-item.active .step-text,
.step-item.active span {
    color: var(--gold) !important;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255,207,139,.16);
}
.step-item.cancelled .step-circle {
    background: linear-gradient(180deg, #ff6668, #ef4444) !important;
    border-color: #ff7c7d !important;
    color: #fff !important;
    box-shadow: 0 0 18px rgba(239,68,68,.20);
}
.step-item.cancelled .step-text {
    color: #ff8f90 !important;
    font-weight: 800;
}
nav#orderSteps .h-\[2px\], nav#checkoutSteps .h-\[2px\] {
    background: linear-gradient(90deg, rgba(241,227,214,.12), rgba(255,207,139,.2), rgba(241,227,214,.12)) !important;
    border-radius: 999px;
}
@media (min-width: 769px) {
    nav#orderSteps,
    nav#checkoutSteps {
        gap: .5rem !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
    }
    .step-item {
        gap: .55rem !important;
    }
    .step-item .step-circle {
        width: 2.5rem;
        height: 2.5rem;
        font-size: .95rem !important;
    }
    .step-item .step-text,
    .step-item span {
        font-size: .88rem !important;
        white-space: nowrap;
    }
    nav#orderSteps .h-\[2px\],
    nav#checkoutSteps .h-\[2px\] {
        width: 2.25rem !important;
        flex: 0 0 2.25rem !important;
        margin: 0 .1rem !important;
    }
}
#closeDeliveryModalBtn, #closePickupModalBtn { background: rgba(0,0,0,.30) !important; border: 1px solid rgba(241,227,214,.18) !important; color: rgba(246,239,232,.88) !important; }
#closeDeliveryModalBtn:hover, #closePickupModalBtn:hover { background: rgba(241,227,214,.08) !important; }
#yandexMap { width: 100%; height: 100%; min-height: 45vh; background: rgba(10,9,9,.55); border-radius: 12px; position: relative; z-index: 1; border: 1px solid rgba(241,227,214,.16); }
.map-loader { background: rgba(10,9,9,.65) !important; }
.delivery-left-panel { background: radial-gradient(700px 260px at 10% 0%, rgba(255,207,139,.10), transparent 60%), linear-gradient(180deg, rgba(20,18,16,.98), rgba(20,18,16,.92)) !important; border: 1px solid var(--line); border-radius: 16px; padding: 20px; width: 100%; max-width: 360px; max-height: 75vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.45); z-index: 20; }
.address-item { border: 1px solid rgba(241,227,214,.16); border-radius: 12px; padding: 10px 14px; transition: all 0.2s ease; background: rgba(0,0,0,.16); }
.address-item:hover { background: rgba(241,227,214,.08); border-color: rgba(255,207,139,.35); transform: translateY(-2px); }
.address-item.selected { background: rgba(255,207,139,.10); border-color: rgba(255,207,139,.55); }
.zoom-btn, .locate-btn { width: 36px; height: 36px; border: 1px solid rgba(241,227,214,.18); border-radius: 50%; background: rgba(0,0,0,.30); color: rgba(246,239,232,.92); display: flex; align-items: center; justify-content: center; font-weight: 900; box-shadow: 0 12px 30px rgba(0,0,0,.35); transition: all 0.2s; }
.zoom-btn:hover, .locate-btn:hover { background: rgba(241,227,214,.08); border-color: rgba(255,207,139,.35); transform: translateY(-1px); }
#cancelCancelBtn { border-color: var(--line2) !important; background: rgba(0,0,0,.18) !important; color: rgba(246,239,232,.88) !important; }
#cancelCancelBtn:hover { background: rgba(241,227,214,.08) !important; }
#toastContainer > div { border: 1px solid rgba(241,227,214,.18); box-shadow: 0 18px 50px rgba(0,0,0,.35); }

.checkout-fulfillment-card { position: relative; overflow: hidden; border-radius: 1.5rem; border: 1px solid rgba(255,207,139,.18); background: radial-gradient(100% 140% at 0% 0%, rgba(255,207,139,.18), transparent 58%), linear-gradient(180deg, rgba(53,35,27,.98), rgba(31,20,15,.96)); padding: 1.1rem; box-shadow: 0 18px 46px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.04); }
.checkout-fulfillment-card::after { content: ""; position: absolute; inset: auto -20% -55% auto; width: 220px; height: 220px; border-radius: 999px; background: radial-gradient(circle, rgba(255,172,92,.18), transparent 65%); pointer-events: none; }
.checkout-fulfillment-card[data-mode="pickup"] { background: radial-gradient(120% 140% at 0% 0%, rgba(255,207,139,.24), transparent 55%), linear-gradient(180deg, rgba(65,42,29,.98), rgba(31,20,15,.96)); }
.checkout-fulfillment-card[data-available="false"] { border-color: rgba(239,68,68,.24); background: radial-gradient(110% 140% at 0% 0%, rgba(239,68,68,.16), transparent 58%), linear-gradient(180deg, rgba(56,25,24,.98), rgba(31,20,15,.96)); }
.checkout-fulfillment-head { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.checkout-fulfillment-eyebrow { margin: 0; color: rgba(246,239,232,.58); font-size: .73rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.checkout-fulfillment-title { margin: .3rem 0 0; color: var(--ink); font-size: 1.2rem; font-weight: 800; line-height: 1.15; }
.checkout-fulfillment-badge { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 2.4rem; padding: .6rem .95rem; border-radius: 999px; border: 1px solid rgba(255,207,139,.26); background: rgba(255,255,255,.06); color: var(--gold); font-size: .95rem; font-weight: 900; letter-spacing: .01em; box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.checkout-fulfillment-card[data-available="false"] .checkout-fulfillment-badge { color: #ffb4b6; border-color: rgba(255,140,140,.22); }
.checkout-fulfillment-description { position: relative; z-index: 1; margin: .85rem 0 0; color: rgba(246,239,232,.74); font-size: .93rem; line-height: 1.55; }
.checkout-fulfillment-progress { position: relative; z-index: 1; margin-top: 1rem; }
.checkout-fulfillment-progress.is-hidden, .checkout-fulfillment-stats.is-hidden { display: none; }
.checkout-fulfillment-progress-track { height: .72rem; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.05); overflow: hidden; box-shadow: inset 0 2px 10px rgba(0,0,0,.28); }
.checkout-fulfillment-progress-bar { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #F28C28 0%, #FFD18B 100%); box-shadow: 0 0 22px rgba(255,172,92,.28); transition: width .3s ease; }
.checkout-fulfillment-progress-meta { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .7rem; color: rgba(246,239,232,.74); font-size: .83rem; }
.checkout-fulfillment-progress-meta span:last-child { color: var(--gold); font-weight: 800; white-space: nowrap; }
.checkout-fulfillment-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: 1rem; }
.checkout-stat-card { border-radius: 1.15rem; border: 1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.20); padding: .85rem .95rem; box-shadow: inset 0 1px 0 rgba(255,255,255,.03); }
.checkout-stat-label { display: block; color: rgba(246,239,232,.56); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.checkout-stat-value { display: block; margin-top: .45rem; color: var(--ink); font-size: 1rem; font-weight: 850; }
.checkout-price-breakdown { border-radius: 1.25rem; border: 1px solid rgba(241,227,214,.14); background: linear-gradient(180deg, rgba(18,14,12,.9), rgba(30,20,15,.88)); padding: .55rem 0; box-shadow: inset 0 1px 0 rgba(255,255,255,.02); }
.checkout-price-breakdown:empty { display: none; }
.checkout-price-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; color: rgba(246,239,232,.78); font-size: .95rem; }
.checkout-price-row + .checkout-price-row { border-top: 1px solid rgba(241,227,214,.08); }
.checkout-price-row strong { color: var(--ink); font-size: .98rem; font-weight: 800; }
.checkout-price-row.is-success span, .checkout-price-row.is-success strong { color: #89e7b1; }
.checkout-price-row.is-muted span, .checkout-price-row.is-muted strong { color: rgba(162,215,255,.88); }
.checkout-total-old { margin-bottom: .2rem; color: rgba(246,239,232,.42); font-size: .86rem; font-weight: 700; text-decoration: line-through; text-decoration-thickness: 1.5px; }
@media (max-width: 640px) {
  .checkout-fulfillment-card { padding: 1rem; }
  .checkout-fulfillment-head { flex-direction: column; align-items: stretch; }
  .checkout-fulfillment-badge { width: fit-content; }
  .checkout-fulfillment-progress-meta { flex-direction: column; align-items: flex-start; }
  .checkout-fulfillment-stats { grid-template-columns: 1fr; }
}

/* More Page */
.prose-like p { margin: .65rem 0; }
.legal-pre { white-space: pre-wrap; word-break: break-word; font-size: 12px; line-height: 1.5; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--muted); }
.more-sticky { top: 50vh; transform: translateY(-50%); max-height: calc(100vh - 140px); overflow: auto; scrollbar-width: none; }
.more-sticky::-webkit-scrollbar { display: none; }
.more-link.active { outline: 2px solid rgba(255,207,139,.45); box-shadow: 0 0 0 6px rgba(255,207,139,.10); }
.consent-link { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.consent-link:hover { opacity: .9; }

/* Animations */
@keyframes fadeIn { 0% { opacity: 0 } 100% { opacity: 1 } }
@keyframes scaleIn { 0% { transform: scale(0.95); opacity: 0 } 100% { transform: scale(1); opacity: 1 } }
.animate-fadeIn { animation: fadeIn 0.25s ease-out forwards; }
.animate-scaleIn { animation: scaleIn 0.25s ease-out forwards; }

/* =========================================
   MEDIA QUERIES (Mobile responsiveness)
   ========================================= */
@media (max-width: 1400px) {
    .header-right .oki-btn { padding: .44rem .62rem; }
    .header-right .oki-btn > span:not(.oki-badge) { display: none; }
}

@media (max-width: 1024px) {
    .pizza-showcase { grid-template-columns: 1fr; gap: 1.15rem; }
}

@media (max-width: 768px) {
    .pizza-showcase { padding: 1rem !important; gap: 1rem; }
    .pizza-showcase-copy { gap: .85rem; }
    .pizza-showcase-panel { padding: .85rem; border-radius: 1.2rem; }
    .pizza-showcase-panel-head { align-items: flex-start; }
    .pizza-showcase-controls { display: none; }
    .pizza-showcase-carousel { scroll-behavior: smooth; }
    .pizza-showcase-track { grid-auto-columns: minmax(168px, 72vw); gap: .75rem; }
    .pizza-showcase-card { padding: .72rem; border-radius: 1rem; }
    .pizza-showcase-card-body h3 { font-size: .94rem; }
    .pizza-showcase-card-price { font-size: .92rem; }
    .pizza-showcase-card-weight { font-size: .78rem; }

    body { padding-bottom: calc(var(--bottom-nav-h, 56px) + env(safe-area-inset-bottom)); }
    header { position: static !important; top: auto !important; }
    header .header-inner { display: flex; flex-direction: column; gap: .45rem; padding-top: .55rem; padding-bottom: .45rem; }
    .header-left { width: 100%; justify-content: space-between; align-items: center; gap: 0.5rem; }
    .header-right { display: none !important; }
    .header-city { height: auto; padding: .35rem .65rem; border: 1px solid rgba(241,227,214,.18); border-radius: 999px; background: rgba(0,0,0,.20); }
    #cartDrawer .absolute, #ordersDrawer .absolute { padding-bottom: calc(var(--bottom-nav-h, 56px) + env(safe-area-inset-bottom)) !important; }
    #mobileCategoryBarMount { position: sticky; top: 0; z-index: 40 !important; background: linear-gradient(180deg, rgba(42,26,19,.96) 0%, rgba(34,20,15,.95) 100%); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); box-shadow: 0 18px 40px rgba(0,0,0,.35); margin-left: -16px !important; margin-right: -16px !important; width: auto !important; overflow: clip; box-sizing: border-box; }
    #mobileCategoryBarMount .oki-navwrap { height: auto !important; padding: 0.45rem 0 !important; width: 100%; justify-content: flex-start; min-width: 0; }
    .oki-nav { height: auto !important; width: 100%; padding: 0 !important; gap: 0.6rem !important; scroll-snap-type: x mandatory; min-width: 0; }
    #mobileCategoryBarMount .oki-nav { padding-left: 14px !important; padding-right: 14px !important; scroll-padding-left: 14px; }
    .nav-link:first-child { margin-left: 0 !important; } .nav-link:last-child { margin-right: 0 !important; }
    .nav-link { height: auto !important; line-height: normal !important; padding: 0.42rem 0.95rem !important; font-size: 0.8rem !important; font-weight: 600 !important; color: rgba(246,239,232,.95) !important; border-radius: 999px; border: 1px solid rgba(241,227,214,.14) !important; background: rgba(0,0,0,.18) !important; scroll-snap-align: start; flex: 0 0 auto; }
    .nav-link.active { color: var(--gold) !important; text-shadow: 0 0 8px rgba(255,170,90,.45) !important; border-color: rgba(255,207,139,.4) !important; background: rgba(255,207,139,.08) !important; }
    .nav-link::after, .oki-nav::after { display: none !important; }
    .oki-nav-arrow { display: none !important; }
    .oki-hero h1 { line-height: 1.15 !important; }
    .oki-hero p{
        line-height:1.6;
        text-shadow:0 1px 4px rgba(0,0,0,.6);
        color:rgba(255,255,255,.92);
    }
    .hero-text-bg{
        background:linear-gradient(180deg, rgba(28,19,15,.78), rgba(18,13,11,.48));
        backdrop-filter:blur(8px);
        padding:14px;
        border-radius:14px;
    }
    .pizza-showcase-copy-note { gap: .65rem; padding-top: .8rem; }
    .pizza-showcase-copy-kicker { margin-bottom: .6rem; font-size: .68rem; letter-spacing: .14em; }
    .pizza-showcase-copy-dot { width: .52rem; height: .52rem; margin-top: .45rem; }
    .oki-hero .hero-actions, .oki-hero .hero-features { display: none !important; }
    .oki-hero .hero-chips .oki-chip:nth-child(3) { display: none !important; }
    #productModalPanel { bottom: auto !important; max-height: none !important; height: auto !important; }
    .more-sticky { top: auto; transform: none; max-height: none; overflow: visible; }
    #pickupAddressModal, #timeModal, #confirmDeleteModal, #confirmCancelModal { align-items: flex-end !important; }
    #pickupAddressModal > div, #timeModal > div, #confirmDeleteModal > div, #confirmCancelModal > div { width: 100% !important; margin: 0 !important; max-height: 85vh !important; border-radius: 24px 24px 0 0 !important; border-bottom: none !important; padding-bottom: env(safe-area-inset-bottom); transform: translateY(100%); animation: slideUpSheet 0.3s ease-out forwards; }
    @keyframes slideUpSheet { to { transform: translateY(0); } }
    #deliveryAddressModal > div { width: 100% !important; height: 100dvh !important; max-width: none !important; border-radius: 0 !important; margin: 0 !important; }
    #closeDeliveryModalBtn { top: calc(env(safe-area-inset-top, 16px) + 16px) !important; }
    .delivery-left-panel { width: 100% !important; max-width: 100% !important; left: 0 !important; bottom: 0 !important; border-radius: 24px 24px 0 0 !important; height: min(78dvh, calc(100dvh - env(safe-area-inset-top, 0px) - 12px)) !important; min-height: 140px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); overflow: hidden !important; display: flex !important; flex-direction: column !important; }
    #zoomControls { top: auto !important; bottom: calc(min(78dvh, calc(100dvh - env(safe-area-inset-top, 0px) - 12px)) + 20px) !important; transform: none !important; }
    .checkout-sticky-footer { padding-bottom: calc(1rem + env(safe-area-inset-bottom)) !important; border-radius: 24px 24px 0 0; }
    #orderItems { max-height: none !important; overflow: visible !important; }
}

@media (max-width: 480px) {
    /* Общие фиксы для зума */
    input, textarea, select { font-size: 16px !important; }
    header img { max-width: 160px !important; }

    /* Отступы для основных блоков */
    main .p-6, main .md\:p-8, .profile-card { padding: 1.25rem !important; }
    #productModalPanel, #loginModal > div { margin-left: 0.5rem !important; margin-right: 0.5rem !important; width: calc(100% - 1rem) !important; }
    .oki-chip { padding: 0.25rem 0.5rem; font-size: 0.75rem; }
    .legal-pre { padding: 1rem !important; font-size: 11px !important; word-break: break-all !important; }

    /* ==================================== */
    /* ИСПРАВЛЕНИЯ ДЛЯ CHECKOUT.HTML        */
    /* ==================================== */
    /* Возвращаем место: уменьшаем огромные паддинги карточек */
    main > section.bg-white, main > aside.bg-white {
        padding: 1.25rem !important;
        border-radius: 20px !important;
    }

    /* Шапка: центрируем контент */
    header > div { padding: 0.75rem 0.5rem !important; gap: 0.75rem !important; }
    header img { margin: 0 auto; }

    /* Шаги заказа: темные, аккуратные и без белых кружков */
    nav#orderSteps, nav#checkoutSteps {
        gap: 0.2rem !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        width: 100%;
        padding-left: 0.1rem;
        padding-right: 0.1rem;
        overflow-x: auto;
        flex-wrap: nowrap !important;
    }
    .step-item {
        gap: 0.28rem !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        flex: 1 1 0;
    }
    .step-circle {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        font-size: 0.74rem !important;
        border-width: 1.5px !important;
    }
    .step-text, .step-item span {
        font-size: 0.58rem !important;
        line-height: 1.15 !important;
        margin-top: 0 !important;
        text-align: center;
        max-width: 52px;
        white-space: normal !important;
    }
    nav#orderSteps .h-\[2px\], nav#checkoutSteps .h-\[2px\] {
        width: 100% !important;
        min-width: 10px !important;
        flex: 1 1 10px !important;
        margin-top: 12px !important;
    }

    /* Сетка: Имя и Телефон ставим друг под другом */
    .grid.md\:grid-cols-2 { grid-template-columns: 1fr !important; }

    /* Кнопки внизу (Отменить заказ и На главную) — в столбик, кнопка на всю ширину */
    section.bg-white > .flex.justify-between.items-center.mt-6 { flex-direction: column-reverse !important; gap: 1rem !important; align-items: stretch !important; }
    #cancelOrderBtn { width: 100% !important; text-align: center; justify-content: center; }

    /* Размер шрифта заголовка заказа */
    #orderTitle { font-size: 1.5rem !important; }
}

/* =========================================
   ПОЗИЦИОНИРОВАНИЕ БАННЕРА COOKIE
   ========================================= */

#cookieBanner {
    /* Делаем его выше всех модалок и нижнего меню (у меню z-index: 20000) */
    z-index: 20001 !important;
}

@media (max-width: 768px) {
    #cookieBanner {
        /* Поднимаем баннер на высоту нижнего меню + безопасная зона iPhone + отступ 16px */
        bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 16px) !important;
    }
}
#orderItems {
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Заставляем все внутренние flex-контейнеры заказа сужаться, а не растягивать экран */
#orderItems * {
    min-width: 0;
}

/* =========================================
   СТИЛИ КНОПОК ВРЕМЕНИ И АДРЕСА
   ========================================= */
.timeBtn.bg-orange-50 {
    /* Меняем блеклую кнопку на насыщенную для стиля сайта */
    background: linear-gradient(180deg, var(--ember), var(--ember2)) !important;
    color: #fff !important;
    border-color: rgba(242,140,40,.55) !important;
    box-shadow: 0 10px 24px rgba(242,140,40,.35) !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* =========================================
   СВОРАЧИВАНИЕ ПАНЕЛИ КАРТЫ
   ========================================= */
.delivery-left-panel {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* ПК версия: панель ВСЕГДА полностью развернута, ручка скрыта */
@media (min-width: 769px) {
    .delivery-left-panel.panel-half,
    .delivery-left-panel.panel-minimized {
        transform: none !important;
    }
    #mobilePanelHandle { display: none !important; }
}

/* Мобильная версия: drag-based сворачивание с переменной --panel-offset */
@media (max-width: 768px) {
    #deliveryAddressModal > div {
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
    }
    #yandexMap { border-radius: 0 !important; }

    .delivery-left-panel {
        height: min(78dvh, calc(100dvh - env(safe-area-inset-top, 0px) - 12px)) !important;
        transform: translateY(var(--panel-offset, 0%));
        transition: none; /* transition управляется JS через класс .panel-animate */
    }
    .delivery-left-panel.panel-animate {
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    /* snap targets for programmatic animate */
    .delivery-left-panel.panel-half {
        --panel-offset: 22%;
    }
    .delivery-left-panel.panel-minimized {
        --panel-offset: 68%;
    }
    .delivery-left-panel.panel-open {
        --panel-offset: 0%;
    }

    #addFormWrapper {
        padding-bottom: 0;
    }

    /* Sticky footer кнопок формы */
    #formActionsFooter {
        padding-bottom: calc(4px + env(safe-area-inset-bottom));
    }

    /* Sticky footer Доставить сюда */
    #panelDeliverFooter {
        padding-bottom: calc(4px + env(safe-area-inset-bottom));
    }

    /* Pickup modal fullscreen on mobile */
    #pickupAddressModal > div {
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    #pickupAddressModal > div > div:last-child {
        max-height: calc(100vh - 120px) !important;
    }
}

/* =========================================
   EXTRA MOBILE FIXES FOR CHECKOUT / ORDER
   ========================================= */

/* Общие анти-переполнения для checkout/order */
main,
main > section,
main > aside,
main > section > div,
main > aside > div,
#orderItems > div,
#orderItems > div > div {
    min-width: 0;
}

@media (max-width: 768px) {
    /* Страницы checkout/order: одна колонка без горизонтального скролла */
    main {
        width: 100%;
        max-width: 100%;
        overflow-x: clip;
    }

    main > section.bg-white,
    main > aside.bg-white {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 20px !important;
        padding: 1rem !important;
    }

    /* Если summary/sidebar был sticky справа на десктопе */
    main > aside,
    .checkout-sticky,
    .order-sticky,
    .sticky-summary,
    .cart-summary {
        position: static !important;
        top: auto !important;
    }

    /* Сетки формы и итогов — в одну колонку */
    .grid,
    .grid.md\:grid-cols-2,
    .grid.lg\:grid-cols-2,
    .grid.lg\:grid-cols-3,
    .grid.xl\:grid-cols-2,
    .grid.xl\:grid-cols-3 {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    /* Любые горизонтальные action-блоки пусть переносятся */
    .flex.justify-between,
    .flex.items-center.justify-between,
    .flex.gap-2,
    .flex.gap-3,
    .flex.gap-4,
    .flex.gap-6 {
        flex-wrap: wrap;
    }

    /* Кнопки и ссылки-действия — на всю ширину, если тесно */
    button,
    .oki-btn,
    .bg-primary,
    #checkoutBtn,
    #cancelOrderBtn,
    #repeatOrderBtn,
    a.oki-btn {
        max-width: 100%;
    }

    .checkout-sticky-footer {
        left: 0;
        right: 0;
        bottom: 0;
        margin: 0;
    }

    .checkout-sticky-footer .flex,
    .checkout-sticky-footer .items-center {
        flex-wrap: wrap;
    }

    .checkout-sticky-footer button,
    .checkout-sticky-footer .oki-btn,
    .checkout-sticky-footer a,
    .checkout-sticky-footer [role="button"] {
        width: 100%;
        justify-content: center;
    }

    /* Карточки товаров заказа не должны раздвигать экран */
    #orderItems > div {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden;
    }

    #orderItems img {
        width: 72px !important;
        min-width: 72px !important;
        height: 72px !important;
        object-fit: cover;
    }

    #orderItems .flex,
    #orderItems [class*="flex"] {
        min-width: 0;
    }

    #orderItems .truncate,
    #orderItems h3,
    #orderItems h4,
    #orderItems p,
    #orderItems span {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    /* Поля формы: убираем залипание в 2 колонки */
    form .grid,
    form .md\:grid-cols-2,
    form .lg\:grid-cols-2 {
        grid-template-columns: 1fr !important;
    }

    input,
    textarea,
    select {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Шаги — компактнее и пригодны для 360-390px */
    nav#orderSteps,
    nav#checkoutSteps {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }

    nav#orderSteps::-webkit-scrollbar,
    nav#checkoutSteps::-webkit-scrollbar {
        display: none;
    }

    .step-item {
        flex: 0 0 auto;
    }

    .step-item .step-text,
    .step-item span {
        max-width: 72px;
        text-align: center;
        white-space: normal !important;
        line-height: 1.2 !important;
    }
}

@media (max-width: 480px) {
    /* Ещё плотнее на маленьких телефонах */
    main > section.bg-white,
    main > aside.bg-white {
        padding: .875rem !important;
        border-radius: 18px !important;
    }

    #orderItems > div {
        padding: .75rem !important;
    }

    #orderItems img {
        width: 64px !important;
        min-width: 64px !important;
        height: 64px !important;
    }

    .checkout-sticky-footer {
        padding-left: .875rem !important;
        padding-right: .875rem !important;
    }

    .step-item .step-text,
    .step-item span {
        max-width: 56px;
    }
}
/* =========================================
   FREE GIFT SLIDER
   ========================================= */
#freeGiftSection {
    min-width: 0;
}

#freeGiftOptions.free-gift-slider {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 2px 10px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    overscroll-behavior-x: contain;
    min-width: 0;
}

#freeGiftOptions.free-gift-slider::-webkit-scrollbar {
    height: 6px;
}

#freeGiftOptions.free-gift-slider::-webkit-scrollbar-thumb {
    background: rgba(242, 140, 40, 0.45);
    border-radius: 999px;
}

#freeGiftOptions .free-gift-card {
    flex: 0 0 320px;
    min-width: 320px;
    max-width: 320px;
    scroll-snap-align: start;
    box-shadow: 0 8px 24px rgba(0,0,0,0.16);
    border-radius: 20px;
    min-height: 96px;
    align-items: center;
    box-sizing: border-box;
}

#freeGiftOptions .free-gift-card img {
    width: 64px;
    height: 64px;
    min-width: 64px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
}

#freeGiftOptions .free-gift-card .min-w-0 {
    min-width: 0;
}

#freeGiftOptions .free-gift-card .text-grayDark {
    line-height: 1.2;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Планшет */
@media (max-width: 1024px) {
    #freeGiftOptions .free-gift-card {
        flex: 0 0 290px;
        min-width: 290px;
        max-width: 290px;
    }
}

/* Мобилка: карточки ШИРЕ, листаются, видно кусок следующей */
@media (max-width: 640px) {
  #freeGiftOptions.free-gift-slider {
    gap: 10px;
    padding: 4px 0 10px;
    scroll-padding-left: 0;
  }

  #freeGiftOptions .free-gift-card {
    flex: 0 0 58%;
    min-width: 58%;
    max-width: 58%;
    padding: 12px 12px;
    border-radius: 18px;
    align-items: center;
    gap: 10px;
    min-height: 96px;
  }

  #freeGiftOptions .free-gift-card img {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 12px;
  }

  #freeGiftOptions .free-gift-card .text-grayDark {
    font-size: 0.82rem !important;
    line-height: 1.18 !important;
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
    hyphens: none;
  }

  #freeGiftOptions .free-gift-card .text-xs,
  #freeGiftOptions .free-gift-card .text-sm {
    font-size: 0.72rem !important;
    line-height: 1.12 !important;
  }

  #freeGiftOptions .free-gift-card .w-5.h-5 {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
  }

  #freeGiftOptions .free-gift-card .w-2\.5.h-2\.5 {
    width: 8px !important;
    height: 8px !important;
  }
}

/* ~400px: ещё чуть шире */
@media (max-width: 420px) {
  #freeGiftOptions .free-gift-card {
    flex: 0 0 62%;
    min-width: 62%;
    max-width: 62%;
    padding: 11px 10px;
    gap: 9px;
  }

  #freeGiftOptions .free-gift-card img {
    width: 46px;
    height: 46px;
    min-width: 46px;
  }

  #freeGiftOptions .free-gift-card .text-grayDark {
    font-size: 0.78rem !important;
    line-height: 1.14 !important;
  }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
  #freeGiftOptions .free-gift-card {
    flex: 0 0 68%;
    min-width: 68%;
    max-width: 68%;
  }
}
/* --- Стили для отображения веса (Граммы) --- */
.product-card {
    position: relative; /* Для позиционирования бейджа, если нужно */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-weight-badge {
    background-color: #f8f9fa; /* Светло-серый фон */
    color: #6c757d; /* Серый текст */
    font-size: 0.8rem; /* Уменьшенный шрифт */
    padding: 3px 10px;
    border-radius: 20px; /* Скругленные углы */
    display: inline-flex;
    align-items: center;
    margin-bottom: 8px; /* Отступ до цены/кнопки */
    font-weight: 500;
    border: 1px solid #e9ecef;
}

.product-weight-badge i {
    margin-right: 5px; /* Иконка, если решите добавить (например, весы) */
    font-size: 0.9rem;
}
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* ===================================================
   AUTH MODAL — MOBILE REDESIGN
   =================================================== */

/* Step progress dots */
.login-step-dot {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(241,227,214,.22);
    transition: width .25s ease, background .25s ease;
    flex-shrink: 0;
}
.login-step-dot.is-active {
    width: 24px;
    background: var(--gold);
}
.login-step-dot.is-done {
    background: rgba(241,227,214,.50);
}

/* Custom checkbox for marketing consent */
.login-ckbox { display: inline-flex; align-items: flex-start; }
.login-ckbox-icon {
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid var(--line2);
    background: rgba(241,227,214,.06);
    flex-shrink: 0;
    position: relative;
    transition: background .18s, border-color .18s;
}
.login-ckbox input:checked + .login-ckbox-icon {
    background: var(--ember);
    border-color: var(--ember);
}
.login-ckbox input:checked + .login-ckbox-icon::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 7px;
    height: 11px;
    border: 2.5px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

/* OTP digit boxes */
.code-digit {
    width: 58px;
    height: 64px;
    border-radius: 16px;
    border: 2px solid var(--line2);
    background: rgba(241,227,214,.06);
    color: var(--ink);
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    caret-color: transparent;
    outline: none;
    transition: border-color .18s, background .18s;
}
.code-digit:focus {
    border-color: rgba(255,207,139,.50);
    background: rgba(241,227,214,.10);
    box-shadow: 0 0 0 3px rgba(255,207,139,.12);
}
.code-digit:not([value=""]):not(:placeholder-shown) {
    border-color: var(--ember);
}

/* Mobile modal tweaks */
@media (max-width: 768px) {
    body.auth-modal-open #mobileBottomNav {
        display: none !important;
    }
    body.auth-modal-open {
        overflow: hidden !important;
    }
    /* Cancel the global "flex.gap-N → flex-wrap:wrap" rule inside the modal */
    #loginModal .flex,
    #loginModal label.flex {
        flex-wrap: nowrap !important;
    }
}

/* Cart scroll area */
#cartScrollArea {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Cart popular items — vertical grid */
#cartScrollArea { overflow-x: hidden; }
#cartPopularItems {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.popular-card { min-width: 0; overflow: hidden; }
@media (min-width: 769px) {
  #cartPopularItems {
    grid-template-columns: repeat(3, 1fr);
  }
}
@keyframes popularLeave {
  to { opacity: 0; transform: scale(0.8); }
}
.popular-item-leave {
  animation: popularLeave 0.3s ease forwards;
}

/* Cart floating sticky footer */
#cartStickyFooter {
  background: transparent;
  border-top: 1px solid rgba(241,227,214,0.25);
  position: relative;
  z-index: 5;
}
@media (max-width: 768px) {
  #cartStickyFooter {
    background: transparent;
  }
}

/* Cart address display */
#cartAddressDisplay {
  transition: all 0.2s ease;
}
#cartAddressDisplay:hover {
  background: rgba(242, 140, 40, 0.18) !important;
  border-color: rgba(242, 140, 40, 0.5) !important;
}

/* Cart delivery type buttons */
.delivery-type-btn {
  transition: transform .1s ease;
}
.delivery-type-btn:active {
  transform: scale(.96);
}

/* ------------------------------------------ */
.product-card-weight {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: -0.1rem 0 0.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(246, 239, 232, 0.62);
  font-size: 0.84rem;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.product-card-weight::before {
  content: none;
}

.product-card-weight.hidden {
  display: none !important;
}

@media (min-width: 768px) {
  .product-card-weight {
    font-size: 0.88rem;
  }
}


@media (max-width: 640px) {
    .product-card {
        padding: 14px !important;
        border-radius: 20px;
    }

    .product-card img {
        border-radius: 18px;
        aspect-ratio: 4 / 3;
        height: auto !important;
        object-fit: cover;
    }

    #productModalPanel {
        width: calc(100% - 0.75rem) !important;
        margin-left: 0.375rem !important;
        margin-right: 0.375rem !important;
        max-height: calc(100dvh - var(--bottom-nav-h, 56px) - env(safe-area-inset-bottom)) !important;
    }

    #productModalPanel .sticky {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom)) !important;
    }
}

@media (max-width: 420px) {
    #productModalPanel .lg\:w-1\/2:last-child {
        padding: 1rem !important;
    }

    #productModalPanel #addToCartBtn {
        min-height: 52px;
        font-size: 1rem;
    }
}

/* ========================================== */
/* PRODUCT CARDS / PRODUCT MODAL ARCHITECTURE */
/* ========================================== */

.product-card {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.product-card h3 {
  line-height: 1.22;
}

.product-card .text-gray-500 {
  overflow-wrap: anywhere;
}

/* ==========================================
   PRODUCT MODAL — CLEAN REWRITE
   ========================================== */

html.product-modal-open,
body.product-modal-open {
  overflow: hidden !important;
}

#productModal {
  overscroll-behavior: contain;
}

/* Panel */
#productModalPanel {
  background: linear-gradient(180deg, #1e130f, #160e0b);
  overflow: hidden;
}

#productModalPanel *,
#productModalPanel *::before,
#productModalPanel *::after {
  box-sizing: border-box;
}

/* Close button */
#productModalPanel [data-role="close-product-modal"] {
  position: absolute;
  top: 0.875rem;
  right: 0.875rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(12,12,12,.52);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(241,227,214,.16);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 70;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
  flex-shrink: 0;
}
#productModalPanel [data-role="close-product-modal"]:hover {
  background: rgba(12,12,12,.68);
  transform: scale(.97);
}

/* Left: image column */
.pm-left {
  overflow: hidden;
  background: rgba(22,14,11,1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Blurred image background — fills empty space behind object-contain image */
.pm-image-blur {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(24px) brightness(0.28) saturate(1.4);
  transform: scale(1.08);
  pointer-events: none;
}

.pm-image {
  display: block;
  max-width: 100%;
  position: relative;
  z-index: 1;
}

/* Right: content column */
.pm-right {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(30,19,15,.98), rgba(22,14,11,.97));
  position: relative;
}

/* Scrollable area */
.pm-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  min-width: 0;
}

.pm-scroll::-webkit-scrollbar { width: 3px; }
.pm-scroll::-webkit-scrollbar-track { background: transparent; }
.pm-scroll::-webkit-scrollbar-thumb {
  background: rgba(241,227,214,.18);
  border-radius: 2px;
}

/* #6: «Может понравиться» — рекомендации внутри модалки блюда */
.recommend-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 769px) {
  .recommend-list { grid-template-columns: repeat(3, 1fr); }
}
.recommend-card {
  display: flex;
  flex-direction: column;
  background: rgba(241,227,214,.05);
  border: 1px solid rgba(241,227,214,.12);
  border-radius: 14px;
  padding: 8px;
}
.recommend-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  background-color: #2a1a13;
  margin-bottom: 6px;
}
.recommend-name {
  color: #F6EFE8;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.recommend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: 6px;
}
.recommend-price { color: var(--gold, #FFCF8B); font-weight: 800; font-size: 14px; }
.recommend-add {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: linear-gradient(180deg, var(--ember,#F28C28), var(--ember2,#d9761a));
  border: 1px solid rgba(242,140,40,.55);
  cursor: pointer;
  transition: transform .12s ease, filter .12s ease;
}
.recommend-add:hover { transform: translateY(-1px); filter: saturate(1.05); }
.recommend-add:active { transform: scale(.94); }
.recommend-add:disabled { opacity: .6; }

/* #6: тост «Добавлено в корзину» */
.added-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  z-index: 27000;
  background: rgba(20,16,12,.96);
  color: #F6EFE8;
  border: 1px solid rgba(255,207,139,.35);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.added-toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Title row */
.pm-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.pm-header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

/* Nutrition tooltip */
#nutritionTooltip {
  max-width: min(15.5rem, calc(100vw - 2rem));
}

/* Quick-add button (shown on mobile) */
.pm-quick-add {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  border: 1px solid rgba(242,140,40,.55);
  background: linear-gradient(180deg, var(--ember), var(--ember2));
  color: #fff;
  box-shadow: 0 12px 30px rgba(242,140,40,.28);
  transition: transform .18s ease, filter .18s ease;
  flex-shrink: 0;
}
.pm-quick-add:hover { transform: translateY(-1px); filter: saturate(1.05); }
.pm-quick-add:active { transform: scale(.97); }
.pm-quick-add svg { width: 1.05rem; height: 1.05rem; pointer-events: none; }

/* Sticky footer */
.pm-footer {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg,
    rgba(22,14,11,0) 0%,
    rgba(22,14,11,.95) 28%,
    rgba(22,14,11,1) 68%);
}

/* Cart button */
#addToCartBtn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: linear-gradient(180deg, var(--ember), var(--ember2));
  color: #fff;
  font-weight: 700;
  border: none;
  cursor: pointer;
  white-space: normal;
  text-align: center;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 10px 30px rgba(242,140,40,.3);
}
#addToCartBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 38px rgba(242,140,40,.38);
}
#addToCartBtn:active { transform: scale(.97); }

.modal-btn-label,
#modalPrice {
  display: inline-block;
}

/* Product name */
#productName {
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  color: #f6efe8;
  min-width: 0;
}

/* Text elements */
#productDesc,
#productMetaLine,
#selectedChips,
#ingredientsBlock,
#sizeButtons,
#addIngredients {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  min-width: 0;
  max-width: 100%;
}

/* Modifier controls */
.modifier-btn,
.modifier-minus,
.modifier-plus {
  transition: all .16s ease;
}
.modifier-btn:active,
.modifier-minus:active,
.modifier-plus:active {
  transform: scale(.94);
}

/* Modifier cards */
.modifier-card {
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 1rem;
  border-width: 1.5px;
  cursor: pointer;
}
.modifier-card .modifier-img {
  border: 1px solid rgba(241,227,214,.12);
}
.modifier-card .modifier-name {
  color: var(--ink);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.modifier-card .modifier-price {
  margin-top: 0.15rem;
}
.modifier-card.modifier-default {
  background: linear-gradient(180deg, rgba(255,160,80,.10), rgba(255,120,60,.06));
}
.modifier-card.modifier-extra {
  background: linear-gradient(180deg, rgba(255,160,80,.16), rgba(255,120,60,.10));
}
.modifier-card.modifier-removed {
  background: rgba(0,0,0,.12);
}
.modifier-card.modifier-removed .modifier-name {
  text-decoration: line-through;
  color: rgba(246,239,232,.45);
}

/* ==========================================
   DESKTOP (>=769px)
   Panel: fixed height, both cols equal 50%
   Left: image fills with object-cover
   Right: scrolls, footer always visible
   ========================================== */
@media (min-width: 769px) {
  #productModal {
    align-items: center;
    justify-content: center;
    padding: 1.75rem;
  }

  #productModalPanel {
    flex-direction: row;
    align-items: stretch;
    width: min(1060px, calc(100vw - 3.5rem));
    height: min(88vh, 840px);
    border-radius: 28px;
  }

  .pm-left {
    width: 50%;
    flex-shrink: 0;
    height: 100%;
  }

  /* Image: object-contain — блюдо видно целиком, blur заполняет фон */
  .pm-image {
    width: calc(100% - 2.5rem);
    max-height: calc(100% - 2.5rem);
    object-fit: contain;
    border-radius: 20px;
    border: 1px solid rgba(241,227,214,.10);
  }

  .pm-right {
    width: 50%;
    flex-shrink: 0;
    height: 100%;
  }

  .pm-scroll {
    /* Увеличенный верхний отступ — иначе кнопка КБЖУ (i) в title-row уходит под крестик закрытия */
    padding: 4rem 1.75rem 0.5rem;
  }

  .pm-footer {
    padding: 0.5rem 1.75rem 1.5rem;
    border-top: 1px solid rgba(241,227,214,.08);
  }

  #productName {
    font-size: clamp(1.55rem, 2.1vw, 2.1rem);
    line-height: 1.1;
    margin-bottom: 0.4rem;
  }

  #productMetaLine {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: rgba(246,239,232,.55);
  }

  #productDesc {
    margin-bottom: 1rem;
    color: rgba(246,239,232,.6);
    font-size: 0.9375rem;
    line-height: 1.55;
  }

  #selectedChips,
  #ingredientsBlock,
  #sizeBlock,
  #addBlock {
    margin-bottom: 1rem;
  }

  #sizeBlock h4,
  #addBlock h4 {
    color: rgba(246,239,232,.8);
    font-size: 1rem;
    margin-bottom: 0.6rem;
  }

  #addToCartBtn {
    min-height: 56px;
    font-size: 1.0625rem;
    border-radius: 18px;
  }

  .pm-quick-add {
    display: none !important;
  }
}

/* ==========================================
   MOBILE (<=768px) — preserved as-is
   ========================================== */
@media (max-width: 768px) {
  #mobileBottomNav {
    z-index: 22000 !important;
  }

  #productModal {
    z-index: 21000;
    align-items: flex-start;
    justify-content: center;
    padding:
      calc(env(safe-area-inset-top, 0px) + 8px)
      0.375rem
      calc(var(--bottom-nav-h, 56px) + env(safe-area-inset-bottom) + 12px)
      0.375rem;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }

  #productModalPanel {
    position: relative;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    top: 0;
    height: auto;
    max-height: calc(
      100dvh
      - env(safe-area-inset-top, 0px)
      - var(--bottom-nav-h, 56px)
      - env(safe-area-inset-bottom)
      - 20px
    );
    border-radius: 24px;
    border-bottom: 1px solid rgba(241,227,214,.10);
    transform-origin: center top;
  }

  #productModalPanel [data-role="close-product-modal"] {
    top: 0.875rem;
    right: 0.875rem;
    width: 2.75rem;
    height: 2.75rem;
  }

  .pm-left {
    flex-shrink: 0;
    padding: 0.875rem 0.875rem 0.5rem;
    background: transparent;
  }

  .pm-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: min(32vh, 260px);
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid rgba(241,227,214,.12);
  }

  .pm-right {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  .pm-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.65rem 1rem 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  #productName {
    font-size: clamp(1.45rem, 7vw, 2rem);
    line-height: 1.08;
    margin-bottom: 0.35rem;
  }

  #productMetaLine {
    margin-bottom: 0.65rem;
    line-height: 1.35;
    color: rgba(246,239,232,.55);
  }

  #productDesc {
    margin-bottom: 0.8rem;
    color: rgba(246,239,232,.6);
  }

  #ingredientsBlock,
  #sizeBlock,
  #addBlock {
    margin-bottom: 0.8rem;
  }

  #sizeBlock h4,
  #addBlock h4 {
    color: rgba(246,239,232,.8);
  }

  #sizeButtons,
  #selectedChips {
    gap: 0.55rem;
  }

  #addIngredients {
    gap: 0.65rem;
  }

  .pm-footer {
    position: relative;
    flex-shrink: 0;
    padding: 0.9rem 1rem calc(0.95rem + env(safe-area-inset-bottom));
    background: linear-gradient(180deg,
      rgba(22,14,11,0) 0%,
      rgba(22,14,11,.93) 26%,
      rgba(22,14,11,1) 65%);
    border-top: 1px solid rgba(241,227,214,.10);
    box-shadow: 0 -12px 30px rgba(0,0,0,.16);
  }

  #addToCartBtn {
    min-height: 56px;
    font-size: 1rem;
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(0,0,0,.24), 0 10px 26px rgba(242,140,40,.22);
  }

  .pm-quick-add {
    display: inline-flex;
  }

  #productModal #nutritionInfoBtn,
  #productModal .pm-quick-add {
    width: 2.35rem;
    height: 2.35rem;
  }
}

@media (max-width: 420px) {
  #productModal {
    padding:
      calc(env(safe-area-inset-top, 0px) + 6px)
      0.3125rem
      calc(var(--bottom-nav-h, 56px) + env(safe-area-inset-bottom) + 10px)
      0.3125rem;
  }

  #productModalPanel {
    max-height: calc(
      100dvh
      - env(safe-area-inset-top, 0px)
      - var(--bottom-nav-h, 56px)
      - env(safe-area-inset-bottom)
      - 14px
    );
  }

  .pm-left {
    padding: 0.75rem 0.75rem 0.4rem;
  }

  .pm-image {
    max-height: min(28vh, 210px);
    border-radius: 14px;
  }

  .pm-scroll {
    padding: 0.5rem 0.8rem 0;
  }

  .pm-footer {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
    padding-bottom: calc(0.9rem + env(safe-area-inset-bottom));
  }

  #addToCartBtn {
    min-height: 54px;
  }

  #nutritionTooltip {
    width: min(15rem, calc(100vw - 1.5rem));
    right: 0;
  }

  .modifier-card {
    gap: 0.6rem;
    padding: 0.6rem;
  }
}
/* =========================================
   CARD QUICK-ADD BUTTON (price row)
   ========================================= */

.card-quick-add {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--ember), var(--ember2));
  border: 1.5px solid rgba(255,150,70,.40);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(242,140,40,.42), 0 2px 4px rgba(0,0,0,.22);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .16s ease, box-shadow .65s ease;
  will-change: transform;
}

/* Green overlay — opacity animates, gradient does NOT need to animate */
.card-quick-add::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, #34d058, #22c55e);
  opacity: 0;
  transition: opacity 0.62s ease;  /* slow fade-OUT back to orange */
  pointer-events: none;
  z-index: 0;
}

.card-quick-add svg {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  pointer-events: none;
}

.card-quick-add:hover {
  transform: scale(1.10);
  box-shadow: 0 6px 18px rgba(242,140,40,.62), 0 2px 6px rgba(0,0,0,.28);
}

.card-quick-add:active {
  transform: scale(0.92);
}

/* SUCCESS: green overlay appears instantly + pop + green glow */
.card-quick-add--success::before {
  opacity: 1;
  transition: opacity 0.05s ease;  /* instant appear */
}
.card-quick-add--success {
  animation: cardQuickAddPop 0.32s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  box-shadow: 0 5px 18px rgba(34,197,94,.58), 0 2px 5px rgba(0,0,0,.22) !important;
  transition: transform .16s ease, box-shadow 0.08s ease !important; /* fast to green glow */
}
/* When success class removed — box-shadow transitions back slowly via base transition */

/* LOADING state */
.card-quick-add--loading svg {
  opacity: 0;
}
.card-quick-add--loading::after {
  content: '';
  position: absolute;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cardQuickAddSpin .55s linear infinite;
  z-index: 2;
}

@keyframes cardQuickAddSpin {
  to { transform: rotate(360deg); }
}

@keyframes cardQuickAddPop {
  0%   { transform: scale(1);    }
  42%  { transform: scale(1.26); }
  70%  { transform: scale(0.95); }
  100% { transform: scale(1);    }
}

/* =========================================
   DELIVERY MODAL — MOBILE PANEL STATES
   ========================================= */

@media (max-width: 768px) {
  /* Inner modal container: fully transparent so checkout page shows through the overlay */
  #deliveryAddressModal > div {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
  }

  /* Also hide the map wrapper div (the rounded-2xl div that wraps #yandexMap) */
  #deliveryAddressModal > div > .relative {
    display: none !important;
  }

  /* Completely remove the map from layout on mobile — prevents black bg + marker */
  /* High specificity (2 IDs) beats existing .class !important rules */
  #deliveryAddressModal #yandexMap {
    display: none !important;
  }

  /* Show map when JS moves it inside the embedded form holder */
  /* 3-ID specificity (0,3,0,0) beats the 2-ID hide rule above */
  #deliveryAddressModal #mobileMapHolder #yandexMap {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    border-radius: 10px !important;
    border: none !important;
  }

  /* Mobile embedded map holder */
  #mobileMapHolder {
    position: relative;
    width: 100%;
    flex-shrink: 0;
  }

  /* In form mode (full panel): header is hidden, map fills the extra space */
  #deliveryAddressModal #addressPanel.panel-mobile-full #mobileMapHolder {
    height: clamp(220px, calc(100dvh - 360px), 500px) !important;
  }

  /* Hide drag handle in all panel states on mobile */
  #deliveryAddressModal #addressPanel #mobilePanelHandle {
    display: none !important;
  }

  /* Hide header row entirely in form mode — back button moved to bottom "Назад" */
  #deliveryAddressModal #addressPanel.panel-mobile-full #panelHeaderRow {
    display: none !important;
  }

  /* "Добавить" button — plain gold text on mobile, same style as "Назад" */
  #deliveryAddressModal #addressPanel #startAddBtnHeader {
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    color: var(--gold) !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
  }

  /* "Ваши адреса" panel title — gold color to match the header buttons */
  #mobilePanelTitle {
    color: var(--gold);
  }

  /* Hide X close button — tap outside panel to close */
  #deliveryAddressModal #closeDeliveryModalBtn {
    display: none !important;
  }

  /* COMPACT state: no addresses or address list — auto-height bottom sheet */
  /* Specificity (2 IDs + 1 class = 0,2,1,0) beats all existing .class !important rules */
  #deliveryAddressModal #addressPanel.panel-mobile-compact {
    height: auto !important;
    min-height: 0 !important;
    max-height: 70dvh !important;
    border-radius: 20px 20px 0 0 !important;
    transform: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  /* FULL state: add/edit form — covers whole screen */
  #deliveryAddressModal #addressPanel.panel-mobile-full {
    top: 0 !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    min-height: 0 !important;
    border-radius: 0 !important;
    transform: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
}

/* =========================================
   MOBILE HAMBURGER SIDE MENU
   ========================================= */

/* Hamburger button — hidden on desktop, visible on mobile */
.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(241,227,214,.18);
    background: rgba(0,0,0,.22);
    color: rgba(246,239,232,.88);
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, transform .16s ease;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; }
}
.mobile-menu-btn:hover {
    background: rgba(241,227,214,.10);
    border-color: rgba(255,207,139,.30);
}
.mobile-menu-btn:active { transform: scale(.92); }
.mobile-menu-btn svg { width: 22px; height: 22px; pointer-events: none; }

/* Dark overlay */
#mobileMenuOverlay {
    position: fixed;
    inset: 0;
    z-index: 25000;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}
#mobileMenuOverlay.is-open {
    opacity: 1;
    pointer-events: all;
}

/* Drawer panel */
#mobileMenuDrawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: min(320px, 87vw);
    z-index: 25001;
    background:
        radial-gradient(900px 320px at 10% 0%, rgba(255,207,139,.09), transparent 60%),
        linear-gradient(180deg, rgba(22,15,12,.99) 0%, rgba(18,12,10,.98) 100%);
    border-left: 1px solid var(--line);
    box-shadow: -40px 0 100px rgba(0,0,0,.60);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .32s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    overscroll-behavior: contain;
}
#mobileMenuDrawer.is-open {
    transform: translateX(0);
}

/* Drawer: header row */
.mm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .95rem 1.25rem .95rem 1.4rem;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}
.mm-header-logo img {
    height: 38px;
    width: auto;
    object-fit: contain;
}
.mm-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(241,227,214,.18);
    background: rgba(0,0,0,.22);
    color: rgba(246,239,232,.80);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .18s ease, border-color .18s ease, transform .22s ease, color .18s ease;
    -webkit-tap-highlight-color: transparent;
}
.mm-close:hover {
    background: rgba(241,227,214,.10);
    border-color: rgba(255,207,139,.30);
    color: var(--gold);
    transform: rotate(90deg);
}
.mm-close svg { width: 18px; height: 18px; pointer-events: none; }

/* Drawer: scrollable nav area */
.mm-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: .6rem 0;
    display: flex;
    flex-direction: column;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.mm-nav::-webkit-scrollbar { display: none; }

/* Section title */
.mm-section-title {
    padding: .55rem 1.4rem .3rem;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(246,239,232,.32);
    flex-shrink: 0;
}

/* Крупный белый заголовок над карточками "Оформление заказа" / "Заказ №..." на мобильной */
.mm-page-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #f6efe8;
}

/* "Оформление заказа" в карточке checkout на мобильной: крупный заголовок-категория
   слева сверху карточки со способом оплаты/промокодом/комментарием. margin-top
   компенсирует отступ от space-y-6 (его дают скрытые input[type=hidden] и десктопный
   h1 перед этим блоком), прижимая заголовок к самому верху карточки. */
.checkout-page-title {
    font-size: 1.5rem;
    margin-top: -1.5rem;
    padding: .25rem 0 1rem;
}

/* Nav item */
.mm-item {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .75rem 1.4rem;
    color: rgba(246,239,232,.80);
    font-size: .93rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    border-left: 2.5px solid transparent;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}
.mm-item:hover, .mm-item:focus-visible {
    color: var(--gold);
    background: rgba(255,207,139,.07);
    border-left-color: var(--gold);
    outline: none;
}
.mm-item:active { background: rgba(255,207,139,.12); }

/* Icon */
.mm-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(241,227,214,.07);
    border: 1px solid rgba(241,227,214,.11);
    flex-shrink: 0;
    transition: background .18s ease, border-color .18s ease;
}
.mm-item:hover .mm-icon {
    background: rgba(255,207,139,.12);
    border-color: rgba(255,207,139,.25);
}
.mm-icon svg {
    width: 18px;
    height: 18px;
    color: rgba(246,239,232,.65);
    transition: color .18s ease;
}
.mm-item:hover .mm-icon svg { color: var(--gold); }

/* VK special item */
.mm-item.mm-vk .mm-icon {
    background: rgba(0,119,255,.10);
    border-color: rgba(0,119,255,.20);
}
.mm-item.mm-vk:hover .mm-icon {
    background: rgba(0,119,255,.20);
    border-color: rgba(0,119,255,.38);
}
.mm-item.mm-vk .mm-icon svg { color: #5a8fd6; }
.mm-item.mm-vk:hover { color: #82b4f4; border-left-color: #4a76a8; }
.mm-item.mm-vk:hover .mm-icon svg { color: #82b4f4; }

.mm-item.mm-promo { color: var(--gold); border-left-color: rgba(242,140,40,.25); }
.mm-item.mm-promo .mm-icon svg { color: var(--gold); }
.mm-item.mm-promo:hover { color: #ffbe5a; border-left-color: rgba(242,140,40,.6); background: rgba(242,140,40,.08); }
.mm-item.mm-promo:hover .mm-icon svg { color: #ffbe5a; }

/* Admin panel item */
.mm-item.mm-admin { color: rgba(199,210,254,.92); border-left-color: rgba(99,102,241,.30); }
.mm-item.mm-admin .mm-icon { background: rgba(99,102,241,.12); border-color: rgba(99,102,241,.25); }
.mm-item.mm-admin .mm-icon svg { color: rgba(199,210,254,.92); }
.mm-item.mm-admin:hover { color: #c7d2fe; border-left-color: rgba(99,102,241,.6); background: rgba(99,102,241,.08); }
.mm-item.mm-admin:hover .mm-icon { background: rgba(99,102,241,.20); border-color: rgba(99,102,241,.40); }
.mm-item.mm-admin:hover .mm-icon svg { color: #c7d2fe; }

/* Divider */
.mm-divider {
    height: 1px;
    background: var(--line);
    margin: .55rem 1.25rem;
    flex-shrink: 0;
}

/* Drawer footer */
.mm-footer {
    padding: .8rem 1.4rem;
    border-top: 1px solid var(--line);
    flex-shrink: 0;
    font-size: .74rem;
    color: rgba(246,239,232,.28);
    line-height: 1.5;
}

/* Stagger fade-in when drawer opens */
@keyframes mmItemIn {
    from { opacity: 0; transform: translateX(12px); }
    to   { opacity: 1; transform: translateX(0); }
}
#mobileMenuDrawer.is-open .mm-item {
    animation: mmItemIn .22s ease var(--delay, .05s) both;
}

/* Bigger logo + title inside the drawer */
.mm-header-logo {
    display: flex;
    align-items: center;
    gap: .65rem;
}
.mm-header-logo img {
    height: 56px !important;
}
.mm-header-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: .01em;
}

/* Hide footer on mobile — «Ещё» кнопка заменяет его */
@media (max-width: 768px) {
    footer { display: none !important; }
}

/* ════ MOBILE PAGE HEADER (checkout/order): логотип + кнопка "Назад", размер как у шапки бокового меню ════ */
.mm-page-header.mm-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(180deg, rgba(42,26,19,.96) 0%, rgba(34,20,15,.95) 100%);
    backdrop-filter: blur(12px);
}
.mm-back-btn {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem .9rem;
    border-radius: 999px;
    border: 1px solid rgba(241,227,214,.18);
    background: rgba(0,0,0,.22);
    color: rgba(246,239,232,.80);
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
    -webkit-tap-highlight-color: transparent;
}
.mm-back-btn:hover {
    background: rgba(241,227,214,.10);
    border-color: rgba(255,207,139,.30);
    color: var(--gold);
}
.mm-back-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   КАРУСЕЛЬ АКЦИЙ И ОБЪЯВЛЕНИЙ (city.html)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Баннер «баллы за авторизацию в приложении» (#7) ── */
.app-auth-promo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 207, 139, .35);
    background: linear-gradient(135deg, rgba(242, 140, 40, .18), rgba(255, 207, 139, .10));
    box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
    transition: transform .18s, box-shadow .18s;
}
.app-auth-promo:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(0, 0, 0, .34); }
.app-auth-promo:active { transform: scale(.99); }
.app-auth-promo-icon {
    flex-shrink: 0;
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    border-radius: 14px;
    background: rgba(255, 207, 139, .14);
}
.app-auth-promo-body { flex: 1; min-width: 0; }
.app-auth-promo-title { font-size: 15px; font-weight: 800; color: var(--gold); letter-spacing: -.01em; }
.app-auth-promo-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.3; }
.app-auth-promo-cta { flex-shrink: 0; font-size: 13px; font-weight: 700; color: var(--gold); white-space: nowrap; }
@media (max-width: 639px) {
    .app-auth-promo { padding: 11px 13px; gap: 11px; }
    .app-auth-promo-icon { width: 40px; height: 40px; font-size: 20px; }
    .app-auth-promo-title { font-size: 14px; }
    .app-auth-promo-sub { font-size: 11.5px; }
    .app-auth-promo-cta { font-size: 12px; }
}

/* ── Секции «Акции» / «Новинки» ── */
.posts-section {
    margin-top: 1rem !important;
    margin-bottom: 0 !important;
    padding-bottom: 8px !important;
}

/* «Новинки» отделены фоновой панелью — визуально показываем, что это «чутка другое» */
.posts-section--news {
    background: var(--bg2);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 14px 14px 8px !important;
    margin-top: 14px !important;
}
.posts-section--news .posts-section-title { margin-bottom: 8px; }

#mobileCategoryBarMount {
    margin-top: 0 !important;
}

#mobileCategoryBarMount + section {
    margin-top: 2px !important;
}

@media (max-width: 768px) {
    #mobileCategoryBarMount + section {
        margin-top: 10px !important;
    }
}

@media (min-width: 768px) {
    .posts-section {
        margin-top: 1.25rem !important;
    }
    .posts-section--news { margin-top: 16px !important; }
}

/* Стрелки прокрутки — под треком, справа */
.posts-section-arrows {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
    padding-right: 2px;
}

.posts-arrow {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--surface2);
    border: 1px solid var(--line2);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .2s, opacity .2s;
    padding: 0;
    flex-shrink: 0;
}
.posts-arrow svg { width: 16px; height: 16px; }
.posts-arrow:hover { border-color: var(--gold); }

.posts-section-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 10px;
    padding-left: 2px;
    letter-spacing: -.01em;
}
@media (min-width: 640px) {
    .posts-section-title { font-size: 1.3rem; }
}

/* Заголовок «Меню» скрыт везде — на мобиле он не нужен (есть панель категорий),
   на desktop категории в шапке. */
.menu-section-title { display: none !important; }

.posts-track-outer {
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
}
.posts-track-outer::-webkit-scrollbar { display: none; }

.posts-track {
    display: flex;
    gap: 12px;
    padding: 4px 2px 2px;
    min-width: max-content;
}

/* ── Post card ── */
.post-card {
    flex-shrink: 0;
    width: 280px;
    height: 260px;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    text-decoration: none;
    scroll-snap-align: start;
    transition: transform .2s, box-shadow .2s;
    border: 1px solid var(--line);
    display: block;
}

@media (min-width: 640px) {
    .post-card { width: 310px; height: 290px; }
}
@media (min-width: 1024px) {
    .post-card { width: 340px; height: 310px; }
}

/* Мобильная версия: компактные карточки, чтобы вмещалось больше */
@media (max-width: 639px) {
    .post-card { width: 190px; height: 170px; border-radius: 14px; }
    .posts-track { gap: 9px; }
    .post-card-body { padding: 9px 11px 10px; }
    .post-card-title { font-size: 12px; -webkit-line-clamp: 2; margin-bottom: 3px; }
    .post-card-subtitle { font-size: 10px; -webkit-line-clamp: 1; margin-bottom: 3px; }
    .post-card-badge, .post-card-type { font-size: 8.5px; padding: 1px 6px; }
    .post-card-badges { gap: 4px; margin-bottom: 4px; }
    .post-card-cta, .post-card-timer { font-size: 10px; }
    .posts-section--news { border-radius: 16px; padding: 11px 11px 6px !important; }
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, .38);
    border-color: var(--line2);
}
.post-card:active { transform: scale(.97); }

.post-card-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--surface2);
}
.post-card-img--placeholder {
    background: linear-gradient(135deg, var(--cocoa) 0%, var(--surface2) 100%);
}

/* Dark gradient overlay */
.post-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, .04) 0%,
        rgba(0, 0, 0, .02) 30%,
        rgba(0, 0, 0, .50) 60%,
        rgba(0, 0, 0, .86) 100%
    );
    pointer-events: none;
}

.post-card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 16px 16px;
    z-index: 1;
}

.post-card-badges {
    display: flex;
    gap: 5px;
    margin-bottom: 5px;
    flex-wrap: wrap;
    align-items: center;
}

.post-card-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    color: #fff;
    letter-spacing: .4px;
    text-transform: uppercase;
    line-height: 1.5;
}

.post-card-type {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    line-height: 1.5;
}
.post-card-type--promo {
    background: rgba(255, 207, 139, .18);
    color: var(--gold);
}
.post-card-type--ann {
    background: rgba(96, 165, 250, .18);
    color: #93c5fd;
}

.post-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 5px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
@media (min-width: 640px) {
    .post-card-title { font-size: 15px; }
}

.post-card-subtitle {
    font-size: 11px;
    color: rgba(255, 255, 255, .72);
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    margin-bottom: 5px;
}

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.post-card-timer {
    font-size: 11px;
    font-weight: 600;
    color: var(--gold);
}
.post-card-timer:not(:empty)::before {
    content: '⏱ ';
}

.post-card-cta {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, .75);
    margin-left: auto;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════════
   СТРАНИЦА ПОСТА (post.html)
   ═══════════════════════════════════════════════════════════════════════════ */

.post-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gold);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 22px;
    transition: opacity .15s;
}
.post-back-link:hover { opacity: .8; }

.post-article {
    padding-bottom: 16px;
}

.post-hero-image {
    width: 100%;
    aspect-ratio: 16 / 7;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 22px;
    background: var(--surface);
}
.post-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    align-items: center;
}

.post-type-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    letter-spacing: .5px;
    text-transform: uppercase;
    background: rgba(242, 140, 40, .18);
    color: var(--ember);
    border: 1px solid rgba(242, 140, 40, .28);
    line-height: 1.6;
}
.post-type-badge--ann {
    background: rgba(59, 130, 246, .15);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, .25);
}

.post-custom-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    color: #fff;
    line-height: 1.6;
}

.post-expired-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 20px;
    background: rgba(248, 113, 113, .15);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, .25);
    line-height: 1.6;
}

.post-title {
    font-size: clamp(1.4rem, 5vw, 2rem);
    font-weight: 800;
    color: var(--ink);
    line-height: 1.2;
    margin-bottom: 14px;
    letter-spacing: -.02em;
}

.post-expiry {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gold);
    background: rgba(255, 207, 139, .08);
    padding: 7px 14px;
    border-radius: 12px;
    margin-bottom: 22px;
    border: 1px solid rgba(255, 207, 139, .18);
}

.post-content {
    font-size: 15px;
    line-height: 1.75;
    color: var(--muted);
    margin-bottom: 28px;
}
.post-content h2 { font-size: 1.2rem; font-weight: 700; color: var(--ink); margin: 1.2em 0 .5em; }
.post-content h3 { font-size: 1.05rem; font-weight: 700; color: var(--ink); margin: 1em 0 .4em; }
.post-content p  { margin-bottom: .85em; }
.post-content ul, .post-content ol { padding-left: 1.5em; margin: .5em 0 .85em; }
.post-content li { margin-bottom: .35em; }
.post-content strong { color: var(--ink); font-weight: 700; }
.post-content a { color: var(--gold); text-decoration: underline; }
.post-content img { max-width: 100%; border-radius: 12px; margin: .5em 0; }
.post-content blockquote {
    border-left: 3px solid var(--ember);
    padding-left: 14px;
    margin: 1em 0;
    color: var(--muted2);
    font-style: italic;
}

.post-promo-block {
    background: var(--surface);
    border: 1px solid var(--line2);
    border-radius: 18px;
    padding: 18px 20px 20px;
    margin-bottom: 28px;
}

.post-promo-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted2);
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.post-promo-code-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.post-promo-code {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 4px;
    color: var(--gold);
    background: rgba(255, 207, 139, .08);
    border: 2px dashed rgba(255, 207, 139, .35);
    padding: 8px 18px;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
}

.post-promo-copy-btn {
    padding: 9px 18px;
    border-radius: 10px;
    background: linear-gradient(180deg, var(--ember), var(--ember2));
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: opacity .15s;
    white-space: nowrap;
}
.post-promo-copy-btn:hover { opacity: .9; }
.post-promo-copy-btn:active { opacity: .8; transform: scale(.97); }

.post-promo-desc {
    font-size: 13px;
    color: var(--muted2);
    line-height: 1.5;
    margin-top: 4px;
}

/* ── Linked product card on post page ───────────────────────────────────────── */
.post-product-card {
    background: var(--surface);
    border: 1px solid var(--line2);
    border-radius: 18px;
    padding: 18px 20px 20px;
    margin-bottom: 24px;
}

.post-product-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted2);
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.post-product-inner {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.post-product-img-wrap {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface2);
}

.post-product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-product-info {
    flex: 1;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.post-product-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
}

.post-product-weight {
    font-size: 12px;
    color: var(--muted2);
}

.post-product-price-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.post-product-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--gold);
}

.post-product-add {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 12px;
    background: linear-gradient(180deg, var(--ember), var(--ember2));
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
}
.post-product-add svg {
    width: 16px;
    height: 16px;
}
.post-product-add:hover  { opacity: .9; }
.post-product-add:active { transform: scale(.96); }

/* Переопределяем card-quick-add внутри поста — из иконки в полноценную кнопку */
.post-product-card .card-quick-add {
    width: auto !important;
    height: auto !important;
    border-radius: 12px !important;
    padding: 9px 18px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    position: relative !important;
    box-shadow: none !important;
}
.post-product-card .card-quick-add::before {
    border-radius: 12px !important;
}
.post-product-card .card-quick-add svg {
    width: 16px !important;
    height: 16px !important;
    position: relative !important;
}

/* ── Posts list page: grid cards (full-width, not carousel-fixed) ── */
.post-card--page {
    width: 100% !important;
    height: 240px !important;
    flex-shrink: 1;
    scroll-snap-align: none;
}
@media (min-width: 640px) {
    .post-card--page { height: 260px !important; }
}
@media (min-width: 1024px) {
    .post-card--page { height: 280px !important; }
}

/* ── Active nav-btn (bottom nav) ── */
#mobileBottomNav .nav-btn--active { color: var(--gold) !important; }

/* ─── SEARCH STYLES ─── */

/* Ensure dropdown can overflow header */
header .header-inner { overflow: visible; }

/* ─── UTILITY ─── */
.hidden-util { display: none !important; }

/* ─── SEARCH OPEN BUTTON ─── */
.search-open-btn {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid var(--line2); background: rgba(0,0,0,.18);
    color: rgba(246,239,232,.75); cursor: pointer; flex-shrink: 0;
    margin-left: 6px; transition: background .18s, border-color .18s, color .18s;
    -webkit-tap-highlight-color: transparent;
}
.search-open-btn:hover { background: rgba(255,180,80,.12); border-color: rgba(242,140,40,.5); color: var(--gold); }
.search-open-btn svg { width: 16px; height: 16px; }

/* ─── MOBILE SEARCH MODAL ─── */
.search-modal {
    position: fixed; inset: 0; z-index: 300;
    background: var(--surface);
    display: flex; flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(.32,.72,0,1);
    will-change: transform;
}
.search-modal.is-open { transform: translateY(0); }
@media (min-width: 769px) { .search-modal { display: none !important; } }

.search-modal-top {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-bottom: 1px solid var(--line);
    flex-shrink: 0; background: var(--surface);
    position: sticky; top: 0; z-index: 1;
}
.search-back-btn {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 12px;
    border: 1px solid var(--line2); background: rgba(0,0,0,.2);
    color: rgba(246,239,232,.88); cursor: pointer; flex-shrink: 0;
    transition: background .18s; -webkit-tap-highlight-color: transparent;
}
.search-back-btn svg { width: 18px; height: 18px; }
.search-input-row {
    display: flex; align-items: center; gap: 8px; flex: 1;
    background: rgba(241,227,214,.07); border: 1.5px solid var(--line2);
    border-radius: 14px; padding: 9px 12px; transition: border-color .18s;
}
.search-input-row:focus-within { border-color: rgba(242,140,40,.6); }
.sri-icon { width: 15px; height: 15px; color: rgba(246,239,232,.38); flex-shrink: 0; }
.search-input-row input, .desktop-search-area input {
    flex: 1; background: none !important; border: none !important; outline: none;
    color: var(--ink) !important; font-size: .93rem; font-weight: 500;
    caret-color: var(--gold); min-width: 0;
}
.search-input-row input::placeholder,
.desktop-search-area input::placeholder { color: rgba(246,239,232,.32); }
.search-clear-btn {
    display: flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%;
    background: rgba(246,239,232,.18); border: none; cursor: pointer;
    color: rgba(246,239,232,.7); flex-shrink: 0; transition: background .15s;
    -webkit-tap-highlight-color: transparent;
}
.search-clear-btn svg { width: 12px; height: 12px; }
.search-clear-btn:hover { background: rgba(246,239,232,.32); }

.search-modal-body { flex: 1; overflow-y: auto; padding: 16px 14px 88px; }

.search-section { margin-bottom: 4px; }
.search-section-label {
    font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: rgba(246,239,232,.38);
    margin-bottom: 10px; padding-left: 2px;
}
.search-popular-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.search-pop-chip {
    padding: 7px 14px; border-radius: 20px;
    border: 1px solid var(--line2); background: rgba(241,227,214,.06);
    color: rgba(246,239,232,.82); font-size: .82rem; font-weight: 600;
    cursor: pointer; transition: background .18s, border-color .18s, color .18s;
    white-space: nowrap; -webkit-tap-highlight-color: transparent;
}
.search-pop-chip:hover { background: rgba(242,140,40,.12); border-color: rgba(242,140,40,.4); color: var(--gold); }
.search-pop-chip:active { transform: scale(.97); }

/* Search result items */
.search-result-item {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 9px 0; cursor: pointer; background: none;
    border: none; border-bottom: 1px solid var(--line);
    text-align: left; transition: background .14s;
    -webkit-tap-highlight-color: transparent;
}
.search-result-item:first-of-type { border-top: 1px solid var(--line); }
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(241,227,214,.05); border-radius: 8px; padding-left: 6px; padding-right: 6px; }
.sri-img {
    width: 52px; height: 52px; border-radius: 10px; overflow: hidden;
    flex-shrink: 0; background: var(--surface2);
}
.sri-img img { width: 100%; height: 100%; object-fit: cover; }
.sri-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sri-name { font-size: .88rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sri-cat { font-size: .73rem; color: rgba(246,239,232,.40); }
.sri-price { font-size: .88rem; font-weight: 700; color: var(--gold); white-space: nowrap; flex-shrink: 0; }
.search-no-results { text-align: center; padding: 28px 0; color: rgba(246,239,232,.40); font-size: .9rem; }

/* Category cards grid */
.search-cat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
@media (min-width: 420px) { .search-cat-grid { grid-template-columns: repeat(4,1fr); } }
.search-cat-card {
    display: flex; flex-direction: column; align-items: center; gap: 7px;
    padding: 10px 6px; border-radius: 14px;
    border: 1px solid var(--line); background: rgba(241,227,214,.04);
    cursor: pointer; transition: background .18s, border-color .18s; text-align: center;
    -webkit-tap-highlight-color: transparent;
}
.search-cat-card:hover { background: rgba(242,140,40,.08); border-color: rgba(242,140,40,.3); }
.search-cat-card:active { transform: scale(.97); }
.scc-img { width: 60px; height: 60px; border-radius: 10px; overflow: hidden; background: var(--surface2); flex-shrink: 0; }
.scc-img img { width: 100%; height: 100%; object-fit: cover; }
.scc-name { font-size: .70rem; font-weight: 700; color: rgba(246,239,232,.80); line-height: 1.2; }

/* ─── DESKTOP SEARCH ─── */
.desktop-search-area {
    align-items: center; flex: 1; max-width: 340px; gap: 7px;
    background: rgba(241,227,214,.07); border: 1.5px solid var(--line2);
    border-radius: 14px; padding: 7px 10px; position: relative;
    transition: border-color .18s; margin-left: 8px;
}
.desktop-search-area:focus-within { border-color: rgba(242,140,40,.6); }
.dsa-close {
    display: flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border-radius: 50%;
    background: rgba(246,239,232,.16); border: none; cursor: pointer;
    color: rgba(246,239,232,.7); flex-shrink: 0; transition: background .15s;
}
.dsa-close svg { width: 11px; height: 11px; }
.dsa-close:hover { background: rgba(246,239,232,.28); }
.desktop-search-drop {
    position: absolute; top: calc(100% + 8px); left: -40px; width: 380px;
    max-height: 400px; overflow-y: auto;
    background: var(--surface); border: 1px solid var(--line2);
    border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.55);
    padding: 8px 14px 10px; z-index: 200;
}
.dsearch-label {
    font-size: .70rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: rgba(246,239,232,.35);
    padding: 4px 0 8px;
}
.desktop-search-drop .search-result-item { padding: 9px 0; }
.desktop-search-drop .search-result-item:hover { padding-left: 4px; padding-right: 4px; }
.desktop-search-drop .search-no-results { padding: 20px 0; }
@media (max-width: 768px) { .desktop-search-area { display: none !important; } }

/* Desktop navwrap in search mode: hide nav & arrows */
/* Desktop search open: fade out nav, arrows, fixed btn */
.oki-navwrap[data-search-open] > #categoryNav,
.oki-navwrap[data-search-open] > .oki-nav-arrow,
.oki-navwrap[data-search-open] > .search-open-btn--fixed {
    opacity: 0; pointer-events: none; transition: opacity .18s;
}
.oki-navwrap { overflow: visible !important; }

/* Mobile: hide the fixed (desktop) button */
@media (max-width: 768px) {
    .search-open-btn--fixed { display: none !important; }
}
/* Desktop: hide the in-nav (mobile) button */
@media (min-width: 769px) {
    .search-open-btn--nav { display: none !important; }
}
/* In-nav button: no left margin, snap point at position 0 so mandatory snap doesn't skip it */
.search-open-btn--nav { margin-left: 0 !important; margin-right: 4px; flex-shrink: 0; scroll-snap-align: start; }

#mobileBottomNav .nav-btn--active .nav-ico { opacity: 1 !important; }

/* ============================================================
   SUPPORT CHAT & CONTACT — full chat system styles
   ============================================================ */

/* ── Mobile contact button (header) ── */
.mobile-contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface2);
    border: 1px solid var(--line2);
    color: var(--gold);
    cursor: pointer;
    flex-shrink: 0;
    transition: background .18s, color .18s;
}
.mobile-contact-btn svg { width: 20px; height: 20px; }
.mobile-contact-btn:hover { background: var(--ember); color: #fff; }
@media (min-width: 769px) { .mobile-contact-btn { display: none !important; } }

/* ── Desktop FAB wrap ── */
.contact-fab-wrap {
    position: fixed;
    bottom: 28px;
    right: 24px;
    z-index: 150;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}
@media (max-width: 768px) { .contact-fab-wrap { display: none !important; } }

/* ── FAB button ── */
.contact-fab-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--ember);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(242,140,40,.45);
    transition: background .18s, transform .15s, box-shadow .18s;
    position: relative;
}
.contact-fab-btn svg { width: 24px; height: 24px; }
.contact-fab-btn:hover { background: var(--ember2); transform: scale(1.07); }
.contact-fab-btn--admin { background: #2563eb; box-shadow: 0 4px 20px rgba(37,99,235,.4); }
.contact-fab-btn--admin:hover { background: #1d4ed8; }

/* ── Contact popup menu ── */
.contact-menu {
    background: var(--surface2);
    border: 1px solid var(--line2);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,.55);
    min-width: 260px;
    display: flex;
    flex-direction: column;
}
.contact-menu.hidden { display: none; }

.contact-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
    color: var(--ink);
    transition: background .15s;
    width: 100%;
    text-align: left;
}
.contact-menu-item:hover { background: rgba(255,255,255,.05); }
.contact-menu-item + .contact-menu-item { border-top: 1px solid var(--line); }

.cmi-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cmi-icon svg { width: 22px; height: 22px; }
.cmi-icon--vk   { background: rgba(0,119,255,.18); color: #5b9cf6; }
.cmi-icon--phone { background: rgba(34,197,94,.18); color: #4ade80; }
.cmi-icon--chat  { background: rgba(242,140,40,.18); color: var(--ember); }

.cmi-info { display: flex; flex-direction: column; gap: 2px; }
.cmi-title { font-size: .875rem; font-weight: 600; color: var(--ink); line-height: 1.2; }
.cmi-sub   { font-size: .75rem; color: var(--muted2); line-height: 1.2; }

/* ── FAB unread badge ── */
.chat-fab-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--surface);
}
.chat-fab-badge.hidden { display: none; }

/* ── User Support Chat Modal ── */
.support-chat-modal {
    position: fixed;
    inset: 0;
    z-index: 260;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0,0,0,.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .26s;
}
.support-chat-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}
.support-chat-modal.hidden-util { display: none; }

@media (min-width: 600px) {
    .support-chat-modal {
        align-items: center;
    }
}

.support-chat-inner {
    width: 100%;
    max-width: 460px;
    max-height: 92vh;
    background: var(--surface);
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(40px);
    transition: transform .26s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 -4px 40px rgba(0,0,0,.6);
}
@media (min-width: 600px) {
    .support-chat-inner {
        border-radius: 20px;
        max-height: 82vh;
        transform: scale(.94);
    }
}
.support-chat-modal.is-open .support-chat-inner {
    transform: translateY(0);
}
@media (min-width: 600px) {
    .support-chat-modal.is-open .support-chat-inner {
        transform: scale(1);
    }
}

.support-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(135deg, #2a1a13 0%, #1a0e0a 100%);
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}
.sch-header-info { display: flex; align-items: center; gap: 12px; }
.sch-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--ember);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sch-avatar svg { width: 22px; height: 22px; color: #fff; }
.sch-title    { font-size: .95rem; font-weight: 700; color: var(--ink); }
.sch-subtitle { font-size: .72rem; color: var(--muted2); margin-top: 1px; }
.sch-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    border: none;
    color: var(--muted2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
}
.sch-close:hover { background: rgba(255,255,255,.15); color: var(--ink); }
.sch-close svg { width: 16px; height: 16px; }

.support-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #18100c;
    background-image: radial-gradient(rgba(255,160,60,.022) 1px, transparent 1px);
    background-size: 24px 24px;
    scroll-behavior: smooth;
}

.sch-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
}
.sch-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--line2);
    border-top-color: var(--ember);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.sch-empty-hint {
    text-align: center;
    color: var(--muted2);
    font-size: .85rem;
    padding: 32px 16px;
}
.sch-error {
    text-align: center;
    color: #f87171;
    font-size: .85rem;
    padding: 32px 16px;
}

.sch-msg-wrap {
    display: flex;
    margin-bottom: 2px;
}
.sch-msg-wrap--me   { justify-content: flex-end; }
.sch-msg-wrap--them { justify-content: flex-start; }

.sch-msg {
    max-width: 80%;
    padding: 8px 12px 6px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sch-msg--me {
    background: linear-gradient(150deg, #f59133 0%, #d9600a 100%);
    border-radius: 18px 18px 4px 18px;
    box-shadow: 0 3px 10px rgba(213,93,10,.4);
    color: #fff;
}
.sch-msg--them {
    background: #2a1b13;
    border-radius: 18px 18px 18px 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,.35);
    color: var(--ink);
    border: none;
}
.sch-msg-sender {
    font-size: .7rem;
    font-weight: 600;
    color: var(--gold);
    display: block;
    margin-bottom: 1px;
}
.sch-msg-text { font-size: .875rem; line-height: 1.45; word-break: break-word; white-space: pre-wrap; }
.sch-msg--me .sch-msg-text { color: #fff; }
.sch-msg-time {
    font-size: .65rem;
    opacity: .65;
    align-self: flex-end;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 2px;
}
/* Telegram-style read ticks — shared between user chat and admin chat */
.msg-tick {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: 2px;
    color: rgba(255,255,255,.4);
    transition: color .25s;
}
.msg-tick--read {
    color: #54c5f8;
}
.msg-tick svg { display: block; }
.sch-msg-system {
    text-align: center;
    font-size: .72rem;
    color: var(--muted2);
    padding: 6px 12px;
    background: rgba(255,255,255,.04);
    border-radius: 20px;
    margin: 6px auto;
    max-width: 80%;
}

.support-chat-input-area {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 8px 10px 10px;
    border-top: 1px solid rgba(241,227,214,.07);
    background: #1e140f;
    flex-shrink: 0;
}
.support-chat-input-area textarea {
    flex: 1;
    background: #2a1b13;
    border: none;
    border-radius: 22px;
    padding: 10px 16px;
    color: var(--ink);
    font-size: .875rem;
    resize: none;
    outline: none;
    line-height: 1.45;
    min-height: 40px;
    max-height: 120px;
    overflow-y: auto;
}
.support-chat-input-area textarea::placeholder { color: rgba(246,239,232,.35); }
.sch-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(150deg, #f59133, #d9600a);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(217,96,10,.45);
    transition: opacity .15s, transform .12s;
}
.sch-send-btn svg { width: 18px; height: 18px; }
.sch-send-btn:hover { opacity: .88; transform: scale(1.06); }

/* ── Date separator — Telegram pill style ── */
.msg-date-sep {
    align-self: center;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: .68rem;
    font-weight: 500;
    color: rgba(246,239,232,.6);
    text-transform: lowercase;
    letter-spacing: .01em;
    margin: 10px 0 6px;
    flex-shrink: 0;
}
.msg-date-sep::before,.msg-date-sep::after { display: none; }

/* ── Typing indicator ── */
.sch-typing-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 16px 7px;
    flex-shrink: 0;
    background: #18100c;
    border-top: 1px solid rgba(241,227,214,.05);
}
.sch-typing-wrap.hidden { display: none; }

.am-typing-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 16px 7px;
    flex-shrink: 0;
    background: #18100c;
    border-top: 1px solid rgba(241,227,214,.05);
}
.am-typing-wrap.hidden { display: none; }

.sch-typing-text { font-size: .72rem; color: rgba(246,239,232,.5); }
.sch-typing-dots {
    display: flex;
    align-items: center;
    gap: 3px;
}
.sch-typing-dots span {
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--ember);
    opacity: .5;
    animation: typingBounce 1.1s ease-in-out infinite;
}
.sch-typing-dots span:nth-child(2) { animation-delay: .18s; }
.sch-typing-dots span:nth-child(3) { animation-delay: .36s; }
@keyframes typingBounce {
    0%,60%,100% { transform: translateY(0); opacity: .35; }
    30% { transform: translateY(-5px); opacity: 1; }
}

/* ── Admin Messenger ── */
.admin-messenger {
    position: fixed;
    inset: 0;
    z-index: 280;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .26s;
}
.admin-messenger.is-open {
    opacity: 1;
    pointer-events: auto;
}
.admin-messenger.hidden-util { display: none; }

.am-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.6);
}

.am-panel {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(1000px, 96vw);
    height: min(700px, 92vh);
    background: #18100c;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0,0,0,.8);
    transform: scale(.95);
    transition: transform .26s cubic-bezier(.4,0,.2,1);
}
.admin-messenger.is-open .am-panel { transform: scale(1); }

/* mobile overrides handled in the dedicated mobile section below */

/* Sidebar */
.am-sidebar {
    width: 300px;
    min-width: 300px;
    border-right: 1px solid rgba(241,227,214,.09);
    display: flex;
    flex-direction: column;
    background: #211610;
    flex-shrink: 0;
}
/* mobile sidebar overrides handled below */

.am-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 12px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #241610 0%, #180e09 100%);
    border-bottom: 1px solid rgba(241,227,214,.08);
}
.am-sidebar-title { font-size: 1rem; font-weight: 700; color: var(--ink); }
.am-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,.07);
    border: none;
    color: var(--muted2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
}
.am-close:hover { background: rgba(255,255,255,.14); color: var(--ink); }
.am-close svg { width: 15px; height: 15px; }

.am-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(241,227,214,.07);
    flex-shrink: 0;
    background: #1e140f;
}
.am-search-wrap svg { width: 16px; height: 16px; color: var(--muted2); flex-shrink: 0; }
.am-search-wrap input {
    flex: 1;
    background: #2a1b13;
    border: none;
    outline: none;
    color: var(--ink);
    font-size: .85rem;
    border-radius: 10px;
    padding: 5px 10px;
}
.am-search-wrap input::placeholder { color: var(--muted2); }

.am-chat-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.am-no-chats {
    text-align: center;
    color: var(--muted2);
    font-size: .82rem;
    padding: 32px 16px;
}

.am-chat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    width: 100%;
    border-bottom: 1px solid rgba(241,227,214,.06);
    transition: background .14s;
    position: relative;
}
.am-chat-item:hover { background: rgba(255,255,255,.04); }
.am-chat-item--unread { background: rgba(242,140,40,.07); }
.am-chat-item--unread:hover { background: rgba(242,140,40,.12); }

.am-ci-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--ember);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.am-ci-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.am-ci-top  { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.am-ci-name {
    font-size: .85rem;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.am-ci-time { font-size: .7rem; color: var(--muted2); flex-shrink: 0; }
.am-ci-preview {
    font-size: .78rem;
    color: var(--muted2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.am-ci-preview--unread { color: var(--ember); font-weight: 500; }
.am-ci-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--ember);
    flex-shrink: 0;
    align-self: center;
}

/* Main chat area */
.am-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #18100c;
}
.am-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--muted2);
}
.am-empty svg { width: 48px; height: 48px; opacity: .35; }
.am-empty p   { font-size: .9rem; }
.am-empty.hidden-util { display: none; }

.am-chat { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.am-chat.hidden-util { display: none; }

.am-chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(241,227,214,.08);
    flex-shrink: 0;
    background: linear-gradient(135deg, #241610 0%, #180e09 100%);
}
.am-back-btn {
    display: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,.07);
    border: none;
    color: var(--ink);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s;
}
@media (max-width: 640px) { .am-back-btn { display: flex; } }
.am-back-btn:hover { background: rgba(255,255,255,.14); }
.am-back-btn svg { width: 16px; height: 16px; }

.am-chat-user { display: flex; flex-direction: column; gap: 1px; }
.am-chat-username { font-size: .9rem; font-weight: 700; color: var(--ink); }
.am-chat-userphone { font-size: .75rem; color: var(--muted2); }

.am-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #18100c;
    background-image: radial-gradient(rgba(255,160,60,.022) 1px, transparent 1px);
    background-size: 24px 24px;
    scroll-behavior: smooth;
}

.am-msg-wrap { display: flex; margin-bottom: 2px; }
.am-msg-wrap--user  { justify-content: flex-start; }
.am-msg-wrap--staff { justify-content: flex-end; }

.am-msg {
    max-width: 74%;
    padding: 8px 12px 6px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.am-msg--user {
    background: #2a1b13;
    border-radius: 18px 18px 18px 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,.35);
    color: var(--ink);
    border: none;
}
.am-msg--staff {
    background: linear-gradient(150deg, #f59133 0%, #d9600a 100%);
    border-radius: 18px 18px 4px 18px;
    box-shadow: 0 3px 10px rgba(213,93,10,.4);
    color: #fff;
}
.am-msg-sender {
    font-size: .68rem;
    font-weight: 600;
    color: rgba(255,255,255,.7);
    display: block;
    margin-bottom: 1px;
}
.am-msg-text { font-size: .875rem; line-height: 1.45; word-break: break-word; white-space: pre-wrap; }
.am-msg-time {
    font-size: .63rem;
    opacity: .65;
    align-self: flex-end;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 2px;
}
.am-msg-system {
    text-align: center;
    font-size: .72rem;
    color: var(--muted2);
    padding: 6px 12px;
    background: rgba(255,255,255,.04);
    border-radius: 20px;
    margin: 6px auto;
    max-width: 80%;
}
/* ── Order context card in admin chat ───────────────── */
.am-order-ctx {
    margin: 8px 10px;
    border: 1px solid rgba(255,180,90,.22);
    border-radius: 14px;
    overflow: hidden;
    max-width: 300px;
    background: rgba(22,14,9,.97);
}
.am-oct-head {
    padding: 10px 14px 9px;
    border-bottom: 1px solid rgba(255,180,90,.10);
}
.am-oct-name  { font-weight: 700; font-size: 13px; color: var(--gold); }
.am-oct-phone { font-size: 11.5px; color: rgba(246,239,232,.55); margin-top: 1px; }
.am-oct-addr  { font-size: 11px; color: rgba(246,239,232,.38); margin-top: 5px; line-height: 1.4; }
.am-oct-items {
    padding: 8px 10px;
    display: flex; flex-direction: column; gap: 7px;
}
.am-oci { display: flex; gap: 9px; align-items: center; }
.am-oci-img {
    width: 46px; height: 46px; border-radius: 9px;
    object-fit: cover; flex-shrink: 0;
    border: 1px solid rgba(241,227,214,.10);
}
.am-oci-img--empty { background: rgba(241,227,214,.07); }
.am-oci-info  { flex: 1; min-width: 0; }
.am-oci-name  {
    font-size: 12.5px; font-weight: 600; color: var(--ink);
    line-height: 1.3; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.am-oci-meta  { font-size: 11px; color: rgba(246,239,232,.42); margin-top: 2px; }
.am-oci-price { font-size: 12px; color: var(--gold); font-weight: 600; white-space: nowrap; }
.am-oct-foot  {
    border-top: 1px solid rgba(255,180,90,.10);
    padding: 8px 14px;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12px; color: rgba(246,239,232,.50);
}
.am-oct-sum   { display: flex; gap: 8px; align-items: center; }
.am-oct-discount { font-size: 11px; color: #86efac; }
.am-oct-total { font-size: 14px; font-weight: 700; color: var(--ink); }

.am-input-area {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 8px 10px 10px;
    border-top: 1px solid rgba(241,227,214,.07);
    background: #1e140f;
    flex-shrink: 0;
}
.am-input-area textarea {
    flex: 1;
    background: #2a1b13;
    border: none;
    border-radius: 22px;
    padding: 10px 16px;
    color: var(--ink);
    font-size: .875rem;
    resize: none;
    outline: none;
    line-height: 1.45;
    min-height: 40px;
    max-height: 120px;
    overflow-y: auto;
}
.am-input-area textarea::placeholder { color: rgba(246,239,232,.35); }
.am-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(150deg, #f59133, #d9600a);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(217,96,10,.45);
    transition: opacity .15s, transform .12s;
}
.am-send-btn svg { width: 18px; height: 18px; }
.am-send-btn:hover { opacity: .88; transform: scale(1.06); }

/* nav-label utility for bottom nav messenger button */
#mobileBottomNav .nav-btn a.nav-btn { display: flex; flex-direction: column; align-items: center; }
.nav-label { font-size: .65rem; line-height: 1; margin-top: 3px; }

/* Work mode badge in header */
.work-mode-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px 3px 8px;
    border-radius: 999px;
    background: rgba(246,239,232,.08);
    border: 1px solid rgba(246,239,232,.18);
    color: rgba(246,239,232,.75);
    font-size: .72rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}
.work-mode-badge svg { width: 13px; height: 13px; flex-shrink: 0; }
@media (max-width: 768px) {
    .work-mode-badge { font-size: .65rem; padding: 2px 7px 2px 6px; }
    .work-mode-badge svg { width: 11px; height: 11px; }
}

/* Header actions wrapper (mobile: contact btn + hamburger grouped right) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Mobile contact popup menu */
.mobile-contact-menu {
    position: fixed;
    z-index: 500;
    background: var(--surface2);
    border: 1px solid var(--line2);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,.55);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 200px;
    transition: opacity .18s, transform .18s;
}
.mobile-contact-menu.hidden-util { display: none; }
.mcm-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--ink);
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    width: 100%;
    text-align: left;
    transition: background .14s;
}
.mcm-item:hover { background: rgba(255,255,255,.07); }
.mcm-icon {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.mcm-icon svg { width: 17px; height: 17px; }
.mcm-icon--vk   { background: #2787f5; color: #fff; }
.mcm-icon--phone { background: #22c55e; color: #fff; }
.mcm-icon--chat  { background: var(--ember); color: #fff; }

/* Support chat modal: account for bottom nav on mobile */
@media (max-width: 768px) {
    .support-chat-modal { align-items: flex-end; }
    .support-chat-inner {
        border-radius: 20px 20px 0 0 !important;
        max-height: calc(100dvh - var(--bottom-nav-h, 56px) - env(safe-area-inset-bottom)) !important;
    }
}
/* Hide bottom nav when user support chat is open */
body.support-chat-open #mobileBottomNav { display: none !important; }

/* amMobileNav: bottom nav bar — hidden on desktop, shown on mobile only */
.am-mobile-nav { display: none; }

/* ── Admin Messenger Mobile (Telegram-like) ── */
@media (max-width: 640px) {
    /* No X button on mobile — use back btn + amMobileNav to navigate */
    #closeAdminMessenger { display: none !important; }

    /* adminMessenger itself: full-screen flex column */
    .admin-messenger {
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
    }
    /* Overlay not needed: full-screen takes whole screen */
    .admin-messenger .am-overlay { display: none !important; }

    /* am-panel: flex:1 fills everything above amMobileNav */
    .am-panel {
        flex: 1 !important;
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        border-radius: 0 !important;
        transform: none !important;
        flex-direction: column !important;
        box-shadow: none !important;
        /* No scale animation on mobile */
    }
    .admin-messenger.is-open .am-panel { transform: none !important; }

    /* LIST VIEW (default on mobile): sidebar full height, main hidden */
    .am-panel .am-sidebar {
        width: 100% !important;
        min-width: unset !important;
        max-height: none !important;
        flex: 1 !important;
        border-right: none !important;
        border-bottom: none !important;
    }
    .am-panel .am-main { display: none !important; }

    /* CHAT VIEW (class toggled by JS): sidebar hidden, main full height */
    .am-panel.am--chat-view .am-sidebar { display: none !important; }
    .am-panel.am--chat-view .am-main {
        display: flex !important;
        flex: 1 !important;
        min-height: 0 !important;
        width: 100% !important;
    }

    /* amMobileNav shows at the bottom */
    .am-mobile-nav {
        display: flex !important;
        flex-shrink: 0 !important;
        height: 56px !important;
        width: 100% !important;
        align-items: stretch;
        background: linear-gradient(180deg, rgba(28,18,14,.85), rgba(28,18,14,.98));
        backdrop-filter: blur(14px);
        border-top: 1px solid var(--line);
    }
    .am-mn-btn {
        position: relative;
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        border: none;
        background: transparent;
        color: rgba(246,239,232,.82);
        font-size: 10px;
        font-weight: 650;
        cursor: pointer;
        transition: color .18s;
        user-select: none;
    }
    .am-mn-btn:active { transform: scale(.95); }
    .am-mn-btn--active { color: var(--gold) !important; }
    .am-mn-btn svg { width: 20px; height: 20px; }
    .am-mn-btn .am-mn-badge {
        position: absolute;
        top: 2px;
        right: 50%;
        margin-right: -18px;
        min-width: 16px;
        height: 16px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 4px;
        border-radius: 999px;
        background: var(--gold);
        color: rgba(15,14,13,.92);
        font-size: 9px;
        font-weight: 900;
        border: 1px solid rgba(241,227,214,.25);
    }
    .am-mn-btn .am-mn-badge.hidden { display: none; }
}

/* =========================================
   APP LAUNCH OVERLAY — анимированная заставка
   при холодном запуске мобильного приложения (TWA)
   ========================================= */
.app-launch-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    background: var(--bg);
    overflow: hidden;
}
.app-launch-overlay.is-active { display: flex; }
.app-launch-overlay.is-leaving {
    animation: aloFadeOut .55s cubic-bezier(.4,0,1,1) forwards;
    pointer-events: none;
}
.app-launch-overlay::before,
.app-launch-overlay::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: .85;
    animation: aloDrift 9s ease-in-out infinite alternate;
}
.app-launch-overlay::before {
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, rgba(255,180,100,.28) 0%, rgba(255,150,80,.1) 45%, transparent 72%);
    top: -160px;
    left: -120px;
}
.app-launch-overlay::after {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(242,140,40,.24) 0%, rgba(224,108,18,.08) 45%, transparent 72%);
    bottom: -140px;
    right: -100px;
    animation-delay: -4.5s;
}
.alo-badge {
    position: relative;
    width: 124px;
    height: 124px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: aloPopIn .7s cubic-bezier(.22,1,.36,1) both;
}
.alo-badge::before {
    content: '';
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(242,140,40,.45) 0%, transparent 72%);
    animation: aloGlowPulse 2.4s ease-in-out infinite;
}
.alo-badge img {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
    box-shadow: 0 18px 50px rgba(0,0,0,.45), 0 0 0 1px rgba(241,227,214,.12);
    animation: aloBreathe 2.4s ease-in-out infinite;
}
.alo-word {
    margin: 0;
    text-align: center;
    font-weight: 800;
    letter-spacing: .04em;
    font-size: 1.4rem;
    line-height: 1.3;
    opacity: 0;
    animation: aloRise .6s cubic-bezier(.22,1,.36,1) .35s forwards;
}
.alo-word-accent { color: var(--ember); }
.alo-word-soft { color: var(--beige); }
.alo-dots {
    display: flex;
    gap: 9px;
    opacity: 0;
    animation: aloRise .6s cubic-bezier(.22,1,.36,1) .55s forwards;
}
.alo-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(180deg, #FFB86A, var(--ember));
    animation: aloDotBounce 1.1s ease-in-out infinite;
}
.alo-dots span:nth-child(2) { animation-delay: .15s; }
.alo-dots span:nth-child(3) { animation-delay: .3s; }

@keyframes aloPopIn {
    0% { opacity: 0; transform: scale(.7); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes aloBreathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.055); }
}
@keyframes aloGlowPulse {
    0%, 100% { opacity: .5; transform: scale(.9); }
    50% { opacity: 1; transform: scale(1.12); }
}
@keyframes aloRise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes aloDotBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: .45; }
    40% { transform: translateY(-7px); opacity: 1; }
}
@keyframes aloDrift {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(40px, 30px) scale(1.18); }
}
@keyframes aloFadeOut {
    to { opacity: 0; transform: scale(1.05); }
}
@media (prefers-reduced-motion: reduce) {
    .app-launch-overlay::before,
    .app-launch-overlay::after,
    .alo-badge,
    .alo-badge::before,
    .alo-badge img,
    .alo-word,
    .alo-dots,
    .alo-dots span {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
