/* ========================================
   PRODUCT CARDS
   ======================================== */

/* Базовые стили карточек */
.product-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    background: white;
    min-height: 450px;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    border-color: rgba(217, 35, 50, 0.3);
}

/* Изображения */
.product-image {
    height: 200px;
    object-fit: cover;
    width: 100%;
    object-position: center center;
    flex-shrink: 0;
}

/* Контент карточки */
.product-card .p-4 {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-info {
    flex-shrink: 0;
    min-height: 80px;
    margin-bottom: 0.5rem;
}

.product-info h3 {
    min-height: 48px;
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-info p {
    flex: 1;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.product-actions {
    margin-top: auto;
    flex-shrink: 0;
}

/* ========================================
   ПРОСТАЯ РАМОЧКА ДЛЯ ЦЕНЫ
   ======================================== */

.simple-price-box {
    background: #ffffff;
    border: 1px solid #dc2626;
    border-radius: 8px;
    padding: 12px;
    margin: 12px 0;
    text-align: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.simple-price-main {
    font-size: 1.25rem;
    font-weight: 700;
    color: #dc2626;
    margin: 4px 0;
    line-height: 1.2;
}

.simple-price-info {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 2px;
    font-weight: 500;
}

/* Hover эффекты для рамочки */
.product-card:hover .simple-price-box {
    border-color: #b91c1c;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
    transform: translateY(-1px);
}

.product-card:hover .simple-price-main {
    transform: scale(1.05);
}

/* Старая цена в рамочке */
.simple-price-box .old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 2px;
    font-weight: 500;
}

/* ========================================
   БЕЙДЖИ ВНУТРИ РАМОЧКИ
   ======================================== */

.simple-quality-badge {
    background: #28a745;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    display: inline-block;
    margin-top: 6px;
}

.simple-savings-badge {
    background: #ffc107;
    color: #212529;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 6px;
}

.simple-new-badge {
    background: #6f42c1;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    display: inline-block;
    margin-top: 6px;
}

.simple-popular-badge {
    background: #17a2b8;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    display: inline-block;
    margin-top: 6px;
}

/* ========================================
   БЕЙДЖИ НА КАРТОЧКАХ (УГЛЫ)
   ======================================== */

/* Контейнер бейджей */
.badges-container {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: row;
    gap: 4px;
    z-index: 5;
    align-items: flex-start;
    justify-content: flex-end;
    flex-wrap: wrap;
    max-width: calc(100% - 20px);
}

/* Базовые стили бейджей */
.badge {
    position: relative;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 35px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Типы бейджей */
.badge-new {
    background-color: #D92332;
    color: white;
    order: 2;
}

.badge-sale {
    background-color: #f8bd24;
    color: #222;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    order: 3;
}

.badge-1\+1,
.badge-1plus1 {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border: 2px solid #a78bfa;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
    order: 1;
}

.badge-hot {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    order: 4;
}

.badge-limited {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    order: 5;
}

.badge-popular {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    order: 6;
}

.badge-best {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1f2937;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
    border: 1px solid #fcd34d;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    order: 7;
}

.badge-seasonal {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
    order: 8;
}

/* Hover эффекты для бейджей */
.product-card:hover .badge {
    transform: scale(1.05);
}

/* ========================================
   КНОПКИ
   ======================================== */

.btn-simple {
    background: #dc2626;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-simple:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

.btn-simple:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

/* ========================================
   QUANTITY SELECTION (1+1) - КОМПАКТНАЯ ВЕРСИЯ
   ======================================== */

.quantity-option {
    transition: all 0.3s ease;
    cursor: pointer;
}

.quantity-option:hover {
    border-color: #3b82f6 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quantity-selected {
    border-color: #10b981 !important;
    background-color: #ecfdf5 !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.quantity-selected .text-green-700 {
    color: #047857 !important;
}

.quantity-selected .text-green-800 {
    color: #065f46 !important;
}

.quantity-selected .text-green-600 {
    color: #059669 !important;
}

.quantity-selector {
    display: none;
}

/* ========================================
   CART OVERLAY
   ======================================== */

.cart-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background-color: white;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.cart-overlay.active {
    right: 0;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--primary-color);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-new {
    transition: all 0.2s ease;
}

.cart-item-new:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cart-overlay a[href^="tel:"] {
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.cart-overlay a[href^="tel:"]:hover {
    transform: scale(1.05);
}

/* ========================================
   MOBILE NAVIGATION
   ======================================== */

.mobile-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    height: 100vh;
    background-color: white;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.mobile-nav.active {
    left: 0;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Accordion */
.accordion-item {
    border-bottom: 1px solid #eee;
}

.accordion-header {
    padding: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content.active {
    max-height: 500px;
}

.accordion-content .submenu-mobile-item {
    padding: 0.75rem 1rem;
    padding-left: 2rem;
    transition: all 0.3s ease;
}

/* ========================================
   CAROUSEL
   ======================================== */

.carousel-container {
    position: relative;
    overflow: hidden;
}

.carousel-slide {
    display: none;
    transition: all 0.5s ease;
}

.carousel-slide.active {
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255,255,255,0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background-color: rgba(255,255,255,0.8);
}

.carousel-btn-prev {
    left: 10px;
}

.carousel-btn-next {
    right: 10px;
}

/* ========================================
   СТАРЫЕ ЦЕНЫ И СПЕЦИАЛЬНЫЕ ЦЕНЫ
   ======================================== */

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 4px;
}

.special-price {
    color: #dc2626;
    font-weight: 900;
    font-size: 1.5rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ========================================
   АДАПТИВНОСТЬ - УЛЬТРАКОМПАКТНАЯ МОБИЛЬНАЯ ВЕРСИЯ
   ======================================== */

/* Мобильные устройства - ОЧЕНЬ КОМПАКТНО */
@media (max-width: 768px) {
    /* Принудительно делаем 2 колонки на мобильных */
    .grid-cols-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* УЛЬТРАКОМПАКТНЫЕ карточки */
    .product-card {
        min-height: 240px !important; /* Сильно уменьшили */
        margin-bottom: 0.5rem !important;
    }
    
    /* МАЛЕНЬКИЕ изображения */
    .product-image {
        height: 100px !important; /* Сильно уменьшили */
    }
    
    /* МИНИМАЛЬНАЯ информация о продукте */
    .product-info {
        min-height: 35px !important;
        margin-bottom: 0.25rem !important;
    }
    
    .product-info h3 {
        min-height: 24px !important;
        font-size: 0.8rem !important; /* Очень маленький */
        line-height: 1.1 !important;
        margin-bottom: 0.125rem !important;
    }
    
    .product-info p {
        font-size: 0.65rem !important; /* Очень маленький */
        line-height: 1.2 !important;
        margin-bottom: 0.25rem !important;
        /* Только 1 строка описания */
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* МИНИ рамочка цены */
    .simple-price-box {
        padding: 4px 6px !important;
        margin: 4px 0 !important;
        border-radius: 4px !important;
    }
    
    .simple-price-main {
        font-size: 0.9rem !important;
        margin: 1px 0 !important;
    }
    
    .simple-price-info {
        font-size: 0.6rem !important;
    }
    
    /* МИНИ бейджи в рамочке */
    .simple-quality-badge,
    .simple-savings-badge,
    .simple-new-badge,
    .simple-popular-badge {
        font-size: 0.55rem !important;
        padding: 1px 3px !important;
        margin-top: 2px !important;
    }
    
    /* МИНИ кнопки */
    .btn-simple {
        padding: 4px 6px !important;
        font-size: 0.65rem !important;
    }
    
    .btn-primary {
        padding: 6px 8px !important;
        font-size: 0.7rem !important;
    }
    
    /* МИНИ бейджи на углах */
    .badges-container {
        top: 3px !important;
        right: 3px !important;
        gap: 1px !important;
        max-width: calc(100% - 6px) !important;
    }
    
    .badge {
        font-size: 0.5rem !important;
        padding: 1px 3px !important;
        min-width: 18px !important;
        border-radius: 2px !important;
    }
    
    /* КОМПАКТНЫЙ селектор количества для 1+1 */
    .quantity-selection {
        margin-bottom: 0.25rem !important;
    }
    
    .quantity-option {
        padding: 0.25rem !important;
    }
    
    .quantity-option .text-lg {
        font-size: 0.75rem !important;
    }
    
    .quantity-option .text-sm {
        font-size: 0.6rem !important;
    }
    
    .quantity-option .text-xs {
        font-size: 0.55rem !important;
    }
    
    /* КОМПАКТНАЯ информация о выбранной цене */
    .product-actions [id^="selected-price-"] {
        font-size: 0.9rem !important;
    }
    
    .product-actions [id^="selected-pieces-"] {
        font-size: 0.65rem !important;
    }
    
    /* МИНИ экономия для 1+1 */
    .bg-yellow-100 {
        font-size: 0.55rem !important;
        padding: 1px 4px !important;
    }
    
    /* КОМПАКТНЫЕ отступы между селекторами 1+1 */
    .quantity-selection .flex.space-x-2 {
        gap: 0.25rem !important;
    }
    
    /* УМЕНЬШАЕМ отступы внутри карточки */
    .product-card .p-4 {
        padding: 0.5rem !important;
    }
}

/* Очень маленькие экраны - МАКСИМАЛЬНО КОМПАКТНО */
@media (max-width: 480px) {
    .product-card {
        min-height: 220px !important;
    }
    
    .product-image {
        height: 90px !important;
    }
    
    .product-info h3 {
        font-size: 0.75rem !important;
        min-height: 20px !important;
    }
    
    .product-info p {
        font-size: 0.6rem !important;
    }
    
    .simple-price-main {
        font-size: 0.8rem !important;
    }
    
    .btn-simple,
    .btn-primary {
        padding: 3px 4px !important;
        font-size: 0.6rem !important;
    }
    
    .product-card .p-4 {
        padding: 0.375rem !important;
    }
}

/* ========================================
   СПЕЦИАЛЬНЫЕ СТИЛИ ДЛЯ СЕТОВ И ГОРЯЧИХ СУШИ
   ======================================== */

/* Увеличенные изображения для страницы сетов */
#products-grid .product-image {
    height: 250px;
}

/* Специально для горячих суши - они высокие */
body:has([href*="karstie-sushi"]) .product-image,
body:has([href*="gorjachie-sushi"]) .product-image,
[data-page="hot-sushi"] .product-image,
.hot-sushi-page .product-image {
    height: 280px;
}

@media (min-width: 769px) {
    /* Сеты на десктопе */
    #products-grid .product-image {
        height: 240px;
    }
    
    #products-grid .product-card {
        min-height: 520px;
    }
    
    /* Горячие суши на десктопе */
    body:has([href*="karstie-sushi"]) .product-image,
    body:has([href*="gorjachie-sushi"]) .product-image,
    [data-page="hot-sushi"] .product-image,
    .hot-sushi-page .product-image {
        height: 320px;
    }
    
    body:has([href*="karstie-sushi"]) .product-card,
    body:has([href*="gorjachie-sushi"]) .product-card,
    [data-page="hot-sushi"] .product-card,
    .hot-sushi-page .product-card {
        min-height: 540px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    #products-grid .product-image {
        height: 260px;
    }
    
    /* Горячие суши на планшетах */
    body:has([href*="karstie-sushi"]) .product-image,
    body:has([href*="gorjachie-sushi"]) .product-image,
    [data-page="hot-sushi"] .product-image,
    .hot-sushi-page .product-image {
        height: 300px;
    }
}

/* Мобильные корректировки для специальных страниц */
@media (max-width: 768px) {
    /* Горячие суши - чуть больше места */
    body:has([href*="karstie-sushi"]) .product-image,
    body:has([href*="gorjachie-sushi"]) .product-image,
    [data-page="hot-sushi"] .product-image,
    .hot-sushi-page .product-image {
        height: 110px !important;
    }
    
    body:has([href*="karstie-sushi"]) .product-card,
    body:has([href*="gorjachie-sushi"]) .product-card,
    [data-page="hot-sushi"] .product-card,
    .hot-sushi-page .product-card {
        min-height: 250px !important;
    }
    
    /* Сеты - чуть больше места */
    #products-grid .product-image {
        height: 105px !important;
    }
    
    #products-grid .product-card {
        min-height: 245px !important;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.quantity-option:focus-within {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.badge:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Высокий контраст */
@media (prefers-contrast: high) {
    .badge {
        border: 2px solid currentColor;
        font-weight: 900;
    }
}

/* Отключение анимаций для пользователей с ограниченными возможностями */
@media (prefers-reduced-motion: reduce) {
    .badge,
    .product-card,
    .badges-container,
    .quantity-option,
    .cart-item-new {
        animation: none !important;
        transition: none !important;
    }
}

/* ДОБАВИТЬ В components.css - стили для кликабельных кнопок доставки */

/* ========================================
   КЛИКАБЕЛЬНЫЕ КНОПКИ ДОСТАВКИ В КОРЗИНЕ
   ======================================== */

.delivery-option-btn,
.pickup-option-btn {
    display: block;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.delivery-option-btn:hover,
.pickup-option-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.delivery-option-btn:active,
.pickup-option-btn:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* Эффект нажатия */
.delivery-option-btn::after,
.pickup-option-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.delivery-option-btn:active::after,
.pickup-option-btn:active::after {
    width: 100px;
    height: 100px;
}

/* Специфичные стили для доставки */
.delivery-option-btn {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border: 2px solid #93c5fd;
}

.delivery-option-btn:hover {
    background: linear-gradient(135deg, #bfdbfe, #93c5fd);
    border-color: #60a5fa;
}

/* Специфичные стили для самовывоза */
.pickup-option-btn {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    border: 2px solid #86efac;
}

.pickup-option-btn:hover {
    background: linear-gradient(135deg, #bbf7d0, #86efac);
    border-color: #4ade80;
}

/* Иконки в кнопках */
.delivery-option-btn i,
.pickup-option-btn i {
    transition: transform 0.2s ease;
}

.delivery-option-btn:hover i,
.pickup-option-btn:hover i {
    transform: scale(1.1);
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .delivery-option-btn,
    .pickup-option-btn {
        padding: 0.75rem 0.5rem;
    }
    
    .delivery-option-btn i,
    .pickup-option-btn i {
        font-size: 1rem !important;
    }
    
    .delivery-option-btn .text-xs,
    .pickup-option-btn .text-xs {
        font-size: 0.65rem !important;
    }
}

/* Фокус для доступности */
.delivery-option-btn:focus,
.pickup-option-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Уведомления */
.delivery-notification {
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ДОБАВИТЬ В components.css - увеличенные изображения для сетов */

/* ========================================
   УВЕЛИЧЕННЫЕ ИЗОБРАЖЕНИЯ ДЛЯ СЕТОВ/КОМПЛЕКТОВ
   ======================================== */

/* Страница сетов - увеличиваем изображения */
body:has([href*="sets.html"]) .product-image,
[data-page="sets"] .product-image,
.sets-page .product-image {
    height: 350px !important; /* Сильно увеличили для сетов */
}

/* Для grid на странице сетов */
#products-grid .product-image {
    height: 350px !important;
}

/* Увеличиваем высоту карточек для сетов */
body:has([href*="sets.html"]) .product-card,
[data-page="sets"] .product-card,
.sets-page .product-card,
#products-grid .product-card {
    min-height: 600px !important;
}

/* Десктопные размеры для сетов */
@media (min-width: 769px) {
    /* Сеты на десктопе - еще больше */
    body:has([href*="sets.html"]) .product-image,
    [data-page="sets"] .product-image,
    .sets-page .product-image,
    #products-grid .product-image {
        height: 400px !important; /* Очень большие изображения */
    }
    
    body:has([href*="sets.html"]) .product-card,
    [data-page="sets"] .product-card,
    .sets-page .product-card,
    #products-grid .product-card {
        min-height: 650px !important;
    }
}

/* Планшеты - средний размер */
@media (min-width: 768px) and (max-width: 1024px) {
    body:has([href*="sets.html"]) .product-image,
    [data-page="sets"] .product-image,
    .sets-page .product-image,
    #products-grid .product-image {
        height: 380px !important;
    }
    
    body:has([href*="sets.html"]) .product-card,
    [data-page="sets"] .product-card,
    .sets-page .product-card,
    #products-grid .product-card {
        min-height: 620px !important;
    }
}

/* Мобильные - компактнее, но все равно больше чем обычные суши */
@media (max-width: 768px) {
    body:has([href*="sets.html"]) .product-image,
    [data-page="sets"] .product-image,
    .sets-page .product-image,
    #products-grid .product-image {
        height: 200px !important; /* Намного больше чем обычные 120px */
    }
    
    body:has([href*="sets.html"]) .product-card,
    [data-page="sets"] .product-card,
    .sets-page .product-card,
    #products-grid .product-card {
        min-height: 380px !important;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    body:has([href*="sets.html"]) .product-image,
    [data-page="sets"] .product-image,
    .sets-page .product-image,
    #products-grid .product-image {
        height: 180px !important;
    }
    
    body:has([href*="sets.html"]) .product-card,
    [data-page="sets"] .product-card,
    .sets-page .product-card,
    #products-grid .product-card {
        min-height: 360px !important;
    }
}

/* ========================================
   АЛЬТЕРНАТИВНЫЙ МЕТОД - ЧЕРЕЗ КЛАССЫ
   ======================================== */

/* Если предыдущий метод не работает, используйте классы */
.set-product-card .product-image,
.komplekt-product-card .product-image {
    height: 350px !important;
}

.set-product-card,
.komplekt-product-card {
    min-height: 600px !important;
}

@media (min-width: 769px) {
    .set-product-card .product-image,
    .komplekt-product-card .product-image {
        height: 400px !important;
    }
    
    .set-product-card,
    .komplekt-product-card {
        min-height: 650px !important;
    }
}

@media (max-width: 768px) {
    .set-product-card .product-image,
    .komplekt-product-card .product-image {
        height: 200px !important;
    }
    
    .set-product-card,
    .komplekt-product-card {
        min-height: 380px !important;
    }
}

@media (max-width: 480px) {
    .set-product-card .product-image,
    .komplekt-product-card .product-image {
        height: 180px !important;
    }
    
    .set-product-card,
    .komplekt-product-card {
        min-height: 360px !important;
    }
}

/* ========================================
   ОПТИМИЗИРОВАННАЯ РАСКЛАДКА КАРТОЧЕК
   Больше изображения, меньше пустого места
   ======================================== */

/* Базовые размеры для всех карточек */
.product-card {
    min-height: 350px !important; /* Уменьшили с 380px */
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

/* Увеличиваем изображения */
.product-image {
    height: 200px !important; /* Увеличили с 160px */
    object-fit: cover !important;
    width: 100% !important;
    object-position: center center !important;
    flex-shrink: 0 !important;
}

/* Для популярных продуктов */
#popular-products .product-card {
    min-height: 350px !important; /* Уменьшили с 380px */
}

#popular-products .product-image {
    height: 200px !important; /* Увеличили с 160px */
}

/* Уменьшаем отступы внутри карточки */
#popular-products .product-card .p-4,
.product-card .p-4 {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0.75rem !important; /* Уменьшили с 1rem */
}

/* Компактнее заголовки */
#popular-products .product-info h3,
.product-info h3 {
    min-height: 40px !important; /* Уменьшили с 48px */
    font-size: 0.95rem !important; /* Чуть меньше шрифт */
    line-height: 1.2 !important;
    margin-bottom: 0.4rem !important; /* Уменьшили отступ */
}

/* Компактнее описания */
#popular-products .product-info p,
.product-info p {
    flex: 1 !important;
    line-height: 1.3 !important; /* Уменьшили с 1.4 */
    margin-bottom: 0.5rem !important; /* Уменьшили с 0.75rem */
    font-size: 0.875rem !important;
    max-height: 5.2em !important; /* 4 строки */
    display: -webkit-box !important;
    -webkit-line-clamp: 4 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* Компактнее нижняя часть */
#popular-products .product-actions,
.product-actions {
    margin-top: auto !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.75rem !important; /* Уменьшили с 1rem */
    padding-top: 0.25rem !important; /* Уменьшили отступ */
}

/* Цена */
#popular-products .product-price,
.product-price {
    font-size: 1.1rem !important; /* Чуть меньше */
    font-weight: 700 !important;
    color: #dc2626 !important;
    flex-shrink: 0 !important;
}

/* Кнопка */
#popular-products .btn-primary,
.btn-primary {
    flex-shrink: 0 !important;
    padding: 0.4rem 0.8rem !important; /* Компактнее */
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    min-width: 70px !important;
    white-space: nowrap !important;
}

/* ========================================
   ПЛАНШЕТЫ
   ======================================== */

@media (min-width: 768px) and (max-width: 1024px) {
    .product-card {
        min-height: 320px !important;
    }
    
    .product-image {
        height: 180px !important;
    }
    
    #popular-products .product-card {
        min-height: 320px !important;
    }
    
    #popular-products .product-image {
        height: 180px !important;
    }
    
    .product-card .p-4 {
        padding: 0.6rem !important;
    }
    
    .product-info h3 {
        min-height: 36px !important;
        font-size: 0.9rem !important;
    }
    
    .product-info p {
        font-size: 0.8rem !important;
        max-height: 4.8em !important;
        -webkit-line-clamp: 3 !important;
    }
    
    .product-price {
        font-size: 1rem !important;
    }
    
    .btn-primary {
        padding: 0.35rem 0.7rem !important;
        font-size: 0.75rem !important;
        min-width: 65px !important;
    }
}

