/* Основные стили для body */
body {
    font-family: 'Inter', sans-serif;
    color: #3E3E3E; /* Темно-серый текст для лучшей читаемости */
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

body.show-cart .menu-items-container,
body.show-cart .categories-bar,
body.show-cart .navbar {
    opacity: 0.3; /* Затенить основную часть сайта при отображении корзины */
    pointer-events: none; /* Отключить взаимодействие с основной частью сайта */
}



/* Стили для header */
/* ========== СОВРЕМЕННАЯ ПРОФЕССИОНАЛЬНАЯ NAVBAR ========== */

/* Основные стили навигационной панели */
header.navbar {
    position: sticky;
    top: 0;
    z-index: 1050;
    height: 64px;
    padding: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Эффект при скролле */
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

/* Левый блок с кнопкой кассы */
.navbar .left-section {
    display: flex;
    align-items: center;
    padding-left: 24px;
    flex: 1;
}

/* Контейнер для кнопки кассира */
.cashier-btn-wrapper {
    display: flex;
    align-items: center;
}



/* ========== ИКОНКА КАССЫ ========== */

/* Стили для иконки кассы */
.cashier-icon-btn {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(226, 232, 240, 0.6);
    padding: 0;
    margin: 0;
}

.cashier-icon-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: rgba(203, 213, 225, 0.8);
}

.cashier-icon-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.cashier-icon-btn svg {
    width: 22px;
    height: 22px;
    color: #475569;
    transition: color 0.2s ease;
}

.cashier-icon-btn:hover svg {
    color: #1e293b;
}

/* Мобильная версия иконки кассы */
.cashier-btn-mobile {
    display: none !important;
}

/* Адаптация для планшетов */
@media (max-width: 1024px) {
    .cashier-icon-btn {
        width: 40px;
        height: 40px;
    }

    .cashier-icon-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .cashier-icon-btn {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .cashier-icon-btn svg {
        width: 18px;
        height: 18px;
    }

    /* Показываем мобильную иконку кассы */
    .cashier-btn-mobile {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    /* Скрываем десктопную иконку кассы */
    .cashier-btn-wrapper {
        display: none;
    }
}

/* Адаптация для маленьких мобильных */
@media (max-width: 480px) {
    .cashier-icon-btn {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .cashier-icon-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Поддержка темной темы */
@media (prefers-color-scheme: dark) {
    .cashier-icon-btn {
        background: rgba(30, 41, 59, 0.8);
        border-color: rgba(51, 65, 85, 0.6);
    }

    .cashier-icon-btn:hover {
        background: rgba(51, 65, 85, 0.9);
        border-color: rgba(71, 85, 105, 0.8);
    }

    .cashier-icon-btn svg {
        color: #cbd5e1;
    }

    .cashier-icon-btn:hover svg {
        color: #f8fafc;
    }
}

/* Фокус состояние для доступности */
.cashier-icon-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Логотип по центру */
.navbar .logo {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    text-align: center;
    flex: 1;
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
    position: relative;
    padding: 0 16px;
}

.navbar .logo::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.navbar .logo:hover::after {
    opacity: 1;
}

/* Правый блок с иконками */
.navbar .right-section {
    display: flex;
    align-items: center;
    padding-right: 24px;
    flex: 1;
    justify-content: flex-end;
    gap: 20px;
}

/* Контейнер для иконок действий */
.cart, #profile-icon {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.cart:hover, #profile-icon:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: rgba(203, 213, 225, 0.8);
}

.cart:active, #profile-icon:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Стили иконок */
.cart svg, #profile-icon svg {
    width: 22px;
    height: 22px;
    color: #475569;
    transition: color 0.2s ease;
}

.cart:hover svg, #profile-icon:hover svg {
    color: #1e293b;
}

/* Счетчик корзины */
#cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
    z-index: 1;
}

/* Стили для кнопки новых заказов кассира */
.cashier-orders-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-right: 0;
    width: 44px;
    height: 44px;
}

.cashier-orders-btn:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

.cashier-orders-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.cashier-orders-btn svg {
    width: 20px;
    height: 20px;
    color: #475569;
    transition: color 0.2s ease;
}

.cashier-orders-btn:hover svg {
    color: #1e293b;
}

/* Бейдж счетчика заказов */
.cashier-orders-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    padding: 0 6px;
    animation: pulse 2s infinite;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
    z-index: 1;
    border: 1.5px solid white;
}

/* Индикатор активных заказов клиента */
.client-orders-indicator {
    position: absolute;
    top: -3px;
    right: -3px;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border-radius: 50%;
    min-width: 10px;
    height: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    animation: subtle-pulse 2s infinite;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
    border: 1.5px solid white;
}

/* Утонченная анимация пульсации */
@keyframes subtle-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.2);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 4px rgba(220, 38, 38, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

/* Адаптация для планшетов (768px - 1024px) */
@media (max-width: 1024px) {
    .navbar {
        height: 60px;
        padding: 0 16px;
    }

    .navbar .logo {
        font-size: 18px;
        max-width: 250px;
    }

    .cart, #profile-icon, .cashier-orders-btn {
        width: 40px;
        height: 40px;
    }

    .btn-back.cashier-btn {
        padding: 7px 18px;
        font-size: 13px;
    }
}

/* Адаптация для мобильных устройств (до 768px) */
@media (max-width: 768px) {
    header.navbar {
        height: 56px;
        padding: 0 16px;
        gap: 12px;
    }

    /* Скрываем десктопную кнопку кассы */
    .cashier-btn-wrapper {
        display: none;
    }

    /* Показываем мобильную кнопку кассы */
    .cashier-btn-mobile {
        display: flex !important;
        align-items: center;
        gap: 6px;
        min-height: 32px;
        padding: 6px 8px;
        font-size: 13px;
    }

    /* Обновляем логотип */
    .navbar .logo {
        font-size: 16px;
        max-width: 200px;
        padding: 0 8px;
    }

    /* Обновляем правую секцию */
    .navbar .right-section {
        gap: 12px;
        padding-right: 0;
    }

    /* Компактные иконки */
    .cart, #profile-icon, .cashier-orders-btn {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .cart svg, #profile-icon svg, .cashier-orders-btn svg {
        width: 18px;
        height: 18px;
    }

    /* Обновляем счетчики */
    #cart-count {
        min-width: 18px;
        height: 18px;
        font-size: 10px;
        top: -3px;
        right: -3px;
    }

    .cashier-orders-badge {
        min-width: 18px;
        height: 18px;
        font-size: 10px;
        top: -5px;
        right: -5px;
    }

    .client-orders-indicator {
        min-width: 8px;
        height: 8px;
        top: -2px;
        right: -2px;
    }
}

/* Адаптация для маленьких мобильных (до 480px) */
@media (max-width: 480px) {
    header.navbar {
        padding: 0 12px;
        height: 52px;
        gap: 8px;
    }

    .navbar .logo {
        font-size: 15px;
        max-width: 150px;
        letter-spacing: -0.2px;
    }

    .cashier-btn-mobile {
        padding: 5px 12px;
        font-size: 12px;
        min-height: 30px;
    }

    .navbar .right-section {
        gap: 8px;
    }

    .cart, #profile-icon, .cashier-orders-btn {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .cart svg, #profile-icon svg, .cashier-orders-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Поддержка темной темы */
@media (prefers-color-scheme: dark) {
    header.navbar {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .navbar.scrolled {
        background: rgba(15, 23, 42, 0.95);
    }

    .navbar .logo {
        color: #f1f5f9;
    }

    .cart, #profile-icon, .cashier-orders-btn {
        background: rgba(30, 41, 59, 0.8);
        border-color: rgba(51, 65, 85, 0.6);
    }

    .cart:hover, #profile-icon:hover, .cashier-orders-btn:hover {
        background: rgba(51, 65, 85, 0.9);
        border-color: rgba(71, 85, 105, 0.8);
    }

    .cart svg, #profile-icon svg, .cashier-orders-btn svg {
        color: #cbd5e1;
    }

    .cart:hover svg, #profile-icon:hover svg, .cashier-orders-btn:hover svg {
        color: #f8fafc;
    }

    .btn-back.cashier-btn {
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    }

    .cashier-btn-mobile {
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    }
}

/* Анимация появления */
@keyframes navbar-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar {
    animation: navbar-fade-in 0.3s ease-out;
}

/* Поддержка iOS Safari */
@supports (-webkit-touch-callout: none) {
    .navbar {
        padding-top: env(safe-area-inset-top, 0px);
        height: calc(64px + env(safe-area-inset-top, 0px));
    }

    @media (max-width: 768px) {
        .navbar {
            height: calc(56px + env(safe-area-inset-top, 0px));
        }
    }

    @media (max-width: 480px) {
        .navbar {
            height: calc(52px + env(safe-area-inset-top, 0px));
        }
    }
}

