/* ==========================================================================
   1. ПЕРЕМЕННЫЕ И ДИНАМИКА
   ========================================================================== */
:root {
    /* Базовая палитра (Lounge 2026) */
    --lounge-green: #de6502;
    --soft-orange: #c38053;
    /* Добавляем переменные шрифтов */
    --font-ui: 'Inter', sans-serif;
    --font-display: 'Playfair Display', serif;
    
    /* Динамические переменные (изменяются через JS в зависимости от времени) */
    --dynamic-sphere-1: var(--lounge-green);
    --dynamic-sphere-2: var(--soft-orange);
    --bg-dark: #1b2f24;
    
    /* Свечения, Стекло и Текст */
    --orange-glow: rgba(200, 119, 64, 0.4);
    --green-glow: rgba(42, 71, 56, 0.6);
    --glass-bg: rgba(255, 255, 255, 0.025);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-highlight: rgba(255, 255, 255, 0.08);
    --text-main: #f0f2f0;
    --text-muted: rgba(240, 242, 240, 0.5);
    
    /* Анимации */
    --spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --smooth: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
    background-color: #1b2f24;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
    overscroll-behavior-y: none;
    transition: background-color 1.5s ease;
    font-family: var(--font-ui);
}
/* ==========================================================================
   ФОН: ТЁМНО-ЗЕЛЁНЫЙ ГРАНИТ (ПРОЦЕДУРНАЯ ТЕКСТУРА)
   ========================================================================== */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2; /* Лежит в самом низу, под водяным знаком логотипа (-1) */
    pointer-events: none;
    
    /* 1. Генерируем зерно гранита с помощью SVG Noise */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    
    /* 2. Накладываем шум на наш фон, чтобы получить эффект камня */
    mix-blend-mode: overlay;
    
    /* 3. Сила текстуры (0.15 - элегантный камень, 0.3 - грубый гранит) */
    opacity: 0.20; 
}
/* Финальный аккорд: Фоновый водяной знак (Watermark) */
body::after {
    content: '';
    position: fixed;
    /* Размещаем огромный логотип асимметрично */
    top: 30%;
    right: -10%;
    width: 80%;
    height: 80%;
    
    /* Укажи путь к своему файлу логотипа (лучше .svg или .webp) */
    background-image: url('./img/logo.png'); 
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    
    /* МАГИЯ ПРЕМИУМА: Делаем его черно-белым и почти невидимым */
    filter: grayscale(100%) brightness(0.4);
    opacity: 0.30; /* Всего 4% непрозрачности! */
    
    /* Скрываем под всеми карточками, но над цветными сферами фона */
    z-index: -1; 
    pointer-events: none;
}

/* ==========================================================================
   2. ПРЕЛОАДЕР И ФОН
   ========================================================================== */
.loader-overlay {
    position: fixed; inset: 0; background: var(--bg-dark); z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    transition: opacity 0.6s var(--smooth), visibility 0.6s, background-color 1.5s ease;
}
.loader-overlay.hidden { opacity: 0; visibility: hidden; }

.loader-content { text-align: center; }
.loader-logo { font-size: 56px; font-weight: 800; color: var(--soft-orange); margin-bottom: 20px; animation: pulse-glow 1.5s infinite alternate var(--smooth); }
.loader-bar { width: 150px; height: 4px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; margin: 0 auto; }
.loader-progress { height: 100%; width: 0%; background: var(--dynamic-sphere-1); animation: loadBar 1.2s cubic-bezier(0.85, 0, 0.15, 1) forwards; }
.loader-greeting { margin-top: 15px; font-size: 14px; font-weight: 400; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; }

@keyframes loadBar { 0% { width: 0%; } 100% { width: 100%; } }
@keyframes pulse-glow { 0% { transform: scale(0.95); text-shadow: 0 0 10px transparent; opacity: 0.5; } 100% { transform: scale(1.05); text-shadow: 0 0 30px var(--orange-glow); opacity: 1; } }