/* ========================================
   МОБИЛЬНЫЕ
   ======================================== */

@media (max-width: 768px) {
    .product-card {
        min-height: 280px !important;
    }
    
    .product-image {
        height: 140px !important; /* Увеличили с 120px */
    }
    
    #popular-products .product-card {
        min-height: 280px !important;
    }
    
    #popular-products .product-image {
        height: 140px !important;
    }
    
    .product-card .p-4 {
        padding: 0.5rem !important;
    }
    
    .product-info h3 {
        min-height: 28px !important;
        font-size: 0.85rem !important;
        margin-bottom: 0.3rem !important;
    }
    
    .product-info p {
        font-size: 0.75rem !important;
        line-height: 1.25 !important;
        margin-bottom: 0.4rem !important;
        max-height: 3.75em !important;
        -webkit-line-clamp: 3 !important;
    }
    
    .product-actions {
        gap: 0.5rem !important;
    }
    
    .product-price {
        font-size: 0.95rem !important;
    }
    
    .btn-primary {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.7rem !important;
        min-width: 55px !important;
    }
}

/* ========================================
   ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ
   ======================================== */

@media (max-width: 480px) {
    .product-card {
        min-height: 260px !important;
    }
    
    .product-image {
        height: 120px !important;
    }
    
    #popular-products .product-card {
        min-height: 260px !important;
    }
    
    #popular-products .product-image {
        height: 120px !important;
    }
    
    .product-card .p-4 {
        padding: 0.4rem !important;
    }
    
    .product-info h3 {
        min-height: 24px !important;
        font-size: 0.8rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .product-info p {
        font-size: 0.7rem !important;
        margin-bottom: 0.3rem !important;
        max-height: 3.5em !important;
        -webkit-line-clamp: 2 !important;
    }
    
    .product-price {
        font-size: 0.9rem !important;
    }
    
    .btn-primary {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.65rem !important;
        min-width: 50px !important;
    }
}

