:root {
    /* ---- Палитра: тёплая, "домашняя кухня", без банального крем+D97757 ---- */
    --clay:        #b54b32;   /* основной акцент — глина/жар печи */
    --clay-deep:   #8c3820;   /* тёмный акцент, hover, шапка */
    --mustard:     #d8a13a;   /* второй акцент — бульон/специи */
    --sage:        #6b8f71;   /* свежесть — салаты, статус "добавлено" */
    --cream:       #fbf3e7;   /* фон страницы */
    --paper:       #ffffff;   /* карточки */
    --ink:         #2e2018;   /* текст */
    --ink-muted:   #8a7364;   /* второстепенный текст */
    --border:      #ece0d1;

    --font-display: Georgia, 'Times New Roman', serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.55;
    padding-bottom: 90px; /* место под мобильную панель корзины */
}

a { color: inherit; }
img { max-width: 100%; display: block; }

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

/* ================= Топ-бар ================= */
.site-header {
    background: var(--clay-deep);
    color: var(--cream);
    padding: 14px 0;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.site-brand {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
}
.site-brand em { color: var(--mustard); font-style: normal; }
.site-header .contact {
    font-size: 14px;
    color: rgba(251,243,231,0.85);
    text-decoration: none;
}
.site-header .contact:hover { color: var(--cream); }

/* ================= Hero / меловая доска дня ================= */
.hero {
    position: relative;
    background: var(--clay);
    color: var(--cream);
    padding: 40px 0 34px;
    background-image:
        repeating-linear-gradient(45deg, rgba(255,255,255,0.035) 0 2px, transparent 2px 22px);
}
.hero .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 12px;
    color: var(--mustard);
    font-weight: 700;
    margin-bottom: 8px;
}
.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(28px, 4.5vw, 42px);
    margin: 0 0 10px;
    font-style: italic;
    font-weight: 700;
}
.hero .cutoff-note {
    font-size: 15px;
    color: rgba(251,243,231,0.92);
    max-width: 560px;
}
.hero .cutoff-note strong { color: var(--mustard); }

/* ---- Поднос-навигация по категориям (фирменный элемент) ---- */
.tray {
    display: flex;
    gap: 10px;
    margin-top: 26px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.tray-slot {
    flex: 1 0 130px;
    background: rgba(251,243,231,0.08);
    border: 1.5px solid rgba(251,243,231,0.28);
    border-radius: 14px;
    padding: 12px 14px;
    text-decoration: none;
    color: var(--cream);
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
    cursor: pointer;
}
.tray-slot:hover { transform: translateY(-2px); }
.tray-slot .slot-name {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: block;
    margin-bottom: 6px;
}
.tray-slot .slot-count {
    font-family: var(--font-display);
    font-size: 22px;
    font-style: italic;
    opacity: 0.55;
}
.tray-slot.filled {
    background: var(--mustard);
    border-color: var(--mustard);
    color: var(--clay-deep);
}
.tray-slot.filled .slot-count { opacity: 1; }

/* ================= Категории и блюда ================= */
.menu-section { padding: 34px 0 6px; }
.menu-section h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-style: italic;
    margin: 0 0 4px;
    scroll-margin-top: 16px;
}
.menu-section .section-sub {
    color: var(--ink-muted);
    font-size: 14px;
    margin-bottom: 18px;
}

.dish-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}

.dish-card {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.dish-photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: var(--border);
}
.dish-photo.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-muted);
    font-size: 13px;
}
.dish-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.dish-name { font-weight: 700; font-size: 16px; margin: 0 0 4px; }
.dish-weight { color: var(--ink-muted); font-size: 12.5px; margin-bottom: 6px; }
.dish-desc { color: var(--ink-muted); font-size: 13.5px; margin: 0 0 12px; flex: 1; }
.dish-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}
.dish-price { font-weight: 700; font-size: 16px; }

.qty-control {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--cream);
    border-radius: 10px;
    padding: 4px 6px;
}
.qty-control button {
    width: 26px; height: 26px;
    border: none;
    border-radius: 7px;
    background: var(--paper);
    color: var(--clay);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
}
.qty-control button:hover { background: var(--clay); color: var(--paper); }
.qty-control .qty-val { min-width: 14px; text-align: center; font-weight: 700; font-size: 14px; }