.visual-environment { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.sphere { position: absolute; border-radius: 50%; filter: blur(100px); animation: drift 20s infinite alternate ease-in-out; transition: background 1.5s ease; }
.sphere-primary { 
    width: max(50vw, 350px);  /* Не даст сфере стать меньше 350px на мобилке */
    height: max(50vw, 350px); 
    background: var(--dynamic-sphere-1); 
    top: -5%; 
    right: -10%; /* Сдвинули чуть ближе к центру для телефонов */
    opacity: 0.6; /* Немного повысили базовую яркость */
}

.sphere-secondary { 
    width: max(60vw, 400px); /* Не даст стать меньше 400px */
    height: max(60vw, 400px); 
    background: var(--dynamic-sphere-2); 
    bottom: -5%; 
    left: -10%; 
    opacity: 0.5; 
    animation-delay: -5s; 
}

@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(20px, 40px) scale(1.1); } }

/* ==========================================================================
   3. ГЛАССМОРФИЗМ И БАЗОВЫЙ LAYOUT
   ========================================================================== */
.glass { background: var(--glass-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--glass-border); box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4), inset 0 1px 1px 0 var(--glass-highlight); }
.glass-heavy { background: rgba(14, 20, 16, 0.85); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); border-top: 1px solid var(--glass-border); }

.app-layout { max-width: 500px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 20px; }

/* ==========================================================================
   4. ШАПКА И НАВИГАЦИЯ
   ========================================================================== */
.top-bar { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-radius: 24px; }
.brand-identity { display: flex; align-items: center; gap: 12px; }

.back-btn { background: transparent; border: none; color: var(--text-main); display: flex; align-items: center; justify-content: center; padding: 5px; cursor: pointer; transition: 0.3s; margin-right: 5px; }
.back-btn.hidden { display: none; }
.back-btn:active { transform: scale(0.9); color: var(--soft-orange); }

.brand-logo { width: 44px; height: 44px; background: var(--dynamic-sphere-1); color: var(--text-main); font-size: 22px; font-weight: 800; display: flex; align-items: center; justify-content: center; border-radius: 14px; box-shadow: inset 0 2px 4px rgba(255,255,255,0.1), 0 4px 15px var(--green-glow); transition: background 1.5s ease; }
.brand-titles h1 { font-size: 16px; letter-spacing: 2px; font-weight: 800; }
.brand-titles p { font-size: 9px; color: var(--soft-orange); letter-spacing: 1px; text-transform: uppercase; }

.venue-status { display: flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, 0.05); padding: 6px 12px; border-radius: 20px; font-size: 10px; font-weight: 600; }
.status-indicator { width: 6px; height: 6px; background: var(--soft-orange); border-radius: 50%; box-shadow: 0 0 8px var(--soft-orange); animation: status-pulse 2s infinite; }
@keyframes status-pulse { 0%, 100% { opacity: 0.5; box-shadow: 0 0 4px var(--soft-orange); } 50% { opacity: 1; box-shadow: 0 0 12px var(--soft-orange); } }

/* Обновленная СУПЕР-ЛИПКАЯ навигация */
.nav-container {
    position: sticky;
    top: 0;
    z-index: 100;
    /* УБРАЛИ background: linear-gradient(...) — именно он давал чёрное пятно поверх камня */
    background: transparent; 
    margin: -16px -16px 16px -16px;
    padding: 10px 16px 24px 16px; 
}

.categories-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px;
    border-radius: 20px;
    scrollbar-width: none;
    
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    /* Делаем тень мягче и прозрачнее (0.2 вместо 0.5), чтобы не было черного ореола */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), inset 0 1px 1px var(--glass-highlight);
}

.categories-nav::-webkit-scrollbar { 
    display: none; 
}
.categories-nav::-webkit-scrollbar { display: none; }
.nav-btn { padding: 12px 20px; border-radius: 14px; background: transparent; border: none; color: var(--text-muted); font-size: 14px; font-weight: 600; white-space: nowrap; transition: all 0.3s var(--smooth); cursor: pointer; }
.nav-btn.active { background: var(--soft-orange); color: var(--bg-dark); box-shadow: 0 4px 15px var(--orange-glow); transform: scale(1.02); }

