/* ============================================================
   Restorella - Main Stylesheet
   Современный адаптивный дизайн для кафе и ресторанов
   ============================================================ */

/* ============================================================
   ШРИФТЫ  (GT Eesti Pro Display — /assets/fonts)
   ============================================================ */
@font-face {
    font-family: 'GTEestiProDisplay';
    src: url('/assets/fonts/gteestiprodisplay_thin.otf') format('opentype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'GTEestiProDisplay';
    src: url('/assets/fonts/gteestiprodisplay_light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'GTEestiProDisplay';
    src: url('/assets/fonts/gteestiprodisplay_regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'GTEestiProDisplay';
    src: url('/assets/fonts/gteestiprodisplay_medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'GTEestiProDisplay';
    src: url('/assets/fonts/gteestiprodisplay_bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'GTEestiProDisplay';
    src: url('/assets/fonts/gteestiprodisplay_ultrabold.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* ============================================================
   THEMES  (по умолчанию — светлая)
   Переключение: атрибут data-theme на <html>
   ============================================================ */
:root {
    /* Бренд */
    --primary: #E53E3E;
    --primary-dark: #C53030;
    --primary-darker: #9B2C2C;
    --primary-light: #DC2626;   /* цвет ссылок / акцентов, читаемый на белом */
    --accent: #F59E0B;
    --accent-dark: #D97706;
    --success: #16A34A;
    --warning: #D97706;
    --danger: #DC2626;
    --info: #2563EB;

    /* Поверхности */
    --bg-body: #F6F7FB;
    --bg-primary: #F6F7FB;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-input: #F8FAFC;

    /* Текст */
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;

    /* Границы */
    --border: #D1D5DB;
    --border-light: #E5E7EB;

    /* Семантические элементы UI */
    --header-bg: rgba(255,255,255,0.85);
    --hover-bg: rgba(17,24,39,0.05);
    --primary-soft: rgba(229,62,62,0.10);
    --primary-shadow: rgba(229,62,62,0.30);
    --overlay: rgba(17,24,39,0.45);

    /* Скругления */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Тени (мягкие, для светлой темы) */
    --shadow: 0 1px 3px rgba(17,24,39,0.08);
    --shadow-md: 0 4px 12px rgba(17,24,39,0.10);
    --shadow-lg: 0 12px 30px rgba(17,24,39,0.14);

    --font-sans: 'GTEestiProDisplay', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Тема «Солнечная» — тёплый оранжевый (пицца, роллы) */
[data-theme="sunny"] {
    --primary: #F97316;
    --primary-dark: #EA580C;
    --primary-darker: #C2410C;
    --primary-light: #EA580C;
    --accent: #EF4444;
    --accent-dark: #DC2626;
    --primary-soft: rgba(249,115,22,0.12);
    --primary-shadow: rgba(249,115,22,0.30);
}

/* Тема «Свежая» — зелёный (здоровое питание, суши) */
[data-theme="fresh"] {
    --primary: #16A34A;
    --primary-dark: #15803D;
    --primary-darker: #166534;
    --primary-light: #15803D;
    --accent: #F59E0B;
    --accent-dark: #D97706;
    --primary-soft: rgba(22,163,74,0.12);
    --primary-shadow: rgba(22,163,74,0.30);
}

/* Тема «Морская» — синий (чистый, деловой) */
[data-theme="ocean"] {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-darker: #1E40AF;
    --primary-light: #1D4ED8;
    --accent: #F59E0B;
    --accent-dark: #D97706;
    --primary-soft: rgba(37,99,235,0.12);
    --primary-shadow: rgba(37,99,235,0.30);
}

/* Тема «Ягодная» — розовая/малиновая (суши, десерты) */
[data-theme="berry"] {
    --primary: #DB2777;
    --primary-dark: #BE185D;
    --primary-darker: #9D174D;
    --primary-light: #DB2777;
    --accent: #F59E0B;
    --accent-dark: #D97706;
    --primary-soft: rgba(219,39,119,0.12);
    --primary-shadow: rgba(219,39,119,0.30);
}

/* Тема «Кофейная» — тёплая коричневая (кофейни, пекарни) */
[data-theme="coffee"] {
    --primary: #B45309;
    --primary-dark: #92400E;
    --primary-darker: #78350F;
    --primary-light: #B45309;
    --accent: #CA8A04;
    --accent-dark: #A16207;
    --primary-soft: rgba(180,83,9,0.12);
    --primary-shadow: rgba(180,83,9,0.30);
}

/* Тема «Тёмная» */
[data-theme="dark"] {
    --primary: #E53E3E;
    --primary-dark: #C53030;
    --primary-darker: #9B2C2C;
    --primary-light: #FC8181;
    --accent: #F59E0B;
    --accent-dark: #D97706;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;

    --bg-body: #0B1120;
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-card: #334155;
    --bg-input: #1E293B;

    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;

    --border: #475569;
    --border-light: #334155;

    --header-bg: rgba(15,23,42,0.95);
    --hover-bg: rgba(255,255,255,0.05);
    --primary-soft: rgba(229,62,62,0.10);
    --primary-shadow: rgba(229,62,62,0.30);
    --overlay: rgba(0,0,0,0.70);

    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.4);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    transition: background-color 0.25s ease, color 0.25s ease;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: var(--primary); }

img {
    max-width: 100%;
    height: auto;
}

/* ============================================================
   Layout
   ============================================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-sm { max-width: 800px; }
.container-lg { max-width: 1400px; }

/* ============================================================
   Header / Navigation
   ============================================================ */
.header {
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.75rem 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.logo:hover { color: var(--text-primary); }
.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s;
    font-size: 0.9rem;
    white-space: nowrap;
}
.nav-link:hover {
    color: var(--text-primary);
    background: var(--hover-bg);
}
.nav-link.active {
    color: var(--primary);
    background: var(--primary-soft);
}

.cart-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.cart-count {
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
}

@media (max-width: 768px) {
    .nav { display: none; }
    .mobile-menu-btn { display: block; }
    .nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        gap: 0.25rem;
    }
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-soft) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}
.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero { padding: 2rem 0; }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    line-height: 1.2;
    font-family: inherit;
    white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px var(--primary-shadow);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-darker));
    color: white;
    box-shadow: 0 6px 20px var(--primary-shadow);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
}
.btn-accent:hover { 
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-dark));
    color: white;
    filter: brightness(0.95);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--hover-bg); color: var(--text-primary); }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 0.5rem; border-radius: var(--radius-sm); }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================
   Cards
   ============================================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all 0.2s;
}
.card:hover { border-color: var(--border); }
.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    font-weight: 600;
}
.card-body { padding: 1.25rem; }
.card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-light);
}