.btn-add {
    background: var(--clay);
    color: var(--paper);
    border: none;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.btn-add:hover { background: var(--clay-deep); }

.empty-menu {
    text-align: center;
    padding: 60px 20px;
    color: var(--ink-muted);
}
.empty-menu h2 { font-family: var(--font-display); font-style: italic; color: var(--ink); }

/* ================= Корзина (чек) ================= */
.cart-panel {
    position: fixed;
    right: 24px;
    top: 100px;
    width: 300px;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    box-shadow: 0 12px 30px rgba(46,32,24,0.08);
}
.cart-panel h3 {
    font-family: var(--font-display);
    font-style: italic;
    margin: 0 0 12px;
    font-size: 19px;
}
.cart-empty { color: var(--ink-muted); font-size: 14px; }
.cart-item {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 13.5px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
}
.cart-item .ci-name { flex: 1; }
.cart-item .ci-qty { color: var(--ink-muted); }
.cart-totals { margin-top: 12px; padding-top: 12px; border-top: 1.5px solid var(--ink); font-size: 14px; }
.cart-totals .row { display: flex; justify-content: space-between; margin-bottom: 4px; }
.cart-totals .row.total { font-weight: 700; font-size: 16px; margin-top: 6px; }
.cart-delivery-note { font-size: 12.5px; color: var(--ink-muted); margin-top: 8px; }
.btn-checkout {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--clay);
    color: var(--paper);
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 14px;
    text-decoration: none;
}
.btn-checkout:hover { background: var(--clay-deep); }
.btn-checkout.is-disabled { background: var(--border); color: var(--ink-muted); cursor: not-allowed; pointer-events: none; }

/* Мобильная плавающая панель */
.cart-mobile-bar {
    display: none;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: var(--clay-deep);
    color: var(--paper);
    padding: 12px 18px;
    align-items: center;
    justify-content: space-between;
    z-index: 40;
}
.cart-mobile-bar .cmb-info { font-size: 14px; }
.cart-mobile-bar .cmb-info strong { display: block; font-size: 16px; }
.cart-mobile-bar button {
    background: var(--mustard);
    color: var(--clay-deep);
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-weight: 700;
    font-size: 14px;
}

@media (max-width: 880px) {
    .cart-panel { display: none; }
    .cart-mobile-bar.has-items { display: flex; }
}

/* ================= Подвал ================= */
.site-footer {
    margin-top: 50px;
    padding: 26px 0 40px;
    color: var(--ink-muted);
    font-size: 13px;
    text-align: center;
}

/* ================= Оформление заказа ================= */
.checkout-layout {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 30px;
    padding: 34px 0 60px;
    align-items: start;
}
@media (max-width: 880px) {
    .checkout-layout { grid-template-columns: 1fr; }
}

.checkout-form .form-group { margin-bottom: 16px; }
.checkout-form label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.checkout-form input[type=text], .checkout-form input[type=tel], .checkout-form textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    background: var(--paper);
    color: var(--ink);
}
.checkout-form textarea { resize: vertical; min-height: 70px; }
.checkout-form input:focus, .checkout-form textarea:focus {
    outline: none;
    border-color: var(--clay);
    box-shadow: 0 0 0 3px rgba(181,75,50,0.12);
}
.hp-field { position: absolute; left: -9999px; top: -9999px; }

#address-map {
    width: 100%;
    height: 280px;
    border-radius: 12px;
    margin-top: 8px;
    background: var(--border);
}
.address-status {
    font-size: 13px;
    margin-top: 8px;
    color: var(--ink-muted);
}
.address-status.checking { color: var(--mustard); }
.address-status.ok { color: var(--sage); font-weight: 600; }
.address-status.error { color: var(--clay-deep); font-weight: 600; }

.order-summary-card {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
}
.order-summary-card h3 { font-family: var(--font-display); font-style: italic; margin: 0 0 12px; }

.form-error { color: var(--clay-deep); font-size: 14px; margin: 10px 0; min-height: 18px; }

.btn-submit-order {
    width: 100%;
    background: var(--clay);
    color: var(--paper);
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
}
.btn-submit-order:hover { background: var(--clay-deep); }
.btn-submit-order:disabled { background: var(--border); color: var(--ink-muted); cursor: not-allowed; }

.success-box {
    text-align: center;
    padding: 70px 20px;
    max-width: 520px;
    margin: 0 auto;
}
.success-box .icon { font-size: 48px; margin-bottom: 12px; }
.success-box h1 { font-family: var(--font-display); font-style: italic; }
