/* ============================================
   KLUKVA CAFE - MODERN FOOD DELIVERY STYLES
   Full Mobile-First Responsive Design
   ============================================ */

/* ============================================
   1. RESET & CSS VARIABLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Цветовая палитра */
    --primary-color: linear-gradient(135deg, #C8102E 0%, #FF6B35 100%);
    --primary-hover: linear-gradient(135deg, #C8102E 0%, #FF6B35 100%);
    --primary-light: #FFF5ED;
    --primary-subtle: rgba(255, 105, 0, 0.08);
    --secondary-color: #FFF5EE;
    --text-dark: #1A1A1A;   
    --text-gray: #666666;
    --text-light: #999999;
    --text-muted: #B5B5BE;
    --border-color: #E5E5E5;
    --bg-light: #F9F9F9;
    --bg-hover: #F0F0F0;
    --white: #FFFFFF;
    --success: #22C55E;
    --error: #F03226;
    
    /* Тени */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04);
    
    /* Отступы и размеры */
    --container-width: 1200px;
    --header-height: 80px;
    --border-radius: 16px;
    --border-radius-sm: 12px;
    --border-radius-xs: 8px;
    
    /* Анимации */
    --transition: all 0.3s ease;
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-smooth: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Мобильные переменные */
    --mobile-padding: 16px;
    --tablet-padding: 24px;
}

/* ============================================
   2. BASE STYLES
   ============================================ */

/* Cart Badge - управляется через JS */
.cart-count-badge:empty,
#cart-count:empty {
    display: none !important;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scroll-padding-top: 100px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    flex-grow: 1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}

/* ============================================
   3. CONTAINER & LAYOUT
   ============================================ */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--mobile-padding);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--tablet-padding);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 32px;
    }
}

/* ============================================
   4. MENU SECTION
   ============================================ */

.menu-section {
    padding: 30px 0;
}

@media (min-width: 768px) {
    .menu-section {
        padding: 60px 0;
    }
}

.category {
    scroll-margin-top: 100px;
}


.category h3,
.menu-section h3,
.category-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin-left: 15px;
    padding: 10px 14px;
  
  
    display: flex;
    align-items: center;
    gap: 12px;
    
}


/* ============================================
   5. PRODUCTS GRID - MOBILE FIRST
   ============================================ */

.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 20px;
}



@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-top: 30px;
    }
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

@media (min-width: 1280px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   6. PRODUCT CARD - MOBILE OPTIMIZED
   ============================================ */

.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    
}

@media (hover: hover) {
    .product-card:hover {
        transform: translateY(-4px);
      
    }
}

/* На мобильных устройствах убираем hover эффекты для лучшего UX */
@media (hover: none) {
    .product-card:active {
        transform: scale(0.98);
    }
}

.product-image-wrapper {
    width: 100%;
    padding-bottom: 100%; /* Немного меньше высота на мобильных */
    position: relative;
    
}



.lazy-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.lazy-img:not(.loaded) {
    opacity: 0.05;
}

.lazy-img.loaded {
    opacity: 1;
}

@media (hover: hover) {
    .product-card:hover .lazy-img {
        transform: scale(1.05);
    }
}

.product-info-clickable {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

@media (min-width: 768px) {
    .product-info-clickable {
        padding: 20px;
    }
}

.product-card h4 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .product-card h4 {
        font-size: 18px;
        margin-bottom: 8px;
    }
}

.hit-label {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: var(--white);
    font-size: 9px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .hit-label {
        font-size: 10px;
        padding: 4px 8px;
    }
}

.description {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 12px;
    flex-grow: 1;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .description {
        font-size: 14px;
        margin-bottom: 15px;
        line-height: 1.5;
    }
}

.product-actions-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px 16px;
    margin-top: auto;
    gap: 12px;
}

@media (min-width: 768px) {
    .product-actions-buttons {
        padding: 0 20px 20px;
    }
}

.price-info {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}

@media (min-width: 768px) {
    .price-info {
        font-size: 24px;
    }
}

.weight-value {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 400;
    display: block;
    margin-top: 2px;
}

@media (min-width: 768px) {
    .weight-value {
        font-size: 12px;
    }
}

