/* ============================================
   KOMORI SUSHI BAR - ПОЛНАЯ ПЕРЕСБОРКА
   Дизайн на основе референсов
   ============================================ */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

:root {
    --header-height: 70px;
    --color-black: #000000;
    --color-dark: #0a0a0a;
    --color-gray: #1a1a1a;
    --color-gray-light: #2a2a2a;
    --color-white: #ffffff;
    --color-red: #DC143C;
    --color-red-dark: #B22222;
    --color-text: #ffffff;
    --color-text-secondary: #cccccc;
    /* Карточки меню/ТОП: светлый фон (без изображения для производительности) */
    --menu-card-bg-solid: #f7f7f8;
    --menu-card-text: #101014;
    --menu-card-text-secondary: #4b4b56;
}

html {
    scroll-padding-top: var(--header-height);
}

section[id] {
    scroll-margin-top: var(--header-height);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--color-black);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

* {
    box-sizing: border-box;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(6px);
    z-index: 1000;
    border-bottom: 1px solid rgba(220, 20, 60, 0.3);
}

/* На мобильных blur часто даёт заметные лаги при скролле */
@media (max-width: 768px) {
    .header {
        backdrop-filter: none;
    }
}

.header-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--color-red);
    transition: all 0.3s;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-bat {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-bat img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.logo-bat svg {
    width: 100%;
    height: 100%;
}

.logo-text h1 {
    font-size: 2rem;
    font-weight: bold;
    color: var(--color-white);
    letter-spacing: 2px;
    margin: 0;
}

.logo-text p {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    letter-spacing: 3px;
    margin: 0;
    text-transform: uppercase;
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-red);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 769px) {
    .header-actions {
        gap: 1rem;
    }
}

/* Мои заказы: в шапке — иконка на мобильных, текст на ПК */
.order-history-header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: transparent;
    border: none;
    color: var(--color-white);
    cursor: pointer;
    padding: 8px;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.order-history-header-btn:hover,
.order-history-header-btn:focus-visible {
    color: var(--color-red);
}

.order-history-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.order-history-header-icon svg {
    display: block;
}

.order-history-header-label {
    display: none;
}

@media (min-width: 769px) {
    .order-history-header-icon {
        display: none;
    }
    .order-history-header-label {
        display: inline;
    }
    .order-history-header-btn {
        padding: 8px 4px;
    }
}

@media (min-width: 769px) and (max-width: 1100px) {
    .order-history-header-label {
        font-size: 0.72rem;
        letter-spacing: 0.04em;
    }
}

.cart-btn {
    position: relative;
    background: transparent;
    border: none;
    color: var(--color-white);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--color-red);
    color: var(--color-white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.cart-count.show {
    display: flex;
}

/* Mobile Nav */
.mobile-nav {
    display: none;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.98);
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    z-index: 999;
    padding: 2rem;
    border-top: 1px solid rgba(220, 20, 60, 0.3);
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav-link {
    color: var(--color-text);
    text-decoration: none;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mobile-nav-link:hover {
    color: var(--color-red);
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 120px 1fr 120px;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: 70px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Исключение для секции топ заказов */
.main-content #topOrders {
    overflow-x: visible !important;
}

/* Sidebars */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 10px;
    background: var(--color-dark);
}

.sidebar-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.08), rgba(0, 0, 0, 0.9));
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    border: 1px solid rgba(220, 20, 60, 0.2);
}

/* Center Content */
.center-content {
    background: var(--color-black);
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Исключение для секции топ заказов */
.center-content #topOrders {
    overflow-x: visible !important;
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 4rem 2rem;
    overflow: hidden;
}

.hero-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.1), rgba(0, 0, 0, 0.9));
}

.hero-content {
    max-width: 800px;
    z-index: 2;
    position: relative;
}

.hero-title {
    font-size: clamp(2.4rem, 4vw, 4rem);
    font-weight: bold;
    color: var(--color-white);
    margin-bottom: 1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.2vw, 1.5rem);
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.btn-large {
    padding: 0.9rem 2.4rem;
    font-size: 1rem;
}

