/* ═══════════════════════════════════════════════════════════
   Salmonz · Адаптивный дизайн (mobile-first, MAX WebView)
   Стиль вдохновлён Ёбидоёби: крупная типографика, воздух
   ═══════════════════════════════════════════════════════════ */

:root {
    --font-main: 'Montserrat', -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --accent: #ff7a00;
    --accent-hover: #e66e00;
    --accent-soft: #fff0e5;
    --bg: #ffffff;
    --bg-2: #f5f5f7;
    --card: #ffffff;
    --text: #0a0a0a;
    --muted: #8e8e93;
    --border: #ededed;
    --radius: 20px;
    --radius-sm: 14px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --ok: #34c759;
    --err: #ff3b30;

    --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);

    --bottom-nav-height: 72px;
    --content-bottom-pad: calc(var(--bottom-nav-height) + var(--safe-bottom) + 16px);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    padding-bottom: var(--content-bottom-pad);
}
html.in-max body { overscroll-behavior-y: none; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: max(16px, var(--safe-left));
    padding-right: max(16px, var(--safe-right));
}

/* ═══ Шапка ═══ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(12px + var(--safe-top)) 16px 12px;
    padding-left: max(16px, var(--safe-left));
    padding-right: max(16px, var(--safe-right));
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.topbar.scrolled {
    border-bottom-color: var(--border);
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.04);
}
html.in-max .topbar { padding-top: 12px; }

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.03em;
}
.logo-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 12px;
}
.logo-img { font-size: 28px; line-height: 1; }
.logo-text { font-size: 20px; font-weight: 900; color: var(--text); }
.logo-text .accent { color: var(--accent); }

.topbar-actions { display: flex; gap: 8px; align-items: center; }

.icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-2);
    border: none;
    cursor: pointer;
    font-size: 20px;
    transition: background 0.15s, transform 0.1s;
}
.icon-btn:hover { background: var(--accent-soft); }
.icon-btn:active { transform: scale(0.94); }

.cart-badge {
    position: absolute;
    top: -2px; right: -2px;
    min-width: 22px; height: 22px;
    padding: 0 5px;
    border-radius: 11px;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    display: none;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}
.cart-badge.show { display: inline-flex; }

/* ═══ Нижняя навигация ═══ */
.bottombar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    display: flex;
    justify-content: space-around;
    padding: 8px 4px calc(8px + var(--safe-bottom));
    padding-left: max(4px, var(--safe-left));
    padding-right: max(4px, var(--safe-right));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
}
.bottombar a {
    flex: 1;
    max-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 2px;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    border-radius: 12px;
    transition: color 0.15s;
}
.bottombar a.active { color: var(--accent); }
.bottombar a svg { width: 24px; height: 24px; }

@media (min-width: 900px) {
    .bottombar { display: none; }
    body { padding-bottom: 32px; }
    :root { --bottom-nav-height: 0px; }
}

/* ═══ Hero ═══ */
.hero {
    background: linear-gradient(135deg, #ff7a00 0%, #ff9a40 100%);
    color: #fff;
    border-radius: 24px;
    padding: 32px 24px;
    margin: 8px 0 20px;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 90% 10%,
        rgba(255,255,255,0.2) 0%, transparent 40%);
    pointer-events: none;
}
.hero h1 {
    font-size: 28px;
    font-weight: 900;
    line-height: 1.05;
    margin: 0 0 8px;
    letter-spacing: -0.03em;
    position: relative;
}
.hero p {
    font-size: 15px;
    font-weight: 500;
    opacity: 0.95;
    margin: 0;
    position: relative;
}
@media (min-width: 480px) {
    .hero { padding: 40px 32px; }
    .hero h1 { font-size: 36px; }
    .hero p { font-size: 17px; }
}
@media (min-width: 900px) {
    .hero { padding: 64px 56px; border-radius: 32px; margin: 16px 0 32px; }
    .hero h1 { font-size: 56px; }
    .hero p { font-size: 22px; }
}
@media (min-width: 1200px) { .hero h1 { font-size: 72px; } }