.add-to-cart-btn {
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}



@media (hover: hover) {
    .add-to-cart-btn:hover {
        background: var(--primary-hover);
        transform: scale(1.05);
    }
}

@media (hover: none) {
    .add-to-cart-btn:active {
        background: var(--primary-hover);
        transform: scale(0.95);
    }
}














@media (max-width: 768px) {
    .cart-btn {
        width: 48px !important;
        height: 48px !important;
        padding: 0px !important;
        gap: 0 !important;
        border-radius: 14px !important;
    
    }
    
    .cart-btn .cart-icon {
        width: 22px !important;
        height: 22px !important;
        display: block !important;
    }
    
    .cart-btn .cart-text {
        display: none !important;
    }
    
    .cart-btn .cart-count-badge {
        position: absolute !important;
        top: -6px !important;
        right: -6px !important;
        background: #fff !important;
        color: #C8102E !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
        margin-left: 0 !important;
    }
}




/* ============================================
   7. MODAL - MOBILE OPTIMIZED
   ============================================ */

.modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.modal-content {
    background: var(--white);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-content.dragging {
    transition: none !important;
    will-change: transform;
}

/* Картинка в модалке - ВИДНА на мобильных */
.modal-scroll-area {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.modal-image-col {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg-light);
    flex-shrink: 0;
}

.modal-image-col img {
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
}



.modal-details-col {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
    .modal-details-col {
        padding: 40px;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}



.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    padding-right: 16px;
    line-height: 1.2;
}



.close-button {
    width: 40px;
    height: 40px;
    font-size: 28px;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-xs);
    flex-shrink: 0;
}

.close-button:hover {
    color: var(--text-dark);
    background: var(--bg-light);
}

.modal-body {
    flex-grow: 1;
    margin-bottom: 16px;
}



.modal-body .description {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 20px;
    -webkit-line-clamp: unset;
}



/* Опции товара */
.option-group {
    margin-bottom: 20px;
}



.option-group label:first-child {
    font-weight: 600;
    font-size: 14px;
    display: block;
    margin-bottom: 10px;
    color: var(--text-dark);
}



.option-values-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}



.option-radio {
    display: none;
}

.option-label {
    padding: 10px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-xs);
    cursor: pointer;
    background: var(--white);
    color: var(--text-dark);
    font-weight: 500;
    font-size: 13px;
    transition: var(--transition);
    min-width: 70px;
    text-align: center;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}



.option-label:hover {
    border-color: var(--primary-color);
    background: var(--secondary-color);
}

.option-radio:checked + .option-label {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 105, 0, 0.2);
}

.option-radio:disabled + .option-label {
    cursor: not-allowed;
    opacity: 0.5;
    background: var(--bg-light);
}

/* Футер модального окна */
.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--white);
    flex: 0 0 auto;
}



.weight-display {
    text-align: center;
    font-size: 13px;
    color: var(--text-gray);
}



.modal-footer .add-to-cart-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
}

/* ============================================
   DESKTOP MODAL STYLES (min-width: 769px)
   ============================================ */

@media (min-width: 769px) {
    .modal,
    #customization-modal.modal {
        align-items: center !important;
        justify-content: center !important;
        padding: 20px !important;
    }
    
    /* Desktop modal - use CSS Grid for proper layout */
    .modal .modal-content,
    #customization-modal .modal-content {
        position: relative !important;
        width: 90% !important;
        max-width: 800px !important;
        height: auto !important;
        max-height: 85vh !important;
        margin: auto !important;
        border-radius: 24px !important;
        display: grid !important;
        grid-template-columns: 320px 1fr !important;
        grid-template-rows: 1fr auto !important;
        overflow: hidden !important;
        transform: scale(0.9) !important;
        opacity: 0 !important;
        transition: transform 0.3s ease, opacity 0.3s ease !important;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    }
    
    .modal.show .modal-content,
    #customization-modal.show .modal-content {
        transform: scale(1) !important;
        opacity: 1 !important;
    }
    
    /* Hide swipe indicator on desktop */
    .modal .modal-content::before,
    #customization-modal .modal-content::before {
        display: none !important;
    }
    
    /* Scroll area spans left column both rows */
    .modal .modal-scroll-area,
    #customization-modal .modal-scroll-area {
        display: contents !important;
    }
    
    /* Image column - left side, spans both rows */