.hero-cta-note {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.hero-carousel {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 3rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-dot.active {
    background: var(--color-red);
}

/* Sections */
section {
    padding: 4rem 2rem;
}

/* Thematic Menus Section */
.thematic-menus-section {
    background: var(--color-dark);
    padding: 4rem 2rem;
}

.thematic-menu-description {
    text-align: center;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 3rem;
    font-weight: bold;
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--color-red);
    color: var(--color-red);
    padding: 10px 20px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.filter-btn:hover {
    background: var(--color-red);
    color: var(--color-white);
}

/* Category Filters */
.category-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.category-filter {
    padding: 10px 24px;
    background: var(--color-gray);
    color: var(--color-text);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    pointer-events: auto !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    position: relative;
    z-index: 10;
}

.category-filter:hover {
    background: var(--color-gray-light);
}

.category-filter.active {
    background: var(--color-red);
    color: var(--color-white);
}

/* Sort Filters */
.sort-filters {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    justify-content: flex-end;
    margin-bottom: 2rem;
    margin-top: 1rem;
    gap: 1rem;
    align-items: center;
    width: 100%;
}

.sort-label {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.sort-select {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: 10px 20px;
    background: var(--color-gray);
    color: var(--color-text);
    border: 1px solid var(--color-gray-light);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    min-width: 200px;
    max-width: 300px;
    width: auto;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23DC143C' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.sort-select:hover {
    border-color: var(--color-red);
    background-color: var(--color-gray-light);
}

.sort-select:focus {
    outline: none;
    border-color: var(--color-red);
    box-shadow: 0 0 0 2px rgba(220, 20, 60, 0.2);
}

.sort-select option {
    background: var(--color-gray);
    color: var(--color-text);
    padding: 10px;
}

/* Responsive Sort Filters */
@media (max-width: 768px) {
    .sort-filters {
        justify-content: flex-start;
        margin-bottom: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .sort-label {
        font-size: 0.85rem;
    }
    
    .sort-select {
        min-width: 100%;
        max-width: 100%;
        font-size: 0.85rem;
        padding: 8px 35px 8px 15px;
    }
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background-color: var(--menu-card-bg-solid);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    position: relative;
    /* Предотвращаем изменение размера карточки */
    min-height: 0;
    /* Скролл-производительность */
    content-visibility: auto;
    contain-intrinsic-size: 260px 340px;
    contain: layout paint style;
    isolation: isolate;
}

.product-card::before {
    content: none;
}

.product-card > * {
    position: relative;
    z-index: 1;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-red);
}

.product-image {
    width: 100%;
    height: 150px;
    min-height: 150px;
    max-height: 150px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.05);
    padding: 10px;
    display: block;
    /* Предотвращаем изменение размера при загрузке */
    flex-shrink: 0;
    box-sizing: border-box;
    /* Предотвращаем мигание при загрузке */
    opacity: 1;
    transition: opacity 0.2s ease;
}

.product-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.product-name {
    font-size: 1.2rem;
    color: var(--menu-card-text);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.product-description {
    font-size: 0.9rem;
    color: var(--menu-card-text-secondary);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.product-price {
    font-size: 1.5rem;
    color: var(--color-red);
    font-weight: bold;
}

.product-price-old {
    font-size: 1rem;
    color: var(--menu-card-text-secondary);
    text-decoration: line-through;
    margin-right: 0.5rem;
}

.add-to-cart-btn {
    background: var(--color-red);
    color: var(--color-white);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.3s;
    white-space: nowrap;
}

.add-to-cart-btn:hover {
    background: var(--color-red-dark);
}

/* Specialty Section */
.specialty-section {
    background: var(--color-dark);
    padding: 4rem 2rem;
    overflow: hidden;
}

#topOrders {
    overflow: visible !important;
    padding: 4rem 2rem;
    position: relative;
}

#topOrders.specialty-section {
    overflow: visible !important;
}

.specialty-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

/* Для контейнера с каруселью ТОП заказов убираем grid */
#topOrdersContent {
    display: block;
    grid-template-columns: none;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    overflow: visible !important;
}


/* Top Orders Carousel */
.top-orders-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.top-orders-cards {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
}

.top-order-card {
    background-color: var(--menu-card-bg-solid);
    border-radius: 8px;
    padding: 0.85rem;
    border: 1px solid rgba(220, 20, 60, 0.2);
    transition: transform 0.3s, border-color 0.3s;
    flex-shrink: 0;
    display: flex;
    box-sizing: border-box;
    position: relative;
    /* Скролл-производительность */
    content-visibility: auto;
    contain-intrinsic-size: 200px 260px;
    contain: layout paint style;
    isolation: isolate;
}

.top-order-card::before {
    content: none;
}

.top-order-card > * {
    position: relative;
    z-index: 1;
}

.top-order-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.top-order-main {
    flex: 1;
}

.top-order-title {
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
    color: var(--menu-card-text);
    font-weight: 600;
}

.top-order-desc {
    font-size: 0.8rem;
    color: var(--menu-card-text-secondary);
    margin-bottom: 0.4rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.top-order-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.top-order-price-block {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.top-order-price-old {
    font-size: 0.75rem;
    color: var(--menu-card-text-secondary);
    text-decoration: line-through;
}

.top-order-price-main {
    font-size: 1rem;
    color: var(--color-red);
    font-weight: 600;
}

.top-order-weight {
    font-size: 0.75rem;
    color: var(--menu-card-text-secondary);
}

.top-order-button {
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
    white-space: nowrap;
    width: 100%;
    text-align: center;
}

@media (min-width: 769px) {
    .top-orders-carousel {
        padding: 0;
    }
    
    .top-orders-cards {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .top-order-card {
        flex: 0 0 calc(33.333% - 1rem);
        min-width: calc(33.333% - 1rem);
        max-width: calc(33.333% - 1rem);
    }
}

.top-order-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-red);
}

.top-order-image {
    width: 100%;
    height: 150px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 0.6rem;
}

/* Десктопные карточки ТОП заказов (похожие на меню) */
@media (min-width: 769px) {
    .top-order-card {
        display: flex;
        flex-direction: column;
        padding: 1rem;
    }

    .top-order-image-desktop {
        width: 100%;
        height: 150px;
        background-size: cover;
        background-position: center;
        border-radius: 8px;
        margin-bottom: 0.75rem;
    }

    .top-order-info-desktop {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .top-order-title-desktop {
        font-size: 1.05rem;
        color: var(--color-white);
        margin-bottom: 0.4rem;
    }

    .top-order-desc-desktop {
        font-size: 0.9rem;
        color: var(--color-text-secondary);
        margin-bottom: 0.75rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .top-order-footer-desktop {
        margin-top: auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
    }

    .top-order-price {
        font-size: 1rem;
        color: var(--color-red);
        font-weight: 600;
    }
}

.top-orders-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.top-orders-indicators:empty {
    display: none;
}

.top-orders-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background 0.3s;
}

.top-orders-dot.active {
    background: var(--color-red);
}

@media (max-width: 768px) {
    .top-orders-strip {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 0;
        padding-bottom: 0.25rem;
    }

.top-orders-strip::after {
    content: 'Свайпните →';
    position: absolute;
    right: 10px;
    bottom: -1.6rem;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    opacity: 0.9;
}

    .top-orders-page {
        flex: 0 0 100%;
        min-width: 100%;
        max-width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
        gap: 0.6rem;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        padding: 0 0.25rem;
        box-sizing: border-box;
    }

    .top-order-card {
        min-width: 0;
        max-width: 100%;
    }
    
    .specialty-content {
        grid-template-columns: 1fr;
    }
    
    /* Разрешаем и вертикальный скролл страницы, и горизонтальный свайп карусели */
    .top-orders-carousel {
        touch-action: pan-x pan-y;
        overflow: visible;
        padding: 0;
        width: 100%;
    }
    
    .top-orders-strip {
        touch-action: pan-x pan-y;
        user-select: none;
        -webkit-user-select: none;
    }

    .top-orders-strip::-webkit-scrollbar {
        height: 0;
    }
    
    #topOrders {
        overflow: visible !important;
    }
    
    #topOrdersContent {
        overflow: visible !important;
    }
    
    #topOrders {
        overflow-x: visible !important;
    }
    
    #topOrdersContent {
        overflow-x: visible !important;
    }
}