/* ==========================================================================
   5. ЭКРАНЫ И СЕТКА BENTO
   ========================================================================== */
.view-section { display: none; animation: fadeIn 0.4s var(--smooth); }
.view-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.section-title { font-size: 24px; margin: 10px 0 20px; font-weight: 800; color: var(--soft-orange); }

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    perspective: 1000px;
    grid-auto-flow: dense; /* Идеальное заполнение пустых мест */
}

.bento-item { position: relative; border-radius: 28px; padding: 16px; display: flex; flex-direction: column; justify-content: flex-end; min-height: 200px; overflow: hidden; cursor: pointer; transform-style: preserve-3d; transition: transform 0.1s ease-out, opacity 0.5s var(--spring); }
.bento-item.wide { grid-column: span 2; min-height: 160px; flex-direction: row; align-items: center; justify-content: space-between; }
.category-card { min-height: 140px; }
.category-card .bento-title { font-size: 20px; text-shadow: 0 2px 10px rgba(0,0,0,0.8); }

.bento-bg { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0; transition: transform 0.8s var(--smooth); opacity: 0; }
.bento-item.img-loaded .bento-bg { opacity: 1; }
.bento-item:hover .bento-bg, .bento-item:active .bento-bg { transform: scale(1.08); }
.bento-item::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 14, 11, 0.9) 0%, rgba(10, 14, 11, 0.3) 60%, transparent 100%); z-index: 1; pointer-events: none; }

.bento-content { position: relative; z-index: 2; transform: translateZ(20px); }
.bento-title { font-size: 17px; margin-bottom: 4px; font-weight: 600; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.bento-price { font-size: 16px; font-weight: 800; color: var(--soft-orange); }

/* ==========================================================================
   6. МИКРОФИЧИ (SKELETON & BADGES)
   ========================================================================== */
.skeleton {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, var(--bg-dark) 0%, rgba(200, 119, 64, 0.2) 50%, var(--bg-dark) 100%);
    background-size: 200% 100%;
    animation: shimmer 2.5s infinite linear;
    z-index: 1; transition: opacity 0.6s var(--smooth); border-radius: inherit;
}
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.bento-item.img-loaded .skeleton { opacity: 0; pointer-events: none; }

.bento-badge {
    position: absolute; top: 14px; left: 14px; padding: 6px 12px; border-radius: 10px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; z-index: 10; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    opacity: 0; transform: translateY(-10px) scale(0.9); transition: all 0.5s var(--spring); display: none;
}
.bento-item.img-loaded .bento-badge[style*="display: block"] { opacity: 1; transform: translateY(0) scale(1); }

