:root {
    --bg-color: #121212;
    --card-bg: #1a1a1a;
    --accent-color: #ff4500;
    --text-color: #ffffff;
    --text-muted: #888888;
    --border-color: #2a2a2a;
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}
h2,h3 {

    color: var(--accent-color);
}
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}
.heading {
    justify-self: center;
    padding: 20px 0px;
    color: var(--accent-color);
}
/* Шапка */
.header {
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.header-container {
    display: grid;
    align-items: center;
    height: 80px;
    grid: "logo menu time phone cart" 1fr / 1fr .8fr .5fr .5fr .5fr;
    gap: 12px;
}

.logo {
    font-weight: 700;
    font-size: 20px;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: 2px;
    grid-area: logo;
}

.logo span {
    color: var(--accent-color);
}
.logo-img {
    width: 200px;
}
.nav {
    display: flex;
    gap: 12px;
    grid-area: menu;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--text-color);
}

.header-contacts {
    text-align: right;
}

.phone {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    display: block;
    font-size: 15px;
    grid-area: phone;
}
.work {
    grid-area: time;
}

.work-time {
    font-size: 12px;
    color: var(--text-muted);
}

/* Контейнерный слайдер */
.hero {
    padding: 40px 0;
    background-color: var(--bg-color);
}

.slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #000;
}

/* Лента слайдов */
.slides-track {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1920 / 768;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

.slide img {
    width: 100%;
    height: auto;          /* Картинка сама управляет своей высотой */
    object-fit: cover;     /* Растягивает изображение на всю ширину без полос */
    display: block;
}

/* Стрелочки */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(26, 26, 26, 0.7);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    width: 44px;
    height: 44px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s;
}

.slider-arrow:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.prev-btn { left: 15px; }
.next-btn { right: 15px; }

/* Индикаторы (точки) под слайдером */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active, .dot:hover {
    background-color: var(--text-color);
}

/* На мобильных прячем стрелочки, чтобы не мешали просмотру */
@media (max-width: 768px) {
    .slider-arrow { display: none; }
    .hero { padding: 20px 0; }
}



.btn {
    padding: 15px 30px;
    border-radius: 0px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.btn-primary:hover {
    background-color: #e0e0e0;
}

.btn-secondary {
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: var(--card-bg);
}

/* Секции */
.section-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 40px;
    letter-spacing: 1px;
}

.menu-section, .delivery-section, .reviews-section {
    padding: 80px 0;
    border-bottom: 1px solid var(--border-color);
}
.menu-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    overflow-x: auto;          /* Включает горизонтальную прокрутку */
    white-space: nowrap;       /* Запрещает тексту переноситься на новую строку */
    padding-bottom: 10px;      /* Небольшой отступ снизу для удобства */
    scrollbar-width: none;     /* Для Firefox */
}

/* Скрываем скроллбар для Chrome, Safari и Opera */
.menu-tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
    flex-shrink: 0;
}

.tab-btn.active, .tab-btn:hover {
    color: var(--accent-color);
    border-bottom-color: var(--text-color);
}

/* Сетка товаров */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background-color: var(--card-bg);
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /*height: 440px;*/
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}
.photo {
    width: 100%;
    border-radius: 12px;
    aspect-ratio: 1 / 1;
}
.weight {
    font-size: 13px;
    color: var(--text-muted);
}

.description {
    font-size: 12px;
}

.product-price-block {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.price {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-color);
}

.order-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 18px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.3s;
}

.order-btn:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.hidden {
    display: none !important;
}

/* Доставка и Отзывы */
.delivery-grid, .reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.delivery-item, .review-card {
    background-color: var(--card-bg);
    padding: 30px;
}

.delivery-item h4 {
    font-size: 18px;
    margin-bottom: 10px;
}

.delivery-item p, .review-text {
    color: var(--text-muted);
    font-size: 14px;
}