.specialty-image {
    width: 100%;
    height: 400px;
    background: var(--color-gray);
    background-size: cover;
    background-position: center;
    border-radius: 8px;
}

.specialty-text h3 {
    font-size: 2.5rem;
    color: var(--color-white);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.specialty-text p {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* About Section */
.about-section {
    padding: 4rem 2rem;
    background: var(--color-dark);
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
}

.about-text {
    background: var(--color-gray);
    padding: 3rem;
    border-radius: 8px;
    border: 1px solid rgba(220, 20, 60, 0.2);
}

.about-text h3 {
    font-size: 2rem;
    color: var(--color-red);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* Delivery Section */
.delivery-section {
    padding: 4rem 2rem;
    background: var(--color-dark);
}

.delivery-content {
    max-width: 1200px;
    margin: 0 auto;
}

.pickup-section {
    margin-top: 3rem;
}

.pickup-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-white);
}

.pickup-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}


.pickup-card {
    background: var(--color-gray);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid rgba(220, 20, 60, 0.25);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pickup-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-white);
}

.pickup-address {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

.pickup-meta {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.pickup-meta a {
    color: var(--color-red);
    text-decoration: none;
}

.pickup-meta a:hover {
    text-decoration: underline;
}

.delivery-summary {
    text-align: center;
    margin-bottom: 2rem;
}

.delivery-info-text {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.delivery-info-text:last-of-type {
    margin-bottom: 2rem;
}

#toggleDeliveryTable {
    background: transparent;
    border: 2px solid var(--color-red);
    color: var(--color-red);
    padding: 0.75rem 2rem;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#toggleDeliveryTable:hover {
    background: var(--color-red);
    color: var(--color-white);
}

#toggleDeliveryTable.expanded {
    background: var(--color-red);
    color: var(--color-white);
}

.toggle-icon {
    transition: transform 0.3s ease;
    font-size: 0.9rem;
}

.delivery-table-container {
    margin-top: 2rem;
    animation: slideDown 0.3s ease;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.delivery-table {
    width: 100%;
    max-width: 100%;
    table-layout: auto;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.delivery-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-gray);
    border-radius: 8px;
    overflow: hidden;
}

.delivery-table thead {
    background: var(--color-red);
}

.delivery-table th {
    padding: 1rem;
    text-align: left;
    color: var(--color-white);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    white-space: normal;
    word-break: break-word;
}

.delivery-table th .mobile-break {
    display: none;
}

.delivery-table th .desktop-text {
    display: inline;
}

.delivery-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-secondary);
    line-height: 1.6;
    vertical-align: top;
}

.delivery-table tbody tr:last-child td {
    border-bottom: none;
}

.delivery-table tbody tr:hover {
    background: rgba(220, 20, 60, 0.1);
}

.delivery-table td strong {
    color: var(--color-white);
}