.badge-hit { background: rgba(200, 119, 64, 0.15); color: var(--soft-orange); border: 1px solid rgba(200, 119, 64, 0.3); box-shadow: 0 4px 15px rgba(200, 119, 64, 0.2); }
.badge-new { background: rgba(42, 71, 56, 0.3); color: #86e0a3; border: 1px solid rgba(42, 71, 56, 0.5); box-shadow: 0 4px 15px rgba(42, 71, 56, 0.3); }

/* ==========================================================================
   7. МОДАЛЬНОЕ ОКНО (<dialog>)
   ========================================================================== */
.detail-dialog { margin: auto 0 0 0; width: 100vw; max-width: 500px; max-height: 90vh; border: none; border-radius: 40px 40px 0 0; padding: 0; color: var(--text-main); box-shadow: 0 -10px 40px rgba(0,0,0,0.6); transform: translateY(100%); opacity: 0; transition: transform 0.5s var(--spring), opacity 0.4s var(--smooth); }
.detail-dialog[open] { transform: translateY(0); opacity: 1; }
.detail-dialog::backdrop { background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity 0.4s var(--smooth); }
.detail-dialog[open]::backdrop { opacity: 1; }

.dialog-content { padding: 16px 24px 40px; position: relative; }
.swipe-indicator { width: 40px; height: 4px; background: var(--glass-border); border-radius: 4px; margin: 0 auto 20px; }
.btn-close { position: absolute; top: 24px; right: 24px; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 50%; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: var(--text-main); z-index: 10; cursor: pointer; }

.detail-media { overflow: hidden; border-radius: 24px; margin-bottom: 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.detail-image { width: 100%; height: 280px; background-size: cover; background-position: center; transform: scale(1.05); transition: transform 0.6s var(--smooth); }
.detail-dialog[open] .detail-image { transform: scale(1); }

.detail-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.detail-title { font-size: 26px; font-weight: 800; line-height: 1.1; }
.detail-price { font-size: 24px; font-weight: 800; color: var(--soft-orange); }
.detail-desc { color: var(--text-muted); font-size: 15px; margin-bottom: 30px; line-height: 1.6; }

.btn-primary { width: 100%; background: var(--dynamic-sphere-1); color: var(--text-main); border: 1px solid rgba(255,255,255,0.1); padding: 18px; border-radius: 20px; font-size: 16px; font-weight: 800; box-shadow: 0 8px 20px rgba(0,0,0,0.2); transition: all 0.3s var(--smooth); cursor: pointer; }
.btn-primary:active { transform: scale(0.96); background: var(--soft-orange); color: var(--bg-dark); box-shadow: 0 4px 10px var(--orange-glow); }

.app-footer { text-align: center; padding: 30px 0 50px; }
.footer-divider { width: 30px; height: 2px; background: var(--glass-border); margin: 0 auto 15px; border-radius: 2px; }
.app-footer p { font-size: 12px; color: var(--text-muted); letter-spacing: 1px; }

/* --- СТИЛИ ДЛЯ ЛОГОТИПА В ЛОАДЕРЕ --- */
.loader-logo { 
    width: 80px; /* Оптимальный размер для мобилок, можешь изменить под свой логотип */
    height: auto;
    margin-bottom: 20px; 
    /* Используем filter вместо text-shadow для PNG картинок */
    animation: pulse-glow-img 1.5s infinite alternate var(--smooth); 
}

@keyframes pulse-glow-img { 
    0% { 
        transform: scale(0.95); 
        filter: drop-shadow(0 0 5px rgba(200, 119, 64, 0.2)); 
        opacity: 0.8; 
    } 
    100% { 
        transform: scale(1.05); 
        filter: drop-shadow(0 0 25px var(--soft-orange)); /* Красивое свечение контура */
        opacity: 1; 
    } 
}

/* --- СТИЛИ ДЛЯ ЛОГОТИПА В ШАПКЕ --- */
.brand-logo { 
    width: 44px; 
    height: 44px; 
    /* Если твой логотип квадратный и непрозрачный, background можно сделать transparent */
    background: var(--dynamic-sphere-1); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 14px; 
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.1), 0 4px 15px var(--green-glow); 
    transition: background 1.5s ease; 
    overflow: hidden; /* Чтобы края картинки не вылезали за скругления */
}

/* Настраиваем саму картинку внутри квадратика шапки */
.brand-logo img {
    width: 100%;
    height: 100%;
    /* object-fit: contain гарантирует, что логотип не сплющится, а впишется ровно */
    object-fit: contain; 
}

/* ==========================================================================
   8. VIEW TRANSITIONS API (БЕСШОВНЫЕ ПЕРЕХОДЫ)
   ========================================================================== */

/* 1. Изолируем шапку, чтобы она НЕ анимировалась вместе со всей страницей, 
   а оставалась на месте, как в iOS-приложениях */
.top-bar {
    view-transition-name: top-bar;
}

/* 2. Даем имена нашим основным вьюхам */
#homeView { view-transition-name: home-view; }
#itemsView { view-transition-name: items-view; }

/* 3. Настраиваем физику: убираем стандартный crossfade и ставим spring-тайминги */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.4s;
    animation-timing-function: var(--spring);
}

/* 4. Анимация ухода старого экрана (уменьшение и затухание) */
::view-transition-old(home-view),
::view-transition-old(items-view) {
    animation: fadeOutScale 0.3s var(--smooth) forwards;
}