.modal .modal-image-col,
    #customization-modal .modal-image-col {
        grid-column: 1 !important;
        grid-row: 1 / -1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 20px !important;
        background: white !important;
        position: relative !important;
        overflow: hidden !important;
    }
    
    .modal .modal-image-col img,
    #customization-modal .modal-image-col img {
        width: 320px !important;
        height: 320px !important;
        max-width: none !important;
        max-height: none !important;
        object-fit: contain !important;
        
    }
    
    /* Details column - right side, top */
    .modal .modal-details-col,
    #customization-modal .modal-details-col {
        grid-column: 2 !important;
        grid-row: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow-y: auto !important;
        background: #fff !important;
        padding: 0 !important;
        min-height: 0 !important;
    }
    
    /* Header */
    .modal .modal-header,
    #customization-modal .modal-header {
        padding: 28px 28px 12px !important;
        margin: 0 !important;
        position: relative !important;
        flex-shrink: 0 !important;
    }
    
    .modal .modal-header h3,
    #customization-modal .modal-header h3 {
        font-size: 24px !important;
        font-weight: 700 !important;
        margin: 0 !important;
        padding-right: 40px !important;
        color: #1F2937 !important;
        line-height: 1.3 !important;
    }
    
    /* Close button */
    .modal .close-button,
    #customization-modal .close-button {
        position: absolute !important;
        top: 24px !important;
        right: 24px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 24px !important;
        color: #6B7280 !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 12px !important;
        background: #F3F4F6 !important;
        border: none !important;
        transition: all 0.2s ease !important;
        z-index: 10 !important;
    }
    
    .modal .close-button:hover,
    #customization-modal .close-button:hover {
        background: #E5E7EB !important;
        color: #1F2937 !important;
    }
    
    /* Product summary */
    .modal #product-summary,
    #customization-modal #product-summary {
        padding: 0 28px 12px !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }
    
    .modal #product-summary > div,
    #customization-modal #product-summary > div {
        font-size: 14px !important;
        color: #6B7280 !important;
    }
    
    /* Modal body - scrollable */
    .modal .modal-body,
    #customization-modal .modal-body {
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        padding: 0 28px 20px !important;
        margin: 0 !important;
        min-height: 0 !important;
    }
    
    .modal .modal-body .description,
    #customization-modal .modal-body .description {
        font-size: 14px !important;
        color: #6B7280 !important;
        line-height: 1.6 !important;
        margin-bottom: 20px !important;
    }
    
    /* Option groups */
    .modal .option-group,
    #customization-modal .option-group {
        margin-bottom: 20px !important;
    }
    
    .modal .option-group:last-child,
    #customization-modal .option-group:last-child {
        margin-bottom: 0 !important;
    }
    
    .modal .option-group > label:first-child,
    #customization-modal .option-group > label:first-child {
        font-weight: 600 !important;
        font-size: 14px !important;
        color: #374151 !important;
        margin-bottom: 12px !important;
        display: block !important;
    }
    
    .modal .option-values-container,
    #customization-modal .option-values-container {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }
    
    .modal .option-label,
    #customization-modal .option-label {
        padding: 12px 24px !important;
        border: 2px solid #E5E7EB !important;
        border-radius: 12px !important;
        cursor: pointer !important;
        background: #fff !important;
        color: #374151 !important;
        font-weight: 500 !important;
        font-size: 14px !important;
        transition: all 0.2s ease !important;
        min-height: 48px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .modal .option-label:hover,
    #customization-modal .option-label:hover {
        border-color: #C8102E !important;
        background: #ff151512 !important;
    }
    
    .modal .option-radio:checked + .option-label,
    #customization-modal .option-radio:checked + .option-label {
        background: linear-gradient(135deg, #C8102E 0%, #FF6B35 100%) !important;
        color: #fff !important;
        border-color: transparent !important;
        box-shadow: 0 4px 12px rgba(200, 16, 46, 0.3) !important;
    }
    
    .modal .option-radio:disabled + .option-label,
    #customization-modal .option-radio:disabled + .option-label {
        opacity: 0.5 !important;
        cursor: not-allowed !important;
        background: #F3F4F6 !important;
    }
    
    /* Footer - right side, bottom */
    .modal .modal-footer,
    #customization-modal .modal-footer {
        grid-column: 2 !important;
        grid-row: 2 !important;
        padding: 16px 28px 24px !important;
        margin: 0 !important;
        border-top: 1px solid #E5E7EB !important;
        background: #fff !important;
        position: relative !important;
    }
    
    .modal .modal-footer .add-to-cart-btn,
    .modal #add-to-cart-final,
    #customization-modal .modal-footer .add-to-cart-btn,
    #customization-modal #add-to-cart-final {
        width: 100% !important;
        height: 56px !important;
        min-height: 56px !important;
        border-radius: 16px !important;
        background: linear-gradient(135deg, #C8102E 0%, #FF6B35 100%) !important;
        color: #fff !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        border: none !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        box-shadow: 0 4px 15px rgba(200, 16, 46, 0.35) !important;
        transition: all 0.2s ease !important;
    }
    
    .modal .modal-footer .add-to-cart-btn:hover,
    .modal #add-to-cart-final:hover,
    #customization-modal .modal-footer .add-to-cart-btn:hover,
    #customization-modal #add-to-cart-final:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 20px rgba(200, 16, 46, 0.4) !important;
    }
    
    .modal .modal-footer button:disabled,
    .modal #add-to-cart-final:disabled,
    #customization-modal .modal-footer button:disabled,
    #customization-modal #add-to-cart-final:disabled {
        background: #D1D5DB !important;
        box-shadow: none !important;
        color: #9CA3AF !important;
        cursor: not-allowed !important;
        transform: none !important;
    }
}