/* ========================================
   СПЕЦИАЛЬНЫЕ СТИЛИ ДЛЯ АКЦИЙ 1+1
   ======================================== */

/* Акционные карточки нуждаются в больше места */
.product-card:has(.quantity-selection) {
    min-height: 420px !important;
}

.product-card:has(.quantity-selection) .product-image {
    height: 160px !important; /* Чуть меньше для акций */
}

/* Компактнее селекторы количества */
.quantity-selection {
    margin-bottom: 0.5rem !important;
}

.quantity-option {
    padding: 0.5rem !important; /* Уменьшили отступы */
}

.quantity-option .text-lg {
    font-size: 0.9rem !important;
}

.quantity-option .text-sm {
    font-size: 0.75rem !important;
}

.quantity-option .text-xs {
    font-size: 0.65rem !important;
}

@media (max-width: 768px) {
    .product-card:has(.quantity-selection) {
        min-height: 340px !important;
    }
    
    .product-card:has(.quantity-selection) .product-image {
        height: 120px !important;
    }
    
    .quantity-option {
        padding: 0.3rem !important;
    }
}

/* ========================================
   КАТАЛОЖНЫЕ СТРАНИЦЫ
   ======================================== */

#products-grid .product-image {
    height: 200px !important;
}

#products-grid .product-card {
    min-height: 350px !important;
}