/* Улучшение доступности */
@media (prefers-reduced-motion: reduce) {
    .navbar,
    .btn-back.cashier-btn,
    .cart,
    #profile-icon,
    .cashier-orders-btn {
        transition: none;
        animation: none;
    }

    .btn-back.cashier-btn:hover,
    .cart:hover,
    #profile-icon:hover,
    .cashier-orders-btn:hover {
        transform: none;
    }
}

/* Фокус состояния для доступности */
.btn-back.cashier-btn:focus-visible,
.cashier-btn-mobile:focus-visible,
.cart:focus-visible,
#profile-icon:focus-visible,
.cashier-orders-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* ========== СТИЛИ ДЛЯ СТРАНИЦ БЕЗ NAVBAR (как корзина) ========== */

/* Скрываем navbar на страницах с корзиной */
body.show-cart .navbar {
    display: none !important;
}

/* Убираем затемнение основной части сайта при показе корзины */
body.show-cart .menu-items-container,
body.show-cart .categories-bar,
body.show-cart .navbar {
    opacity: 1; /* Возвращаем нормальную прозрачность */
    pointer-events: auto; /* Возвращаем взаимодействие */
}

/* Стили для категорий */
.categories-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 2px 0;
    background-color: #FFF;
}

/* Контейнер категорий */
.categories-container {
    display: flex;
    gap: 10px; /* Уменьшенный отступ между категориями для компактности */
    align-items: center;
    overflow-x: auto; /* Горизонтальная прокрутка */
    white-space: nowrap; /* Запрещаем перенос элементов */
    padding: 10px 15px;
    scroll-behavior: smooth; /* Плавная прокрутка */
    -webkit-overflow-scrolling: touch; /* Плавная прокрутка на iOS */
    scrollbar-width: none; /* Скрываем полосу прокрутки в Firefox */
}

/* Скрываем полосу прокрутки в WebKit-браузерах (Chrome, Safari) */
.categories-container::-webkit-scrollbar {
    display: none;
}

.category-item {
    background-color: #B46F43;
    color: white;
    padding: 8px 18px; /* Уменьшенные отступы для компактности */
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    font-size: 14px; /* Меньший шрифт для мобильных */
    flex-shrink: 0; /* Запрещаем сжатие кнопок */
}

.category-item:hover {
    background-color: #9F5A32;
    transform: scale(1.05);
}

.category-item.active {
    background-color: #9F5A32;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .categories-container {
        gap: 8px;
        padding: 8px 10px;
    }

    .category-item {
        padding: 6px 14px;
        font-size: 12px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .categories-container {
        gap: 6px;
        padding: 6px 8px;
    }

    .category-item {
        padding: 5px 12px;
        font-size: 11px;
    }
}

/* Стили для контейнера меню */
.menu-items-container {
    padding: 20px;
    background: #FFF;
}

.menu-items {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.menu-item {
    background-color: #FFF;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    padding: 15px;
    text-align: center;
    width: 280px;
    min-height: 380px;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease;
    opacity: 0;
    display: none;
}

.menu-item.visible {
    display: block;
    opacity: 1;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.menu-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 15px;
}

.menu-item h3 {
    font-size: 1.3rem;
    color: #3E3E3E;
    margin: 0px 0px;
    height: 50px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-item .description {
    font-size: 0.9rem;
    color: #666;
    margin: 5px 0;
    max-width: 100%; /* Ограничиваем ширину описания */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; /* Текст не переносится */
    text-align: center;
}

.price {
    font-size: 1.2rem;
    color: #B46F43;
    margin: 10px 0;
}

.add-to-cart {
    background-color: #B46F43;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s ease;
}

.add-to-cart:hover {
    background-color: #9F5A32;
    transform: scale(1.05);
}

.add-to-cart-index {
    background-color: #B46F43;
    color: white;
    border: none;
    padding: 8px 30px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s ease;
    margin-top: 20px; /* Отступ сверху — можно изменить на нужное значение */
}

.add-to-cart-index:hover {
    background-color: #9F5A32;
    transform: scale(1.05);
}


/* Адаптивные стили для мобильных устройств (до 768px) */
@media screen and (max-width: 768px) {
    .menu-items {
        gap: 15px;
    }

    .menu-item {
        width: calc(50% - 10px); /* Два блюда в ряд, с учетом gap */
        min-height: 300px;
        padding: 10px;
    }

    .menu-item img {
        height: 120px; /* Уменьшенная высота изображения */
        margin-bottom: 10px;
    }

    .menu-item h3 {
        font-size: 1.1rem;
        height: 40px;
    }

    .menu-item .description {
        font-size: 0.8rem;
    }

    .price {
        font-size: 1rem;
    }

    .add-to-cart {
        padding: 10px 15px;
        font-size: 0.9rem;
    }


}

/* Стили для страницы деталей товара (уникальные классы) */
.product-detail-page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.product-detail-page {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.product-detail-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.product-detail-title {
    font-size: 1.8rem;
    color: #3E3E3E;
    margin-bottom: 15px;
}

.product-detail-description {
    font-size: 1rem;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.product-detail-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #B46F43;
    margin-bottom: 15px;
}

.product-detail-category {
    font-size: 1rem;
    color: #666;
    margin-bottom: 20px;
}

.product-detail-add-to-cart {
    background-color: #B46F43;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.product-detail-add-to-cart:hover {
    background-color: #9F5A32;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .navbar {
        padding: 10px 15px;
    }

    .logo {
        font-size: 1.6rem;
    }

    .cart svg {
        width: 20px;
        height: 20px;
    }

    .btn-back, .cashier-btn {
        font-size: 14px;
        padding: 3px 12px;
    }

    .cashier-btn-mobile {
        display: inline-block;
    }

    .menu-item {
        max-width: 250px;
        padding: 8px;
    }

    .menu-item img {
        height: 120px;
    }

    .menu-item h3 {
        font-size: 1.1rem;
    }

    .menu-item .description {
        font-size: 0.85rem;
    }

    .menu-item .price {
        font-size: 0.95rem;
    }

    .menu-item .add-to-cart {
        padding: 6px 14px;
        font-size: 0.9rem;
    }

    .product-detail-page-container {
        padding: 15px;
    }

    .product-detail-page {
        padding: 15px;
    }

    .product-detail-image {
        max-height: 300px;
    }

    .product-detail-title {
        font-size: 1.6rem;
    }

    .product-detail-description {
        font-size: 0.95rem;
    }

    .product-detail-price {
        font-size: 1.1rem;
    }

    .product-detail-category {
        font-size: 0.95rem;
    }

    .product-detail-add-to-cart {
        padding: 8px 16px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 8px 10px;
    }

    .logo {
        font-size: 1.4rem;
    }

    .cart svg {
        width: 18px;
        height: 18px;
    }

    .btn-back, .cashier-btn, .cashier-btn-mobile {
        font-size: 12px;
        padding: 2px 10px;
    }

    .menu-item {
        max-width: 200px;
        padding: 6px;
    }

    .menu-item img {
        height: 100px;
    }

    .menu-item h3 {
        font-size: 1rem;
    }

    .menu-item .description {
        font-size: 0.8rem;
    }

    .menu-item .price {
        font-size: 0.9rem;
    }

    .menu-item .add-to-cart {
        padding: 5px 12px;
        font-size: 0.85rem;
    }

    .product-detail-page-container {
        padding: 10px;
    }

    .product-detail-page {
        padding: 10px;
    }

    .product-detail-image {
        max-height: 250px;
    }

    .product-detail-title {
        font-size: 1.4rem;
    }

    .product-detail-description {
        font-size: 0.9rem;
    }

    .product-detail-price {
        font-size: 1rem;
    }

    .product-detail-category {
        font-size: 0.9rem;
    }

    .product-detail-add-to-cart {
        padding: 7px 14px;
        font-size: 0.9rem;
    }
}
/* Ссылка на товар в списке */
.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
    margin-bottom: 10px;
}

.product-link:hover h3 {
    color: #B46F43;
}

/* Стили для корзины */













#cart-count {
    background-color: #dc3545;
    color: white;
    font-size: 12px;
    font-weight: bold;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: -5px;
    right: -10px;
}






















/* Общее скрытие и видимость элементов корзины */
body.show-cart .cart-popup {
    display: block; /* Показываем корзину, когда активен класс show-cart */
}



/* ========== МОДАЛЬНОЕ ОКНО ЧЕКА С КНОПКАМИ В ОДНОЙ СТРОКЕ ========== */

/* Фон для затемнения */
#modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    z-index: 1200;
}

#modal-backdrop.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Основное модальное окно */
#receipt-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    z-index: 1201;
    width: 90%;
    max-width: 480px;
    max-height: 85vh;
    display: none;
    flex-direction: column;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-sizing: border-box;
    overflow: hidden;
}

