﻿/* ===== ПЕРЕМЕННЫЕ ===== */
:root {
    --bg: #0D0D0D;
    --card-bg: rgba(255,255,255,0.06);
    --text: #FFFFFF;
    --text-secondary: #A1A1A6;
    --accent: #F59E0B; /* янтарный, как сырная корочка */
    --border: rgba(255,255,255,0.1);
    --glass-blur: blur(16px);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="light"] {
    --bg: #F5F5F7;
    --card-bg: rgba(0,0,0,0.04);
    --text: #1C1C1E;
    --text-secondary: #6E6E73;
    --accent: #D97706;
    --border: rgba(0,0,0,0.1);
    --glass-blur: blur(12px);
}

/* ===== БАЗА ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-weight: 400;
    line-height: 1.5;
    padding: 16px 16px 100px 16px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ===== ШАПКА ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.theme-toggle:hover {
    color: var(--text);
}

/* ===== СЛАЙДЕР-ЗАГЛУШКА ===== */
.promo-slider {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0;
    margin-bottom: 20px;
    scroll-snap-type: x mandatory;
}

.promo-card {
    flex: 0 0 80%;
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 24px;
    padding: 20px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    scroll-snap-align: start;
}

.promo-card h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.promo-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===== КАРТОЧКИ ===== */
.ios-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 24px;
    padding: 18px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ios-card:active {
    transform: scale(0.98);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.ios-card-icon {
    width: 48px;
    height: 48px;
    color: var(--accent);
    opacity: 0.9;
}

.ios-card-content {
    flex: 1;
}

.ios-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.ios-card-stats {
    display: flex;
    gap: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-item span {
    font-size: 16px;
    font-weight: 700;
}

.stat-item small {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: lowercase;
}

/* ===== ИТОГ ===== */
.total {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 20px;
    padding: 18px;
    margin: 24px 0;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ===== НАВИГАЦИЯ ===== */
.tabs {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 500px;
    background: rgba(30,30,30,0.8);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 30px;
    padding: 8px 16px;
    display: flex;
    justify-content: space-around;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    z-index: 1000;
}

.tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: #8E8E93;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 20px;
    transition: color 0.2s, background 0.2s;
}

.tab.active {
    color: #FFFFFF;
    background: rgba(255,255,255,0.15);
}

.tab i {
    width: 22px;
    height: 22px;
}

/* ===== МЕНЮ ===== */
.menu-category {
    margin-bottom: 28px;
}

.category-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-left: 8px;
    color: var(--text);
}

.menu-items {
    display: grid;
    grid-template-columns: 1fr 1fr;          /* 2 карточки в ряд */
    gap: 12px;
}

/* ===== КАРТОЧКА ТОВАРА ===== */
.menu-item-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.menu-item-card:active {
    transform: scale(0.97);
}

/* ===== ФОТО ===== */
.menu-item-photo {
    width: 100%;
    aspect-ratio: 1 / 1;          /* делает блок квадратным */
    background-color: #1c1c1e;    /* тёмный фон, если картинка не загрузится */
    background-size: contain;      /* вписываем фото целиком */
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;          /* небольшое скругление для красоты */
}

/* ===== ТЕКСТОВАЯ ЧАСТЬ ===== */
.menu-item-info {
    padding: 12px 12px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.menu-item-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
    color: var(--text);
}

.menu-item-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
}

.menu-item-desc {
    font-size: 12px;
    color: #C0C0C0;               /* Светло-серый, хорошо читается */
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Нижняя строка: цена + кнопка */
.menu-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

/* Чтобы последняя карточка не растягивалась и не оставляла дыру */
.menu-items::after {
    content: "";
    flex: auto;
}

/* ===== КНОПКА «В КОРЗИНУ» ===== */
.add-to-cart-btn {
    background: #f97316;
    border: none;
    border-radius: 14px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.add-to-cart-btn:hover {
    background: #ea580c;
}

/* ===== ПЛИТКИ КАТЕГОРИЙ (ГЛАВНАЯ) ===== */
.section-title {
    font-size: 20px;
    font-weight: 600;
    margin: 24px 0 16px;
    color: var(--text);
}

.categories-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.category-card {
    position: relative;
    height: 120px;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
    border: 1px solid var(--border);
}

.category-card:active {
    transform: scale(0.96);
}

.category-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    transition: opacity 0.3s;
}

.category-card:hover .category-card-bg {
    opacity: 0.5;
}

.category-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 8px;
    color: #fff;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}