@media (max-width: 768px) {
    .delivery-table th .mobile-break {
        display: inline;
    }
    
    .delivery-table th .desktop-text {
        display: none;
    }
    
    .delivery-section {
        padding: 2rem 0.5rem;
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }
    
    .delivery-content {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
        padding: 0;
    }
    
    .delivery-summary {
        padding: 0 0.5rem;
        width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
        margin-bottom: 1.5rem;
    }

    .pickup-section {
        padding: 0 0.5rem;
        margin-top: 2rem;
    }

    .pickup-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .pickup-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .pickup-card {
        padding: 1rem;
    }
    
    .delivery-info-text {
        font-size: 0.95rem;
        word-wrap: break-word;
        padding: 0;
        margin-bottom: 0.75rem;
    }
    
    #toggleDeliveryTable {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        width: calc(100% - 1rem);
        margin: 0 0.5rem;
        justify-content: center;
    }
    
    .delivery-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0 0.5rem;
        box-sizing: border-box;
    }
    
    .delivery-table {
        font-size: 0.75rem;
        width: 100%;
        min-width: auto;
        max-width: 100%;
        table-layout: auto;
    }
    
    .delivery-table th,
    .delivery-table td {
        padding: 0.6rem 0.4rem;
        font-size: 0.7rem;
        line-height: 1.4;
        vertical-align: top;
    }
    
    .delivery-table tbody tr {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .delivery-table tbody tr:last-child {
        border-bottom: none;
    }
    
    .delivery-table th:first-child,
    .delivery-table td:first-child {
        display: none;
    }
    
    .delivery-table th:nth-child(2),
    .delivery-table td:nth-child(2),
    .delivery-table th:nth-child(3),
    .delivery-table td:nth-child(3),
    .delivery-table th:nth-child(4),
    .delivery-table td:nth-child(4),
    .delivery-table th:nth-child(5),
    .delivery-table td:nth-child(5) {
        white-space: normal;
        word-break: break-word;
    }
    
    .delivery-table th:nth-child(2),
    .delivery-table td:nth-child(2) {
        min-width: 90px;
        max-width: 120px;
        line-height: 1.4;
    }
    
    .delivery-table th:nth-child(3),
    .delivery-table td:nth-child(3) {
        min-width: 60px;
        max-width: 75px;
        font-weight: 600;
    }
    
    .delivery-table th:nth-child(4),
    .delivery-table td:nth-child(4) {
        min-width: 100px;
        max-width: 130px;
        font-size: 0.65rem;
        line-height: 1.3;
    }
    
    .delivery-table th:nth-child(5),
    .delivery-table td:nth-child(5) {
        min-width: 80px;
        max-width: 100px;
        font-weight: 600;
        color: var(--color-red);
        line-height: 1.3;
    }
    
    .delivery-table th:nth-child(5) {
        font-size: 0.7rem;
        padding: 0.6rem 0.3rem;
        white-space: normal;
        word-break: break-word;
        display: table-cell !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: auto !important;
        min-width: 80px !important;
    }
}

@media (max-width: 480px) {
    .delivery-section {
        padding: 1.5rem 0.25rem;
    }
    
    .delivery-summary {
        padding: 0 0.25rem;
    }
    
    .delivery-info-text {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    #toggleDeliveryTable {
        padding: 0.5rem;
        font-size: 0.8rem;
        width: calc(100% - 0.5rem);
        margin: 0 0.25rem;
    }
    
    .delivery-table-container {
        padding: 0 0.25rem;
    }
    
    .delivery-table {
        font-size: 0.7rem;
        table-layout: auto;
    }
    
    .delivery-table th,
    .delivery-table td {
        padding: 0.55rem 0.3rem;
        font-size: 0.65rem;
        line-height: 1.4;
        vertical-align: top;
    }
    
    .delivery-table tbody tr {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    
    .delivery-table tbody tr:last-child {
        border-bottom: none;
    }
    
    .delivery-table th:nth-child(4),
    .delivery-table td:nth-child(4) {
        white-space: normal;
        line-height: 1.5;
    }
    
    .delivery-table th:nth-child(2),
    .delivery-table td:nth-child(2),
    .delivery-table th:nth-child(3),
    .delivery-table td:nth-child(3),
    .delivery-table th:nth-child(4),
    .delivery-table td:nth-child(4),
    .delivery-table th:nth-child(5),
    .delivery-table td:nth-child(5) {
        white-space: normal;
        word-break: break-word;
    }
    
    .delivery-table th:nth-child(2),
    .delivery-table td:nth-child(2) {
        min-width: 80px;
        max-width: 110px;
        line-height: 1.4;
    }
    
    .delivery-table th:nth-child(3),
    .delivery-table td:nth-child(3) {
        min-width: 55px;
        max-width: 70px;
        line-height: 1.3;
    }
    
    .delivery-table th:nth-child(4),
    .delivery-table td:nth-child(4) {
        min-width: 90px;
        max-width: 120px;
        font-size: 0.6rem;
        line-height: 1.3;
    }
    
    .delivery-table th:nth-child(5),
    .delivery-table td:nth-child(5) {
        min-width: 70px;
        max-width: 90px;
        line-height: 1.3;
    }
    
    .delivery-table th:nth-child(5) {
        font-size: 0.65rem;
        padding: 0.55rem 0.25rem;
        white-space: normal;
        word-break: break-word;
        display: table-cell !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: auto !important;
        min-width: 70px !important;
    }
}

/* Order Section */
.order-section {
    background: var(--color-red);
    padding: 4rem 2rem;
}

.order-section .section-title {
    color: var(--color-white);
    margin-bottom: 2rem;
}

.order-form {
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-form input,
.order-form textarea {
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--color-white);
    font-size: 1rem;
    border-radius: 4px;
}

.order-form input::placeholder,
.order-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.order-form input:focus,
.order-form textarea:focus {
    outline: none;
    border-color: var(--color-white);
    background: rgba(255, 255, 255, 0.15);
}

/* Contacts Section */
.contacts-section {
    padding: 4rem 2rem;
}

.contacts-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contacts-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    color: var(--color-text-secondary);
}