#receipt-modal.active {
    display: flex;
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ФИКСИРОВАННАЯ ШАПКА */
#receipt-modal .modal-header {
    padding: 20px 50px 20px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    flex-shrink: 0;
    z-index: 2;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#receipt-modal .modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    text-align: center;
    width: 100%;
}

/* Кнопка закрытия */
.close-receipt-button {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: all 0.2s ease;
    z-index: 3;
}

.close-receipt-button:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
    transform: translateY(-50%) scale(1.05);
}

/* ОСНОВНОЙ КОНТЕНТ С ПРОКРУТКОЙ - ФИКСИРОВАННАЯ ВЫСОТА */
#receipt-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    /* Фиксированная высота, чтобы кнопки всегда были видны */
    max-height: calc(85vh - 220px); /* 85vh минус заголовок, h4 и кнопки оплаты */
}

/* Элементы чека */
.receipt-items {
    margin-bottom: 20px;
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.receipt-item:last-child {
    border-bottom: none;
}

.receipt-item-name {
    font-size: 15px;
    color: #475569;
    font-weight: 500;
    flex: 1;
    margin-right: 10px;
    word-break: break-word;
}

.receipt-item-price {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
}

/* Итоговая сумма */
.receipt-total {
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    text-align: center;
    font-size: 18px;
    color: #1e293b;
    margin-top: 16px;
    margin-bottom: 16px;
}

.receipt-total strong {
    color: #2563eb;
    font-size: 20px;
    display: block;
    margin-top: 4px;
}

/* Заголовок способов оплаты */
#receipt-modal h4 {
    padding: 0 24px;
    margin: 0;
    font-size: 16px;
    text-align: center;
    color: #475569;
    flex-shrink: 0;
    padding-top: 16px;
    padding-bottom: 16px;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    background: white;
}

/* СПОСОБЫ ОПЛАТЫ - ДВЕ КНОПКИ В ОДНОЙ СТРОКЕ ВСЕГДА */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* ВСЕГДА 2 колонки */
    gap: 12px;
    padding: 20px;
    background: white;
    flex-shrink: 0;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
}

.payment-option {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 14px 8px; /* Уменьшили отступы по бокам */
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    white-space: nowrap; /* Текст не переносится */
}

.payment-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* ========== АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ ========== */

/* Планшеты (768px - 1024px) */
@media (max-width: 1024px) {
    #receipt-content {
        max-height: calc(80vh - 200px);
    }

    .payment-option {
        font-size: 13px;
        padding: 12px 6px;
    }
}

/* Мобильные устройства (до 768px) */
@media (max-width: 768px) {
    #receipt-modal {
        width: 94%;
        border-radius: 16px;
        max-height: 85vh;
    }

    #receipt-modal .modal-header {
        padding: 16px 44px 16px 16px;
        min-height: 56px;
    }

    #receipt-modal .modal-header h2 {
        font-size: 18px;
    }

    .close-receipt-button {
        right: 16px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    #receipt-content {
        padding: 16px;
        max-height: calc(85vh - 180px);
    }

    .receipt-item {
        padding: 10px 0;
    }

    .receipt-item-name,
    .receipt-item-price {
        font-size: 14px;
    }

    .receipt-total {
        padding: 14px;
        font-size: 16px;
        margin-top: 14px;
        margin-bottom: 14px;
    }

    .receipt-total strong {
        font-size: 18px;
    }

    #receipt-modal h4 {
        padding: 0 16px;
        font-size: 15px;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    /* НА МОБИЛЬНЫХ КНОПКИ ВСЕ РАВНО В ОДНОЙ СТРОКЕ */
    .payment-methods {
        grid-template-columns: repeat(2, 1fr); /* Всегда 2 кнопки рядом */
        gap: 10px;
        padding: 16px;
    }

    .payment-option {
        padding: 12px 6px; /* Еще меньше отступы на мобильных */
        font-size: 13px;
        min-height: 48px;
        font-size: 12px; /* Чуть меньше текст */
    }
}

/* Маленькие мобильные (до 480px) */
@media (max-width: 480px) {
    #receipt-modal {
        width: 96%;
        border-radius: 12px;
        max-height: 90vh;
    }

    #receipt-modal .modal-header {
        padding: 14px 40px 14px 14px;
        min-height: 52px;
    }

    #receipt-modal .modal-header h2 {
        font-size: 17px;
    }

    .close-receipt-button {
        right: 14px;
        width: 30px;
        height: 30px;
        font-size: 18px;
    }

    #receipt-content {
        padding: 14px;
        max-height: calc(90vh - 170px);
    }

    .receipt-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 8px 0;
    }

    .receipt-item-name {
        font-size: 13px;
        margin-right: 0;
        margin-bottom: 4px;
    }

    .receipt-item-price {
        font-size: 13px;
        align-self: flex-end;
    }

    .receipt-total {
        padding: 12px;
        font-size: 15px;
        margin-top: 12px;
        margin-bottom: 12px;
    }

    .receipt-total strong {
        font-size: 17px;
    }

    #receipt-modal h4 {
        padding: 0 14px;
        font-size: 14px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    /* На очень маленьких экранах делаем кнопки еще компактнее */
    .payment-methods {
        padding: 14px;
        gap: 8px;
        grid-template-columns: repeat(2, 1fr); /* Всегда 2 в ряд */
    }

    .payment-option {
        padding: 10px 4px; /* Минимальные отступы */
        font-size: 11px; /* Маленький текст */
        min-height: 44px;
        border-radius: 10px;
        font-weight: 500; /* Чуть менее жирный */
    }
}

/* Очень маленькие экраны (до 320px) */
@media (max-width: 320px) {
    #receipt-modal {
        width: 98%;
        max-height: 95vh;
    }

    #receipt-modal .modal-header {
        padding: 12px 36px 12px 12px;
        min-height: 48px;
    }

    #receipt-modal .modal-header h2 {
        font-size: 16px;
    }

    .close-receipt-button {
        right: 12px;
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    #receipt-content {
        padding: 12px;
        max-height: calc(95vh - 160px);
    }

    /* На iPhone SE и других маленьких телефонах */
    .payment-methods {
        padding: 12px;
        gap: 6px; /* Еще меньше промежуток */
    }

    .payment-option {
        font-size: 10px; /* Очень маленький текст */
        padding: 8px 2px; /* Минимальные отступы */
        min-height: 40px;
    }
}

/* Горизонтальная ориентация на мобильных */
@media (max-height: 500px) and (orientation: landscape) {
    #receipt-modal {
        max-height: 95vh;
        max-width: 90%;
    }

    #receipt-modal .modal-header {
        padding: 10px 44px 10px 12px;
        min-height: 48px;
    }

    #receipt-modal .modal-header h2 {
        font-size: 16px;
    }

    #receipt-content {
        max-height: calc(95vh - 140px);
        padding: 12px;
    }

    #receipt-modal h4 {
        padding-top: 10px;
        padding-bottom: 10px;
        font-size: 14px;
    }

    .payment-methods {
        padding: 12px;
        grid-template-columns: repeat(2, 1fr); /* В ландшафте тоже 2 в ряд */
        gap: 10px;
    }

    .payment-option {
        padding: 10px 6px;
        font-size: 12px;
        min-height: 40px;
    }
}

/* Если кнопок только одна (для обычных пользователей) */
.payment-methods:has(form:only-child) {
    grid-template-columns: 1fr; /* Если только одна кнопка - занимает всю ширину */
}

/* Поддержка iOS Safari */
@supports (-webkit-touch-callout: none) {
    #receipt-modal {
        max-height: -webkit-fill-available;
        height: 85vh;
    }

    #receipt-content {
        -webkit-overflow-scrolling: touch;
    }
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
    #modal-backdrop {
        background: rgba(0, 0, 0, 0.7);
    }

    #receipt-modal {
        background: #1e293b;
        border-color: rgba(255, 255, 255, 0.08);
    }

    #receipt-modal .modal-header {
        background: linear-gradient(135deg, #2d3748 0%, #1f2937 100%);
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }

    #receipt-modal .modal-header h2 {
        color: #f1f5f9;
    }

    .close-receipt-button {
        background: #374151;
        border-color: rgba(255, 255, 255, 0.08);
        color: #9ca3af;
    }

    .close-receipt-button:hover {
        background: #dc2626;
        border-color: #dc2626;
        color: white;
    }

    .receipt-item {
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }

    .receipt-item-name {
        color: #cbd5e1;
    }

    .receipt-item-price {
        color: #e2e8f0;
    }

    .receipt-total {
        background: #2d3748;
        border-color: rgba(255, 255, 255, 0.08);
        color: #e2e8f0;
    }

    .receipt-total strong {
        color: #60a5fa;
    }

    #receipt-modal h4 {
        color: #cbd5e1;
        border-top-color: rgba(255, 255, 255, 0.08);
        background: #1e293b;
    }

    .payment-methods {
        background: #1e293b;
        border-top-color: rgba(255, 255, 255, 0.08);
    }

    .payment-option {
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    }

    .payment-option:hover {
        background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    }
}