@media (min-width: 768px) and (max-width: 1024px) {
    #products-grid .product-image {
        height: 180px !important;
    }
    
    #products-grid .product-card {
        min-height: 320px !important;
    }
}

@media (max-width: 768px) {
    #products-grid .product-image {
        height: 140px !important;
    }
    
    #products-grid .product-card {
        min-height: 280px !important;
    }
}

@media (max-width: 480px) {
    #products-grid .product-image {
        height: 120px !important;
    }
    
    #products-grid .product-card {
        min-height: 260px !important;
    }
}

/* ========================================
   СТИЛИ ДЛЯ БЕЙДЖА "HOT" (ГОРЯЧИЕ СУШИ)
   ======================================== */

/* Основной бейдж "hot" для горячих суши */
.badge-hot {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.4);
    border: 2px solid #fb923c;
    position: relative;
    overflow: hidden;
    order: 4;
    animation: hotSteam 3s infinite;
}

/* Анимация "пара" для горячих суши */
@keyframes hotSteam {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(249, 115, 22, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 4px 12px rgba(249, 115, 22, 0.6);
        transform: scale(1.02);
    }
}

/* Убираем иконку термометра, чтобы не перекрывала текст */

/* Альтернативный стиль без эмодзи (более строгий дизайн) */
.badge-hot-alt {
    background: linear-gradient(135deg, #f97316, #ea580c, #c2410c);
    color: white;
    box-shadow: 
        0 2px 8px rgba(249, 115, 22, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 2px solid #fb923c;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    order: 4;
}

/* Тепловой эффект для hot бейджа */
.badge-hot-alt::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 165, 0, 0.1),
        transparent
    );
    animation: heatWave 4s infinite;
}

