/* ===========================================================
   Огонёк — стили публичной части
   Safari / iOS / WebKit совместимость — полная поддержка
   =========================================================== */

:root {
    --bg:        #0e0c0b;
    --bg-2:      #15110f;
    --bg-3:      #1c1815;
    --line:      rgba(255, 140, 60, .15);
    --line-2:    rgba(255, 255, 255, .07);
    --text:      #f3eee9;
    --muted:     #a89c92;
    --primary:   #ff6b35;
    --primary-2: #ff8a3d;
    --gold:      #ffd166;
    --danger:    #e34b3a;
    --ok:        #2dd4a6;
    --radius:    16px;
    --radius-lg: 24px;
    --shadow:    0 20px 50px rgba(0,0,0,.45);
    --header-h:  72px;
    /* Safe area для iPhone notch/Dynamic Island */
    --safe-top:    env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left:   env(safe-area-inset-left, 0px);
    --safe-right:  env(safe-area-inset-right, 0px);
}

*,
*::before,
*::after { box-sizing: border-box; }

/* scroll-behavior через JS для Safari < 15.4 — см. site.js */
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

/* === Тёмный скроллбар под стиль сайта === */
/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 107, 53, .35) transparent;
}
/* WebKit (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-2);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 53, .25);
    border-radius: 999px;
    border: 2px solid var(--bg-2);
    transition: background .2s;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 53, .55);
}
::-webkit-scrollbar-corner {
    background: var(--bg-2);
}

/* При переходе по якорю — отступаем на высоту шапки + safe-area,
   чтобы заголовок секции не уходил под Dynamic Island */
:target,
[id]:not(html):not(body) {
    scroll-margin-top: calc(var(--header-h) + var(--safe-top) + 1rem);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Safari: отключаем авто-зум при ориентации */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: hidden;
    min-height: 100vh;
    /* Поддержка safe-area снизу (кнопка Home или indicator) */
    padding-bottom: var(--safe-bottom);
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}
a { color: inherit; text-decoration: none; }
/* Safari: убираем дефолтный стиль кнопок */
button {
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    /* учёт safe-area на iPhone в горизонтальной ориентации */
    padding-left: max(1.25rem, var(--safe-left));
    padding-right: max(1.25rem, var(--safe-right));
}
.center { text-align: center; }
.muted  { color: var(--muted); }

.grad {
    background: linear-gradient(135deg, var(--primary) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    /* Fallback для очень старых Safari */
    color: var(--primary);
}
/* Safari поддерживает это нормально начиная с iOS 6 */
@supports (-webkit-background-clip: text) {
    .grad { color: transparent; }
}

/* =========== Шапка =========== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    /* Safe-area сверху — фон закрывает Dynamic Island / notch целиком */
    padding-top: var(--safe-top);
    /* Горизонтальные safe-area — для landscape + notch слева/справа */
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
    z-index: 50;
    /* Блюр только там где он работает */
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    /* Полностью непрозрачный фон — сквозь Dynamic Island не просвечивает hero */
    background: #0e0c0b;
    border-bottom: 1px solid var(--line-2);
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}
/* На устройствах с поддержкой backdrop-filter — можно чуть сделать прозрачнее */
@supports (-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px)) {
    .site-header {
        background: rgba(14, 12, 11, .96);
    }
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    gap: .75rem;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1.2;
    flex-shrink: 0;
    /* Чтобы хвосты букв не обрезались */
    overflow: visible;
}
.brand-flame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    filter: drop-shadow(0 0 6px rgba(255,107,53,.5));
}
.brand-name {
    color: var(--text);
    line-height: 1.2;
    /* Padding снизу/сверху по 2px чтобы хвосты букв (например "У") не резались */
    padding: 2px 0;
}

/* Логотип-картинка вместо эмодзи */
.brand-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    flex-shrink: 0;
}

/* На мобиле — лого чуть меньше, чтобы поместился в шапку 60px */
@media (max-width: 880px) {
    .brand-logo {
        width: 30px;
        height: 30px;
        border-radius: 7px;
    }
    .brand-flame {
        font-size: 1.1rem;
    }
}

.nav {
    display: flex;
    gap: 1.5rem;
    font-weight: 500;
}
.nav a {
    position: relative;
    color: var(--muted);
    transition: color .2s;
    padding: .25rem 0;
}
.nav a:hover, .nav a.active { color: var(--text); }
.nav a.active::after,
.nav a:hover::after {
    content: '';
    position: absolute;
    inset: auto 0 -4px 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--gold));
}

