/* Стили для уведомления о добавлении в корзину */
.cart-notification {
    position: fixed;
    bottom: -100px;
    left: 20px;
    right: 20px;
    background-color: rgba(207, 25, 48, 1);
    color: white;
    border-radius: 14px;
    padding: 15px;
    z-index: 1000;
    transition: bottom 0.3s ease-in-out;
    font-family: 'Montserrat', sans-serif;
    box-shadow: 0px 4px 15.4px rgba(0, 0, 0, 0.25);

}

.cart-notification.show {
    bottom: 20px;
    display: block;
}

.notification-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.notification-left img {
    width: 36px;
    height: 36px;
}

.notification-text {
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.cart-info {
    display: flex;
    gap: 5px;
    font-size: 14px;
}

.view-cart-btn {
    background-color: white;
    color: rgba(207, 25, 48, 1);
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
}

/* Стили для попапа корзины */
.cart-popup,
.cart-popup *,
.cart-popup *::before,
.cart-popup *::after {
    box-sizing: border-box;
}

.cart-popup {
    position: fixed;
    bottom: -100%;

    width: 100%;
    height: 80vh;
    background-color: white;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 20px 20px 0 0;
    z-index: 1001;
    transition: bottom 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    font-family: 'Montserrat', sans-serif;
    z-index: 999999;
}

.cart-popup.show {
    bottom: 0;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.popup-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.close-popup {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.popup-content {
    flex: 1;
    overflow-y: auto;
    padding: 0px;
}

.popup-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background-color: rgba(207, 25, 48, 1);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: block;
}

.mobile-menu-modal {
    display: none;
    /* Скрыто по умолчанию */
    position: fixed;
    /* Фиксированное положение */
    z-index: 9999999;
    /* Поверх всего */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    /* Включение прокрутки, если содержимое больше экрана */
    background-color: rgba(0, 0, 0, 0.8);
    /* Полупрозрачный черный фон */
    backdrop-filter: blur(5px);
    /* Эффект размытия, если поддерживается */
    animation: fadeIn 0.3s ease-out;
    /* Анимация появления */
}

.mobile-menu-modal.active {
    display: flex;
    /* Отображаем модальное окно */
    justify-content: center;
    /* Центрирование содержимого */
    align-items: center;
}

.modal-content {

    margin: auto;
    /* Центрирование */
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    /* Ширина модального окна */
    max-width: 1200px;
    /* Максимальная ширина */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    height: 90vh;
    /* Высота модального окна */
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;

}

.modal-header .logo img {
    max-height: 40px;
    /* Размер логотипа в модальном окне */
}

.close-button {
    color: #aaa;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover,
.close-button:focus {
    color: white;
    text-decoration: none;
}

.modal-body-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    /* Три колонки */
    grid-template-rows: 1fr 1fr;
    /* Две строки */
    gap: 20px;
    /* Отступы между элементами сетки */
    padding-top: 20px;
    flex-grow: 1;
    /* Чтобы сетка занимала все доступное пространство */
}

/* Стили для левого блока с меню */
.modal-menu-category {
    background-image: url("/wp-content/uploads/2025/08/наборы-1.png");
    border-radius: 8px;
    padding: 20px;
    grid-row: 1 / 3;
    /* Занимает обе строки */
    display: flex;
    flex-direction: column;
    background-size: cover;
    background-position: center;
}

.modal-menu-title {
    color: #fff;
    font-size: 1.8em;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.modal-menu-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.modal-menu-button {
    background: #333;
    /* Цвет кнопок категорий */
    color: #fff;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.modal-menu-button:hover {
    background: #555;
}

.modal-search {
    display: flex;
    align-items: center;
    background: #333;
    /* Фон поля поиска */
    border-radius: 5px;
    padding: 10px;
    margin-top: auto;
    /* Прижимает поиск к низу левого блока */
}

.modal-search-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.modal-search-input {
    background: transparent;
    border: none;
    color: #fff;
    width: 100%;
    outline: none;
    font-size: 1em;
}

.modal-search-input::placeholder {
    color: #aaa;
}

/* Стили для карточек АКЦИИ, ДОСТАВКА, ГЛАВНАЯ, КОНТАКТЫ */
.modal-menu-card {
    border-radius: 18px;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    color: #fff;
    font-size: 1.5em;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
    position: relative;
    overflow: hidden;
    padding-top: 50px;
    padding-left: 20px;
}

/* При режиме только-каталог скрываем карточки и разворачиваем меню */
.mobile-menu-modal.catalog-only .modal-menu-card {
    display: none !important;
}

.mobile-menu-modal.catalog-only .modal-body-grid {
    grid-template-columns: 1fr !important;
    grid-template-rows: 1fr !important;
}

.mobile-menu-modal.catalog-only .modal-menu-category {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
}

.modal-menu-card:hover {
    background-color: #4D0F0F;
    /* Более светлый оттенок при наведении */
}

/* Добавьте стили для фоновых изображений и затемнений, как на PDF */
.card-sales {
    background-image: url('/wp-content/uploads/2025/08/роллы.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: auto;
}

.card-delivery {
    background-image: url('/wp-content/uploads/2025/08/салаты.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: auto;
}

.card-home {
    background-image: url('/wp-content/uploads/2025/08/суши.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: auto;
}

.card-contacts {
    background-image: url('/wp-content/uploads/2025/08/горячие-блюда.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: auto;
}

/* Анимация появления */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Медиа-запросы для адаптивности, если нужно */
@media (max-width: 768px) {
    .modal-body-grid {
        grid-template-columns: 1fr 1fr;
        /* 2 колонки на меньших экранах */
        grid-template-rows: auto;
    }

    .modal-menu-category {
        grid-column: 1 / 3;
        /* Левый блок занимает всю ширину сверху */
        grid-row: auto;
    }

    .entry-content {
        padding: 0 5%;
    }
}

@media (max-width: 480px) {
    .modal-body-grid {
        grid-template-columns: 1fr;
        /* Одна колонка на очень маленьких экранах */
    }

    .modal-menu-category {
        grid-column: auto;
    }
}

.entry-content {
    padding: 0 15%;
}

/* ===== ОБЩИЕ СТИЛИ МИНИ-КОРЗИНЫ ===== */
#cart-popup .woocommerce-mini-cart-wrapper {
    font-family: 'Montserrat', sans-serif;
}

#cart-popup .popup-content {
    padding: 0;
}

/* Список товаров */
#cart-popup .woocommerce-mini-cart.cart_list,
.woocommerce #cart-popup ul.cart_list,
.woocommerce-page #cart-popup ul.cart_list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    display: block !important;
}

#cart-popup .mini_cart_item,
.woocommerce #cart-popup ul.cart_list li,
.woocommerce-page #cart-popup ul.cart_list li {
    display: flex !important;
    align-items: center !important;
    padding: 15px !important;
    border-bottom: 1px solid #f0f0f0 !important;
    position: relative !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

#cart-popup .mini_cart_item:last-child,
.woocommerce #cart-popup ul.cart_list li:last-child {
    border-bottom: none !important;
}

/* Кнопка удаления */
#cart-popup .remove.remove_from_cart_button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: #dc3545;
    color: white !important;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-size: 16px;
    text-decoration: none;
    transition: background 0.3s;
    display: block;
}

#cart-popup .remove.remove_from_cart_button:hover {
    background: #c82333;
    color: white !important;
}

/* Ссылка товара */
#cart-popup .mini_cart_item>a:not(.remove) {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: #333;
    flex: 1;
    padding-right: 30px;
}