@keyframes heatWave {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(0%) translateY(0%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Hover эффекты для hot бейджа */
.product-card:hover .badge-hot {
    animation-duration: 1.5s;
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.6);
    transform: scale(1.05);
    background: linear-gradient(135deg, #fb923c, #f97316);
}

.product-card:hover .badge-hot-alt {
    box-shadow: 
        0 4px 16px rgba(249, 115, 22, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Стили для простого бейджа в рамочке цены */
.simple-hot-badge {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 6px;
    box-shadow: 0 2px 4px rgba(249, 115, 22, 0.3);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    @keyframes hotSteam {
        0%, 100% {
            box-shadow: 0 1px 4px rgba(249, 115, 22, 0.4);
            transform: scale(1);
        }
        50% {
            box-shadow: 0 2px 8px rgba(249, 115, 22, 0.6);
            transform: scale(1.01);
        }
    }
}

/* Отключение анимаций для пользователей с ограниченными возможностями */
@media (prefers-reduced-motion: reduce) {
    .badge-hot,
    .badge-hot-alt {
        animation: none !important;
    }
    
    .badge-hot-alt::after {
        animation: none !important;
    }
}

/* Стили для высокого контраста */
@media (prefers-contrast: high) {
    .badge-hot,
    .badge-hot-alt {
        border: 3px solid #ea580c;
        font-weight: 900;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    }
}

/* ========================================
   МОБИЛЬНЫЕ КАТЕГОРИИ С ФОНОВЫМИ ИЗОБРАЖЕНИЯМИ
   ======================================== */

/* Общие стили для категорий */
.mobile-categories-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.category-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    transform-origin: center;
}

.category-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.category-card:active {
    transform: translateY(-2px) scale(0.98);
    transition: transform 0.1s ease;
}

/* Контейнеры изображений с фонами */
.category-image-container {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* Фоновые изображения для каждой категории */
.category-all .category-image-container {
    background-image: url('../images/categories/all-sushi-bg.webp');
    background-color: #6b7280; /* Fallback color */
}

.category-cold .category-image-container {
    background-image: url('../images/categories/cold-sushi-bg.webp');
    background-color: #3b82f6; /* Blue fallback */
}

.category-hot .category-image-container {
    background-image: url('../images/categories/hot-sushi-bg.webp');
    background-color: #f97316; /* Orange fallback */
}

.category-sets .category-image-container {
    background-image: url('../images/categories/sets-bg.webp');
    background-color: #10b981; /* Green fallback */
}

/* Градиентные оверлеи */
.category-overlay {
    backdrop-filter: blur(1px);
    transition: all 0.3s ease;
}

.category-card:hover .category-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
}

/* Иконки и текст */
.category-overlay i {
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.category-card:hover .category-overlay i {
    transform: scale(1.1);
}

.category-overlay h3 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    transition: all 0.3s ease;
}

.category-card:hover .category-overlay h3 {
    transform: translateY(-2px);
    letter-spacing: 1px;
}

/* Эффект загрузки для изображений */
.category-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
    z-index: 1;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Адаптивность */
@media (max-width: 480px) {
    .category-image-container {
        height: 7rem !important;
    }
    
    .category-overlay h3 {
        font-size: 0.75rem !important;
        line-height: 1.2;
    }
    
    .category-overlay i {
        font-size: 1.5rem !important;
    }
    
    .category-overlay {
        padding: 0.5rem !important;
    }
}

@media (max-width: 320px) {
    .mobile-categories-section .grid {
        gap: 0.5rem;
    }
    
    .category-image-container {
        height: 6rem !important;
    }
    
    .category-overlay h3 {
        font-size: 0.7rem !important;
    }
}

/* ========================================
   МОБИЛЬНЫЕ КАТЕГОРИИ С ФОНОВЫМИ ИЗОБРАЖЕНИЯМИ
   ======================================== */

/* Общие стили для категорий */
.mobile-categories-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.category-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    transform-origin: center;
}

.category-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.category-card:active {
    transform: translateY(-2px) scale(0.98);
    transition: transform 0.1s ease;
}

/* Контейнеры изображений с фонами */
.category-image-container {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* Фоновые изображения для каждой категории */
.category-all .category-image-container {
    background-image: url('../images/products/summer-cold-set-56.webp');
    background-color: #6b7280; /* Fallback color */
}

.category-cold .category-image-container {
    background-image: url('../images/products/philadelphia.webp');
    background-color: #3b82f6; /* Blue fallback */
}

.category-hot .category-image-container {
    background-image: url('../images/products/grilled-panko-salmon.webp');
    background-color: #f97316; /* Orange fallback */
}

.category-sets .category-image-container {
    background-image: url('../images/categories/sets-bg.webp');
    background-color: #10b981; /* Green fallback */
}

/* Градиентные оверлеи - БОЛЕЕ ПРОЗРАЧНЫЕ */
.category-overlay {
    /* Убираем blur полностью */
    transition: all 0.3s ease;
}

/* Обычное состояние - очень легкий градиент только снизу */
.category-all .category-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 40%, transparent 70%);
}

.category-cold .category-overlay {
    background: linear-gradient(to top, rgba(30,64,175,0.6) 0%, rgba(59,130,246,0.2) 40%, transparent 70%);
}

.category-hot .category-overlay {
    background: linear-gradient(to top, rgba(154,52,18,0.6) 0%, rgba(249,115,22,0.2) 40%, transparent 70%);
}

.category-sets .category-overlay {
    background: linear-gradient(to top, rgba(5,150,105,0.6) 0%, rgba(16,185,129,0.2) 40%, transparent 70%);
}

/* При наведении - чуть сильнее градиент для лучшей читаемости */
.category-card:hover .category-all .category-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, transparent 80%);
}