.header-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.btn-icon {
    position: relative;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: 1px solid var(--line-2);
    color: var(--text);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    transition: border-color .2s;
    flex-shrink: 0;
    /* Убираем tap-highlight на iOS */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.btn-icon:hover { border-color: var(--primary); }
.badge {
    position: absolute;
    inset: -4px -4px auto auto;
    background: var(--primary);
    color: white;
    font-size: .65rem;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.nav-toggle { display: none; }
.nav-toggle {
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    gap: 0;
    padding: 0;
    /* перебиваем width/height от .btn-icon */
    width: 44px;
    height: 44px;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    margin: 3px 0;
    flex-shrink: 0;
    -webkit-transition: -webkit-transform .25s, opacity .2s;
    transition: transform .25s, opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    -webkit-transform: translateY(8px) rotate(45deg);
    transform: translateY(8px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    -webkit-transform: translateY(-8px) rotate(-45deg);
    transform: translateY(-8px) rotate(-45deg);
}

/* =========== Кнопки =========== */
.btn {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    gap: .5rem;
    padding: .75rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: .95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: -webkit-transform .2s, transform .2s, box-shadow .2s, border-color .2s, color .2s;
    white-space: nowrap;
    text-align: center;
    -webkit-appearance: none;
    appearance: none;
    /* Отключаем tap-highlight */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    /* Safari: текст не выделяется при нажатии */
    -webkit-user-select: none;
    user-select: none;
    text-decoration: none;
}
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }
.btn-sm { padding: .5rem 1rem; font-size: .85rem; }
.btn-compact { padding: .5rem 1rem; font-size: .85rem; }
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: white;
    /* свечения по умолчанию нет — только при наведении */
    box-shadow: none;
}
.btn-primary:hover {
    transform: none;
    box-shadow: 0 0 0 0 transparent;
    filter: brightness(1.08);
}
.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: rgba(255,255,255,.25);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* =========== Hero =========== */
.hero {
    position: relative;
    /* Fallback для старых Safari */
    min-height: 92vh;
    /* dvh — Dynamic Viewport Height, Safari 15.4+  */
    min-height: 92dvh;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    overflow: hidden;
    /* учёт safe-area (notch / Dynamic Island): контент не уходит под шапку */
    padding-top: calc(var(--header-h) + var(--safe-top));
    /* isolation: isolate — Safari < 16 иногда глючит с z-index,
       используем explicit stacking context */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    z-index: 0;
}
.hero-bg {
    position: absolute;
    /* inset с запасом для parallax, без shorthand */
    top: -15%;
    left: 0;
    right: 0;
    bottom: -15%;
    background-size: cover;
    background-position: center 20%;
    z-index: -2;
    will-change: transform;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    background:
        -webkit-radial-gradient(50% 30%, circle, rgba(255,107,53,.15) 0%, transparent 55%),
        radial-gradient(60% 50% at 50% 30%, rgba(255,107,53,.15), transparent 55%),
        -webkit-linear-gradient(
            top,
            rgba(14,12,11,.3)  0%,
            rgba(14,12,11,.25) 30%,
            rgba(14,12,11,.55) 60%,
            rgba(14,12,11,.88) 82%,
            rgba(14,12,11,1)   100%
        ),
        linear-gradient(
            to bottom,
            rgba(14,12,11,.3)  0%,
            rgba(14,12,11,.25) 30%,
            rgba(14,12,11,.55) 60%,
            rgba(14,12,11,.88) 82%,
            rgba(14,12,11,1)   100%
        );
}

/* Плавный переход hero → следующая секция */
.hero::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 120px;
    background: -webkit-linear-gradient(top, transparent, var(--bg));
    background: linear-gradient(to bottom, transparent, var(--bg));
    z-index: 1;
    pointer-events: none;
}
.hero-content {
    text-align: center;
    padding: 2rem 1rem;
}
.hero-eyebrow {
    color: var(--gold);
    font-size: .8rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    margin: 0 0 1rem;
    animation: fadeUp .6s ease both;
}
.hero-title {
    font-family: 'Bebas Neue', 'Playfair Display', serif;
    font-size: clamp(4.5rem, 14vw, 10rem);
    font-weight: 400; /* Bebas Neue — только Regular */
    line-height: .95;
    letter-spacing: .03em;
    margin: 0 0 1rem;
    animation: fadeUp .7s .05s ease both;
}
.hero-sub {
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    color: var(--muted);
    max-width: 580px;
    margin: 0 auto 2rem;
    animation: fadeUp .8s .1s ease both;
}
.hero-cta {
    display: flex;
    gap: .75rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeUp .9s .15s ease both;
}
.hero-stats {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    animation: fadeUp 1s .2s ease both;
}
.hero-stats > div { text-align: center; }
.hero-stats strong {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 2.25rem;
    color: var(--primary);
}
.hero-stats span {
    color: var(--muted);
    font-size: .85rem;
}