/* Кастомный скроллбар */
#receipt-content::-webkit-scrollbar {
    width: 4px;
}

#receipt-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 2px;
}

#receipt-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

@media (prefers-color-scheme: dark) {
    #receipt-content::-webkit-scrollbar-track {
        background: #2d3748;
    }

    #receipt-content::-webkit-scrollbar-thumb {
        background: #4b5563;
    }
}

/* Поддержка темной темы */
@media (prefers-color-scheme: dark) {
    #modal-backdrop {
        background: rgba(0, 0, 0, 0.7);
    }

    #receipt-modal {
        background: #1e293b;
        border-color: rgba(255, 255, 255, 0.08);
    }

    #receipt-modal .modal-header {
        background: linear-gradient(135deg, #2d3748 0%, #1f2937 100%);
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }

    #receipt-modal .modal-header h2 {
        color: #f1f5f9;
    }

    .close-receipt-button {
        background: #374151;
        border-color: rgba(255, 255, 255, 0.08);
        color: #9ca3af;
    }

    .receipt-item {
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }

    .receipt-item-name {
        color: #cbd5e1;
    }

    .receipt-item-price {
        color: #e2e8f0;
    }

    .receipt-total {
        background: #2d3748;
        border-color: rgba(255, 255, 255, 0.08);
        color: #e2e8f0;
    }

    .receipt-total strong {
        color: #60a5fa;
    }

    .payment-methods {
        background: #1e293b;
        border-top-color: rgba(255, 255, 255, 0.08);
    }

    .payment-option {
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    }

    .payment-option:hover {
        background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    }
}

/* Фокус состояния для доступности */
.close-receipt-button:focus-visible,
.payment-option:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Улучшение скроллбара для WebKit браузеров */
#receipt-modal .modal-body::-webkit-scrollbar {
    width: 4px;
}

#receipt-modal .modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 2px;
}

#receipt-modal .modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

#receipt-modal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Для темной темы */
@media (prefers-color-scheme: dark) {
    #receipt-modal .modal-body::-webkit-scrollbar-track {
        background: #2d3748;
    }

    #receipt-modal .modal-body::-webkit-scrollbar-thumb {
        background: #4b5563;
    }

    #receipt-modal .modal-body::-webkit-scrollbar-thumb:hover {
        background: #6b7280;
    }
}

/* Окно "Ваш заказ в ожидании" */
.order-waiting {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    background-color: white;
    border-radius: 10px;
    text-align: center;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1051;
}

.order-waiting-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.order-button {
        background-color: #28a745; /* Зеленый цвет */
        color: white; /* Белый текст */
        font-size: 16px; /* Размер шрифта */
        padding: 12px 121px; /* Отступы внутри кнопки */
        border: none; /* Убираем стандартные границы */
        border-radius: 8px; /* Скругленные углы */
        cursor: pointer; /* Курсор в виде руки при наведении */
        transition: background-color 0.3s, transform 0.2s; /* Плавные анимации */
    }

    .order-button:hover {
        background-color: #218838; /* Темно-зеленый при наведении */
        transform: scale(1.01); /* Легкое увеличение кнопки при наведении */
    }

    .order-button:active {
        background-color: #1e7e34; /* Еще темнее при нажатии */
        transform: scale(0.98); /* Уменьшение кнопки при нажатии */
    }

    .order-button:focus {
        outline: none; /* Убираем обводку при фокусе */
    }
.order-waiting-content button {
    background-color: #B46F43;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s;
}

.order-waiting-content button:hover {
    background-color: #9F5A32;
}

/* Окно для оплаты наличными */
#cashModal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    z-index: 1051;
    width: 300px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    #receipt-modal {
        width: 90%;
        padding: 15px;
    }

    .payment-methods .payment-option {
        width: 100%;
        font-size: 14px;
    }

    #receipt-modal .close-receipt-button {
        font-size: 18px;
    }
}

.form-footer {
  text-align: center;
  padding: 20px;
  color: var(--manager-ios-label-secondary);
  font-size: 13px;
  position: static;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border-top: 0.5px solid var(--manager-ios-system-separator);
  z-index: 10;
}