/* 5. Анимация появления нового экрана (наплыв и проявление) */
::view-transition-new(home-view),
::view-transition-new(items-view) {
    animation: fadeInScale 0.4s var(--spring) forwards;
}

@keyframes fadeOutScale {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.95); }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(1.05); }
    to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   9. SPATIAL UI: ЖИВЫЕ БЛИКИ И СВЕТОТЕНЬ
   ========================================================================== */

/* Создаем базовые переменные для блика по центру (до срабатывания гироскопа) */
.bento-item {
    --glare-x: 50%;
    --glare-y: 50%;
}

/* Слой освещения */
.bento-item::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    /* Создаем мягкий белый/золотистый блик */
    background: radial-gradient(
        circle at var(--glare-x) var(--glare-y),
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.05) 30%,
        transparent 70%
    );
    /* Soft-light отлично имитирует отражение на темном матовом стекле */
    mix-blend-mode: soft-light;
    pointer-events: none;
    transition: opacity 0.5s var(--smooth);
}

/* Усиливаем эффект блика при наведении или удержании пальца */
.bento-item:hover::before,
.bento-item:active::before {
    background: radial-gradient(
        circle at var(--glare-x) var(--glare-y),
        rgba(200, 119, 64, 0.25) 0%, /* При касании блик становится фирменного оранжевого цвета */
        rgba(255, 255, 255, 0.05) 40%,
        transparent 80%
    );
}

/* ==========================================================================
   10. НАТИВНЫЕ SCROLL-DRIVEN АНИМАЦИИ (CSS-only)
   ========================================================================== */

/* Создаем анимацию выплывания карточки снизу */
@keyframes reveal-card {
    from {
        opacity: 0;
        /* Используем независимые свойства вместо transform, 
           чтобы не сломать наши гироскопические блики из JS */
        translate: 0 50px;
        scale: 0.9;
    }
    to {
        opacity: 1;
        translate: 0 0;
        scale: 1;
    }
}

.bento-item {
    /* Привязываем анимацию к зоне видимости (viewport) */
    animation: reveal-card linear both;
    animation-timeline: view();
    
    /* Анимация начинается, когда карточка вошла в экран на 5%, 
       и полностью завершается, когда вошла на 25% */
    animation-range: entry 5% cover 25%;
}

/* ==========================================================================
   11. УМНАЯ ПОЛКА (SMART SHELF) - ГОРИЗОНТАЛЬНЫЙ СВАЙП
   ========================================================================== */
.smart-shelf-container {
    margin-bottom: 30px;
}

.smart-shelf {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Скрываем скроллбар в Firefox */
}

.smart-shelf::-webkit-scrollbar {
    display: none; /* Скрываем скроллбар в Webkit */
}

/* Модификатор для карточек на полке */
.bento-item.shelf-card {
    min-width: 160px; /* Фиксируем ширину для свайпа */
    width: 160px;
    height: 220px;    /* Чуть выше, чем обычные квадратные карточки */
    flex-shrink: 0;   /* Запрещаем сжиматься */
    scroll-snap-align: start; /* Магнитим к левому краю */
}

/* ==========================================================================
   12. МУЛЬТИЯЗЫЧНОСТЬ (LANG SWITCHER)
   ========================================================================== */
.lang-switcher {
    display: flex;
    gap: 2px;
    padding: 4px;
    border-radius: 12px;
    margin-left: 20px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 800;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s var(--smooth);
}

.lang-btn.active {
    background: var(--soft-orange);
    color: var(--bg-dark);
    box-shadow: 0 2px 10px var(--orange-glow);
}
/* ==========================================================================
   13. КОРЗИНА И МОЙ ЗАКАЗ (FRONTEND CART)
   ========================================================================== */