.contact-icon {
    font-size: 1.5rem;
}

.contact-item a {
    color: var(--color-red);
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

.contacts-map {
    width: 100%;
    height: 400px;
    background: var(--color-gray);
    border-radius: 8px;
    min-height: 400px;
}

.contacts-map #contactsMap {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* Footer */
.footer {
    background: var(--color-dark);
    padding: 2rem;
    border-top: 1px solid rgba(220, 20, 60, 0.3);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-legal {
    max-width: 1200px;
    margin: 1rem auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    justify-content: center;
}

.footer-legal a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.footer-legal a:hover {
    color: var(--color-red);
}

/* Cookie banner */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 12000;
    padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0));
    background: rgba(10, 10, 10, 0.97);
    border-top: 1px solid rgba(220, 20, 60, 0.4);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
}

.cookie-banner[hidden] {
    display: none !important;
}

.cookie-banner-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1 1 260px;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--color-text-secondary);
}

.cookie-banner-text a {
    color: #ff6b81;
}

.cookie-banner-btn {
    flex: 0 0 auto;
    min-width: 120px;
}

.form-group-consent .consent-label {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
    line-height: 1.4;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.form-group-consent input[type="checkbox"] {
    margin-top: 0.2rem;
    width: 1.05rem;
    height: 1.05rem;
    flex-shrink: 0;
    accent-color: var(--color-red);
}

.form-group-consent a {
    color: #ff6b81;
}

.social-links {
    display: flex;
    gap: 2rem;
}

.social-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.social-link:hover {
    color: var(--color-red);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    z-index: 10001;
}

.modal-content {
    background: var(--color-gray);
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    max-height: 85dvh;
    border: 1px solid var(--color-red);
    position: relative;
    z-index: 10002;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Специальные стили для модального окна заказа */
#orderModal .modal-content {
    max-height: 80vh;
    max-height: 80dvh;
}

.modal-content.large {
    max-width: 900px;
}

/* Оплата: не обрезать содержимое iframe с виджетом Альфы */
#paymentModal .modal-content {
    overflow: visible;
    max-height: 90vh;
    max-height: 90dvh;
}

#paymentModal .modal-body {
    overflow: visible;
    min-height: 320px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid rgba(220, 20, 60, 0.3);
    flex-shrink: 0;
}

/* Компактный header для модального окна заказа */
#orderModal .modal-header {
    padding: 1.25rem 1.5rem;
}

#orderModal .modal-header h2 {
    font-size: 1.5rem;
}

.modal-header h2 {
    color: var(--color-white);
    font-size: 1.8rem;
    text-transform: uppercase;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--color-white);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--color-red);
}

.modal-body {
    padding: 1.5rem 2rem;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    max-height: calc(90vh - 200px);
    max-height: calc(90dvh - 200px);
    overscroll-behavior: contain;
}

/* Специальные стили для body модального окна заказа */
#orderModal .modal-body {
    padding: 1rem 1.5rem;
    max-height: calc(80vh - 220px);
    max-height: calc(80dvh - 220px);
    min-height: 0;
}

/* Cart */
.cart-items {
    max-height: none;
    overflow-y: visible;
    margin-bottom: 2rem;
}

/* Cart recommendations */
.cart-recommendations {
    margin-top: 1.25rem;
    padding: 1rem;
    background: rgba(220, 20, 60, 0.08);
    border: 1px solid rgba(220, 20, 60, 0.25);
    border-radius: 8px;
}