/* Новый стиль для серого фона */
.payment-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Полупрозрачный черный фон */
    display: none; /* Изначально скрыт */
    z-index: 999;
}
.body-user {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9fb;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* Стили контейнера профиля */
.profile-container-user {
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    padding: 30px 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

/* Заголовок */
.profile-container-user h1 {
    color: #333333;
    margin-bottom: 20px;
    font-size: 24px;
}

/* Стили ссылок */
.profile-links-user a {
    display: block;
    text-decoration: none;
    color: #ffffff;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    padding: 15px;
    margin: 10px 0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

/* Эффект при наведении для ссылок */
.profile-links-user a:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

/* Стили для кнопки "Выйти" */
.profile-links-user a.logout-user {
    background: linear-gradient(135deg, #ff4b2b, #ff6a54);
}

/* Эффект при наведении кнопки "Выйти" */
.profile-links-user a.logout-user:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #ff3a1a, #ff5733);
}

/* ========== СТИЛИ ДЛЯ БЛОКА ЗАВЕДЕНИЯ ========== */

.establishment-block {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 12px 15px;
    margin: 15px 0 20px 0;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.establishment-block:hover {
    background-color: #f0f2f5;
    border-color: #dee2e6;
}

.establishment-block svg {
    color: #6c757d;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.establishment-block span {
    color: #495057;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

/* ========== АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ ========== */

/* Для телефонов (до 576px) */
@media (max-width: 576px) {
    .establishment-block {
        padding: 10px 12px;
        margin: 12px 0 16px 0;
        border-radius: 8px;
        gap: 8px;
    }

    .establishment-block svg {
        width: 16px;
        height: 16px;
    }

    .establishment-block span {
        font-size: 15px;
    }
}

/* Для маленьких телефонов (до 375px) */
@media (max-width: 375px) {
    .establishment-block {
        padding: 8px 10px;
        margin: 10px 0 14px 0;
        gap: 6px;
    }

    .establishment-block svg {
        width: 14px;
        height: 14px;
    }

    .establishment-block span {
        font-size: 14px;
    }
}

/* Для планшетов (от 577px до 768px) */
@media (min-width: 577px) and (max-width: 768px) {
    .establishment-block {
        padding: 12px 14px;
        margin: 14px 0 18px 0;
    }

    .establishment-block span {
        font-size: 15px;
    }
}

/* Улучшение для темной темы */
@media (prefers-color-scheme: dark) {
    .establishment-block {
        background-color: #2c3034;
        border-color: #495057;
    }

    .establishment-block:hover {
        background-color: #343a40;
        border-color: #6c757d;
    }

    .establishment-block svg {
        color: #adb5bd;
    }

    .establishment-block span {
        color: #e9ecef;
    }
}


body.order-history-page {
background-color: #f9f9fb;
font-family: 'Arial', sans-serif;
margin: 0;
padding: 20px;
ustify-content: center;
    align-items: center;
}

.order-history-container {
    max-width: 700px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.order-history h1 {
    text-align: center;
    color: #333;
}

.order-item {
    padding: 15px 0;
}

.order-item h2 {
    font-size: 18px;
    color: #444;
    margin-bottom: 5px;
}

.order-item p {
    font-size: 14px;
    margin: 3px 0;
}

.order-details-link {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
}

.order-details-link:hover {
    text-decoration: underline;
}

.status-completed {
    color: green;
    font-weight: bold;
}

.status-cancelled {
    color: red;
    font-weight: bold;
}

hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 10px 0;
}

body.my-order-page {
    background-color: #f9f9fb;
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 20px;
    color: #333;

}

.my-order-container {
    max-width: 700px;
    margin: 20px auto;
    background-color: #fff;
    border-radius: 10px;
    padding: 25px;

}


/* ========== КОМПАКТНЫЕ СТИЛИ ПРОФИЛЯ ========== */

/* Основной контейнер */
.profile-container-user {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 24px;
    width: 90%;
    max-width: 400px;
    margin: 40px auto;
    position: relative;
    box-sizing: border-box;
}

/* Кнопка назад */
.profile-back-btn {
    position: absolute;
    left: 16px;
    top: 16px;
    background: none;
    border: 1px solid #e1e5e9;
    color: #6c757d;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.profile-back-btn:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

/* Заголовок профиля */
.profile-header {
    text-align: center;
    margin-bottom: 24px;
    padding-top: 8px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.2);
}

.profile-header h1 {
    color: #212529;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 4px;
    line-height: 1.3;
    word-break: break-word;
}

.profile-subtitle {
    color: #6c757d;
    font-size: 13px;
    margin: 0;
    font-weight: 400;
}

/* Карточка сводки по заказам */
.orders-summary-card {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.orders-summary-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.orders-summary-header svg {
    color: #007bff;
    flex-shrink: 0;
}

.orders-summary-header h3 {
    color: #212529;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    flex-grow: 1;
}

.orders-count-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 16px;
    min-width: 24px;
    text-align: center;
    flex-shrink: 0;
}

/* Детали заказа */
.current-order-details {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #e9ecef;
}

.order-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.order-info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.order-info-row:first-child {
    padding-top: 0;
}

.info-label {
    color: #6c757d;
    font-size: 13px;
    font-weight: 400;
}

.info-value {
    color: #212529;
    font-size: 14px;
    font-weight: 500;
}

/* Индикаторы статуса */
.status-indicator {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 16px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-new {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
    border: 1px solid rgba(0, 123, 255, 0.2);
}

.status-pending {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.status-completed {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

/* Кнопка просмотра всех заказов */
.view-all-orders-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    color: #007bff;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 0;
    width: 100%;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    border-top: 1px solid #e9ecef;
    margin-top: 16px;
}

.view-all-orders-btn:hover {
    color: #0056b3;
}

.view-all-orders-btn svg {
    transition: transform 0.2s ease;
}

.view-all-orders-btn:hover svg {
    transform: translateX(3px);
}

/* Состояние "нет заказов" */
.empty-state-card {
    text-align: center;
    padding: 32px 20px;
    margin-bottom: 16px;
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
}

.empty-state-card svg {
    color: #28a745;
    margin-bottom: 12px;
}

.empty-state-title {
    color: #212529;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px;
}

.empty-state-subtitle {
    color: #6c757d;
    font-size: 13px;
    margin: 0;
}

/* Действия профиля */
.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-action-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    padding: 16px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.profile-action-btn:hover {
    background: #f8f9fa;
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.action-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.logout-action .action-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.action-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0; /* Для правильного обрезания текста */
}

.action-title {
    color: #212529;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-subtitle {
    color: #6c757d;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-arrow {
    color: #adb5bd;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.profile-action-btn:hover .action-arrow {
    color: #007bff;
    transform: translateX(3px);
}

/* ========== АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ ========== */

/* Для телефонов (до 576px) */
@media (max-width: 576px) {
    .profile-container-user {
        padding: 20px 16px;
        margin: 30px auto;
        width: 94%;
    }

    .profile-back-btn {
        left: 12px;
        top: 12px;
        padding: 6px 8px;
    }

    .profile-back-btn svg {
        width: 12px;
        height: 12px;
    }

    .profile-avatar {
        width: 56px;
        height: 56px;
    }

    .profile-avatar svg {
        width: 28px;
        height: 28px;
    }

    .profile-header h1 {
        font-size: 18px;
    }

    .orders-summary-card,
    .empty-state-card {
        padding: 16px;
        margin-bottom: 14px;
    }

    .current-order-details {
        padding: 14px;
    }

    .order-info-row {
        padding: 6px 0;
    }

    .info-label,
    .info-value {
        font-size: 13px;
    }

    .profile-action-btn {
        padding: 14px;
        gap: 12px;
    }

    .action-icon {
        width: 32px;
        height: 32px;
    }

    .action-icon svg {
        width: 14px;
        height: 14px;
    }

    .action-title {
        font-size: 14px;
    }

    .action-subtitle {
        font-size: 11px;
    }

    .action-arrow svg {
        width: 12px;
        height: 12px;
    }
}

/* Для очень маленьких телефонов (до 375px) */
@media (max-width: 375px) {
    .profile-container-user {
        padding: 16px 14px;
        margin: 20px auto;
        width: 96%;
    }

    .profile-back-btn {
        left: 8px;
        top: 8px;
        padding: 5px 7px;
    }

    .profile-avatar {
        width: 48px;
        height: 48px;
    }

    .profile-header h1 {
        font-size: 17px;
    }

    .orders-summary-header h3 {
        font-size: 15px;
    }

    .orders-count-badge {
        font-size: 11px;
        padding: 2px 8px;
    }

    .profile-action-btn {
        padding: 12px;
        gap: 10px;
    }

    .action-icon {
        width: 28px;
        height: 28px;
    }
}

/* Для горизонтальной ориентации */
@media (max-height: 500px) and (orientation: landscape) {
    .profile-container-user {
        padding: 16px;
        margin: 20px auto;
        max-height: 90vh;
        overflow-y: auto;
    }

    .profile-header {
        margin-bottom: 16px;
    }

    .profile-avatar {
        width: 48px;
        height: 48px;
        margin-bottom: 8px;
    }

    .profile-header h1 {
        font-size: 16px;
    }
}

/* Для темной темы */
@media (prefers-color-scheme: dark) {
    .profile-container-user {
        background: #2c3034;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    }

    .orders-summary-card,
    .empty-state-card,
    .profile-action-btn {
        background: #343a40;
        border-color: #495057;
    }

    .current-order-details {
        background: #2c3034;
        border-color: #495057;
    }

    .view-all-orders-btn {
        border-color: #495057;
    }
}


/* ========== ПРОФЕССИОНАЛЬНЫЕ СТИЛИ ДЛЯ СТРАНИЦЫ ЗАКАЗОВ ========== */

/* Основной контейнер */
.myorder-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px 20px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    box-sizing: border-box;
}

/* Заголовок страницы */
.myorder-container h1 {
    font-size: 20px;
    font-weight: 600;
    color: #212529;
    text-align: center;
    margin: 0 0 28px 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #e1e5e9;
    position: relative;
}

.myorder-container h1:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Карточка заказа */
.myorder-details {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.myorder-details:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* Шапка заказа */
.myorder-header {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e9ecef;
}

.myorder-header h2 {
    font-size: 17px;
    font-weight: 600;
    color: #212529;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.myorder-date {
    font-size: 13px;
    color: #6c757d;
    font-weight: 400;
    margin: 0;
}

/* Блок заведения */
.establishment-block {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 0 0 20px 0;
    border: 1px solid #e9ecef;
}

.establishment-block svg {
    color: #007bff;
    flex-shrink: 0;
}

.establishment-block span {
    color: #212529;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}

/* Состав заказа */
.myorder-items {
    margin-bottom: 20px;
}

.myorder-items-header {
    font-size: 15px;
    font-weight: 600;
    color: #212529;
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.myorder-items-header:before {
    content: '';
    width: 4px;
    height: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.myorder-items ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.myorder-items ul li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f5;
    font-size: 14px;
}

.myorder-items ul li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.myorder-items ul li:first-child {
    padding-top: 0;
}

.myorder-item-name {
    flex: 2;
    color: #212529;
    font-weight: 400;
    line-height: 1.5;
    padding-right: 12px;
}

.myorder-item-qty {
    flex: 0 0 40px;
    text-align: center;
    color: #6c757d;
    font-weight: 400;
}

.myorder-item-price {
    flex: 0 0 100px;
    text-align: right;
    color: #212529;
    font-weight: 500;
}

/* Футер заказа */
.myorder-footer {
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

.myorder-total {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin: 0 0 14px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.myorder-total strong {
    color: #6c757d;
    font-weight: 500;
}

.myorder-status {
    font-size: 14px;
    color: #212529;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.myorder-status strong {
    color: #6c757d;
    font-weight: 500;
}

/* Статусы заказов - профессиональные индикаторы */
.myorder-status-processing,
.myorder-status-preparing,
.myorder-status-completed,
.myorder-status-delivered,
.myorder-status-rejected,
.myorder-status-canceled,
.myorder-status-unknown {
    font-size: 13px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.myorder-status-processing {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
    border: 1px solid rgba(0, 123, 255, 0.2);
}

.myorder-status-preparing {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.myorder-status-completed {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.myorder-status-delivered {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
    border: 1px solid rgba(23, 162, 184, 0.2);
}

.myorder-status-rejected {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.myorder-status-canceled {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.2);
}

.myorder-status-unknown {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.2);
}

/* Кнопка причины отказа */
.myorder-reason-button {
    background: #ffffff;
    border: 1px solid #dc3545;
    color: #dc3545;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}

.myorder-reason-button:hover {
    background: #dc3545;
    color: white;
}

/* Кнопка "Перейти к меню" */
.myorder-btn-back {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    margin-top: 16px;
    text-decoration: none;
    text-align: center;
}

.myorder-btn-back:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

/* Модальное окно */
.myorder-restaurant-card {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: none;
}

.modal-header {
    border-bottom: 1px solid #e1e5e9;
    padding: 20px 24px;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    margin: 0;
}

.btn-close {
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 24px;
}

.myorder-notice-content {
    font-size: 15px;
    color: #212529;
    line-height: 1.6;
    margin: 0;
}

.modal-footer {
    border-top: 1px solid #e1e5e9;
    padding: 16px 24px;
    display: flex;
    gap: 12px;
}

.myorder-menu-button {
    background: #6c757d;
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

.myorder-menu-button:hover {
    background: #5a6268;
}

/* Состояние "нет заказов" */
.myorder-empty-orders {
    text-align: center;
    padding: 48px 32px;
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    margin: 20px 0;
}

.myorder-empty-orders p {
    font-size: 16px;
    color: #6c757d;
    margin: 0 0 24px 0;
}

/* Анимация */
@keyframes myorder-fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.myorder-details {
    animation: myorder-fadeIn 0.3s ease;
}

/* ========== АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ ========== */

@media (max-width: 576px) {
    .myorder-container {
        padding: 20px 16px;
    }

    .myorder-container h1 {
        font-size: 18px;
        margin-bottom: 24px;
        padding-bottom: 14px;
    }

    .myorder-details {
        padding: 16px;
        margin-bottom: 14px;
    }

    .myorder-header h2 {
        font-size: 16px;
    }

    .establishment-block {
        padding: 12px;
        margin-bottom: 16px;
    }

    .establishment-block span {
        font-size: 14px;
    }

    .myorder-items-header {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .myorder-items ul li {
        font-size: 13px;
        padding: 10px 0;
    }

    .myorder-item-qty {
        flex: 0 0 36px;
    }

    .myorder-item-price {
        flex: 0 0 90px;
        font-size: 13px;
    }

    .myorder-total {
        font-size: 15px;
        margin-bottom: 12px;
    }

    .myorder-status {
        font-size: 13px;
    }

    .myorder-status-processing,
    .myorder-status-preparing,
    .myorder-status-completed,
    .myorder-status-delivered,
    .myorder-status-rejected,
    .myorder-status-canceled,
    .myorder-status-unknown {
        font-size: 12px;
        padding: 3px 10px;
    }

    .myorder-reason-button {
        font-size: 12px;
        padding: 5px 12px;
        margin-top: 8px;
        margin-left: 0;
        width: 100%;
    }

    .myorder-btn-back {
        padding: 10px 20px;
        font-size: 14px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }

    .modal-title {
        font-size: 16px;
    }

    .myorder-notice-content {
        font-size: 14px;
    }

    .myorder-menu-button {
        padding: 8px 16px;
        font-size: 13px;
    }

    .myorder-empty-orders {
        padding: 40px 24px;
    }

    .myorder-empty-orders p {
        font-size: 15px;
        margin-bottom: 20px;
    }
}

@media (max-width: 375px) {
    .myorder-container {
        padding: 16px 14px;
    }

    .myorder-container h1 {
        font-size: 17px;
        margin-bottom: 20px;
    }

    .myorder-details {
        padding: 14px;
    }

    .establishment-block {
        padding: 10px;
        margin-bottom: 14px;
    }

    .myorder-items-header {
        margin-bottom: 10px;
    }

    .myorder-items ul li {
        font-size: 12px;
        padding: 8px 0;
    }

    .myorder-item-price {
        flex: 0 0 80px;
    }

    .myorder-total {
        font-size: 14px;
    }
}

/* Для темной темы */
@media (prefers-color-scheme: dark) {
    .myorder-container h1 {
        color: #e9ecef;
        border-bottom-color: #495057;
    }

    .myorder-details {
        background: #2c3034;
        border-color: #495057;
    }

    .myorder-header {
        border-bottom-color: #495057;
    }

    .myorder-header h2 {
        color: #e9ecef;
    }

    .myorder-date {
        color: #adb5bd;
    }

    .establishment-block {
        background: #343a40;
        border-color: #495057;
    }

    .establishment-block span {
        color: #e9ecef;
    }

    .myorder-items-header {
        color: #e9ecef;
    }

    .myorder-items ul li {
        border-bottom-color: #495057;
    }

    .myorder-item-name {
        color: #e9ecef;
    }

    .myorder-item-qty {
        color: #adb5bd;
    }

    .myorder-item-price {
        color: #e9ecef;
    }

    .myorder-footer {
        border-top-color: #495057;
    }

    .myorder-total {
        color: #e9ecef;
    }

    .myorder-total strong {
        color: #adb5bd;
    }

    .myorder-status {
        color: #e9ecef;
    }

    .myorder-status strong {
        color: #adb5bd;
    }

    .myorder-reason-button {
        background: #343a40;
        border-color: #dc3545;
    }

    .myorder-restaurant-card {
        background: #2c3034;
        border-color: #495057;
    }

    .modal-header {
        border-bottom-color: #495057;
    }

    .modal-title {
        color: #e9ecef;
    }

    .myorder-notice-content {
        color: #e9ecef;
    }

    .modal-footer {
        border-top-color: #495057;
    }

    .myorder-empty-orders {
        background: #2c3034;
        border-color: #495057;
    }

    .myorder-empty-orders p {
        color: #adb5bd;
    }
}
:root {
    --estab-primary: #5e35b1;
    --estab-primary-hover: #512da8;
    --estab-secondary: #3949ab;
    --estab-text: #263238;
    --estab-light-bg: #f5f7fa;
    --estab-border: #e0e0e0;
    --estab-gray: #757575;
    --estab-error: #d32f2f;
    --estab-success: #388e3c;
    --estab-radius: 10px;
    --estab-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    --estab-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.estab-auth-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.estab-auth-card {
    background: white;
    border-radius: var(--estab-radius);
    box-shadow: var(--estab-shadow);
    padding: 2.5rem;
    width: 100%;
    transition: var(--estab-transition);
}

.estab-auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.estab-auth-title {
    color: var(--estab-primary);
    margin-bottom: 0.75rem;
    font-size: 1.8rem;
    font-weight: 700;
}

.estab-auth-subtitle {
    color: var(--estab-gray);
    font-size: 0.95rem;
}

.estab-auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.estab-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.estab-form-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--estab-text);
}

.estab-form-input,
.estab-form-select {
    padding: 0.9rem 1.2rem;
    border: 1px solid var(--estab-border);
    border-radius: var(--estab-radius);
    font-size: 1rem;
    transition: var(--estab-transition);
    width: 100%;
    background-color: #fafafa;
}

.estab-form-input:focus,
.estab-form-select:focus {
    outline: none;
    border-color: var(--estab-primary);
    box-shadow: 0 0 0 3px rgba(94, 53, 177, 0.2);
    background-color: white;
}

.estab-password-wrap {
    position: relative;
}

.estab-password-wrap {
    position: relative;
}

.estab-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    width: 24px;
    height: 24px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23757575"><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    z-index: 2; /* Чтобы иконка была поверх поля ввода */
    padding: 0; /* Убираем возможные отступы */
    margin: 0;
}

.estab-password-toggle:hover {
    opacity: 1;
}

.estab-password-toggle.active {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23757575"><path d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/></svg>');
}

.estab-auth-btn {
    background-color: var(--estab-primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: var(--estab-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--estab-transition);
    margin-top: 0.5rem;
    letter-spacing: 0.5px;
}

.estab-auth-btn:hover {
    background-color: var(--estab-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(94, 53, 177, 0.2);
}

.estab-auth-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--estab-gray);
    font-size: 0.9rem;
}

.estab-auth-link {
    color: var(--estab-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--estab-transition);
}

.estab-auth-link:hover {
    text-decoration: underline;
    color: var(--estab-primary-hover);
}

.estab-form-options {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.estab-form-link {
    color: var(--estab-gray);
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--estab-transition);
}

.estab-form-link:hover {
    color: var(--estab-primary);
}

.estab-security-alert {
    background-color: #fff5f5;
    border: 1px solid #ffebee;
    border-radius: var(--estab-radius);
    padding: 1.2rem;
    margin-top: 1.5rem;
    text-align: center;
    color: var(--estab-error);
    font-size: 0.9rem;
    display: none;
    animation: estab-fade-in 0.4s ease-out;
}

.estab-alert-link {
    color: var(--estab-error);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

@keyframes estab-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Адаптация для мобильных */
@media (max-width: 576px) {
    .estab-auth-container {
        padding: 15px;
    }

    .estab-auth-card {
        padding: 1.8rem;
    }

    .estab-auth-title {
        font-size: 1.6rem;
    }

    .estab-form-input,
    .estab-form-select {
        padding: 0.8rem 1rem;
    }
}

/* Дополнительные анимации */
.estab-animate-fade {
    animation: estab-fade-in 0.5s ease-out forwards;
}

/* Базовые стили */
.estab-welcome-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 1rem;
    background-color: #f8f9fa;
}

.estab-welcome-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
    max-width: 600px;
    width: 100%;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.estab-welcome-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.estab-welcome-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.estab-welcome-name {
    color: #4f46e5;
    font-weight: 800;
}

.estab-welcome-text {
    font-size: 1.1rem;
    color: #4a5568;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.estab-welcome-button {
    display: inline-block;
    background-color: #4f46e5;
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2);
}

.estab-welcome-button:hover {
    background-color: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(79, 70, 229, 0.3);
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .estab-welcome-container {
        min-height: 50vh;
        padding: 0.5rem;
    }

    .estab-welcome-card {
        padding: 1.5rem;
        border-radius: 12px;
    }

    .estab-welcome-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .estab-welcome-text {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .estab-welcome-button {
        padding: 0.7rem 1.5rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .estab-welcome-card {
        padding: 1.2rem;
    }

    .estab-welcome-title {
        font-size: 1.3rem;
    }

    .estab-welcome-text {
        font-size: 0.95rem;
    }
}

/* ========== СТИЛИ ДЛЯ УВЕДОМЛЕНИЙ ========== */

/* Красная точка уведомления */
.notification-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background-color: #ff4757;
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse 2s infinite;
    z-index: 10;
}

/* Анимация пульсации */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Адаптивность для мобильных */
@media (max-width: 576px) {
    .notification-dot {
        width: 8px;
        height: 8px;
        top: 1px;
        right: 1px;
        border-width: 1.5px;
    }
}

@media (max-width: 375px) {
    .notification-dot {
        width: 6px;
        height: 6px;
    }
}


/* ========== ПРОФЕССИОНАЛЬНЫЕ СТИЛИ КОРЗИНЫ ========== */

/* Основной контейнер корзины */
.cart-popup {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    height: 100vh;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    padding: 80px 24px 24px 24px;
    display: none;
    overflow-y: auto;
    z-index: 1100;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(100%);
}

body.show-cart .cart-popup {
    display: block;
    transform: translateX(0);
}

/* Заголовок корзины */
.cart-popup::before {
    content: 'Корзина';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    padding: 24px;
    text-align: center;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Форма корзины */
.cart-form {
    padding-top: 30px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Элемент корзины */
.cart-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: white;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 16px;
}

.cart-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: rgba(203, 213, 225, 0.8);
}

/* Изображение товара */
.cart-item img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid rgba(226, 232, 240, 0.6);
}

/* Детали товара */
.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.cart-item-price {
    font-size: 16px;
    font-weight: 700;
    color: #2563eb;
    margin: 0;
}

/* Управление количеством */
.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.add-item {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #475569;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.add-item:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
    transform: scale(1.05);
}

.add-item:active {
    transform: scale(0.95);
}

.cart-item-quantity {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    min-width: 24px;
    text-align: center;
}

/* Итоговая сумма */
.cart-summary {
    margin-top: auto;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 16px;
}

.cart-summary p {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#cart-total {
    color: #2563eb;
    font-size: 20px;
    font-weight: 800;
}

/* Кнопки корзины */
/* Кнопки управления корзиной (вверху) */
/* Кнопки управления корзиной (вверху - на одной линии с заголовком) */
.cart-controls {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    z-index: 11;
    pointer-events: none;
    background: white;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.cart-controls button {
    pointer-events: auto;
}

/* Удаляем псевдоэлемент с текстом "Корзина" и заменяем реальным заголовком */
.cart-popup::before {
    content: none !important;
}

/* Добавляем настоящий заголовок */
.cart-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    z-index: 10;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    pointer-events: none;
}

/* Обновляем отступы для формы */
.cart-form {

    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Для планшетов (768px - 1024px) */
@media (max-width: 1024px) {
    .cart-header {
        height: 60px;
        font-size: 18px;
    }

    .cart-controls {
        height: 60px;
        padding: 0 20px;
    }

    .cart-form {
        padding-top: 30px; /* 60px + 16px */
    }

    .empty-content {
        padding-top: 76px !important;
    }
}

/* Мобильные устройства (до 768px) */
@media (max-width: 768px) {
    .cart-header {
        height: 56px;
        font-size: 17px;
    }

    .cart-controls {
        height: 56px;
        padding: 0 16px;
    }

    .cart-form {
        padding-top: 30px; /* 56px + 16px */
    }

    .empty-content {
        padding-top: 72px !important;
    }

    .close-cart-button,
    .clear-cart-button {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .close-cart-button svg,
    .clear-cart-button svg {
        width: 18px;
        height: 18px;
    }
}

/* Маленькие мобильные (до 480px) */
@media (max-width: 480px) {
    .cart-header {
        height: 52px;
        font-size: 16px;
    }

    .cart-controls {
        height: 52px;
        padding: 0 12px;
    }

    .cart-form {
        padding-top: 25px; /* 52px + 16px */
    }

    .empty-content {
        padding-top: 68px !important;
    }

    .close-cart-button,
    .clear-cart-button {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }

    .close-cart-button svg,
    .clear-cart-button svg {
        width: 16px;
        height: 16px;
    }
}

.close-cart-button,
.clear-cart-button {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.close-cart-button:hover,
.clear-cart-button:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-color: #cbd5e1;
}

.close-cart-button:active,
.clear-cart-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.close-cart-button svg,
.clear-cart-button svg {
    width: 20px;
    height: 20px;
    color: #475569;
    transition: color 0.2s ease;
}

.close-cart-button:hover svg {
    color: #2563eb;
}

.clear-cart-button:hover svg {
    color: #dc2626;
}

/* Кнопка заказа (внизу) */
.cart-buttons {
    margin-top: 20px;
}

.order-button {
    width: 100%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.order-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.order-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.2);
}

.close-cart-button:hover,
.clear-cart-button:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

.close-cart-button:active,
.clear-cart-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.close-cart-button svg,
.clear-cart-button svg {
    width: 20px;
    height: 20px;
    color: #475569;
    transition: color 0.2s ease;
}

.close-cart-button:hover svg {
    color: #2563eb;
}

.clear-cart-button:hover svg {
    color: #dc2626;
}

/* Кнопка заказа */
.order-button {
    grid-column: span 2;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    height: 52px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.order-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.order-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.2);
}

/* Модальное окно чека */
#modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    z-index: 1200;
}

#modal-backdrop.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

#receipt-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    z-index: 1201;
    width: 90%;
    max-width: 480px;
    max-height: 80vh;
    overflow: hidden;
    display: none;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

#receipt-modal.active {
    display: block;
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.close-receipt-button {
    position: absolute;
    top: 35px;
    right: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: all 0.2s ease;
    z-index: 10;
}


.modal-header {
    padding: 28px 24px 20px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.modal-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.modal-body {
    padding: 24px;
    max-height: 400px;
    overflow-y: auto;
}

.receipt-items {
    margin-bottom: 24px;
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.receipt-item:last-child {
    border-bottom: none;
}

.receipt-item-name {
    font-size: 15px;
    color: #475569;
    font-weight: 500;
    flex: 1;
}

.receipt-item-price {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin-left: 16px;
}

.receipt-total {
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    text-align: center;
    font-size: 18px;
    color: #1e293b;
    margin-top: 20px;
}

.receipt-total strong {
    color: #2563eb;
    font-size: 20px;
}

/* Способы оплаты */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 24px;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    max-height: 200px;
    overflow-y: auto;
}

.payment-option {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .payment-methods {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 20px;
        max-height: 180px;
    }

    /* Увеличиваем высоту модального окна на мобильных */
    #receipt-modal {
        max-height: 85vh;
    }

    .modal-body {
        max-height: calc(50vh - 100px);
    }
}

/* Маленькие мобильные */
@media (max-width: 480px) {
    .payment-methods {
        padding: 16px;
        gap: 10px;
        max-height: 160px;
    }

    #receipt-modal {
        max-height: 90vh;
    }

    .modal-body {
        max-height: calc(45vh - 120px);
    }
}

.payment-option:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.2);
}

.empty-cart .close-cart-button {
    width: 120px;
    height: 48px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.empty-cart .close-cart-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.empty-cart .close-cart-button svg {
    color: white;
    width: 18px;
    height: 18px;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* ========== АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ ========== */

/* Планшеты (768px - 1024px) */
@media (max-width: 1024px) {
    .cart-popup {
        width: 380px;
        padding: 70px 20px 20px 20px;
    }

    .cart-item {
        padding: 14px;
        gap: 14px;
    }

    .cart-item img {
        width: 64px;
        height: 64px;
    }

    .cart-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .close-cart-button,
    .clear-cart-button {
        width: 48px;
        height: 48px;
    }

    .order-button {
        height: 48px;
        font-size: 15px;
    }
}

/* Мобильные устройства (до 768px) */
@media (max-width: 768px) {
    .cart-popup {
        width: 100%;
        padding: 60px 16px 16px 16px;
        box-shadow: -2px 0 16px rgba(0, 0, 0, 0.15);
    }

    .cart-popup::before {
        padding: 20px;
        font-size: 18px;
    }

    .cart-item {
        padding: 12px;
        gap: 12px;
        margin-bottom: 10px;
    }

    .cart-item img {
        width: 56px;
        height: 56px;
    }

    .cart-item-name {
        font-size: 14px;
    }

    .cart-item-price {
        font-size: 15px;
    }

    .cart-item-controls {
        padding: 6px 10px;
        gap: 10px;
    }

    .add-item {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .cart-item-quantity {
        font-size: 15px;
    }

    .cart-summary {
        padding: 16px;
        margin-bottom: 12px;
    }

    .cart-summary p {
        font-size: 17px;
    }

    #cart-total {
        font-size: 18px;
    }

    .cart-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-top: 16px;
    }

    .close-cart-button,
    .clear-cart-button {
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }

    .order-button {
        height: 44px;
        font-size: 14px;
        border-radius: 10px;
    }

    /* Модальное окно на мобильных */
    #receipt-modal {
        width: 94%;
        max-width: none;
        border-radius: 16px;
    }

    .modal-header {
        padding: 24px 20px 16px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .modal-body {
        padding: 20px;
        max-height: 50vh;
    }

    .receipt-item {
        padding: 10px 0;
    }

    .receipt-item-name,
    .receipt-item-price {
        font-size: 14px;
    }

    .payment-methods {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 20px;
    }

    .payment-option {
        padding: 14px;
        font-size: 14px;
    }
}
    .payment-methods {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 20px;
        max-height: 180px;
    }

    /* Увеличиваем высоту модального окна на мобильных */
    #receipt-modal {
        max-height: 85vh;
    }

    .modal-body {
        max-height: calc(50vh - 100px);
    }
/* Маленькие мобильные (до 480px) */
@media (max-width: 480px) {
    .cart-popup {
        padding: 56px 12px 12px 12px;
    }

    .cart-popup::before {
        padding: 18px;
        font-size: 17px;
    }

    .cart-item {
        padding: 10px;
        gap: 10px;
        margin-bottom: 8px;
        flex-wrap: wrap;
    }

    .cart-item img {
        width: 48px;
        height: 48px;
    }

    .cart-item-details {
        flex: 2;
        min-width: 0;
    }

    .cart-item-name {
        font-size: 13px;
    }

    .cart-item-price {
        font-size: 14px;
    }

    .cart-item-controls {
        margin-left: auto;
        padding: 4px 8px;
        gap: 8px;
    }

    .add-item {
        width: 24px;
        height: 24px;
        font-size: 14px;
        border-radius: 6px;
    }

    .cart-item-quantity {
        font-size: 14px;
    }

    .cart-summary {
        padding: 14px;
        margin-bottom: 10px;
    }

    .cart-summary p {
        font-size: 16px;
    }

    #cart-total {
        font-size: 17px;
    }

    .cart-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .close-cart-button,
    .clear-cart-button {
        width: 40px;
        height: 40px;
        border-radius: 8px;
    }

    .close-cart-button svg,
    .clear-cart-button svg {
        width: 16px;
        height: 16px;
    }

    .order-button {
        height: 40px;
        font-size: 13px;
        border-radius: 8px;
        letter-spacing: 0.2px;
    }

    /* Модальное окно на маленьких мобильных */
    #receipt-modal {
        width: 96%;
        border-radius: 12px;
    }

    .modal-header {
        padding: 20px 16px 14px;
    }

    .modal-header h2 {
        font-size: 18px;
    }

    .close-receipt-button {
        top: 40px;
        right: 16px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .modal-body {
        padding: 16px;
        max-height: 45vh;
    }

    .receipt-total {
        padding: 16px;
        font-size: 16px;
        margin-top: 16px;
    }

    .receipt-total strong {
        font-size: 18px;
    }

    .payment-methods {
        padding: 16px;
        gap: 10px;
    }

    .payment-option {
        padding: 12px;
        font-size: 13px;
        border-radius: 10px;
    }
}
        .payment-methods {
        padding: 16px;
        gap: 10px;
        max-height: 160px;
    }

    #receipt-modal {
        max-height: 90vh;
    }

    .modal-body {
        max-height: calc(45vh - 120px);
    }

/* Поддержка iOS Safari */
/* Поддержка iOS Safari */
@supports (-webkit-touch-callout: none) {
    .cart-popup {
        padding-top: env(safe-area-inset-top, 0px);
        height: calc(100vh - env(safe-area-inset-top, 0px));
    }

    .cart-header {
        padding-top: env(safe-area-inset-top, 0px);
        height: calc(64px + env(safe-area-inset-top, 0px));
    }

    .cart-controls {
        padding-top: env(safe-area-inset-top, 0px);
        height: calc(64px + env(safe-area-inset-top, 0px));
    }

    .cart-form {
        padding-top: calc(80px + env(safe-area-inset-top, 0px));
    }

    @media (max-width: 1024px) {
        .cart-header {
            height: calc(60px + env(safe-area-inset-top, 0px));
        }

        .cart-controls {
            height: calc(60px + env(safe-area-inset-top, 0px));
        }

        .cart-form {
            padding-top: calc(76px + env(safe-area-inset-top, 0px));
        }
    }

    @media (max-width: 768px) {
        .cart-header {
            height: calc(56px + env(safe-area-inset-top, 0px));
        }

        .cart-controls {
            height: calc(56px + env(safe-area-inset-top, 0px));
        }

        .cart-form {
            padding-top: calc(72px + env(safe-area-inset-top, 0px));
        }
    }

    @media (max-width: 480px) {
        .cart-header {
            height: calc(52px + env(safe-area-inset-top, 0px));
        }

        .cart-controls {
            height: calc(52px + env(safe-area-inset-top, 0px));
        }

        .cart-form {
            padding-top: calc(68px + env(safe-area-inset-top, 0px));
        }
    }
}




/* Поддержка темной темы */
@media (prefers-color-scheme: dark) {
    .cart-popup {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
        border-left-color: rgba(255, 255, 255, 0.08);
    }

    .cart-popup::before {
        background: #1e293b;
        color: #f1f5f9;
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }

    .cart-item {
        background: #2d3748;
        border-color: rgba(255, 255, 255, 0.08);
    }

    .cart-item:hover {
        border-color: rgba(255, 255, 255, 0.12);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    }

    .cart-item img {
        border-color: rgba(255, 255, 255, 0.08);
    }

    .cart-item-name {
        color: #e2e8f0;
    }

    .cart-item-price {
        color: #60a5fa;
    }

    .cart-item-controls {
        background: #374151;
        border-color: rgba(255, 255, 255, 0.08);
    }

    .add-item {
        background: #4b5563;
        border-color: #6b7280;
        color: #d1d5db;
    }

    .add-item:hover {
        background: #2563eb;
        border-color: #2563eb;
        color: white;
    }

    .cart-item-quantity {
        color: #f3f4f6;
    }

    .cart-summary {
        background: #2d3748;
        border-color: rgba(255, 255, 255, 0.08);
    }

    .cart-summary p {
        color: #e2e8f0;
    }

    #cart-total {
        color: #60a5fa;
    }

    .close-cart-button,
    .clear-cart-button {
        background: #374151;
        border-color: rgba(255, 255, 255, 0.08);
    }

    .close-cart-button:hover,
    .clear-cart-button:hover {
        background: #4b5563;
        border-color: rgba(255, 255, 255, 0.12);
    }

    .close-cart-button svg,
    .clear-cart-button svg {
        color: #9ca3af;
    }

    #modal-backdrop {
        background: rgba(0, 0, 0, 0.7);
    }

    #receipt-modal {
        background: #1e293b;
        border-color: rgba(255, 255, 255, 0.08);
    }

    .modal-header {
        background: linear-gradient(135deg, #2d3748 0%, #1f2937 100%);
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }

    .modal-header h2 {
        color: #f1f5f9;
    }

    .close-receipt-button {
        background: #374151;
        border-color: rgba(255, 255, 255, 0.08);
        color: #9ca3af;
    }

    .receipt-item {
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }

    .receipt-item-name {
        color: #cbd5e1;
    }

    .receipt-item-price {
        color: #e2e8f0;
    }

    .receipt-total {
        background: #2d3748;
        border-color: rgba(255, 255, 255, 0.08);
        color: #e2e8f0;
    }

    .receipt-total strong {
        color: #60a5fa;
    }

    .empty-message {
        color: #9ca3af;
    }

    .empty-cart .close-cart-button {
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    }

    .empty-cart .close-cart-button:hover {
        background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    }
}

/* Фокус состояния для доступности */
.cart-item:focus-within,
.add-item:focus-visible,
.close-cart-button:focus-visible,
.clear-cart-button:focus-visible,
.order-button:focus-visible,
.payment-option:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}