.category-card:hover .category-cold .category-overlay {
    background: linear-gradient(to top, rgba(30,64,175,0.7) 0%, rgba(59,130,246,0.3) 50%, transparent 80%);
}

.category-card:hover .category-hot .category-overlay {
    background: linear-gradient(to top, rgba(154,52,18,0.7) 0%, rgba(249,115,22,0.3) 50%, transparent 80%);
}

.category-card:hover .category-sets .category-overlay {
    background: linear-gradient(to top, rgba(5,150,105,0.7) 0%, rgba(16,185,129,0.3) 50%, transparent 80%);
}

/* Иконки и текст */
.category-overlay i {
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.category-card:hover .category-overlay i {
    transform: scale(1.1);
}

.category-overlay h3 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    transition: all 0.3s ease;
}

.category-card:hover .category-overlay h3 {
    transform: translateY(-2px);
    letter-spacing: 1px;
}

/* Эффект загрузки для изображений - УБИРАЕМ */

/* Адаптивность */
@media (max-width: 480px) {
    .category-image-container {
        height: 7rem !important;
    }
    
    .category-overlay h3 {
        font-size: 0.75rem !important;
        line-height: 1.2;
    }
    
    .category-overlay i {
        font-size: 1.5rem !important;
    }
    
    .category-overlay {
        padding: 0.5rem !important;
    }
}