.review-author {
    display: block;
    margin-top: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.kontakt {
    display: grid;
    grid: "text map" 1fr / 1fr 1fr;
}

/* Подвал */
.footer {
    padding: 40px 0;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-container {
    display: flex;
    justify-content: center;
}
/* Кнопка корзины в шапке */
.cart-toggle-btn {
    background-color: var(--text-color);
    color: var(--bg-color);
    border: none;
    padding: 10px 20px;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    grid-area: cart;
}

.cart-toggle-btn:hover {
    background-color: #e0e0e0;
}

#cart-badge {
    background-color: var(--accent-color);
    color: var(--text-color);
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 50%;
}

/* Панель корзины */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px; /* Изначально спрятана за экраном */
    width: 100%;
    max-width: 400px;
    height: 100%;
    background-color: var(--card-bg);
    z-index: 200;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 25px rgba(0,0,0,0.5);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-sidebar.open {
    right: 0; /* Выезжает на экран */
}

.cart-sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-sidebar-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.close-cart-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

/* Список товаров */
.cart-items-list {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}
.cart-item-info {
    display: grid;
    grid: "pict name" auto "pict price" auto / 1fr;
    gap: 8px;
}
.cart-item-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    grid-area: ; name;
}
.cart-item-info img {
    max-width: 70px;
    grid-area: pict;
}
.cart-item-info .item-price {
    font-size: 14px;
    color: var(--text-muted);
    grid-area: price;
}

/* Кнопки количества товаров +/- */
.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 4px 8px;
}

.quantity-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    padding: 0 4px;
}

.item-count {
    font-size: 14px;
    font-weight: 600;
    min-width: 16px;
    text-align: center;
}

/* Итог корзины */
.cart-sidebar-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    background-color: rgba(18, 18, 18, 0.5);
}

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

.checkout-btn {
    width: 100%;
    padding: 16px;
    background-color: var(--text-color);
    color: var(--bg-color);
    border: none;
    font-family: inherit;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.checkout-btn:disabled {
    background-color: var(--border-color);
    color: var(--text-muted);
    cursor:not-allowed;
}

.checkout-btn:not(:disabled):hover {
    background-color: var(--accent-color);
    color: var(--text-color);
}

/* Затемняющий фон */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Модальное окно заказа */
.order-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 460px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    z-index: 300;
    padding: 30px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.order-modal.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.order-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.order-modal-header h3 {
    font-size: 22px;
    font-weight: 600;
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
}

/* Элементы формы */
.order-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="tel"] {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--text-color);
}

/* Переключатель доставки/самовывоза */
.delivery-toggle-container {
    display: flex;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
}

.toggle-option {
    flex: 1;
    text-align: center;
    cursor: pointer;
}

.toggle-option input {
    display: none; /* Прячем стандартный кружок радио-кнопки */
}

.toggle-option span {
    display: block;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s;
}

.toggle-option input:checked + span {
    background-color: var(--text-color);
    color: var(--bg-color);
}

/* Скрытие блока адреса с анимацией */
#address-group {
    max-height: 100px;
    opacity: 1;
    transition: all 0.3s ease;
    overflow: hidden;
}

#address-group.hidden {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    border: none;
}

/* Футер модалки */
.order-modal-footer {
    margin-top: 15px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

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

.modal-total #modal-total-price {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 18px;
}

.submit-order-btn {
    width: 100%;
    padding: 16px;
    background-color: var(--accent-color);
    color: var(--text-color);
    border: none;
    font-family: inherit;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-order-btn:hover {
    background-color: #e03d00;
}
.ssilka {
    color: var(--accent-color);
    text-decoration: none;
}
@media (min-width: 768px) and (max-width: 1050px) {
    .work {
        display: none;
    }
    .header-container { 
        grid: "logo menu phone cart" 1fr / 1fr .8fr .5fr .5fr;
    }
    .phone {
        font-size: 14px;
    }

}

@media (max-width: 768px) {
    .header-container { 
        height: auto;
        gap: 12px;
        padding: 15px 20px;
        grid: "logo cart" 1fr "menu menu" auto / 2fr 1fr;
    }
    .heading {
        text-align: center;
        font-size: 16px;
    }
    .slides-track {
        aspect-ratio: 800 / 500;
    }
    .price {
        font-size: 16px;
    }
    .nav {
        gap: 20px;
        justify-content: center;
    }
    .menu-section, .delivery-section, .reviews-section {
        padding: 30px 0px;
    }
    .kontakt {
        grid: "text" auto "map" 1fr / 1fr;
    }
    .work {
        display: none;
    }
    .header-contacts {
        display: none;
    }
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 8px;
    }
    .order-btn {
        padding: 4px 9px;
        font-size: 14px;
        transition: all 0.3s;
    }
}