/* Плавающая кнопка (FAB) */
.cart-fab {
    position: fixed; bottom: 24px; right: 24px; z-index: 90;
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px; border-radius: 30px;
    background: rgba(200, 119, 64, 0.9); /* Оранжевый акцентный цвет */
    color: var(--bg-dark); border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px var(--orange-glow);
    cursor: pointer; transition: all 0.4s var(--spring);
}
.cart-fab.hidden { transform: translateY(100px) scale(0.5); opacity: 0; pointer-events: none; }
.cart-fab:active { transform: scale(0.95); }

.cart-fab-icon { position: relative; display: flex; align-items: center; }
.cart-badge {
    position: absolute; top: -8px; right: -12px;
    background: var(--text-main); color: var(--bg-dark);
    font-size: 11px; font-weight: 800; min-width: 18px; height: 18px;
    border-radius: 9px; display: flex; align-items: center; justify-content: center;
}
.cart-total-fab { font-weight: 800; font-size: 16px; }

/* Список товаров внутри корзины */
.cart-items-container {
    max-height: 50vh; overflow-y: auto;
    display: flex; flex-direction: column; gap: 12px;
    margin-bottom: 24px; padding-right: 5px;
}
.cart-item {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255,255,255,0.03); padding: 12px 16px;
    border-radius: 16px; border: 1px solid var(--glass-border);
}
.cart-item-info { display: flex; flex-direction: column; gap: 4px; }
.cart-item-title { font-size: 15px; font-weight: 600; }
.cart-item-price { font-size: 14px; color: var(--soft-orange); font-weight: 800; }
.cart-item-qty { font-size: 12px; color: var(--text-muted); }

.btn-remove {
    background: rgba(255, 50, 50, 0.1); border: none; color: #ff5555;
    width: 32px; height: 32px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}

.cart-footer { border-top: 1px solid var(--glass-border); padding-top: 20px; }
.cart-total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 16px; font-weight: 600; color: var(--text-muted); }
/* Кнопки управления количеством (Степпер) */
.cart-stepper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 10px;
    border-radius: 12px;
    width: fit-content;
}

.btn-stepper {
    background: transparent;
    border: none;
    color: var(--soft-orange);
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s var(--smooth);
}

.btn-stepper:active {
    transform: scale(0.7);
}

.stepper-value {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
    min-width: 16px;
    text-align: center;
}

.stepper-price {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 6px;
}

.app-footer a{
    color: #C87740;
}

/* Применяем премиальный шрифт к заголовкам */
.brand-name, 
.section-title, 
.bento-title, 
.detail-title {
    font-family: var(--font-display);
    letter-spacing: 0.5px;
}

.detail-title {
    font-size: 30px; /* Делаем заголовки в модалке чуть крупнее для эффекта */
}

/* --- ОПТИЧЕСКАЯ ГЛУБИНА (Depth of Field) --- */
.app-layout {
    transition: filter 0.5s var(--spring), transform 0.5s var(--spring);
    will-change: filter, transform;
}

/* Этот класс будет вешаться на body через JS при открытии модалок */
body.dialog-open .app-layout {
    filter: blur(10px) brightness(0.6);
    transform: scale(0.96) translateY(-10px);
    pointer-events: none;
}

/* --- РАЗНАЯ ПЛОТНОСТЬ СТЕКЛА ДЛЯ ХИТОВ --- */
.bento-item.featured-glass {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), inset 0 1px 3px rgba(255, 255, 255, 0.3);
}

/* --- ЖИВЫЕ ПРЕВЬЮ ЕДЫ (Эффект дыхания) --- */
@keyframes breathe {
    0% { transform: scale(1.02); }
    100% { transform: scale(1.08); }
}

.bento-item.img-loaded .bento-bg {
    /* Фоновые картинки медленно "дышат" */
    animation: breathe 8s infinite alternate ease-in-out;
}

.bento-item:hover .bento-bg, 
.bento-item:active .bento-bg {
    /* При касании анимация замирает и картинка увеличивается */
    animation-play-state: paused;
    transform: scale(1.12);
}