/* Menu Item Card */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.menu-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}
.menu-card:hover {
    transform: translateY(-4px);
    border-color: var(--border);
    box-shadow: var(--shadow-lg);
}

.menu-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-secondary);
}
.menu-card-image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-muted);
}

.menu-card-body {
    padding: 1rem;
}
.menu-card-category {
    font-size: 0.8rem;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}
.menu-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.menu-card-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.menu-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
}
.menu-card-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}
.menu-card-old-price {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 0.5rem;
}

/* ============================================================
   Forms
   ============================================================ */
.form-group {
    margin-bottom: 1rem;
}
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s;
    outline: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.form-input::placeholder { color: var(--text-muted); }
.form-textarea { min-height: 100px; resize: vertical; }
.form-select { cursor: pointer; }
.form-error {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}
.form-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}
.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* ============================================================
   Order Status
   ============================================================ */
.status-timeline {
    display: flex;
    align-items: flex-start;
    gap: 0;
    padding: 1rem 0;
}

.status-step {
    flex: 1;
    text-align: center;
    position: relative;
}
.status-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 16px;
    left: 50%;
    right: -50%;
    height: 2px;
    background: var(--border);
}
.status-step.completed:not(:last-child)::after {
    background: var(--success);
}
.status-step.active:not(:last-child)::after {
    background: linear-gradient(90deg, var(--success), var(--border));
}

.status-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-size: 0.8rem;
    position: relative;
    z-index: 1;
    transition: all 0.3s;
}
.status-step.completed .status-dot {
    background: var(--success);
    border-color: var(--success);
    color: white;
}
.status-step.active .status-dot {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245,158,11,0.2);
}

.status-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.status-step.completed .status-label { color: var(--success); }
.status-step.active .status-label { color: var(--accent); font-weight: 600; }

