:root {
    --bg: #faf6ef;
    --surface: #ffffff;
    --ink: #26221c;
    --muted: #7a736a;
    --primary: #31584a;
    --primary-dark: #24443a;
    --accent: #c9704d;
    --accent-dark: #b25f3e;
    --line: #e8e0d4;
    --radius: 14px;
    --shadow: 0 8px 24px rgba(38, 34, 28, .08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
}

.container {
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ---------- Навигация ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250, 246, 239, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.75rem;
}

.nav-links a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    transition: color .2s;
}

.nav-links a:hover {
    color: var(--accent);
}

.cart-btn {
    position: relative;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    padding: .5rem 1.1rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    transition: background .2s;
}

.cart-btn:hover {
    background: var(--primary-dark);
}

.cart-count {
    background: var(--accent);
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 800;
}

/* ---------- Hero ---------- */
.hero {
    background:
        radial-gradient(1100px 480px at 85% -10%, rgba(201, 112, 77, .35), transparent 60%),
        radial-gradient(900px 420px at 5% 115%, rgba(49, 88, 74, .55), transparent 60%),
        linear-gradient(135deg, #2f5d46, #24443a);
    color: #fff;
    padding: 5rem 0 4.5rem;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.15;
    max-width: 700px;
    margin-bottom: 1rem;
}

.hero p {
    max-width: 620px;
    color: rgba(255, 255, 255, .85);
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ---------- Кнопки ---------- */
.btn {
    display: inline-block;
    padding: .8rem 1.7rem;
    border-radius: 999px;
    border: none;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform .15s, background .2s;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, .55);
}

.btn-ghost:hover {
    border-color: #fff;
}

.btn-small {
    padding: .45rem 1.1rem;
    font-size: .85rem;
    background: var(--primary);
    color: #fff;
}

.btn-small:hover {
    background: var(--primary-dark);
}

.btn-submit {
    width: 100%;
    font-size: 1.05rem;
}

/* ---------- Секции ---------- */
.section {
    padding: 3.5rem 0;
}

.section-alt {
    background: #fff;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.9rem;
    margin-bottom: 1.75rem;
}

.empty {
    color: var(--muted);
}

/* ---------- Меню ---------- */
.menu-category {
    margin-bottom: 2.5rem;
}

.menu-category-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--line);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.menu-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    transition: transform .2s, box-shadow .2s;
}

.menu-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.menu-card-head {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: baseline;
}

.menu-card-head h4 {
    font-size: 1.05rem;
}

.menu-price {
    color: var(--accent);
    font-weight: 800;
    white-space: nowrap;
}

.menu-price small {
    color: var(--muted);
    font-weight: 500;
}

.menu-desc {
    color: var(--muted);
    font-size: .9rem;
    flex: 1;
}

.menu-card-foot {
    margin-top: .5rem;
}

.stepper {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    background: #f4efe7;
    border-radius: 999px;
    padding: .25rem .4rem;
}

.stepper button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: background .2s;
}

.stepper button:hover {
    background: var(--primary-dark);
}

.stepper span {
    min-width: 20px;
    text-align: center;
    font-weight: 700;
}

/* ---------- Календарь ---------- */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.cal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    min-width: 200px;
    text-align: center;
}

.cal-nav {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: .2s;
}

.cal-nav:hover:not(:disabled) {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.cal-nav:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.calendar-weekdays,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: .5rem;
    max-width: 640px;
    margin: 0 auto;
}

.calendar-weekdays {
    margin-bottom: .5rem;
}

.calendar-weekdays span {
    text-align: center;
    font-weight: 700;
    font-size: .85rem;
    color: var(--muted);
    text-transform: uppercase;
}

.cal-day {
    aspect-ratio: 1;
    border-radius: 10px;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    font-weight: 700;
    transition: .15s;
}

.cal-day.free {
    background: #e9f4ee;
    color: var(--primary-dark);
    border-color: #cfe6da;
    cursor: pointer;
}

.cal-day.free:hover {
    background: var(--primary);
    color: #fff;
}

.cal-day.selected {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.cal-day.busy {
    background: #f7e3e0;
    color: #a05648;
}

.cal-day.blocked {
    background: #efe9e1;
    color: #9a9186;
}

.cal-day.past,
.cal-day.too_early {
    background: #f4f1ec;
    color: #b5ada2;
}

.cal-day:disabled {
    cursor: not-allowed;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
    font-size: .9rem;
    color: var(--muted);
}

.calendar-legend .dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 4px;
    margin-right: .4rem;
}

.dot.free { background: #e9f4ee; border: 1px solid #cfe6da; }
.dot.busy { background: #f7e3e0; }
.dot.blocked { background: #efe9e1; }
.dot.selected { background: var(--accent); }

/* ---------- Форма заказа ---------- */
.order-layout {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 2.5rem;
    align-items: start;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: .35rem;
    font-size: .85rem;
    font-weight: 700;
    color: var(--muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: .7rem .9rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font: inherit;
    transition: border-color .2s, box-shadow .2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(201, 112, 77, .18);
}

/* ---------- Сводка заказа ---------- */
.order-summary {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    position: sticky;
    top: 90px;
    box-shadow: var(--shadow);
}

.order-summary h3 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 1rem;
}

.cart-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .6rem 0;
    border-bottom: 1px dashed var(--line);
}

.cart-row-name {
    font-weight: 600;
    font-size: .95rem;
}

.cart-row-meta {
    font-size: .85rem;
    color: var(--muted);
}

.cart-row-right {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.cart-row-sum {
    font-weight: 700;
    white-space: nowrap;
}

.cart-remove {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: #f7e3e0;
    color: #a05648;
    cursor: pointer;
    font-size: .9rem;
    line-height: 1;
}

.cart-remove:hover {
    background: #a05648;
    color: #fff;
}

.summary-total {
    margin-top: 1rem;
    font-size: 1.05rem;
    text-align: right;
}

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 20px);
    background: var(--ink);
    color: #fff;
    padding: .8rem 1.5rem;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transition: .25s;
    z-index: 100;
    max-width: 90vw;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.toast.error {
    background: #a33a2e;
}

/* ---------- Footer ---------- */
footer {
    background: var(--ink);
    color: #cfc8bd;
    text-align: center;
    padding: 2rem;
}

/* ---------- Адаптивность ---------- */
@media (max-width: 900px) {
    .order-layout {
        grid-template-columns: 1fr;
    }

    .order-summary {
        position: static;
    }
}

@media (max-width: 700px) {
    .nav-links {
        display: none;
    }

    .hero {
        padding: 3.5rem 0;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ---------- Страница "Спасибо за заказ" ---------- */
.success-main {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.25rem;
}

.success-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.5rem;
    max-width: 520px;
    width: 100%;
    text-align: center;
}

.success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #e9f4ee;
    color: var(--primary);
    font-size: 2.2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.success-card h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
    margin-bottom: .75rem;
}

.success-details {
    margin: 1.5rem 0;
    text-align: left;
    border: 1px dashed var(--line);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    display: grid;
    gap: .6rem;
}

.success-details div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.success-details span {
    color: var(--muted);
}

.success-note {
    color: var(--muted);
    font-size: .95rem;
    margin-bottom: 1.5rem;
}

/* ---------- Логотип ---------- */
.logo {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
}

.logo-img {
    width: 36px;
    height: 36px;
}

/* ---------- Фото блюд в карточках ---------- */
.menu-card-img img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}