@media (max-width: 320px) {
    .mobile-categories-section .grid {
        gap: 0.5rem;
    }
    
    .category-image-container {
        height: 6rem !important;
    }
    
    .category-overlay h3 {
        font-size: 0.7rem !important;
    }
}

/* ========================================
   УВЕЛИЧЕННЫЕ ИЗОБРАЖЕНИЯ ДЛЯ СЕТОВ - МОБИЛЬНАЯ ВЕРСИЯ
   ======================================== */

/* Еще больше увеличиваем изображения для сетов на мобильных */
@media (max-width: 768px) {
    /* Основные селекторы для страницы сетов */
    body:has([href*="sets.html"]) .product-image,
    [data-page="sets"] .product-image,
    .sets-page .product-image,
    #products-grid .product-image {
        height: 250px !important; /* Увеличили с 200px до 250px */
    }
    
    /* Соответственно увеличиваем высоту карточек */
    body:has([href*="sets.html"]) .product-card,
    [data-page="sets"] .product-card,
    .sets-page .product-card,
    #products-grid .product-card {
        min-height: 420px !important; /* Увеличили с 380px до 420px */
    }
    
    /* Альтернативные селекторы через классы */
    .set-product-card .product-image,
    .komplekt-product-card .product-image {
        height: 250px !important;
    }
    
    .set-product-card,
    .komplekt-product-card {
        min-height: 420px !important;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    body:has([href*="sets.html"]) .product-image,
    [data-page="sets"] .product-image,
    .sets-page .product-image,
    #products-grid .product-image,
    .set-product-card .product-image,
    .komplekt-product-card .product-image {
        height: 220px !important; /* Увеличили с 180px до 220px */
    }
    
    body:has([href*="sets.html"]) .product-card,
    [data-page="sets"] .product-card,
    .sets-page .product-card,
    #products-grid .product-card,
    .set-product-card,
    .komplekt-product-card {
        min-height: 400px !important; /* Увеличили с 360px до 400px */
    }
}