/* ═══ Поиск ═══ */
.search { display: flex; gap: 8px; margin-bottom: 16px; }
.search input {
    flex: 1;
    min-height: 52px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    outline: none;
    font-size: 15px;
    font-weight: 500;
    transition: border-color 0.15s, background 0.15s;
}
.search input:focus { border-color: var(--accent); background: #fff; }
.search button {
    min-height: 52px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: var(--text);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.search button:hover { background: var(--accent); }
@media (max-width: 480px) {
    .search button { padding: 0 16px; font-size: 14px; }
}
@media (min-width: 900px) {
    .search { max-width: 560px; }
}

/* ═══ Чипсы категорий ═══ */
.chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 18px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex: 0 0 auto;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--card);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.15s;
    cursor: pointer;
}
.chip.active { background: var(--text); color: #fff; border-color: var(--text); }
.chip:hover:not(.active) { border-color: var(--accent); color: var(--accent); }
@media (min-width: 900px) {
    .chip { padding: 12px 22px; font-size: 15px; }
}

/* ═══ Сетка товаров ═══ */
.grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .grid { gap: 16px; grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .grid { gap: 20px; grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 360px) { .grid { gap: 8px; } }

.card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
@media (hover: hover) {
    .card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    }
}
.card:active { transform: scale(0.98); }

.card-img {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--bg-2);
    overflow: hidden;
}
.card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
@media (hover: hover) {
    .card:hover .card-img img { transform: scale(1.05); }
}
.card-img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 48px; opacity: 0.35;
}

.badges {
    position: absolute;
    top: 10px; left: 10px;
    display: flex; gap: 4px; flex-wrap: wrap;
    max-width: calc(100% - 20px);
}
.badge {
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.badge.hit { background: var(--accent); }
.badge.new { background: #2563eb; }
.badge.discount { background: var(--err); }

.card-body {
    padding: 12px 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.card-title {
    font-weight: 800;
    font-size: 14px;
    line-height: 1.25;
    letter-spacing: -0.02em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 34px;
}
.card-meta {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}
.card-row {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 8px;
}
.price {
    font-weight: 900;
    font-size: 18px;
    letter-spacing: -0.02em;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}
.price-old {
    color: var(--muted);
    text-decoration: line-through;
    font-size: 12px;
    font-weight: 500;
}
@media (min-width: 480px) {
    .card-body { padding: 14px 14px 18px; }
    .card-title { font-size: 15px; min-height: 38px; }
    .price { font-size: 20px; }
}
@media (min-width: 900px) {
    .card-body { padding: 16px 16px 20px; }
    .card-title { font-size: 16px; min-height: 40px; }
    .price { font-size: 22px; }
}

/* ═══ Кнопки ═══ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px;
    border: none;
    border-radius: 999px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: -0.01em;
    background: var(--accent-soft);
    color: var(--accent);
    text-decoration: none;
    touch-action: manipulation;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; pointer-events: none; }
.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 16px rgba(255, 122, 0, 0.35);
}
.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 6px 20px rgba(255, 122, 0, 0.45);
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--err); color: #fff; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 13px; }
.btn-lg { min-height: 56px; font-size: 16px; padding: 0 28px; }
.btn-block { width: 100%; }

.btn-add {
    min-height: 40px;
    min-width: 40px;
    padding: 0 14px;
    font-size: 20px;
    font-weight: 900;
    border-radius: 50%;
    background: var(--text);
    color: #fff;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    touch-action: manipulation;
}
.btn-add:hover { background: var(--accent); transform: scale(1.08); }
.btn-add:active { transform: scale(0.92); }
@media (min-width: 640px) {
    .btn-add {
        min-height: 44px; min-width: 44px;
        padding: 0 18px;
        border-radius: 999px;
    }
}

/* ═══ Формы ═══ */
.field { margin-bottom: 18px; }
.field label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.field input,
.field textarea,
.field select {
    width: 100%;
    min-height: 52px;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-2);
    outline: none;
    font-size: 16px;
    font-weight: 500;
    transition: border-color 0.15s, background 0.15s;
    -webkit-appearance: none;
    appearance: none;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
    border-color: var(--accent);
    background: #fff;
}
.field textarea { min-height: 100px; resize: vertical; font-family: inherit; }

.radio-group { display: grid; gap: 10px; }
.radio-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    cursor: pointer;
    transition: all 0.15s;
}
.radio-card input {
    accent-color: var(--accent);
    width: 22px; height: 22px;
    flex: 0 0 auto;
}
.radio-card:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.radio-icon { font-size: 24px; flex: 0 0 auto; }
.radio-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.radio-text b { font-weight: 800; font-size: 15px; }
.radio-text small { color: var(--muted); font-size: 12px; font-weight: 500; }

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
}
.checkbox input { width: 20px; height: 20px; accent-color: var(--accent); }