/* ============================================
   8. STICKY CATEGORIES (Navigation Bar)
   ============================================ */

.sticky-categories {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.3s ease;
}

.sticky-categories.is-sticky {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.sticky-categories .container,
.sticky-categories .category-bar-inner {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
    max-width: var(--container-width);
    margin: 0 auto;
}

/* Logo placeholder */
.logo-placeholder {
    width: 0;
    height: 44px;
    flex-shrink: 0;
    opacity: 0;
    
    transition: width 0.3s ease, opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sticky-categories.is-sticky .logo-placeholder {
    opacity: 1;
    width: 44px;
}

.logo-placeholder .logo-link {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    overflow: hidden;
    line-height: 0;
}

.logo-placeholder .site-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Categories list */
.categories-list {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 0;
    align-items: center;
    -webkit-overflow-scrolling: touch;
}

.categories-list::-webkit-scrollbar {
    display: none;
}

.categories-list a {
    font-family: 'Inter', sans-serif;
    font-weight: 1000;
    font-size: 16px;
    color: var(--text-gray);
    padding: 10px 16px;
    border-radius: 20px;
    white-space: nowrap;
    background: transparent;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
    min-height: 44px;
    display: flex;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
}

.categories-list a:hover {
    color: #C8102E;
    background: rgba(200, 16, 46, 0.08);
}

.categories-list a.active {
    color: #fff;
    background: linear-gradient(135deg, #C8102E 0%, #FF6B35 100%);
    
}

/* Cart button */
.cart-btn {
    background: linear-gradient(135deg, #C8102E 0%, #FF6B35 100%);
    color: white;
    width: auto;
    height: 48px;
    padding: 0 20px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(200, 16, 46, 0.25);
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}




.cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(200, 16, 46, 0.35);
}

.cart-btn:active {
    transform: scale(0.95);
}

.cart-btn .cart-icon {
    width: 22px;
    height: 22px;
    display: block;
}
 .cart-btn .cart-text {
        display: block;
        font-size: 15px;
    }

.cart-btn .cart-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    margin-left: 8px;
    padding: 0 6px;
    background: rgba(255,255,255,0.25);
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 11px;
    backdrop-filter: blur(4px);
}


.cart-btn .cart-separator,
.cart-btn #cart-count:not(.cart-count-badge) {
    display: none;
}



.cart-btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(255, 105, 0, 0.3);
}