/* ============================================================
   Alerts / Flash Messages
   ============================================================ */
.alert {
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.alert-success { background: rgba(16,185,129,0.15); color: var(--success); border: 1px solid rgba(16,185,129,0.3); }
.alert-error, .alert-danger { background: rgba(239,68,68,0.15); color: var(--danger); border: 1px solid rgba(239,68,68,0.3); }
.alert-warning { background: rgba(245,158,11,0.15); color: var(--accent); border: 1px solid rgba(245,158,11,0.3); }
.alert-info { background: rgba(59,130,246,0.15); color: var(--info); border: 1px solid rgba(59,130,246,0.3); }

/* ============================================================
   Badges & Tags
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-primary { background: rgba(229,62,62,0.15); color: var(--primary); }
.badge-success { background: rgba(16,185,129,0.15); color: var(--success); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--accent); }
.badge-danger { background: rgba(239,68,68,0.15); color: var(--danger); }
.badge-info { background: rgba(59,130,246,0.15); color: var(--info); }

/* ============================================================
   Grid & Utilities
   ============================================================ */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 2rem; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-accent { color: var(--accent); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.ml-2 { margin-left: 0.5rem; }
.mr-2 { margin-right: 0.5rem; }

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }

.rounded { border-radius: var(--radius-sm); }
.rounded-lg { border-radius: var(--radius); }
.shadow { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.w-full { width: 100%; }

/* ============================================================
   Section Styles
   ============================================================ */
.section {
    padding: 3rem 0;
}
.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.section-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Category tabs */
.category-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.category-tabs::-webkit-scrollbar { display: none; }

.category-tab {
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}
.category-tab:hover { border-color: var(--border); color: var(--text-primary); }
.category-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ============================================================
   Promo Banner / Vitrine
   ============================================================ */
.promo-banner {
    position: relative;
    margin: 1.5rem 0 0.5rem;
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    color: #fff;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 12px 32px var(--primary-shadow);
}
.promo-banner::after {
    content: '';
    position: absolute;
    right: -60px; top: -60px;
    width: 340px; height: 340px;
    background: radial-gradient(circle, rgba(255,255,255,0.28), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.promo-banner-inner { position: relative; z-index: 1; max-width: 620px; }
.promo-badge {
    display: inline-block;
    background: rgba(255,255,255,0.22);
    padding: 0.3rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    backdrop-filter: blur(4px);
}
.promo-banner h2 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 0.5rem;
    color: #fff;
}
.promo-banner p { opacity: 0.92; margin-bottom: 1.25rem; }
.promo-banner .btn-light {
    background: #fff;
    color: var(--primary);
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.promo-banner .btn-light:hover { color: var(--primary-dark); }
@media (max-width: 768px) {
    .promo-banner { padding: 1.75rem 1.25rem; }
    .promo-banner h2 { font-size: 1.45rem; }
}

/* Category chip icon */
.category-tab { display: inline-flex; align-items: center; gap: 0.4rem; }
.chip-icon { font-size: 1.05rem; line-height: 1; }

/* ============================================================
   Product Card (food-delivery style)
   ============================================================ */
.menu-card-media { display: block; position: relative; overflow: hidden; }
.menu-card-image, .menu-card-image-placeholder { transition: transform 0.4s ease; }
.menu-card:hover .menu-card-image,
.menu-card:hover .menu-card-image-placeholder { transform: scale(1.05); }

.menu-card-badge {
    position: absolute;
    top: 0.75rem; left: 0.75rem;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    z-index: 2;
    letter-spacing: 0.02em;
}
.menu-card-badge.is-hit { background: var(--primary); }
.menu-card-badge.is-new { background: var(--success); }
.menu-card-badge.is-sale { background: var(--danger); }

.menu-card-title {
    color: var(--text-primary);
    display: block;
}
.menu-card-title:hover { color: var(--primary); }

.menu-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.15rem 0 0.5rem;
}
.menu-card-prices { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }

.add-to-cart-btn {
    width: 40px; height: 40px;
    min-width: 40px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, background 0.2s ease;
    box-shadow: 0 4px 12px var(--primary-shadow);
}
.add-to-cart-btn:hover { background: var(--primary-dark); transform: scale(1.08); }
.add-to-cart-btn:active { transform: scale(0.94); }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1rem;
}
.section-head h2 { font-size: 1.5rem; font-weight: 800; display: flex; align-items: center; gap: 0.5rem; }
.section-head a { font-size: 0.9rem; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    padding: 2rem 0;
    margin-top: 4rem;
}
.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
}
.footer-title {
    font-weight: 600;
    margin-bottom: 1rem;
}
.footer-links {
    list-style: none;
}
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--text-primary); }