/* =========== Секции =========== */
.section {
    padding: 5rem 0;
    /* content-visibility убран — в Safari < 15.4 вызывает скачки скролла */
}
.section-page-top {
    padding-top: calc(var(--header-h) + var(--safe-top) + 3rem);
}
.section-dim { background: var(--bg-2); }

.section-eyebrow {
    color: var(--primary);
    font-size: .8rem;
    letter-spacing: .25em;
    text-transform: uppercase;
    margin: 0 0 .75rem;
    font-weight: 600;
}
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 900;
    margin: 0 0 1.5rem;
    line-height: 1.1;
}
.section-text {
    color: var(--muted);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}
.features li {
    display: flex;
    align-items: center;
    gap: .65rem;
}
.features span {
    width: 36px; height: 36px;
    background: rgba(255,107,53,.12);
    border: 1px solid var(--line);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.img-frame {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 4 / 3;
}
.img-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.img-frame:hover img { transform: scale(1.04); }

/* =========== Меню =========== */
.menu-toolbar {
    display: flex;
    gap: .5rem;
    max-width: 600px;
    margin: 0 auto 1.5rem;
    flex-wrap: wrap;
}
.menu-search {
    flex: 1 1 200px;
    background: var(--bg-3);
    border: 1px solid var(--line-2);
    color: var(--text);
    padding: .75rem 1rem;
    border-radius: 999px;
    font: inherit;
    transition: border-color .2s;
}
.menu-search:focus {
    outline: none;
    border-color: var(--primary);
}

.tabs {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin: 1.5rem 0 2.5rem;
    position: relative;
}

/* Анимированный подчёркиватель активного таба */
.menu-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
    padding-bottom: 4px;
    gap: .4rem;
}
.menu-tabs::-webkit-scrollbar { display: none; }
/* Выровняем по центру если мало табов */
@supports (justify-content: safe center) {
    .menu-tabs { justify-content: safe center; }
}

.tab {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
    padding: .55rem 1.2rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 500;
    font-size: .9rem;
    transition: color .2s, border-color .2s, background .2s, transform .15s;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.tab:hover {
    color: var(--text);
    border-color: var(--primary);
}
.tab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 14px rgba(255,107,53,.35);
}

/* =========== Меню — анимированный фильтр =========== */
.menu-card {
    opacity: 1;
    transform: scale(1) translateY(0);
    transition:
        opacity .22s ease,
        transform .22s ease,
        border-color .2s,
        box-shadow .25s;
}
/* Исчезающее состояние (перед display:none) */
.menu-card.card-hiding {
    opacity: 0;
    transform: scale(.94) translateY(6px);
    pointer-events: none;
}
/* Полностью скрыто */
.menu-card.card-hidden {
    display: none;
}
/* Появление */
.menu-card.card-showing {
    opacity: 0;
    transform: scale(.94) translateY(6px);
}