/* Изображение товара */
#cart-popup .mini_cart_item img,
.woocommerce #cart-popup ul.cart_list li img {
    width: 60px !important;
    height: 60px !important;
    max-width: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    margin: 0 !important;
    float: none !important;
}

/* Название товара */
#cart-popup .mini_cart_item>a:not(.remove) {
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
}

/* Количество и цена */
#cart-popup .quantity {
    margin-top: 5px;
    font-size: 13px;
    color: #666;
}

#cart-popup .woocommerce-Price-amount {
    color: #b7b7b7;
    font-weight: 600;
}

/* Блок итогов */
#cart-popup .woocommerce-mini-cart__total {
    padding: 20px;
    margin: 0;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#cart-popup .woocommerce-mini-cart__total strong {
    color: #333;
    font-weight: 600;
}

/* Кнопки */
#cart-popup .woocommerce-mini-cart__buttons {
    padding: 20px;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

#cart-popup .woocommerce-mini-cart__buttons .button {
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    display: block;
}

#cart-popup .woocommerce-mini-cart__buttons .button.wc-forward {
    background: #6c757d;
    color: white;
}

#cart-popup .woocommerce-mini-cart__buttons .button.wc-forward:hover {
    background: #5a6268;
}

#cart-popup .woocommerce-mini-cart__buttons .button.checkout {
    background: #28a745;
    color: white;
}

#cart-popup .woocommerce-mini-cart__buttons .button.checkout:hover {
    background: #218838;
}

/* Пустая корзина */
#cart-popup .woocommerce-mini-cart__empty-message {
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* ===== АНИМАЦИИ ===== */
#cart-popup .mini_cart_item {
    transition: background-color 0.3s;
}

#cart-popup .mini_cart_item:hover {
    background-color: #f8f9fa;
}

/* ===== ПОЛОСА ПРОКРУТКИ ===== */
#cart-popup .woocommerce-mini-cart.cart_list::-webkit-scrollbar {
    width: 6px;
}

#cart-popup .woocommerce-mini-cart.cart_list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#cart-popup .woocommerce-mini-cart.cart_list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

#cart-popup .woocommerce-mini-cart.cart_list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 480px) {
    #cart-popup .mini_cart_item {
        padding: 12px;
    }

    #cart-popup .mini_cart_item img,
    .woocommerce #cart-popup ul.cart_list li img {
        width: 50px !important;
        height: 50px !important;
        max-width: 50px;
    }

    #cart-popup .mini_cart_item>a:not(.remove) {
        font-size: 13px;
        gap: 10px;
    }

    #cart-popup .woocommerce-mini-cart__buttons {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    #cart-popup .woocommerce-mini-cart__total {
        padding: 15px;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    #cart-popup .remove.remove_from_cart_button {
        top: 8px;
        right: 8px;
        width: 20px;
        height: 20px;
        line-height: 20px;
        font-size: 14px;
    }
}

/* ===== СОСТОЯНИЯ ===== */
#cart-popup .mini_cart_item .loading {
    opacity: 0.6;
}

/* ===== ИКОНКИ ===== */
#cart-popup .remove.remove_from_cart_button::before {
    content: '×';
    display: block;
}

/* ===== ФОКУС ===== */
#cart-popup .woocommerce-mini-cart__buttons .button:focus {
    outline: 2px solid #cf1930;
    outline-offset: 2px;
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ ПОПАПА ===== */
#cart-popup .popup-content {
    border-radius: 0 0 15px 15px;
}

#cart-popup .popup-footer {
    padding: 0;
}

/* Скрываем стандартные кнопки если есть наша кнопка "Оформить" */
#cart-popup .woocommerce-mini-cart__buttons {
    display: none !important;
}

/* Стили для нашей кастомной кнопки */
#checkout-btn {
    width: 100%;
    padding: 16px;
    background: #cf1930;
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

#checkout-btn:hover {
    background: #218838;
}