@media (max-width: 768px) {
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ============================================================
   Modal / Overlay
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
}
.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}
.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
}

/* ============================================================
   Table
   ============================================================ */
.table-wrapper {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
    font-weight: 600;
}
td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
}
tr:hover td {
    background: var(--hover-bg);
}

/* ============================================================
   Cart Item
   ============================================================ */
.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}
.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    object-fit: cover;
    flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-title { font-weight: 600; font-size: 0.95rem; }
.cart-item-desc { color: var(--text-muted); font-size: 0.8rem; }
.cart-item-price { font-weight: 700; color: var(--accent); white-space: nowrap; }
.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
}
.quantity-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.quantity-btn:hover { background: var(--hover-bg); }
.quantity-value {
    width: 40px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    background: none;
    border: none;
    color: var(--text-primary);
}

/* ============================================================
   Product Detail Modal
   ============================================================ */
.product-modal {
    max-width: 700px;
}
.product-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.product-modal-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
}
.product-modal-info h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.product-modal-desc { color: var(--text-secondary); margin-bottom: 1rem; }
.product-modal-price { font-size: 1.5rem; font-weight: 700; color: var(--accent); margin-bottom: 1rem; }
.modifier-group { margin-bottom: 1rem; }
.modifier-group-title { font-weight: 600; margin-bottom: 0.5rem; font-size: 0.9rem; }
.modifier-options { display: flex; flex-direction: column; gap: 0.25rem; }

@media (max-width: 768px) {
    .product-modal-grid { grid-template-columns: 1fr; }
    .product-modal-image { height: 200px; }
}

/* ============================================================
   Admin Sidebar
   ============================================================ */
.admin-layout {
    display: flex;
    min-height: 100vh;
}
.admin-sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-light);
    padding: 1rem;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 50;
}
.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 1.5rem;
}
.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.sidebar-link:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}
.sidebar-link.active {
    background: var(--primary-soft);
    color: var(--primary);
}
.sidebar-section {
    margin-bottom: 1.5rem;
}
.sidebar-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 0 1rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .admin-sidebar { width: 100%; position: relative; height: auto; }
    .admin-main { margin-left: 0; }
    .admin-layout { flex-direction: column; }
}

/* ============================================================
   Stat Cards
   ============================================================ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    padding: 1.25rem;
}
.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}
.stat-card-value {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}
.stat-card-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============================================================
   Responsive Adjustments
   ============================================================ */
@media (max-width: 1024px) {
    .menu-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}
@media (max-width: 480px) {
    .menu-grid { grid-template-columns: 1fr; }
    .container { padding: 0 0.75rem; }
}

/* ============================================================
   Animations
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in {
    animation: fadeIn 0.3s ease-out;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.loading-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Order type selector */
.order-type-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.order-type-btn {
    flex: 1;
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    background: var(--bg-input);
    color: var(--text-secondary);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}
.order-type-btn:hover { border-color: var(--text-muted); }
.order-type-btn.active {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
}
.order-type-btn-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

/* Search */
.search-bar {
    position: relative;
}
.search-bar input {
    padding-left: 2.5rem;
}
.search-bar-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}
.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}
.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.empty-state-desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Map */
.map-container {
    height: 400px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-secondary);
}

/* Loading spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
 * Toast Notifications — modern stacked
 * ============================================================ */
#toastContainer {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
    max-width: 380px;
    width: 100%;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    pointer-events: auto;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    position: relative;
    overflow: hidden;
}
.toast-show {
    transform: translateX(0);
    opacity: 1;
}
.toast-hide {
    transform: translateX(120%);
    opacity: 0;
}