.cart-btn:active {
    transform: scale(0.95);
}

/* ============================================
   9. HERO SLIDER
   ============================================ */

.hero-slider {
    width: 100%;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .hero-slider {
        margin-bottom: 40px;
    }
}
.slider-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 100px;
    box-shadow: var(--shadow-md);
}

@media (min-width: 480px) {
    .slider-container {
        height: 280px;
    }
}

@media (min-width: 768px) {
    .slider-container {
        height: 400px;
        border-radius: var(--border-radius);
    }
}

@media (min-width: 1024px) {
    .slider-container {
        height: 500px;
    }
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 0;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 100%
    );
    z-index: 1;
}

.slide-text {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 15px;
    max-width: 800px;
    animation: slideInUp 0.8s ease-out;
}

@media (min-width: 768px) {
    .slide-text {
        padding: 20px;
    }
}

.slide-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

@media (min-width: 480px) {
    .slide-title {
        font-size: 28px;
        margin-bottom: 16px;
    }
}

@media (min-width: 768px) {
    .slide-title {
        font-size: 40px;
        margin-bottom: 24px;
    }
}

@media (min-width: 1024px) {
    .slide-title {
        font-size: 48px;
    }
}

.slide-btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 105, 0, 0.4);
    min-height: 44px;
}

@media (min-width: 768px) {
    .slide-btn {
        padding: 16px 40px;
        font-size: 18px;
    }
}

.slide-btn:hover {
    background: #ff8533;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 105, 0, 0.6);
}

/* Навигация слайдера */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (min-width: 768px) {
    .slider-nav {
        width: 50px;
        height: 50px;
    }
}

.slider-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.slider-nav.prev {
    left: 10px;
}

.slider-nav.next {
    right: 10px;
}

@media (min-width: 768px) {
    .slider-nav.prev {
        left: 20px;
    }
    
    .slider-nav.next {
        right: 20px;
    }
}

.slider-nav i {
    font-size: 14px;
    color: var(--primary-color);
}

@media (min-width: 768px) {
    .slider-nav i {
        font-size: 20px;
    }
}

/* Индикаторы слайдера */
.slider-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

@media (min-width: 768px) {
    .slider-dots {
        bottom: 24px;
        gap: 12px;
    }
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

@media (min-width: 768px) {
    .dot {
        width: 12px;
        height: 12px;
    }
}

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.dot.active {
    background: white;
    width: 24px;
    border-radius: 6px;
}

@media (min-width: 768px) {
    .dot.active {
        width: 32px;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   10. UTILITIES
   ============================================ */

.logo-wrapper,
.brand-section,
.logo-compact {
    margin: 0 !important;
    padding: 0 !important;
}

.site-logo,
.brand-logo img,
.logo-compact img {
    display: block;
    margin: 0;
}

.logo-link {
    line-height: 0;
}

/* Safe Area для iPhone */
@supports (padding: max(0px)) {
    .modal-content {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
    
    .modal-footer {
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }
}

/* Prevent overscroll on iOS */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* ============================================
   11. REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.category-menu.sticky-categories .container.category-bar-inner{
  max-width: var(--container-width);
  margin: 0 auto;
}





/* ВАЖНО: чтобы не обрезалось — contain вместо cover */
.product-image-wrapper .lazy-img {
  object-fit: contain !important;  /* было cover */
  padding: 0px;                  /* чтобы не липло к краям */
  box-sizing: border-box;
}

/* Убираем hover-скейл, чтобы снова не подрезало края */
@media (hover: hover) {
  .product-card:hover .lazy-img {
    transform: none !important;
  }
}
/* ============================================
   DISCOUNT BREAKDOWN - GLASS MORPHISM
   ============================================ */

/* Скрываем старый простой блок скидки */
.summary-row.discount-row {
    display: none !important;
}

/* ===== ОСНОВНОЙ КОНТЕЙНЕР ===== */
.discount-breakdown {
    position: relative;
    margin: 12px 0;
    animation: discountBreakdownAppear 0.4s ease-out;
}

/* Фоновые blob-эффекты */
.discount-breakdown::before,
.discount-breakdown::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
}

.discount-breakdown::before {
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: rgba(251, 146, 60, 0.4);
}

.discount-breakdown::after {
    bottom: -20px;
    left: -20px;
    width: 120px;
    height: 120px;
    background: rgba(239, 68, 68, 0.35);
}

/* Основная карточка */
.discount-breakdown-card {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    overflow: hidden;
    box-shadow: 
        0 4px 24px -4px rgba(249, 115, 22, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

/* ===== ЗАГОЛОВОК "ВАША ВЫГОДА" ===== */
.discount-breakdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.95) 0%, rgba(220, 38, 38, 0.95) 100%);
    backdrop-filter: blur(10px);
}

.discount-breakdown-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-weight: 700;
    font-size: 15px;
}

.discount-breakdown-title-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.discount-breakdown-title-icon svg {
    width: 20px;
    height: 20px;
    color: white;
    stroke: white;
}

.discount-breakdown-total {
    font-size: 22px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
}

/* ===== СПИСОК СКИДОК ===== */
.discount-breakdown-list {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Элемент скидки */
.discount-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.2s ease;
}

.discount-breakdown-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(2px);
}