/* Пустое состояние */
.menu-empty {
    text-align: center;
    padding: 4rem 1rem;
    grid-column: 1 / -1;
    animation: fadeUp .3s ease both;
}
.menu-empty-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: .4;
}
.menu-empty-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin: 0 0 .5rem;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.menu-card {
    background: var(--bg-3);
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    overflow: hidden;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-transition: -webkit-transform .25s ease, border-color .2s, box-shadow .25s;
    transition: transform .25s ease, border-color .2s, box-shadow .25s;
}
.menu-card:hover {
    transform: scale(1.03);
    border-color: var(--primary);
    box-shadow: 0 0 0 0 transparent, 0 8px 24px rgba(255,107,53,.18);
}
.menu-card.has-img .menu-img {
    position: relative;
    overflow: hidden;
    background: var(--bg-2);
    /* Fallback для Safari < 15 где aspect-ratio не работает */
    padding-top: calc(11 / 16 * 100%);
}
.menu-card.has-img .menu-img img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Современные браузеры — переопределяем */
@supports (aspect-ratio: 16 / 11) {
    .menu-card.has-img .menu-img {
        aspect-ratio: 16 / 11;
        padding-top: 0;
    }
    .menu-card.has-img .menu-img img {
        position: static;
        height: 100%;
    }
}
.menu-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-transition: -webkit-transform .4s ease;
    transition: transform .4s ease;
    display: block;
}
.menu-card:hover .menu-img img { transform: scale(1.05); }
.menu-cat {
    position: absolute;
    top: .75rem; left: .75rem;
    background: rgba(0,0,0,.65);
    color: var(--gold);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    padding: .25rem .65rem;
    border-radius: 999px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.menu-discount {
    position: absolute;
    top: .75rem; right: .75rem;
    background: var(--danger);
    color: white;
    font-size: .75rem;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-weight: 700;
}

.menu-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .65rem;
    flex: 1;
}
.menu-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    margin: 0;
    color: var(--text);
}
.menu-desc {
    color: var(--muted);
    font-size: .9rem;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.menu-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    gap: .5rem;
}
.menu-price strong {
    font-size: 1.25rem;
    color: var(--primary);
    font-weight: 700;
}
.menu-price .old {
    display: inline-block;
    margin-right: .35rem;
    color: var(--muted);
    text-decoration: line-through;
    font-size: .8rem;
}
.add-to-cart {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
}

/* =========== Новости =========== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}
.news-card {
    background: var(--bg-3);
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: transform .25s, border-color .2s, box-shadow .25s;
}
.news-card:hover {
    border-color: var(--primary);
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(255,107,53,.12);
}
.news-date {
    color: var(--gold);
    font-size: .85rem;
    margin: 0 0 .5rem;
}
.news-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    margin: 0 0 .75rem;
}
.news-body { color: var(--muted); margin: 0; }

/* =========== Отзывы =========== */
.yandex-reviews-wrap {
    margin: 2rem auto;
    max-width: 900px;
}
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}
.review-card {
    background: var(--bg-3);
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: transform .25s, border-color .2s, box-shadow .25s;
}
.review-card:hover {
    border-color: var(--gold);
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(255,209,102,.1);
}
.review-stars {
    color: var(--gold);
    font-size: 1.15rem;
    letter-spacing: 2px;
    margin-bottom: .75rem;
}
.review-text { font-style: italic; margin: 0 0 1rem; }
.review-author { color: var(--muted); margin: 0; font-weight: 500; }

.review-form-wrap { margin-top: 2.5rem; text-align: center; }
.review-form-wrap summary {
    list-style: none;
    cursor: pointer;
    display: inline-block;
}
.review-form-wrap summary::-webkit-details-marker { display: none; }
.review-form {
    max-width: 540px;
    margin: 1.5rem auto 0;
    display: grid;
    gap: .75rem;
}
.review-form input,
.review-form select,
.review-form textarea {
    background: var(--bg-3);
    border: 1px solid var(--line-2);
    color: var(--text);
    padding: .85rem 1rem;
    border-radius: 12px;
    font: inherit;
    font-size: 16px;
    transition: border-color .2s;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none;
}
.review-form input:focus,
.review-form select:focus,
.review-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* =========== Бронирование =========== */

/* Обёртка с лейблом для datetime полей */
.booking-field-label {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    width: 100%;
}
.booking-field-hint {
    font-size: .78rem;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding-left: .25rem;
}

/* iOS: date/time пикеры — убираем их дефолтный вид */
input[type="date"],
input[type="time"] {
    -webkit-appearance: none;
    appearance: none;
    /* Цвет пикера в Safari задаётся через color-scheme */
    color-scheme: dark;
}
/* Safari: убираем системную иконку calendar */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    opacity: .5;
    filter: invert(0.7) sepia(1) saturate(3) hue-rotate(0deg);
    cursor: pointer;
}