.toast-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
    color: #fff;
}
.toast-icon-success { background: var(--success, #16A34A); }
.toast-icon-error { background: var(--danger, #DC2626); }
.toast-icon-warning { background: var(--warning, #F59E0B); }
.toast-icon-info { background: var(--info, #3B82F6); }

.toast-content {
    flex: 1;
    min-width: 0;
}
.toast-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
    color: var(--text);
}
.toast-message {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.3;
}
.toast-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    opacity: 0.6;
}
.toast-close:hover { opacity: 1; }

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: var(--border);
}
.toast-progress-success { background: var(--success, #16A34A); }
.toast-progress-error { background: var(--danger, #DC2626); }
.toast-progress-warning { background: var(--warning, #F59E0B); }
.toast-progress-info { background: var(--info, #3B82F6); }

/* ============================================================
 * Cart — beautiful modern design
 * ============================================================ */
.cart-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.cart-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
}
.cart-header-count {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 768px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }
}

/* ---- Cart Items List ---- */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.cart-items-header {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 0.25rem;
    margin-bottom: 0.25rem;
}

/* ---- Cart Item Card ---- */
.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    transition: box-shadow 0.25s, border-color 0.25s;
    position: relative;
}
.cart-item:hover {
    border-color: var(--border);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.cart-item-image-wrap {
    flex-shrink: 0;
    position: relative;
}
.cart-item-image,
.cart-item-image-ph {
    width: 88px;
    height: 88px;
    border-radius: var(--radius);
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-item-image-ph {
    background: var(--bg-secondary);
    font-size: 2rem;
    color: var(--text-muted);
}
.cart-item-category {
    position: absolute;
    bottom: -4px;
    left: 4px;
    display: flex;
    gap: 0.2rem;
}
.cart-item-category span {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    padding: 0.1rem 0.45rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.cart-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cart-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}
.cart-item-info {
    flex: 1;
    min-width: 0;
}
.cart-item-name {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 0.15rem;
}
.cart-item-mods {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.4rem;
}
.cart-item-mod {
    font-size: 0.78rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
}

.cart-item-remove {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    opacity: 0.5;
}
.cart-item:hover .cart-item-remove {
    opacity: 1;
}
.cart-item-remove:hover {
    background: rgba(220, 38, 38, 0.12);
    color: var(--danger, #DC2626);
    opacity: 1;
}

.cart-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-light);
}

.cart-item-price {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

/* ---- Quantity Controls ---- */
.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid var(--border);
    border-radius: 50px;
    overflow: hidden;
    background: var(--bg-card);
    transition: border-color 0.2s;
}
.cart-item-qty:hover {
    border-color: var(--primary);
}
.cart-item-qty-btn {
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: background 0.15s, color 0.15s;
    user-select: none;
}
.cart-item-qty-btn:hover {
    background: var(--hover-bg);
    color: var(--primary);
}
.cart-item-qty-btn:active {
    background: var(--border);
}
.cart-item-qty-value {
    width: 32px;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    background: transparent;
    user-select: none;
}

/* ---- Line Total ---- */
.cart-item-total {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    white-space: nowrap;
}
.cart-item-total-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.cart-item-total-value {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--accent);
    transition: color 0.3s;
}

/* ---- Sidebar / Summary ---- */
.cart-sidebar {
    position: sticky;
    top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cart-summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.cart-summary-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    font-weight: 700;
    font-size: 1rem;
    border-bottom: 1px solid var(--border-light);
}
.cart-summary-icon {
    font-size: 1.1rem;
}
.cart-summary-body {
    padding: 1rem 1.25rem 1.25rem;
}
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    font-size: 0.92rem;
}
.cart-summary-label {
    color: var(--text-muted);
}
.cart-summary-value {
    font-weight: 600;
}
.cart-summary-row-sub {
    padding-bottom: 0.75rem;
}
.cart-summary-value-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}
.cart-summary-divider {
    height: 2px;
    background: var(--border);
    margin: 0.4rem 0;
    border-radius: 2px;
}
.cart-summary-row-total {
    padding: 0.75rem 0 1rem;
}
.cart-summary-total-label {
    font-weight: 700;
    font-size: 1.05rem;
}
.cart-summary-total-value {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--accent);
}

.cart-summary-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 80%, #000));
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.2s;
}
.cart-summary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    color: #fff;
}
.cart-summary-btn:active {
    transform: translateY(0);
}
.cart-summary-btn-arrow {
    transition: transform 0.2s;
}
.cart-summary-btn:hover .cart-summary-btn-arrow {
    transform: translateX(3px);
}

.cart-summary-link {
    display: block;
    text-align: center;
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}
.cart-summary-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* ---- Info Card ---- */
.cart-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.cart-info-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.cart-info-icon {
    font-size: 1.15rem;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}
.cart-info-text {}
.cart-info-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}
.cart-info-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ============================================================
 * Checkout — layout & fields
 * ============================================================ */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }
}

.checkout-fields {
    min-width: 0;
}

.checkout-sidebar {
    position: sticky;
    top: 1rem;
}

.checkout-summary-items {
    display: flex;
    flex-direction: column;
}
.checkout-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-light);
    gap: 0.75rem;
}
.checkout-summary-item:last-child {
    border-bottom: none;
}
.checkout-summary-item-info {
    flex: 1;
    min-width: 0;
}
.checkout-summary-item-price {
    font-weight: 700;
    white-space: nowrap;
}