.legal-text {
    color: var(--muted);
    font-size: 12px;
    text-align: center;
    margin: 14px 0 0;
    line-height: 1.5;
    font-weight: 500;
}
@media (min-width: 900px) {
    .checkout-form-wrap { max-width: 600px; margin: 0 auto; }
}

/* Слоты доставки */
.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px;
}
.slot-btn {
    padding: 10px 12px;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--bg-2);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}
.slot-btn:hover { border-color: var(--accent); color: var(--accent); }
.slot-btn.selected {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255,122,0,0.35);
}
.section-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ═══ Корзина ═══ */
.cart-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    background: var(--card);
    border-radius: 18px;
    box-shadow: var(--shadow);
}
.cart-item img,
.cart-item-placeholder {
    width: 72px; height: 72px;
    object-fit: cover;
    border-radius: 14px;
    background: var(--bg-2);
    flex: 0 0 auto;
}
.cart-item-placeholder {
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; opacity: 0.4;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-info .name {
    font-weight: 800;
    font-size: 15px;
    line-height: 1.25;
    letter-spacing: -0.02em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.cart-item-info .price {
    font-size: 16px;
    color: var(--accent);
    font-weight: 900;
    margin-top: 4px;
    letter-spacing: -0.02em;
}
.qty {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-2);
    border-radius: 999px;
    padding: 3px;
    flex: 0 0 auto;
}
.qty button {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--card);
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: all 0.15s;
    touch-action: manipulation;
}
.qty button:active { transform: scale(0.9); background: var(--bg); }
.qty span {
    min-width: 26px;
    text-align: center;
    font-weight: 900;
    font-size: 15px;
}
@media (min-width: 640px) {
    .cart-item { padding: 16px; gap: 16px; }
    .cart-item img, .cart-item-placeholder { width: 88px; height: 88px; }
    .cart-item-info .name { font-size: 16px; }
    .cart-item-info .price { font-size: 18px; }
    .qty button { width: 38px; height: 38px; }
    .qty span { min-width: 30px; font-size: 16px; }
}

/* ═══ Итоги ═══ */
.summary {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 16px;
    box-shadow: var(--shadow);
}
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 15px;
    color: var(--muted);
    font-weight: 600;
}
.summary-row.total {
    font-size: 24px;
    font-weight: 900;
    color: var(--text);
    border-top: 2px solid var(--border);
    margin-top: 10px;
    padding-top: 16px;
    letter-spacing: -0.03em;
}
.summary-row .free { color: var(--ok); font-weight: 800; }
.hint {
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    background: var(--accent-soft);
    padding: 10px 14px;
    border-radius: 12px;
    margin-top: 12px;
    text-align: center;
}
@media (min-width: 900px) {
    .cart-layout {
        display: grid;
        grid-template-columns: 1fr 380px;
        gap: 32px;
        align-items: start;
    }
    .cart-layout .summary {
        margin-top: 0;
        position: sticky;
        top: 96px;
    }
}