/* Левая часть элемента */
.discount-breakdown-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

/* Иконка элемента */
.discount-breakdown-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.15);
}

.discount-breakdown-item-icon svg {
    width: 20px;
    height: 20px;
    color: white;
    stroke: white;
    stroke-width: 2;
}

/* Промокод - фиолетовый градиент */
.discount-breakdown-item-icon.promocode {
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
}

/* Автоматическая скидка - оранжевый градиент */
.discount-breakdown-item-icon.auto {
    background: linear-gradient(135deg, #F97316 0%, #EF4444 100%);
}

/* Текстовая информация */
.discount-breakdown-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.discount-breakdown-item-name {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.discount-breakdown-item-desc {
    font-size: 12px;
    color: #6b7280;
}

/* Сумма скидки */
.discount-breakdown-item-amount {
    font-weight: 700;
    font-size: 15px;
    color: #ea580c;
    flex-shrink: 0;
    margin-left: 12px;
}

/* ===== АНИМАЦИЯ ===== */
@keyframes discountBreakdownAppear {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Анимация появления элементов */
.discount-breakdown-item {
    animation: discountItemSlideIn 0.3s ease-out backwards;
}

.discount-breakdown-item:nth-child(1) { animation-delay: 0.1s; }
.discount-breakdown-item:nth-child(2) { animation-delay: 0.2s; }
.discount-breakdown-item:nth-child(3) { animation-delay: 0.3s; }

@keyframes discountItemSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-10px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== АДАПТИВ ДЛЯ МОБИЛЬНЫХ ===== */
@media (max-width: 480px) {
    .discount-breakdown {
        margin: 10px 0;
    }
    
    .discount-breakdown::before {
        width: 80px;
        height: 80px;
        top: -15px;
        right: -15px;
    }
    
    .discount-breakdown::after {
        width: 100px;
        height: 100px;
        bottom: -15px;
        left: -15px;
    }
    
    .discount-breakdown-card {
        border-radius: 16px;
    }
    
    .discount-breakdown-header {
        padding: 12px 14px;
    }
    
    .discount-breakdown-title {
        font-size: 14px;
        gap: 6px;
    }
    
    .discount-breakdown-title-icon {
        width: 18px;
        height: 18px;
    }
    
    .discount-breakdown-title-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .discount-breakdown-total {
        font-size: 20px;
    }
    
    .discount-breakdown-list {
        padding: 8px;
        gap: 6px;
    }
    
    .discount-breakdown-item {
        padding: 10px 12px;
        border-radius: 12px;
    }
    
    .discount-breakdown-item-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }
    
    .discount-breakdown-item-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .discount-breakdown-item-left {
        gap: 10px;
    }
    
    .discount-breakdown-item-name {
        font-size: 13px;
    }
    
    .discount-breakdown-item-desc {
        font-size: 11px;
    }
    
    .discount-breakdown-item-amount {
        font-size: 14px;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .discount-breakdown,
    .discount-breakdown-item {
        animation: none !important;
    }
    
    .discount-breakdown-item:hover {
        transform: none;
    }
}