.checkout-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}
.checkout-total-final {
    border-top: 2px solid var(--border);
    margin-top: 0.25rem;
    padding-top: 0.75rem;
}

.coupon-section {
    display: flex;
    gap: 0.5rem;
}
.coupon-section .form-input {
    flex: 1;
}

.payment-method-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
}
.payment-method-item:last-child {
    border-bottom: none;
}

/* ============================================================
 * Admin: Checkout Fields
 * ============================================================ */
.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm, 4px);
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

/* ============================================================
 * Utility: Extra helpers
 * ============================================================ */
.text-danger {
    color: var(--danger, #DC2626);
}
.mt-2 { margin-top: 0.5rem; }

/* ============================================================
 * Mini-cart drawer — slides from right
 * ============================================================ */
.mc-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(20, 16, 12, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mc-overlay.mc-open {
    opacity: 1;
    visibility: visible;
}

.mc-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 10002;
    width: 100%;
    max-width: 420px;
    background: var(--bg-card, #fff);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}
.mc-drawer.mc-open {
    transform: translateX(0);
}

.mc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--border-light, #eee);
    flex-shrink: 0;
}
.mc-header-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
}
.mc-header-icon { font-size: 1.2rem; }
.mc-header-count {
    font-size: 0.85rem;
    color: var(--text-muted, #888);
    font-weight: 500;
}
.mc-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary, #f5f5f5);
    color: var(--text, #222);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.mc-close:hover { background: var(--hover-bg, #eee); }

.mc-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0.85rem;
    -webkit-overflow-scrolling: touch;
}

.mc-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
}

.mc-items {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.mc-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--border-light, #eee);
    border-radius: var(--radius, 10px);
    position: relative;
}
.mc-item-img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}
.mc-item-img-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary, #f5f5f5);
    font-size: 1.5rem;
}
.mc-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.mc-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
    padding-right: 1.5rem;
}
.mc-item-mods {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted, #888);
}
.mc-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
}
.mc-qty {
    display: flex;
    align-items: center;
    border: 1px solid var(--border, #ddd);
    border-radius: 50px;
    overflow: hidden;
}
.mc-qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text, #222);
    transition: background 0.15s;
}
.mc-qty-btn:hover { background: var(--hover-bg, #eee); }
.mc-qty-val {
    min-width: 26px;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
}
.mc-item-total {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--accent, #E53E3E);
    white-space: nowrap;
}
.mc-item-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.7rem;
    color: var(--text-muted, #aaa);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    opacity: 0.6;
}
.mc-item:hover .mc-item-remove { opacity: 1; }
.mc-item-remove:hover {
    background: rgba(220, 38, 38, 0.12);
    color: var(--danger, #DC2626);
    opacity: 1;
}

.mc-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.mc-empty-icon { font-size: 3rem; opacity: 0.5; }
.mc-empty-title { font-weight: 700; font-size: 1.1rem; }
.mc-empty-desc { color: var(--text-muted, #888); font-size: 0.9rem; }
.mc-empty-btn {
    margin-top: 0.75rem;
    padding: 0.7rem 1.5rem;
    background: var(--primary, #E53E3E);
    color: #fff;
    border-radius: var(--radius, 10px);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: opacity 0.15s;
}
.mc-empty-btn:hover { opacity: 0.88; color: #fff; }

.mc-footer {
    flex-shrink: 0;
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid var(--border-light, #eee);
    background: var(--bg-card, #fff);
}
.mc-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}
.mc-total-label {
    font-weight: 600;
    font-size: 1rem;
}
.mc-total-value {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--accent, #E53E3E);
}
.mc-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--primary, #E53E3E);
    background: linear-gradient(135deg, var(--primary, #E53E3E), color-mix(in srgb, var(--primary, #E53E3E) 80%, #000));
    color: #fff;
    border-radius: var(--radius, 10px);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: transform 0.15s, box-shadow 0.2s;
}
.mc-checkout-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    color: #fff;
}
.mc-checkout-arrow { transition: transform 0.2s; }
.mc-checkout-btn:hover .mc-checkout-arrow { transform: translateX(3px); }
.mc-view-cart-link {
    display: block;
    text-align: center;
    margin-top: 0.6rem;
    color: var(--text-muted, #888);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.15s;
}
.mc-view-cart-link:hover { color: var(--primary); text-decoration: underline; }

@media (max-width: 480px) {
    .mc-drawer { max-width: 100%; }
}

/* ============================================================
 * Checkout header & steps
 * ============================================================ */
.checkout-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}
.checkout-heading {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.01em;
}
.checkout-steps {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.checkout-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted, #999);
    white-space: nowrap;
}
.checkout-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--bg-secondary, #eee);
    color: var(--text-muted, #999);
    flex-shrink: 0;
}
.checkout-step-active .checkout-step-num {
    background: var(--primary, #E53E3E);
    color: #fff;
}
.checkout-step-active .checkout-step-label {
    color: var(--text, #222);
    font-weight: 600;
}
.checkout-step-done .checkout-step-num {
    background: var(--success, #16A34A);
    color: #fff;
}
.checkout-step-done .checkout-step-label {
    color: var(--success, #16A34A);
    font-weight: 600;
}
.checkout-step-line {
    width: 40px;
    height: 2px;
    background: var(--border, #ddd);
    border-radius: 2px;
}
@media (max-width: 640px) {
    .checkout-head { flex-direction: column; align-items: flex-start; }
    .checkout-heading { font-size: 1.5rem; }
    .checkout-step-line { width: 18px; }
    .checkout-step-label { display: none; }
    .checkout-step-active .checkout-step-label,
    .checkout-step-done .checkout-step-label { display: inline; }
}

/* ============================================================
   Сегментированный переключатель для опций (radio)
   ============================================================ */
.seg-toggle {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    background: var(--bg-body, #F0F2F6);
    border: 1px solid var(--border-light, #E5E7EB);
    border-radius: 12px;
    padding: 4px;
}
.seg-toggle .seg-item {
    position: relative;
    flex: 1 1 auto;
    min-width: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--text-secondary, #4B5563);
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s, border-color 0.15s;
    user-select: none;
}
.seg-toggle .seg-item input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}
.seg-toggle .seg-item:hover {
    color: var(--text-primary, #111827);
}
.seg-toggle .seg-item:has(input:checked) {
    background: var(--bg-card, #fff);
    color: var(--text-primary, #111827);
    font-weight: 600;
    border-color: var(--border-light, #E5E7EB);
    box-shadow: var(--shadow, 0 1px 3px rgba(17,24,39,0.08));
}
/* Fallback для браузеров без :has() — класс выставляется через JS */
.seg-toggle .seg-item.is-checked {
    background: var(--bg-card, #fff);
    color: var(--text-primary, #111827);
    font-weight: 600;
    border-color: var(--border-light, #E5E7EB);
    box-shadow: var(--shadow, 0 1px 3px rgba(17,24,39,0.08));
}
.seg-toggle .seg-item .opt-price {
    font-size: 0.78rem;
    color: var(--text-muted, #9CA3AF);
    font-weight: 500;
}

/* ============================================================
   Inline add-ons inside catalog cards
   ============================================================ */
.card-addons {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0.55rem 0 0.15rem;
    padding-top: 0.55rem;
    border-top: 1px dashed var(--border-light, #E5E7EB);
    cursor: default;
}
.card-addons-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted, #9CA3AF);
    margin-bottom: 0.1rem;
}
.card-addon {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    color: var(--text-primary, #111827);
    cursor: pointer;
    line-height: 1.25;
    user-select: none;
}
.card-addon input.card-addon-input {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    margin: 0;
    accent-color: var(--primary, #E53E3E);
    cursor: pointer;
}
.card-addon-name {
    flex: 1 1 auto;
}
.card-addon-price {
    flex: 0 0 auto;
    font-size: 0.78rem;
    color: var(--text-muted, #9CA3AF);
    white-space: nowrap;
}
.card-addon:has(input:checked) {
    font-weight: 600;
}
.card-addon:has(input:checked) .card-addon-price {
    color: var(--primary, #E53E3E);
}

/* ============================================================
   SITE HEADER (дизайн из макета: логотип, режим, адрес, поиск)
   ============================================================ */
.hdr {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #eef0f3;
}
.hdr-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
}
.hdr-logo {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    text-decoration: none;
    white-space: nowrap;
    flex: 0 0 auto;
}
.hdr-logo-text {
    font-family: var(--font-sans);
    font-size: 28px;
    font-weight: 800;
    color: #005bff;
    letter-spacing: -1px;
    line-height: 1;
}
.hdr-logo:hover .hdr-logo-text { color: #005bff; }
.hdr-logo-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #ff7a00;
    border-radius: 50%;
    transform: translateY(3px);
}
.hdr-logo-img {
    height: 40px;
    width: auto;
    border-radius: 8px;
    display: block;
}
.hdr-toggle {
    display: flex;
    background: #f0f2f5;
    border-radius: 20px;
    padding: 2px;
    flex: 0 0 auto;
}
.hdr-toggle-btn {
    border: none;
    background: transparent;
    padding: 8px 16px;
    border-radius: 18px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    color: #8c8e94;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}
.hdr-toggle-btn.active {
    background: #fff;
    color: #1a1a1a;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.hdr-addr {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    min-width: 0;
    flex: 0 1 auto;
}
.hdr-addr svg {
    fill: #005bff;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}
.hdr-addr-city {
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}
.hdr-addr-link {
    color: #8c8e94;
    border-bottom: 1px dashed #ccc;
    white-space: nowrap;
    cursor: pointer;
}
.hdr-search {
    flex: 1 1 auto;
    max-width: 400px;
    background: #f0f2f5;
    border-radius: 12px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8c8e94;
    font-size: 14px;
}
.hdr-search svg { flex: 0 0 auto; }
.hdr-search input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-family: var(--font-sans);
    font-size: 14px;
    color: #1a1a1a;
}
.hdr-search input::placeholder { color: #8c8e94; }
.hdr-icons {
    display: flex;
    gap: 24px;
    align-items: center;
    flex: 0 0 auto;
}
.hdr-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    color: #1a1a1a;
    text-decoration: none;
    position: relative;
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-sans);
}
.hdr-icon svg {
    width: 22px;
    height: 22px;
    stroke: #1a1a1a;
    fill: none;
    stroke-width: 1.8;
}
.hdr-icon > span:not(.hdr-cart-count) {
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}
.hdr-cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff7a00;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    min-width: 16px;
    height: 16px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}
.hdr-profile { position: relative; }
.hdr-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.12);
    padding: 6px;
    display: none;
    flex-direction: column;
    min-width: 180px;
    z-index: 120;
    text-align: left;
}
.hdr-profile.open .hdr-menu,
.hdr-profile:hover .hdr-menu,
.hdr-profile:focus-within .hdr-menu { display: flex; }
.hdr-menu a {
    padding: 9px 12px;
    border-radius: 8px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}
.hdr-menu a:hover { background: #f4f5f7; color: #005bff; }

@media (max-width: 768px) {
    .hdr-inner { flex-wrap: wrap; padding: 10px 0; gap: 12px; }
    .hdr-search { order: 3; max-width: 100%; width: 100%; margin-top: 4px; }
    .hdr-addr, .hdr-toggle { display: none; }
    .hdr-logo-text { font-size: 24px; }
    .hdr-icons { gap: 14px; margin-left: auto; }
    .hdr-icon > span:not(.hdr-cart-count) { display: none; }
}