/* ═══ Статусы ═══ */
.status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}
.status-new       { background: #e3f2fd; color: #1565c0; }
.status-готовится { background: #fff3e0; color: #e65100; }
.status-готов     { background: #f3e5f5; color: #6a1b9a; }
.status-в-доставке{ background: #e1bee7; color: #4a148c; }
.status-доставлен { background: #e8f5e9; color: #2e7d32; }
.status-отменён   { background: #ffebee; color: #c62828; }
.status-ожидает   { background: #fff3e0; color: #e65100; }
.status-оплачен   { background: #e8f5e9; color: #2e7d32; }
.status-возврат   { background: #ffebee; color: #c62828; }

/* ═══ Flash ═══ */
.flashes { margin: 12px 0; display: grid; gap: 8px; }
.flash {
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    animation: slideDown 0.25s ease-out;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
}
.flash-ok { background: #e8f5e9; color: #2e7d32; }
.flash-error { background: #ffebee; color: #c62828; }

/* ═══ Пустое состояние ═══ */
.empty {
    text-align: center;
    color: var(--muted);
    padding: 60px 20px;
}
.empty-icon { font-size: 64px; margin-bottom: 12px; opacity: 0.4; }
.empty p { margin: 0 0 12px; font-size: 15px; font-weight: 600; }

/* ═══ Страница товара ═══ */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-weight: 700;
    font-size: 14px;
    margin: 8px 0 16px;
}
.back-link:hover { color: var(--accent); }

.product-hero {
    position: relative;
    background: var(--card);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.product-hero img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.product-hero-placeholder {
    width: 100%; aspect-ratio: 1 / 1;
    display: flex; align-items: center; justify-content: center;
    font-size: 100px; background: var(--bg-2); opacity: 0.4;
}
.stop-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 18px;
    text-transform: uppercase; letter-spacing: 2px;
    z-index: 3;
}
.product-title {
    font-size: 26px;
    font-weight: 900;
    margin: 0 0 10px;
    line-height: 1.1;
    letter-spacing: -0.03em;
}
.product-meta {
    display: flex; flex-wrap: wrap; gap: 14px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}
.product-ingredients {
    background: var(--card);
    border-radius: 18px;
    padding: 16px 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.product-ingredients h3 {
    margin: 0 0 8px;
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
}
.product-ingredients p { margin: 0; font-size: 15px; line-height: 1.55; font-weight: 500; }

.product-buybar {
    position: fixed;
    left: 12px; right: 12px;
    bottom: calc(84px + var(--safe-bottom));
    z-index: 70;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 22px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    max-width: 1100px;
    margin: 0 auto;
}
.product-buybar .product-price {
    font-size: 22px;
    font-weight: 900;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    letter-spacing: -0.03em;
}
.product-buybar .product-price .price-old {
    font-size: 12px;
    color: var(--muted);
    text-decoration: line-through;
    font-weight: 500;
}
.product-buybar .btn { flex: 1; }
@media (min-width: 900px) {
    .product-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        align-items: start;
    }
    .product-hero { margin-bottom: 0; }
    .product-title { font-size: 36px; }
    .product-buybar {
        position: static;
        margin-top: 24px;
        box-shadow: none;
        background: var(--card);
        border: 1px solid var(--border);
    }
}

/* ═══ Кнопка «Войти через MAX» ═══ */
.btn-max {
    background: linear-gradient(135deg, #7b5cff, #a855f7);
    color: #fff;
    box-shadow: 0 6px 20px rgba(124, 92, 255, 0.35);
    font-weight: 800;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    width: 100%;
    text-decoration: none;
    letter-spacing: -0.01em;
}
.btn-max:hover { filter: brightness(1.05); transform: translateY(-1px); }

.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ═══ Заголовки ═══ */
.page-title {
    font-size: 26px;
    font-weight: 900;
    margin: 16px 0 20px;
    letter-spacing: -0.03em;
    line-height: 1.1;
}
.section-title {
    font-size: 20px;
    font-weight: 900;
    margin: 24px 0 12px;
    letter-spacing: -0.03em;
}
@media (min-width: 640px) {
    .page-title { font-size: 32px; }
    .section-title { font-size: 24px; }
}
@media (min-width: 900px) {
    .page-title { font-size: 40px; margin: 24px 0 28px; }
    .section-title { font-size: 28px; margin: 32px 0 16px; }
}

/* ═══ Кухня ═══ */
.kitchen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
@media (max-width: 640px) {
    .kitchen-grid { grid-template-columns: 1fr; }
}

/* ═══ Курьер ═══ */
.courier-card {
    background: var(--card);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 18px;
    margin-bottom: 14px;
    border-left: 6px solid var(--accent);
}
.courier-card.mine { border-left-color: #7b5cff; }
.courier-address {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-2);
    border-radius: 14px;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 15px;
}
.courier-contact { display: flex; gap: 10px; margin-bottom: 12px; }
.courier-contact .btn { flex: 1; min-height: 48px; }
.courier-actions { display: flex; gap: 10px; }
.courier-actions .btn { flex: 1; min-height: 56px; font-size: 16px; }

/* ═══ Трекинг — таймлайн ═══ */
.timeline { padding: 0 8px; margin-bottom: 24px; }
.step {
    display: flex;
    gap: 16px;
    padding: 8px 0;
    position: relative;
}
.step-icon {
    flex: 0 0 48px;
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: var(--bg);
    color: var(--muted);
    border: 2px solid var(--border);
    transition: all 0.3s;
    z-index: 2;
}
.step-body { flex: 1; padding-top: 6px; }
.step-title { font-weight: 700; font-size: 16px; }
.step-desc { color: var(--muted); font-size: 13px; margin-top: 2px; }
.step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 23px; top: 56px; bottom: -8px;
    width: 2px;
    background: var(--border);
    z-index: 1;
}
.step.done .step-icon {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.step.done:not(:last-child)::after { background: var(--accent); }
.step.active .step-icon {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    animation: pulse 1.8s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,122,0,.6); }
    50%      { box-shadow: 0 0 0 12px rgba(255,122,0,0); }
}
.step.cancelled .step-icon {
    background: var(--err);
    color: #fff;
    border-color: var(--err);
}
.step.cancelled .step-title { color: var(--err); }

.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #ff9a40);
    border-radius: 4px;
    width: 0;
    transition: width 0.8s ease;
}

/* ═══ Плашка времени (трекинг) ═══ */
.scheduled-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #fff0e5, #ffe6d0);
    border-radius: 18px;
    margin: 16px 0 8px;
    color: #7a3300;
}
.sched-icon { font-size: 32px; flex: 0 0 auto; }
.sched-title {
    font-size: 13px;
    font-weight: 700;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sched-time { font-size: 18px; font-weight: 900; letter-spacing: -0.02em; }

/* ═══ Печать ═══ */
@media print {
    .topbar, .bottombar, .no-print,
    .product-buybar, .chips, .search {
        display: none !important;
    }
    body { padding: 0; background: #fff; color: #000; }
    .container { max-width: 100%; }
    .card, .summary { box-shadow: none; border: 1px solid #ddd; }
}

/* ═══════════════════════════════════════════════════════════
   Hero с картинкой-баннером
   ═══════════════════════════════════════════════════════════ */
.hero-image {
    background-image: url('/static/img/hero-banner.png');
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    position: relative;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 24px;
    border-radius: 24px;
    margin: 8px 0 20px;
    overflow: hidden;
    color: #fff;
}
.hero-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.45) 0%,
        rgba(0, 0, 0, 0.15) 50%,
        transparent 75%
    );
    border-radius: inherit;
    pointer-events: none;
    z-index: 1;
}
.hero-image h1 {
    position: relative;
    z-index: 2;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    font-size: 32px;
    font-weight: 900;
    line-height: 1.1;
    margin: 0 0 8px;
    letter-spacing: -0.03em;
    max-width: 65%;
}
.hero-image p {
    position: relative;
    z-index: 2;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    opacity: 0.95;
    max-width: 65%;
}
@media (min-width: 900px) {
    .hero-image {
        min-height: 380px;
        padding: 56px 48px;
    }
    .hero-image h1 { font-size: 52px; }
    .hero-image p { font-size: 20px; }
}
@media (max-width: 640px) {
    .hero-image {
        min-height: 220px;
        padding: 28px 20px;
    }
    .hero-image h1 { font-size: 24px; max-width: 85%; }
    .hero-image p { font-size: 14px; max-width: 85%; }
}

/* ═══════════════════════════════════════════════
   Hero с картинкой-баннером
   ═══════════════════════════════════════════════ */
.hero.hero-image {
    background-image: url('/static/img/hero-banner.png') !important;
    background-size: cover !important;
    background-position: center right !important;
    background-repeat: no-repeat !important;
    min-height: 280px !important;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 32px !important;
    color: #fff;
    overflow: hidden;
}
.hero.hero-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.55) 0%,
        rgba(0, 0, 0, 0.25) 45%,
        transparent 70%
    );
    border-radius: inherit;
    pointer-events: none;
    z-index: 1;
}
.hero.hero-image::after {
    display: none !important;
}
.hero.hero-image h1,
.hero.hero-image p {
    position: relative;
    z-index: 2;
    color: #fff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    max-width: 60%;
}
.hero.hero-image h1 {
    font-size: 42px;
    font-weight: 900;
    line-height: 1.05;
    margin: 0 0 10px;
    letter-spacing: -0.03em;
}
.hero.hero-image p {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    opacity: 0.95;
}
@media (min-width: 900px) {
    .hero.hero-image { min-height: 380px !important; padding: 56px 48px !important; }
    .hero.hero-image h1 { font-size: 56px; }
    .hero.hero-image p { font-size: 20px; }
}
@media (max-width: 640px) {
    .hero.hero-image { min-height: 220px !important; padding: 28px 20px !important; }
    .hero.hero-image h1 { font-size: 24px; max-width: 80%; }
    .hero.hero-image p { font-size: 14px; max-width: 80%; }
}

/* ═══════════════════════════════════════════════════════════
   Пустые состояния — рыбки без подложек
   ═══════════════════════════════════════════════════════════ */
.empty {
    background: transparent !important;
    padding: 40px 20px !important;
    text-align: center;
}
.empty img {
    display: block;
    margin: 0 auto 20px !important;
    max-width: 260px;
    width: 100%;
    height: auto;
    /* Убираем любые подложки, если остались */
    background: transparent !important;
}
.empty p {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px;
}

/* Пустые состояния — рыбки без подложек */
.empty {
    background: transparent !important;
    text-align: center;
    padding: 32px 20px !important;
}
.empty img {
    display: block !important;
    margin: 0 auto 20px !important;
    max-width: 260px !important;
    width: 100% !important;
    height: auto !important;
    background: transparent !important;
}
.empty p {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px;
}

/* ═══════════════════════════════════════════════════════════
   Пустые состояния — полностью убираем подложки
   ═══════════════════════════════════════════════════════════ */
.empty {
    background: transparent !important;
    text-align: center;
    padding: 40px 20px !important;
}
.empty img {
    display: block !important;
    margin: 0 auto 24px !important;
    max-width: 240px !important;
    width: 100% !important;
    height: auto !important;
    background: transparent !important;
    /* Ключевой момент: светлый фон сливается с белым */
    
}
.empty p {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px;
}
