/* ============================================
   MODERN FOOD DELIVERY WEBSITE STYLES
   ============================================ */

/* ============================================
   1. RESET & BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Цветовая палитра */
    --primary-color: #FF6900;
    --primary-hover: #E55D00;
    --secondary-color: #FFF5EE;
    --text-dark: #1A1A1A;
    --text-gray: #666666;
    --text-light: #999999;
    --border-color: #E5E5E5;
    --bg-light: #F9F9F9;
    --white: #FFFFFF;
    --success: #22C55E;
    --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);
    
    /* Отступы и размеры */
    --container-width: 1200px;
    --header-height: 80px;
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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;
}

main {
    flex-grow: 1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

/* ============================================
   2. CONTAINER & LAYOUT
   ============================================ */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}



/* ============================================
   5. PRODUCTS GRID (Сетка товаров)
   ============================================ */

.menu-section {
    padding: 60px 0;
}

.category h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    padding-top: 50px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
    scroll-margin-top: 140px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

/* ============================================
   6. PRODUCT CARD (Карточка товара)
   ============================================ */



.product-card:hover {
    transform: translateY(-4px);
    
}

.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;
}

.product-card:hover .lazy-img {
    transform: scale(1.05);
}

.product-info-clickable {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.product-card h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.hit-label {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.description {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 15px;
    flex-grow: 1;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-actions-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px 20px;
    margin-top: auto;
}

.price-info {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

.weight-value {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 400;
    display: block;
    margin-top: 2px;
}

.add-to-cart-btn {
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.add-to-cart-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

/* ============================================
   7. MODAL (Модальное окно)
   ============================================ */

.modal {
    display: none;
    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;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-image-col {
    flex: 0 0 50%;
    
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.modal-image-col img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.modal-details-col {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    padding-right: 20px;
}

.close-button {
    font-size: 32px;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.close-button:hover {
    color: var(--text-dark);
}

.modal-body {
    flex-grow: 1;
    margin-bottom: 20px;
}

.modal-body .description {
    font-size: 15px;
    color: var(--text-gray);
    margin-bottom: 25px;
    -webkit-line-clamp: unset;
}

/* Опции */
.option-group {
    margin-bottom: 25px;
}

.option-group label:first-child {
    font-weight: 600;
    font-size: 15px;
    display: block;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.option-values-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.option-radio {
    display: none;
}

.option-label {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    background: var(--white);
    color: var(--text-dark);
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
    min-width: 80px;
    text-align: 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-top: 20px;
    border-top: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.weight-display {
    text-align: center;
    font-size: 14px;
    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;
}


/* ============================================
   10. UTILITIES & ANIMATIONS
   ============================================ */

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}


/* ============================================
   STICKY NAVIGATION (ИСПРАВЛЕНО)
   ============================================ */

.sticky-categories {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 999;
    transition: all 0.3s ease;
    border-bottom: 1px solid #E5E5E5;
}

.sticky-categories.is-sticky {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.category-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 20px;
}

/* Плейсхолдер для логотипа в sticky меню */
.logo-placeholder {
    width: 0;
    height: 60px;
    flex-shrink: 0;
    opacity: 0;
    overflow: hidden;
    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: 60px;
}

.logo-placeholder .logo-link {
    display: block;
    line-height: 0;
}

.logo-placeholder .site-logo {
    width: 50px;
    height: 50px;
    border-radius: 10px;
}

/* ============================================
   КАТЕГОРИИ
   ============================================ */

.categories-list {
    display: flex;
    gap: 8px;
    flex-grow: 1;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 4px 0;
    align-items: center;
}

.categories-list::-webkit-scrollbar {
    display: none;
}

.categories-list a {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #666666;
    padding: 10px 20px;
    border-radius: 50px;
    white-space: nowrap;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    text-decoration: none;
}

.categories-list a:hover {
    color: #FF6900;
    background: rgba(255, 105, 0, 0.1);
}

.categories-list a.active {
    color: #ffffff;
    background: #FF6900;
    border-color: #FF6900;
    
}

/* ============================================
   КНОПКА КОРЗИНЫ В STICKY МЕНЮ
   ============================================ */

.cart-btn {
    background: #FF6900;
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 105, 0, 0.2);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cart-btn:hover {
    background: #E55D00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 105, 0, 0.3);
}

.cart-separator {
    opacity: 0.5;
    margin: 0 4px;
}

#cart-count {
    min-width: 20px;
    text-align: center;
    font-weight: 700;
}



/* ============================================
   ФИКС: ПРАВИЛЬНОЕ ПОЗИЦИОНИРОВАНИЕ
   ============================================ */

.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;
}

/* ============================================
   АДАПТАЦИЯ STICKY МЕНЮ
   ============================================ */

@media (max-width: 768px) {
    .logo-placeholder {
        opacity: 1;
        width: 50px;
        height: 50px;
    }
    
    .logo-placeholder .site-logo {
        width: 45px;
        height: 45px;
    }
    
    .cart-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* ============================================
   ФИКС СКРОЛЛА (ДОБАВЬТЕ В КОНЕЦ ФАЙЛА)
   ============================================ */

html {
    scroll-padding-top: 100px;
}

.category {
    scroll-margin-top: 100px;
}

.category h3 {
    scroll-margin-top: 100px;
}


/* ============================================
   HERO SLIDER (БАННЕРЫ)
   ============================================ */

.hero-slider {
    width: 100%;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.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: 20px;
    max-width: 800px;
    animation: slideInUp 0.8s ease-out;
}

.slide-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 24px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.slide-btn {
    display: inline-block;
    padding: 16px 40px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 105, 0, 0.4);
}

.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: 50px;
    height: 50px;
    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);
}

.slider-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.slider-nav.prev {
    left: 20px;
}

.slider-nav.next {
    right: 20px;
}

.slider-nav i {
    font-size: 20px;
    color: var(--primary-color);
}

/* Индикаторы */
.slider-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.dot.active {
    background: white;
    width: 32px;
    border-radius: 6px;
}

/* Анимация появления текста */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .slider-container {
        height: 400px;
        border-radius: 12px;
    }
    
    .slide-title {
        font-size: 32px;
        margin-bottom: 16px;
    }
    
    .slide-btn {
        padding: 12px 30px;
        font-size: 16px;
    }
    
    .slider-nav {
        width: 40px;
        height: 40px;
    }
    
    .slider-nav.prev {
        left: 10px;
    }
    
    .slider-nav.next {
        right: 10px;
    }
    
    .slider-nav i {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .slider-container {
        height: 300px;
    }
    
    .slide-title {
        font-size: 24px;
    }
    
    .slide-btn {
        padding: 10px 24px;
        font-size: 14px;
    }
}