.contact-info {
    margin-top: 1.5rem;
    display: grid;
    gap: .75rem;
}
.contact-info > div {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: var(--muted);
}
.contact-info a { color: var(--text); }
.booking-form {
    background: var(--bg-3);
    border: 1px solid var(--line-2);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: grid;
    gap: 1rem;
}
.booking-form .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
/* label-обёртка с подписью */
.booking-form label.booking-field-label input,
.booking-form label.booking-field-label textarea {
    width: 100%;
}
.booking-form input,
.booking-form textarea {
    background: var(--bg-2);
    border: 1px solid var(--line-2);
    color: var(--text);
    padding: .85rem 1rem;
    border-radius: 12px;
    font: inherit;
    /* Safari: font-size минимум 16px чтобы не было авто-зума */
    font-size: 16px;
    transition: border-color .2s;
    width: 100%;
    /* Убираем дефолтный вид iOS */
    -webkit-appearance: none;
    appearance: none;
    /* Убираем тень на input в iOS */
    box-shadow: none;
}
.booking-form input:focus,
.booking-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}
.form-msg {
    margin: 0;
    min-height: 1.3em;
    font-size: .9rem;
}
.form-msg.ok  { color: var(--ok); }
.form-msg.err { color: var(--danger); }

/* =========== Подвал =========== */
.site-footer {
    background: var(--bg-2);
    padding: 2.5rem 0;
    border-top: 1px solid var(--line-2);
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.footer-links a {
    color: var(--muted);
    transition: color .2s;
}
.footer-links a:hover { color: var(--primary); }

/* =========== Корзина =========== */
.cart-drawer {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 100;
    pointer-events: none;
    visibility: hidden;
}
.cart-drawer[aria-hidden="false"] {
    visibility: visible;
    pointer-events: auto;
}
.cart-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.6);
    opacity: 0;
    -webkit-transition: opacity .3s;
    transition: opacity .3s;
}
.cart-drawer[aria-hidden="false"] .cart-overlay { opacity: 1; }

/* Блокировка скролла фона при открытой корзине на мобиле */
body.cart-locked {
    overflow: hidden;
    /* iOS Safari: position:fixed выставляется через JS,
       это дополнительная страховка для других мобильных браузеров */
    touch-action: none;
}
/* Внутри корзины скролл работает нормально */
body.cart-locked .cart-body,
body.cart-locked .cart-panel {
    touch-action: pan-y;
}
.cart-panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    left: auto;
    width: min(420px, 100%);
    background: var(--bg-2);
    border-left: 1px solid var(--line-2);
    -webkit-transform: translate3d(100%, 0, 0);
    transform: translate3d(100%, 0, 0);
    -webkit-transition: -webkit-transform .35s cubic-bezier(.4, .2, .2, 1);
    transition: transform .35s cubic-bezier(.4, .2, .2, 1);
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    /* Safe area на iPhone */
    padding-bottom: var(--safe-bottom);
}
.cart-drawer[aria-hidden="false"] .cart-panel {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}
.cart-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--line-2);
}
.cart-head h3 {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
}
.cart-body {
    -webkit-flex: 1;
    flex: 1;
    overflow-y: auto;
    /* iOS momentum scroll */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 1rem 1.5rem;
}
.cart-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 0;
    border-bottom: 1px solid var(--line-2);
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-info strong {
    display: block;
    font-size: .92rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cart-item-info small { color: var(--muted); }
.cart-qty {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}
.cart-qty button {
    width: 26px; height: 26px;
    border-radius: 6px;
    border: 1px solid var(--line-2);
    background: transparent;
    color: var(--text);
    cursor: pointer;
}
.cart-qty button:hover { border-color: var(--primary); }
.cart-remove {
    background: transparent;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1.05rem;
    padding: .25rem .5rem;
}
.cart-foot {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--line-2);
    display: grid;
    gap: .75rem;
}
.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
}
.cart-total strong {
    color: var(--primary);
    font-size: 1.35rem;
}
#orderForm { display: grid; gap: .55rem; }
#orderForm input,
#orderForm textarea {
    background: var(--bg-3);
    border: 1px solid var(--line-2);
    color: var(--text);
    padding: .75rem;
    border-radius: 10px;
    font: inherit;
    font-size: 16px;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none;
    width: 100%;
}
#orderForm input:focus,
#orderForm textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* =========== Тост =========== */
.toast {
    position: fixed;
    bottom: 24px;
    bottom: calc(24px + var(--safe-bottom));
    left: 50%;
    -webkit-transform: translate3d(-50%, calc(100% + 40px), 0);
    transform: translate3d(-50%, calc(100% + 40px), 0);
    background: var(--bg-3);
    border: 1px solid var(--primary);
    color: var(--text);
    padding: .85rem 1.4rem;
    border-radius: 999px;
    box-shadow: var(--shadow);
    -webkit-transition: -webkit-transform .3s ease;
    transition: transform .3s ease;
    z-index: 200;
    max-width: calc(90vw - var(--safe-left) - var(--safe-right));
    font-size: .92rem;
    pointer-events: none;
    visibility: hidden;
    white-space: nowrap;
}
.toast.show {
    -webkit-transform: translate3d(-50%, 0, 0);
    transform: translate3d(-50%, 0, 0);
    pointer-events: auto;
    visibility: visible;
}