/* --- ЭСТЕТИКА ЗАГРУЗКИ (Новый Skeleton) --- */
.skeleton {
    position: absolute; inset: 0;
    background: transparent;
    border: 2px solid rgba(200, 119, 64, 0.1);
    box-shadow: inset 0 0 20px rgba(200, 119, 64, 0.05);
    border-radius: inherit;
    z-index: 1; 
    transition: opacity 0.6s var(--smooth);
    animation: skeleton-pulse 1.5s infinite alternate ease-in-out;
}

@keyframes skeleton-pulse {
    0% { border-color: rgba(200, 119, 64, 0.1); box-shadow: inset 0 0 10px rgba(200, 119, 64, 0.05); }
    100% { border-color: rgba(200, 119, 64, 0.4); box-shadow: inset 0 0 40px rgba(200, 119, 64, 0.2); }
}

/* ==========================================================================
   Background Animations (добавь это в конец файла)
   ========================================================================== */

/* 1. Модифицируем существующие сферы для дрейфа */
.sphere-primary,
.sphere-secondary {
    /* Добавляем инерцию и размытие */
    will-change: transform, opacity;
    filter: blur(80px); /* Усиливаем блюр для мягкости */
}

.visual-environment .sphere-primary {
    animation: driftPrimary 35s ease-in-out infinite alternate;
}

.visual-environment .sphere-secondary {
    animation: driftSecondary 45s ease-in-out infinite alternate-reverse;
    animation-delay: -5s; 
}
/* 2. Частицы "Аромат кофе" */
.coffe-aroma-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1; /* Между гранитным слоем (0) и контентом (3) */
    pointer-events: none; /* Чтобы не мешали кликам */
}

.aroma-particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.4); /* Очень прозрачные */
    border-radius: 50%;
    filter: blur(8px);
    opacity: 0;
    will-change: transform, opacity;
    animation: riseAroma 20s linear infinite;
}

/* Разные размеры и задержки для частиц (создаем хаос) */
.aroma-particle:nth-child(1) { width: 40px; height: 40px; left: 10%; animation-delay: 0s; animation-duration: 22s; }
.aroma-particle:nth-child(2) { width: 60px; height: 60px; left: 25%; animation-delay: 5s; animation-duration: 18s; }
.aroma-particle:nth-child(3) { width: 30px; height: 30px; left: 45%; animation-delay: 2s; animation-duration: 25s; }
.aroma-particle:nth-child(4) { width: 50px; height: 50px; left: 65%; animation-delay: 8s; animation-duration: 20s; }
.aroma-particle:nth-child(5) { width: 70px; height: 70px; left: 80%; animation-delay: 1s; animation-duration: 23s; }
.aroma-particle:nth-child(6) { width: 45px; height: 45px; left: 95%; animation-delay: 10s; animation-duration: 19s; }


/* ==========================================================================
   KEYFRAMES - Описываем движения
   ========================================================================== */

/* Дрейф первой сферы */
@keyframes driftPrimary {
    0% { transform: translate(0, 0) scale(1); opacity: 0.8; }
    50% { transform: translate(150px, 80px) scale(1.1); opacity: 0.6; }
    100% { transform: translate(-50px, 150px) scale(0.9); opacity: 0.9; }
}

/* Дрейф второй сферы */
@keyframes driftSecondary {
    0% { transform: translate(0, 0) scale(1); opacity: 0.7; }
    33% { transform: translate(-180px, -100px) scale(0.9); opacity: 0.8; }
    66% { transform: translate(80px, 200px) scale(1.2); opacity: 0.5; }
    100% { transform: translate(100px, -50px) scale(1.1); opacity: 0.7; }
}

/* Подъем "Аромата" */
@keyframes riseAroma {
    0% {
        transform: translateY(110vh) scale(0.5) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.3; /* Медленное проявление */
    }
    50% {
        transform: translateY(50vh) scale(1) translateX(50px); /* Покачивание вправо */
        opacity: 0.4;
    }
    80% {
        opacity: 0.2; /* Медленное затухание */
    }
    100% {
        transform: translateY(-10vh) scale(1.5) translateX(-30px); /* Уход вверх влево */
        opacity: 0;
    }
}