.cart-recommendations-title {
    color: var(--color-text-secondary);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.cart-recommendations-products {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cart-rec-product {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cart-rec-product img {
    width: 46px;
    height: 46px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.cart-rec-product-info {
    flex: 1;
    min-width: 0;
}

.cart-rec-product-info .name {
    color: var(--color-white);
    font-size: 0.95rem;
    font-weight: 700;
    word-break: break-word;
    line-height: 1.2;
}

.cart-rec-product-info .price {
    color: var(--color-red);
    font-weight: 700;
    margin-top: 0.25rem;
    font-size: 0.9rem;
}

.cart-rec-product button {
    white-space: nowrap;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    align-items: center;
    flex-wrap: wrap;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-info h4 {
    color: var(--color-white);
    margin-bottom: 0.5rem;
    font-size: 1rem;
    word-wrap: break-word;
}

.cart-item-info p {
    color: var(--color-red);
    font-weight: bold;
    font-size: 0.9rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.cart-item-controls button {
    background: var(--color-gray-light);
    border: none;
    color: var(--color-white);
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.cart-item-controls button:hover {
    background: var(--color-red);
}

.cart-total {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    flex-shrink: 0;
    background: var(--color-gray);
}

.promo-code-section {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.promo-code-section input {
    flex: 1;
    padding: 10px;
    background: var(--color-gray-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    border-radius: 4px;
}

.total-info {
    margin-bottom: 1.5rem;
}

.total-info p {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--color-text-secondary);
}

.order-final {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-red);
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

/* Уменьшаем отступы для полей в модальном окне заказа */
#orderModal .form-group {
    margin-bottom: 0.9rem;
}

#orderModal .form-group label {
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

#orderModal .form-group input,
#orderModal .form-group textarea,
#orderModal .form-group select {
    padding: 10px;
    font-size: 0.95rem;
}

#orderModal .form-group textarea {
    min-height: 60px;
    resize: vertical;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-white);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    background: var(--color-gray-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-red);
}

.order-footer {
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    background: var(--color-gray);
    padding: 0.75rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
    z-index: 10;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

/* Специальные стили для footer модального окна заказа */
#orderModal .order-footer {
    padding: 0.75rem 1.5rem;
    position: relative;
    flex-shrink: 0;
}

.order-summary {
    background: rgba(220, 20, 60, 0.1);
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 0.6rem;
    border: 1px solid rgba(220, 20, 60, 0.3);
}

.order-summary p {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.order-summary p:last-child {
    margin-bottom: 0;
}

.order-summary .order-final {
    font-weight: bold;
    color: var(--color-white);
    font-size: 1rem;
    margin-top: 0.3rem;
    padding-top: 0.3rem;
    border-top: 1px solid rgba(220, 20, 60, 0.3);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    background: var(--color-red);
    color: var(--color-white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s;
}

.btn:hover {
    background: var(--color-red-dark);
}

.btn-primary {
    background: var(--color-red);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
}

/* Product Details */
.product-details-images {
    margin-bottom: 2rem;
}

.product-details-images.single .product-detail-image {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 4px;
    background: var(--color-gray-light);
    padding: 10px;
}

/* Product Images Carousel */
.product-images-carousel {
    position: relative;
    margin-bottom: 2rem;
}

.product-images-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 4px;
    background: var(--color-gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Стили для изображений в карусели */
.product-images-carousel .product-detail-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.product-images-carousel .product-detail-image.active {
    opacity: 1;
}

.product-images-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.product-image-prev,
.product-image-next {
    background: var(--color-red);
    color: var(--color-white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.product-image-prev:hover,
.product-image-next:hover {
    background: var(--color-red-dark);
}

.product-images-dots {
    display: flex;
    gap: 0.5rem;
}

.product-image-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background 0.3s;
}

.product-image-dot.active {
    background: var(--color-red);
}

.product-details-info {
    color: var(--color-text-secondary);
}

.product-details-price {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: rgba(220, 20, 60, 0.1);
    border-radius: 4px;
}

.product-price-main {
    font-size: 2rem;
    font-weight: bold;
    color: var(--color-red);
}

.product-details-description {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 80px 1fr 80px;
    }
    
    .sidebar-image {
        height: 150px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        flex-shrink: 0;
        padding: 6px;
    }
    
    .nav {
        display: none;
    }

    /* Шапка: иконки корзины / «Мои заказы» не уезжают за край экрана */
    .header-container {
        padding: 0.65rem 0.35rem 0.65rem 0.5rem;
        gap: 0.35rem;
        justify-content: flex-start;
    }

    .header-actions {
        flex-shrink: 0;
        gap: 0;
        margin-left: auto;
        /* чуть левее от правого края (визуально корзина снова на экране).
           Используем left вместо transform, чтобы не было микропрыжков после закрытия модалок. */
        transform: none;
        position: relative;
        left: -6px;
        padding-right: 2px;
    }

    .header-actions .cart-btn {
        padding: 6px;
        margin-right: 0;
    }

    .header-actions .order-history-header-btn {
        padding: 6px;
    }

    .header-actions .cart-btn svg,
    .header-actions .order-history-header-svg {
        width: 22px;
        height: 22px;
    }

    .logo {
        flex: 1 1 auto;
        min-width: 0;
        gap: 0.5rem;
    }

    .logo-bat {
        width: 46px;
        height: 46px;
    }

    .logo-text h1 {
        font-size: 1.35rem;
        letter-spacing: 1px;
    }

    .logo-text p {
        font-size: 0.62rem;
        letter-spacing: 2px;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .center-content {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .sidebar {
        display: none;
    }
    
    section {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    section#topOrders {
        overflow: visible !important;
        overflow-x: visible !important;
    }
    
    #topOrders {
        overflow-x: visible !important;
        overflow: visible !important;
    }
    
    #topOrdersContent {
        overflow-x: visible !important;
        overflow: visible !important;
    }
    
    .top-orders-carousel {
        overflow-x: visible !important;
        overflow: visible !important;
    }
    
    .top-orders-cards {
        overflow-x: visible !important;
        overflow: visible !important;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .product-images-wrapper {
        height: 300px;
    }
    
    .product-details-images.single .product-detail-image {
        max-height: 300px;
    }
    
    .product-image-prev,
    .product-image-next {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .specialty-content {
        grid-template-columns: 1fr;
    }
    
    .contacts-content {
        grid-template-columns: 1fr;
    }

    /* Mobile: compact and safe layout for contact links */
    .contacts-info {
        gap: 1rem;
    }
    
    .contact-item {
        gap: 0.75rem;
        flex-wrap: wrap; /* allow icon and long text to move to next line */
    }
    
    .contact-item .contact-icon {
        font-size: 1.2rem;
        line-height: 1.3;
    }
    
    .contact-item a,
    .contact-item #contactAddress {
        min-width: 0;           /* allow flex item to shrink */
        max-width: 100%;
        word-break: break-word;
        overflow-wrap: anywhere;
        line-height: 1.35;
        font-size: 0.95rem;
    }

    .contact-item a {
        display: inline-block;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-legal {
        justify-content: center;
    }

    /* Footer social links: prevent overflow on narrow screens */
    .social-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem 1rem;
        width: 100%;
    }

    .social-link {
        font-size: 0.85rem;
        letter-spacing: 0.5px;
        line-height: 1.2;
        max-width: 100%;
        word-break: break-word;
        overflow-wrap: anywhere;
        text-align: center;
    }
    
    /* Cart mobile styles */
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .cart-item-image {
        width: 100%;
        height: 150px;
        max-width: 200px;
    }
    
    .cart-item-info {
        width: 100%;
    }
    
    .cart-item-controls {
        width: 100%;
        justify-content: flex-start;
        gap: 0.5rem;
    }
    
    .cart-item-controls button {
        flex: 0 0 auto;
        min-width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .promo-code-section {
        flex-direction: column;
    }
    
    .promo-code-section input {
        width: 100%;
    }
    
    .promo-code-section .btn-small {
        width: 100%;
    }
    
    .modal-content {
        max-width: 100%;
        margin: 10px;
        max-height: 95vh;
        max-height: 95dvh;
    }
    
    .modal-header {
        padding: 1.5rem;
        flex-shrink: 0;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .modal-body {
        padding: 1.5rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .cart-items {
        max-height: none;
        margin-bottom: 1.5rem;
    }
    
    .cart-total {
        padding-top: 1.5rem;
        padding-bottom: 1rem;
        margin-top: auto;
    }
    
    .cart-total .btn {
        margin-top: 1rem;
    }
    
    .order-footer {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .order-footer .btn {
        margin-top: 0.75rem;
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .order-summary {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .order-summary p {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    
    .modal-body {
        padding: 1rem 1.5rem;
        max-height: calc(95vh - 180px);
        max-height: calc(95dvh - 180px);
    }
    
    #orderModal .modal-body {
        padding: 0.75rem 1rem;
        max-height: calc(80vh - 200px);
        max-height: calc(80dvh - 200px);
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    #orderModal .form-group {
        margin-bottom: 0.8rem;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0.55rem 0.25rem 0.55rem 0.4rem;
        gap: 0.25rem;
    }

    .header-actions {
        transform: translateX(-8px);
    }

    .logo-bat {
        width: 42px;
        height: 42px;
    }

    .logo-text h1 {
        font-size: 1.2rem;
    }
    
    .hero {
        min-height: 60vh;
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    section {
        padding: 2rem 1rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    /* Cart extra small screens */
    .cart-item {
        padding: 0.75rem;
    }
    
    .cart-item-image {
        height: 120px;
    }
    
    .cart-item-info h4 {
        font-size: 0.9rem;
    }
    
    .cart-item-info p {
        font-size: 0.85rem;
    }
    
    .cart-item-controls {
        gap: 0.25rem;
    }
    
    .cart-item-controls button {
        min-width: 32px;
        height: 32px;
        font-size: 0.85rem;
        padding: 0 6px;
    }
    
    .modal-content {
        margin: 5px;
        max-height: 98vh;
        max-height: 98dvh;
    }
    
    .modal-header {
        padding: 1rem;
        flex-shrink: 0;
    }
    
    .modal-header h2 {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 1rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .product-images-wrapper {
        height: 250px;
    }
    
    .product-details-images.single .product-detail-image {
        max-height: 250px;
    }
    
    .product-image-prev,
    .product-image-next {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .cart-items {
        max-height: none;
        margin-bottom: 1rem;
    }
    
    .cart-total {
        padding: 1rem;
        flex-shrink: 0;
    }
    
    .cart-total .btn {
        margin-top: 0.75rem;
        padding: 12px;
        font-size: 1rem;
    }
    
    .order-footer {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .order-footer .btn {
        margin-top: 0.5rem;
        padding: 0.7rem;
        font-size: 0.85rem;
    }
    
    .order-summary {
        padding: 0.6rem;
        margin-bottom: 0.4rem;
    }
    
    .order-summary p {
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
    }
    
    .modal-body {
        padding: 0.75rem 1rem;
        max-height: calc(98vh - 160px);
        max-height: calc(98dvh - 160px);
    }
    
    #orderModal .modal-body {
        padding: 0.6rem 0.75rem;
        max-height: calc(80vh - 180px);
        max-height: calc(80dvh - 180px);
    }
    
    .form-group {
        margin-bottom: 0.9rem;
    }
    
    #orderModal .form-group {
        margin-bottom: 0.7rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    #orderModal .form-group input,
    #orderModal .form-group textarea,
    #orderModal .form-group select {
        padding: 8px;
        font-size: 0.9rem;
    }
    
    #orderModal .form-group textarea {
        min-height: 50px;
    }
    
    .order-summary p {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    
    .total-info {
        margin-bottom: 1rem;
    }
    
    .promo-code-section {
        margin-bottom: 1rem;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .btn-small {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* --- История заказов (клиент) ---
   Светлая «плашка» + тёмный текст: иначе от body наследуется белый текст на светлом фоне карточек */
.order-history-section {
    padding: 2rem 1.25rem 2.5rem;
    max-width: 720px;
    margin: 1.5rem auto 2.5rem;
    border-radius: 16px;
    background: var(--menu-card-bg-solid, #f7f7f8);
    color: var(--menu-card-text, #101014);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.order-history-section .section-title {
    color: var(--menu-card-text, #101014);
}

/* История заказов в модальном окне */
#orderHistoryModal .modal-content.order-history-modal-shell {
    max-width: 560px;
    max-height: 92vh;
    max-height: 92dvh;
}

#orderHistoryModal .modal-header {
    padding: 1.25rem 1.5rem;
}

#orderHistoryModal .modal-header h2 {
    font-size: 1.35rem;
    text-transform: none;
    letter-spacing: 0.02em;
}

#orderHistoryModal .modal-body.order-history-modal-body {
    padding: 1.15rem 1.25rem 1.5rem;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(92vh - 5.5rem);
    max-height: calc(92dvh - 5.5rem);
    background: var(--menu-card-bg-solid, #f7f7f8);
    color: var(--menu-card-text, #101014);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.order-history-section.order-history-in-modal {
    margin: 0;
    padding: 0;
    max-width: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    color: inherit;
}

.order-history-in-modal .order-history-hint {
    margin-top: 0;
}

.order-history-hint {
    color: var(--menu-card-text-secondary, #4b4b56);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 1rem;
}

.order-history-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.order-history-danger {
    background: #d11a46 !important;
    color: #ffffff !important;
    border: 1px solid #d11a46 !important;
    font-weight: 700;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.order-history-danger:hover,
.order-history-danger:focus-visible {
    background: #b8133d !important;
    border-color: #b8133d !important;
    color: #ffffff !important;
}

.order-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.order-history-empty {
    color: var(--menu-card-text-secondary, #4b4b56);
    margin: 0;
}

.order-history-card {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    background: #ffffff;
    color: var(--menu-card-text, #101014);
    overflow: hidden;
    text-align: left;
}

.order-history-card-toggle {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.25rem 0.75rem;
    padding: 1rem 1rem 1rem 1.25rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: left;
    color: var(--menu-card-text, #101014);
    align-items: start;
}

.order-history-card-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.order-history-card-meta {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--menu-card-text-secondary, #4b4b56);
}

.oh-num {
    font-weight: 700;
    font-size: 1rem;
}

.oh-sum {
    font-weight: 600;
    color: var(--color-primary, #c9a227);
}

.oh-chevron {
    grid-row: 1 / span 2;
    align-self: center;
    opacity: 0.45;
    font-size: 0.8rem;
    color: var(--menu-card-text-secondary, #4b4b56);
}

.oh-status {
    font-size: 0.85rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
}

.oh-status-pending { background: rgba(200, 160, 60, 0.15); }
.oh-status-confirmed { background: rgba(60, 120, 200, 0.12); }
.oh-status-preparing { background: rgba(100, 80, 180, 0.12); }
.oh-status-ready { background: rgba(40, 160, 120, 0.15); }
.oh-status-delivered { background: rgba(40, 140, 60, 0.15); }
.oh-status-cancelled { background: rgba(180, 60, 60, 0.12); }

.order-history-card-body {
    padding: 0 1.25rem 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.95rem;
    color: var(--menu-card-text, #101014);
}

.order-history-card-body[hidden] {
    display: none !important;
}

.oh-line {
    margin: 0.35rem 0;
    line-height: 1.45;
}

.order-history-items-head {
    font-weight: 600;
    margin: 0.75rem 0 0.35rem;
}

.order-history-items {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.order-history-item-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.25rem 0.75rem;
    padding: 0.35rem 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}

.order-history-item-row:last-child {
    border-bottom: none;
}

.order-history-cancel-notice {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(200, 160, 60, 0.15);
    border: 1px solid rgba(200, 160, 60, 0.35);
    font-size: 0.95rem;
    line-height: 1.4;
}

.order-history-cancel-actions {
    margin-top: 1rem;
}

.order-history-cancel-hint {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    line-height: 1.35;
}

.order-history-cancel-btn {
    margin-top: 0.25rem;
}

.order-history-item-options {
    width: 100%;
    font-size: 0.85rem;
    color: var(--menu-card-text-secondary, #4b4b56);
}

.order-lookup-box {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.85);
    color: var(--menu-card-text, #101014);
}

.order-lookup-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    color: var(--menu-card-text, #101014);
}

.order-lookup-note {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: var(--menu-card-text-secondary, #4b4b56);
    line-height: 1.45;
}

.order-lookup-fields {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.order-lookup-fields input {
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    font: inherit;
    background: #fff;
    color: var(--menu-card-text, #101014);
}

.order-lookup-fields input::placeholder {
    color: #888;
}

.order-lookup-error {
    color: #b33;
    font-size: 0.9rem;
    margin: 0.75rem 0 0;
}

@media (min-width: 560px) {
    .order-lookup-fields {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
    .order-lookup-fields input {
        flex: 1 1 200px;
        min-width: 160px;
    }
    .order-lookup-fields .btn {
        flex: 0 0 auto;
    }
}

/* Подсказка под полем формы */
.form-hint {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin: 0 0 0.5rem;
    line-height: 1.35;
}

/* Скрытое поле-ловушка для ботов (доступно для скринридеров при необходимости — не display:none) */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Body scroll lock when modal open */
html.modal-open {
    overflow: hidden;
}

body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}