/* =========== Reveal-анимация =========== */
.reveal {
    opacity: 0;
    -webkit-transform: translate3d(0, 20px, 0);
    transform: translate3d(0, 20px, 0);
    -webkit-transition: opacity .6s ease, -webkit-transform .6s ease;
    transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
    opacity: 1;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

/* =========== Keyframes =========== */
@-webkit-keyframes fadeUp {
    from { opacity: 0; -webkit-transform: translate3d(0, 20px, 0); transform: translate3d(0, 20px, 0); }
    to   { opacity: 1; -webkit-transform: translate3d(0, 0, 0);    transform: translate3d(0, 0, 0); }
}
@keyframes fadeUp {
    from { opacity: 0; -webkit-transform: translate3d(0, 20px, 0); transform: translate3d(0, 20px, 0); }
    to   { opacity: 1; -webkit-transform: translate3d(0, 0, 0);    transform: translate3d(0, 0, 0); }
}

/* =========== Safari / WebKit исправления =========== */

/* Input placeholder цвет */
::-webkit-input-placeholder { color: var(--muted); opacity: 1; }
::placeholder { color: var(--muted); opacity: 1; }

/* Убираем синий highlight на тапах во всех элементах */
a, button, [role="button"], .tab, .chip, .btn-icon, .cart-remove, .nav a {
    -webkit-tap-highlight-color: transparent;
}

/* Дефолтный appearance убираем для select в Safari */
select {
    -webkit-appearance: none;
    appearance: none;
}

/* details/summary — убираем дефолтный треугольник в Safari */
details summary::-webkit-details-marker { display: none; }
details summary { list-style: none; }

/* Safari < 16: gap во flex частично не работает — добавляем margin как fallback */
@supports not (gap: 1rem) {
    .nav > * + * { margin-left: 1.5rem; }
    .hero-cta > * + * { margin-left: .75rem; }
    .header-actions > * + * { margin-left: .5rem; }
}

/* Safari: overflow:hidden на border-radius — нужен transform для клипинга */
.menu-card,
.img-frame,
.cart-panel {
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}

/* Убираем outline на тап (не нарушаем a11y — :focus-visible) */
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* menu-search — font-size 16px чтобы Safari не зумил */
.menu-search {
    font-size: 16px;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none;
}

/* Тост: bottom с учётом home indicator */
@supports (padding: max(0px)) {
    .toast {
        bottom: max(24px, calc(24px + env(safe-area-inset-bottom)));
    }
}

/* Подвал с учётом safe-area — отступ снизу больше для iPhone home indicator */
.site-footer {
    padding-bottom: calc(2.5rem + var(--safe-bottom));
}

/* Дополнительный отступ снизу для всего body, чтобы Safari URL-bar
   не наезжал на последний контент */
@supports (padding: max(0px)) {
    body {
        padding-bottom: max(var(--safe-bottom), env(safe-area-inset-bottom));
    }
}

/* =========== prefers-reduced-motion =========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        -webkit-animation-duration: .01ms !important;
        animation-duration: .01ms !important;
        -webkit-animation-iteration-count: 1 !important;
        animation-iteration-count: 1 !important;
        -webkit-transition-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    .hero-bg {
        -webkit-transform: none !important;
        transform: none !important;
    }
    .reveal {
        opacity: 1 !important;
        -webkit-transform: none !important;
        transform: none !important;
    }
}

/* =========================================================
   Адаптив — оптимизация под разные диагонали
   Точки:
     420  — маленькие телефоны (iPhone SE, старые Android)
     560  — средние телефоны
     768  — планшеты (вертикально)
     880  — переход с десктопа на мобильный
     1024 — планшеты горизонтально
     1280 — стандартный десктоп
     1440 — большие экраны
   ========================================================= */

/* Базовые тач-улучшения для любых мобильных устройств */
@media (hover: none) and (pointer: coarse) {
    /* На сенсорных экранах не делаем hover-эффекты */
    .menu-card:hover,
    .news-card:hover,
    .review-card:hover {
        transform: none;
    }
    .menu-card:hover .menu-img img,
    .img-frame:hover img {
        transform: none;
    }
    .btn-primary:hover {
        transform: none;
    }
    /* Увеличенные тач-зоны */
    .btn,
    .btn-icon,
    .tab,
    .add-to-cart {
        min-height: 44px;
    }
    .add-to-cart {
        min-width: 44px;
    }
    /* Скролл — нативный с инерцией */
    .menu-tabs,
    .cart-body,
    .table-scroll {
        -webkit-overflow-scrolling: touch;
    }
}

/* === Большие экраны (1440px+) === */
@media (min-width: 1440px) {
    .container { max-width: 1320px; }
    .hero-title { font-size: clamp(5rem, 9vw, 10rem); }
    .menu-grid { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
}

/* === Планшеты горизонтально (1024px) === */
@media (max-width: 1024px) {
    .container { padding: 0 1.5rem; }
    .section { padding: 4.5rem 0; }
}

/* === Планшеты вертикально (768px) === */
@media (max-width: 768px) {
    .hero-title { font-size: clamp(3rem, 12vw, 5.5rem); }
    .section { padding: 3.5rem 0; }
    .two-col { gap: 2.5rem; }
    .menu-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }
    .news-grid, .reviews-grid { gap: 1.25rem; }
    .booking-form { padding: 1.75rem; }
    .container { padding: 0 1.25rem; }
}

/* === Переход на мобильную навигацию (880px) === */
@media (max-width: 880px) {
    :root { --header-h: 68px; }
    .nav {
        position: fixed;
        top: var(--header-h);
        /* учитываем safe-area (Dynamic Island) */
        top: calc(var(--header-h) + var(--safe-top));
        left: 0;
        right: 0;
        background: rgba(14, 12, 11, .96);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        -webkit-flex-direction: column;
        flex-direction: column;
        padding: 1rem 1.25rem 1.5rem;
        padding-bottom: calc(1.5rem + var(--safe-bottom));
        border-bottom: 1px solid var(--line-2);
        gap: .25rem;
        /* В закрытом состоянии — полностью скрыто и не кликабельно */
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        -webkit-transform: translateY(-12px);
        transform: translateY(-12px);
        -webkit-transition: opacity .25s ease, -webkit-transform .3s ease, visibility .3s;
        transition: opacity .25s ease, transform .3s ease, visibility .3s;
        z-index: 49;
        /* iOS: предотвращаем скролл под меню */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        max-height: 80vh;
        max-height: 80dvh;
        box-shadow: 0 12px 24px rgba(0,0,0,.35);
    }
    .nav.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
    .nav a {
        padding: .75rem 0;
        border-bottom: 1px solid var(--line-2);
    }
    .nav a:last-child { border-bottom: none; }
    .nav-toggle {
        display: -webkit-inline-flex;
        display: inline-flex;
        -webkit-flex-direction: column;
        flex-direction: column;
    }
    .brand {
        font-size: 1.15rem;
        line-height: 1.2;
    }
    .brand-name {
        line-height: 1.2;
        padding: 3px 0;
    }
    .btn-compact { display: none; }

    .hero { min-height: 80vh; }
    .hero-stats { gap: 1.25rem; margin-top: 2rem; }
    .hero-stats strong { font-size: 1.6rem; }
    .hero-cta .btn { width: 100%; }
    .hero-cta { flex-direction: column; max-width: 280px; margin: 0 auto; }

    .section { padding: 3.5rem 0; }
    .two-col { grid-template-columns: 1fr; gap: 2rem; }
    .booking-form { padding: 1.5rem; }
    .booking-form .row { grid-template-columns: 1fr; gap: .75rem; }
    /* datetime — оставляем в 2 колонки: дата + время рядом, это удобнее */
    .booking-datetime-row { grid-template-columns: 1fr 1fr; }
    .features { grid-template-columns: 1fr; }

    .menu-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
    .menu-body { padding: .85rem; gap: .4rem; }
    .menu-name { font-size: 1.05rem; }
    .menu-desc { font-size: .8rem; -webkit-line-clamp: 2; }
    .menu-price strong { font-size: 1.05rem; }
    .menu-foot { gap: .35rem; }
    .add-to-cart { width: 32px; height: 32px; font-size: 1.2rem; }

    .footer-inner { flex-direction: column; text-align: center; }
    .cart-panel { width: 100%; }
}

/* === Средние телефоны (560px) === */
@media (max-width: 560px) {
    .hero-title { font-size: clamp(2.75rem, 14vw, 4.5rem); }
    .hero-sub { font-size: .95rem; }
    .hero-stats strong { font-size: 1.4rem; }
    .hero-stats span { font-size: .75rem; }
    .section-title { font-size: clamp(1.75rem, 6vw, 2.5rem); }
    .menu-cat-title { font-size: 1.4rem; margin: 1.5rem 0 .75rem; }
    .booking-form { padding: 1.25rem; border-radius: 16px; }
    .container { padding: 0 1rem; }

    /* Дата/время — подписи всегда видны */
    .booking-datetime-row {
        grid-template-columns: 1fr 1fr !important;
        gap: .75rem;
    }
    .booking-field-label { gap: .25rem; }

    /* Контакты — красивые карточки на мобиле */
    .contact-info {
        display: grid;
        grid-template-columns: 1fr;
        gap: .6rem;
        margin-top: 1.25rem;
    }
    .contact-info > div {
        background: var(--bg-3);
        border: 1px solid var(--line-2);
        border-radius: 12px;
        padding: .85rem 1rem;
        font-size: .92rem;
    }

    /* Hero stat-блок красивее */
    .hero-stats {
        gap: .75rem;
        padding: 1rem;
        background: rgba(255,255,255,.04);
        border-radius: 14px;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

/* === Маленькие телефоны (420px) === */
@media (max-width: 420px) {
    .menu-grid { grid-template-columns: 1fr 1fr; gap: .65rem; }
    .menu-body { padding: .65rem; gap: .35rem; }
    .menu-name { font-size: .92rem; line-height: 1.2; }
    .menu-desc { display: none; }
    .menu-price strong { font-size: .92rem; }
    .menu-price .old { font-size: .7rem; }
    .menu-foot { gap: .3rem; }
    .menu-cat { font-size: .65rem; padding: .15rem .5rem; top: .5rem; left: .5rem; }
    .menu-discount { font-size: .65rem; padding: .12rem .45rem; top: .5rem; right: .5rem; }
    .hero-eyebrow { font-size: .7rem; letter-spacing: .15em; }
    .hero { min-height: 70vh; }
    .hero-stats { display: none; }
    .section { padding: 2.75rem 0; }
    .section-eyebrow { font-size: .7rem; }
    .review-form-wrap summary { font-size: .9rem; padding: .75rem 1.5rem; }
    .news-card, .review-card { padding: 1.25rem; }
    .add-to-cart { width: 30px; height: 30px; font-size: 1.1rem; }
    .footer-inner { gap: .5rem; }
    .footer-inner p { font-size: .8rem; }
}

/* === Очень маленькие (360px и меньше — старые Android) === */
@media (max-width: 360px) {
    .menu-grid { grid-template-columns: 1fr; gap: .65rem; }
    .menu-card.has-img .menu-img { aspect-ratio: 16 / 9; }
    .menu-desc { display: -webkit-box; font-size: .75rem; }
    .container { padding: 0 .85rem; }
    .header-actions { gap: .35rem; }
    .btn-icon { width: 38px; height: 38px; }
}

/* === Альбомная ориентация на маленьких — низкая высота === */
@media (max-height: 500px) and (orientation: landscape) {
    .hero { min-height: 100vh; min-height: 100dvh; }
    .hero-stats { display: none; }
    .hero-title { font-size: clamp(2rem, 7vw, 3.5rem); margin-bottom: .5rem; }
    .hero-sub { margin-bottom: 1rem; }
    /* В альбомной — учитываем боковые safe-area для notch слева/справа */
    .container {
        padding-left: max(1.25rem, var(--safe-left));
        padding-right: max(1.25rem, var(--safe-right));
    }
    .site-header .container {
        padding-left: max(1.25rem, var(--safe-left));
        padding-right: max(1.25rem, var(--safe-right));
    }
}

/* === iPad / большой планшет (точно подобрана для iPad Pro) === */
@media (min-width: 881px) and (max-width: 1180px) {
    .container { max-width: 960px; padding: 0 2rem; }
    .menu-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

/* === Очень широкие экраны (>1600px) === */
@media (min-width: 1600px) {
    .container { max-width: 1440px; }
    .menu-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
}

/* =========== Print =========== */
@media print {
    .site-header, .cart-drawer, .toast, .hero-cta, #bookingForm { display: none; }
    .hero { min-height: auto; }
    body { background: white; color: black; }
}
