﻿/*
   Токены дизайн-системы. Значения — те же, что уже использовались по всему
   файлу (просто теперь в одном месте и с понятными именами), палитра,
   шрифт и тексты не менялись.
*/
:root {
    --color-bg: floralwhite;
    --color-surface: #ffffff;
    --color-brand: #780404;
    --color-brand-dark: #5d0303;
    --color-brand-soft: mistyrose;
    --color-accent: #d63384;
    --color-cta: #f7755e;
    --color-ink: #222222;
    --color-ink-muted: #666666;
    --color-border: rgba(0, 0, 0, 0.08);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.18);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    --container: 1200px;

    --z-nav: 1000;
    --z-dropdown: 1100;
    --z-overlay: 1400;
    --z-side-menu: 1500;
    --z-modal: 2000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
}

/* Видимый фокус с клавиатуры — доступность без изменения цветовой палитры */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: 2px;
}

html {
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Roboto", sans-serif;
    background-color: floralwhite;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

img {
    max-width: 100%;
}



/* Главный заголовок */
.main_header_div {
    background-color: #780404;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.up_label {
    color: white;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: var(--container);
    padding: 0 20px;
}

.up_label__left,
.up_label__right {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.up_label__right {
    justify-content: flex-end;
}

.insta_line {
    display: flex;
    align-items: center;
    min-width: 0;
}

.Instagram_nick {
    color: white;
    font-size: 18px;
    font-family: "Roboto", sans-serif;
    text-align: left;
}

    .Instagram_nick:hover{
        color:black;
    }

    .InstaLogo {
        width: 24px !important;
        height: 24px !important;
        display: inline-block !important;
        vertical-align: middle !important;
        margin-right: 8px !important;
        background: transparent !important;
    }

.sweet_buicket_text {
    font-size: 65px;
    text-align: center;
    white-space: nowrap;
    font-family: "Roboto", sans-serif;
}

.phone_number_header_text {
    color: white;
    font-size: 18px;
    text-align: right;
    font-family: "Roboto", sans-serif;
}

.in_service_or_on_order {
    color: white;
    font-size: 15px;
    text-align: center;
    margin: 5px 0 0 0;
    font-family: "Roboto", sans-serif;
}

/* Якорные ссылки */
.all_refs {
    display: flex;
    background-color: mistyrose;
    justify-content: center;
    gap: 80px;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: var(--z-nav);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.catalog,
.for_present,
.about_us,
.order_and_delivery,
.delivery_information {
    font-size: 15px;
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
    font-family: "Roboto", sans-serif;
}

    .catalog:hover,
    .about_us:hover,
    .for_present:hover,
    .order_and_delivery:hover,
    .delivery_information:hover {
        color: #d63384;
    }

/* Описание продукции */
.products_description {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 40px clamp(20px, 5vw, 60px);
    background-color: floralwhite;
    box-sizing: border-box;
}

.row1, .row2, .row3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    width: 100%;
    margin-bottom: 50px;
    font-family: "Roboto", sans-serif;
}

.row1__text,
.row2__text,
.row3__text {
    flex: 0 1 520px;
    font-size: 20px;
    line-height: 1.6;
    word-wrap: break-word;
}

.row1__image,
.row2__image,
.row3__image {
    flex: 0 1 420px;
    max-width: 420px;
}

.row1__image img,
.row2__image img,
.row3__image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-top: 10px;
    cursor: zoom-in;
}

/* Заголовки каталога */
.Chockolate_buikerts_title {
    text-align: center;
    font-size: 50px;
    padding-top: 60px;
    font-family: "Roboto", sans-serif;
}

.Chockolate_buikerts_description {
    text-align: center;
    font-size: 20px;
    margin-top: 20px;
    font-family: "Roboto", sans-serif;
}

.catalog-see-all-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    font-size: 17px;
    font-weight: 600;
    color: var(--color-brand);
    font-family: "Roboto", sans-serif;
}

    .catalog-see-all-link:hover {
        color: var(--color-accent);
    }

.Chocklate_for_order_title {
    text-align: center;
    font-size: 50px;
    padding-top: 60px;
    font-family: "Roboto", sans-serif;
}

.Chocklate_for_order_description {
    text-align: center;
    font-size: 20px;
    margin-top: 20px;
    font-family: "Roboto", sans-serif;
}

/*Все ро слайдеры*/

.product-slider {
    max-width: var(--container);
    margin: 30px auto;
    padding: 15px;
    text-align: center;
}

.swiper-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-width: 150px;
    text-align: center;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 14px 12px 18px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .swiper-slide:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
    }

    .swiper-slide img {
        width: 100%;
        max-width: 280px;
        aspect-ratio: 3 / 4;
        border-radius: var(--radius-md);
        box-shadow: none;
        object-fit: contain;
        background-color: floralwhite;
    }


.slide-caption {
    font-size: 15px;
    font-weight: 500;
    margin-top: 12px;
    color: #000500;
    font-family: "Roboto", sans-serif;
    padding: 0 5px;
    line-height: 1.35;
}

/* Ссылка-обёртка в карточках слайдера "ТОП продаж" — занимает всю карточку,
   но не ломает исходный вид (без подчёркивания и смены цвета текста). */
.top-sale-slide-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

    .top-sale-slide-link:hover {
        color: inherit;
        text-decoration: none;
    }


.slider-arrow {
    font-size: 26px;
    color: #000500;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

/*Блок с доставкой*/

.DeliverySection {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px 60px;
}

.delivery_main_title {
    text-align: center;
    font-size: 50px;
    padding-top: 60px;
    font-family: "Roboto", sans-serif;
}

.services_and_benefits,
.corporate_clients {
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    max-width: 760px;
    margin: 30px auto 0;
    padding: 28px clamp(20px, 5vw, 40px);
    font-size: 18px;
    background-color: var(--color-brand-soft);
    border-radius: var(--radius-lg);
}

.services_and_benefits_title {
    font-size: 26px;
    text-align: center;
}

.corporate_clients {
    margin-top: 24px;
}

.corporate_clients_title {
    font-size: 26px;
    text-align: center;
    font-family: "Roboto", sans-serif;
}

.corporate_clients_text {
    font-family: "Roboto", sans-serif;
}

.Delivery_and_pickup {
    max-width: 760px;
    margin: 40px auto 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.services_and_benefits_text {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

    .services_and_benefits_text li {
        position: relative;
        padding-left: 20px;
    }

        .services_and_benefits_text li::before {
            content: "";
            position: absolute;
            left: 0;
            top: 0.6em;
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background-color: var(--color-brand);
        }

.delivery_list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pickup_text {
    text-align: center;
}

.delivery,
.pickup {
    text-align: left;
    font-size: 16px;
    line-height: 1.6;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.delivery_title,
.pickup_title {
    font-size: 22px;
    text-align: center;
    margin-bottom: 10px;
}
/* Footer */
.footer {
    height: 150px;
}

#order_and_delivery {
    background-color: var(--color-brand);
}

.Conclusion_Div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 40px;
    max-width: var(--container);
    margin: 0 auto;
    padding: 56px 20px;
}

.contacts_div {
    color: white;
    font-family: "Roboto", sans-serif;
    font-size: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.order_information {
    border: none;
    border-radius: var(--radius-md);
    background-color: var(--color-cta);
    color: white;
    font-family: "Roboto", sans-serif;
    font-size: 20px;
    font-weight: 600;
    padding: 16px 36px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

    .order_information:hover {
        background-color: var(--color-accent);
        color: white;
        transform: translateY(-2px);
    }

.YNPInformation {
    text-align: center;
    background-color: #780404;
    padding-top:15px;
}


.footerInstNick {
    color: white;
}

.footerInstNick:hover{
    color:black;
}

.ButtonSend, .ButtonClose {
    font-family: "Roboto", sans-serif;
}

/* ==========================================================
   Модальное окно «Оформить заказ»
   ========================================================== */
.order-modal {
    display: none;
    position: fixed;
    inset: 0;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.55);
    z-index: var(--z-modal);
    animation: fadeIn 0.2s ease;
}

    .order-modal.is-open {
        display: flex;
    }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.order-modal__panel {
    position: relative;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    background-color: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 28px 24px 24px;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.25s ease;
    font-family: "Roboto", sans-serif;
}

@keyframes modalIn {
    from {
        transform: translateY(-24px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.order-modal__panel h3 {
    font-size: 20px;
    color: var(--color-ink);
    padding-right: 40px;
}

/* Кнопка закрытия */
.order-modal__close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: none;
    color: #999;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

    .order-modal__close:hover {
        background-color: var(--color-brand-soft);
        color: var(--color-brand);
    }

/* Форма внутри модалки */
#orderForm {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 20px;
}

    #orderForm input,
    #orderForm textarea {
        padding: 11px 12px;
        border: 1px solid #ddd;
        border-radius: var(--radius-sm);
        font-size: 15px;
        font-family: "Roboto", sans-serif;
    }

    #orderForm textarea {
        height: 80px;
        resize: vertical;
    }

.order-modal__actions {
    display: flex;
    gap: 10px;
    margin-top: 2px;
}

.ButtonClose,
.ButtonSend {
    flex: 1;
    padding: 11px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.ButtonClose {
    background-color: #eee;
    color: #333;
}

    .ButtonClose:hover {
        background-color: #ddd;
    }

.ButtonSend {
    background-color: var(--color-brand);
    color: white;
}

    .ButtonSend:hover {
        background-color: var(--color-brand-dark);
    }

.policy-link {
    display: block;
    margin-top: 14px;
    font-size: 12px;
    color: var(--color-ink-muted);
}



/* Планшеты (до 1024px) */
@media (max-width: 1024px) {
    .up_label {
        max-width: 100%;
    }

    .sweet_buicket_text {
        font-size: 48px;
    }

    .row1, .row2, .row3 {
        gap: 24px;
    }

    .order-modal__panel {
        max-width: 460px;
        margin: 0 auto;
    }
}

/* Маленькие планшеты и большие телефоны (до 768px) */
@media (max-width: 768px) {
    .sweet_buicket_text {
        font-size: 32px;
        white-space: normal;
    }

    /* Корзина: +/- и удаление всегда отдельной строкой под фото/названием/ценой —
       никогда не пытаемся уместить их в одну строку и не даём распасться пополам */
    .cart_item {
        flex-wrap: wrap;
    }

    .cart_item_actions {
        flex-basis: 100%;
        justify-content: space-between;
        margin-top: 10px;
    }

    .up_label {
        display: flex;
        position: relative;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        text-align: center;
        padding-top: 4px;
        padding-left: 44px;
        padding-right: 44px;
    }

    .up_label__left,
    .up_label__right {
        justify-content: center;
    }

    /* Бургер-меню — сбоку, а не в общем центрированном стеке */
    .hamburger_btn {
        position: absolute;
        top: 4px;
        left: 14px;
    }

    .insta_line {
        justify-content: center;
    }

    .Instagram_nick {
        font-size: 13px;
    }

    .InstaLogo {
        width: 18px !important;
        height: 18px !important;
        margin-right: 6px !important;
    }

    .phone_number_header_text {
        font-size: 13px;
        text-align: center;
    }

    .in_service_or_on_order {
        font-size: 12px;
    }

    /* Навигация */
    .all_refs {
        gap: 20px;
        flex-wrap: wrap;
        padding: 10px 0;
    }

    /* Описание продукции — на телефоне все 3 блока в один столбец,
       картинка всегда сверху (даже там, где на десктопе она справа),
       чтобы страница читалась ритмично: фото—текст—фото—текст—фото—текст */
    .row1, .row2, .row3 {
        flex-direction: column;
        align-items: center;
        gap: 14px;
        text-align: center;
        margin-bottom: 32px;
    }

    .row1__image, .row2__image, .row3__image {
        order: -1;
        max-width: 220px;
        width: 60%;
    }

    .row1__text, .row2__text, .row3__text {
        order: 0;
        flex: 0 0 auto;
        max-width: 100%;
        font-size: 16px;
    }

    /* Блок доставки */
    .delivery_main_title {
        font-size: 34px;
        padding-top: 40px;
    }

    .services_and_benefits,
    .corporate_clients {
        padding: 22px;
        font-size: 16px;
    }

    .Delivery_and_pickup {
        grid-template-columns: 1fr;
    }

    /* Заголовки каталога */
    .Chockolate_buikerts_title,
    .Chocklate_for_order_title {
        font-size: 36px;
        padding-top: 40px;
    }

    .Chockolate_buikerts_description,
    .Chocklate_for_order_description {
        font-size: 18px;
        padding: 0 15px;
    }

    /* Слайдеры */
    .slide-caption {
        font-size: 14px;
    }

    .swiper-slide img {
        max-width: 170px;
    }

    /* Footer / Заказ — на телефоне блок компактнее и спокойнее, чтобы не читался как баннер/попап */
    .Conclusion_Div {
        flex-direction: column;
        padding: 32px 20px;
        gap: 18px;
    }

    .contacts_div {
        font-size: 15px;
    }

    .order_information {
        font-size: 16px;
        padding: 12px 24px;
    }
}





@media (max-width: 480px) {
    .sweet_buicket_text {
        font-size: 28px;
    }

    .main_header_div {
        padding: 15px 0;
    }

    .Instagram_nick,
    .phone_number_header_text {
        font-size: 12px;
    }

    .InstaLogo {
        width: 16px !important;
        height: 16px !important;
        margin-right: 5px !important;
    }

    .in_service_or_on_order {
        font-size: 11px;
    }

    .row1__text, .row2__text, .row3__text {
        font-size: 15px;
    }

    .row1__image, .row2__image, .row3__image {
        max-width: 180px;
        width: 55%;
    }

    .Chockolate_buikerts_title,
    .Chocklate_for_order_title {
        font-size: 28px;
    }

    .Chockolate_buikerts_description,
    .Chocklate_for_order_description {
        font-size: 16px;
    }

    /* --- СЛАЙДЕРЫ --- */

    /* Убираем лишние отступы у контейнера слайдера */
    .product-slider {
        padding: 0 5px;
        margin: 20px auto;
        width: 100%; /* На всю ширину */
        box-sizing: border-box;
        overflow: hidden; /* Обрезаем всё, что вылезает */
    }

    .swiper-slide {
        padding: 10px 8px 14px;
    }

    /* Картинка занимает всю карточку и держит более высокий формат, чтобы не обрезать
       текст, впечатанный прямо в фото (прайс-лист и т.п.) */
    .swiper-slide img {
        width: 100%;
        max-width: none;
        aspect-ratio: 3 / 4;
        object-fit: contain;
        background-color: floralwhite;
        display: block;
    }

    .slide-caption {
        font-size: 13px;
        margin-top: 8px;
        padding: 0 5px;
    }

    .slider-arrow {
        width: 30px;
        height: 30px;
    }

        .slider-arrow:after {
            font-size: 16px;
        }

    /* Footer / Заказ */
    .order_information {
        font-size: 17px;
        padding: 12px 24px;
    }

    .contacts_div {
        font-size: 16px;
        padding: 0 10px;
    }

    /* Корзина на узких телефонах */
    .cart_item {
        flex-wrap: wrap;
    }

    .cart_summary {
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* Для совсем маленьких экранов (менее 360px) */
@media (max-width: 360px) {
    .sweet_buicket_text {
        font-size: 24px;
    }

    .all_refs {
        gap: 10px;
    }

    .catalog, .for_present, .about_us, .order_and_delivery {
        font-size: 14px;
    }

    .slide-caption {
        font-size: 12px;
    }

    .order_information, .contacts_div {
        font-size: 16px;
    }
}


/* ==========================================================
   Бургер-меню (три точки), боковое меню, категории/подкатегории,
   корзина — добавлено по ТЗ
   ========================================================== */

.hamburger_btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

    .hamburger_btn .dot {
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background-color: white;
        transition: background-color 0.2s ease;
    }

    .hamburger_btn:hover .dot {
        background-color: mistyrose;
    }

/* Иконка корзины в шапке */
.cart_icon_link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px;
    margin: -11px;
    font-size: 22px;
    text-decoration: none;
    color: white;
}

.cart_badge {
    display: none;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 3px;
    right: 1px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background-color: #d63384;
    color: white;
    font-size: 11px;
    font-family: "Roboto", sans-serif;
}

/* На мобильной раскладке шапка становится колонкой (см. @media 768px выше) —
   иконка корзины должна выйти из потока и встать в угол симметрично бургеру.
   Правило продублировано здесь (а не только в блоке 768px выше), потому что
   более поздний по каскаду безусловный .cart_icon_link{position:relative}
   иначе побеждает и тихо ломает мобильное позиционирование. */
@media (max-width: 768px) {
    .cart_icon_link {
        position: absolute;
        top: 4px;
        right: 14px;
        margin: 0;
    }
}

/* ==========================================================
   Нижнее меню — только для телефонов
   ========================================================== */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    /* Место под фиксированное нижнее меню, чтобы контент не перекрывался */
    body {
        padding-bottom: 62px;
    }

    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: var(--z-side-menu);
        background-color: var(--color-surface);
        border-top: 1px solid var(--color-border);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    }

    .mobile-bottom-nav__item {
        position: relative;
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 8px 4px 6px;
        color: var(--color-ink);
        font-family: "Roboto", sans-serif;
        font-size: 11px;
    }

        .mobile-bottom-nav__item:active {
            color: var(--color-brand);
        }

        .mobile-bottom-nav__item svg {
            flex-shrink: 0;
        }

    .mobile-bottom-nav__badge {
        top: 2px;
        right: calc(50% - 24px);
    }
}

/* Затемнение фона при открытом боковом меню */
.side-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: var(--z-overlay);
}

    .side-menu-overlay.open {
        display: block;
    }

/* Боковое меню */
.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background: floralwhite;
    box-shadow: 2px 0 12px rgba(0,0,0,0.25);
    z-index: var(--z-side-menu);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

    .side-menu.open {
        transform: translateX(0);
    }

.side-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #780404;
    color: white;
    padding: 16px 20px;
    font-size: 18px;
    font-family: "Roboto", sans-serif;
}

.side-menu-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: -10px -12px -10px 0;
    background: none;
    border: none;
    color: white;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.side-menu-list {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.side-menu-cat-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding: 14px 20px;
    font-size: 16px;
    font-family: "Roboto", sans-serif;
    color: #333;
    cursor: pointer;
    text-align: left;
}

    .side-menu-cat-btn .chevron {
        font-size: 11px;
        transition: transform 0.2s ease;
        color: #780404;
    }

    .side-menu-cat-btn.active .chevron {
        transform: rotate(180deg);
    }

    .side-menu-cat-btn:hover {
        color: #d63384;
    }

.side-menu-subcats {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    background-color: mistyrose;
    transition: max-height 0.25s ease;
}

    .side-menu-subcats.open {
        max-height: 400px;
    }

    .side-menu-subcats li a {
        display: block;
        padding: 12px 36px;
        font-size: 14px;
        font-family: "Roboto", sans-serif;
        color: #444;
    }

        .side-menu-subcats li a:hover {
            color: #d63384;
        }

.side-menu-cart-link {
    display: block;
    margin: 16px 20px;
    padding: 12px;
    text-align: center;
    background-color: #780404;
    color: white;
    border-radius: 6px;
    font-family: "Roboto", sans-serif;
}

/* Кнопка "Заказать звонок" в боковом меню */
.side-menu-call-order-btn {
    display: block;
    width: calc(100% - 40px);
    margin: 16px 20px 0;
    padding: 12px;
    text-align: center;
    background-color: var(--color-cta);
    color: white;
    border: none;
    border-radius: 6px;
    font-family: "Roboto", sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

    .side-menu-call-order-btn:hover {
        background-color: var(--color-accent);
    }

/* Кнопка "Заказать звонок" в шапке, рядом с номером телефона */
.header_call_order_btn {
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    background-color: transparent;
    color: white;
    font-family: "Roboto", sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

    .header_call_order_btn:hover {
        background-color: rgba(255, 255, 255, 0.15);
        border-color: white;
    }

@media (max-width: 768px) {
    .header_call_order_btn {
        font-size: 12px;
        padding: 7px 14px;
    }
}

body.no-scroll {
    overflow: hidden;
}

/* Верхняя навигация: категории вместо разделов */
.top_categories {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 50px;
    flex-wrap: wrap;
}

.top_cat {
    position: relative;
}

.top_cat_btn {
    background: none;
    border: none;
    font-size: 15px;
    font-family: "Roboto", sans-serif;
    color: #333;
    cursor: pointer;
    padding: 10px 4px;
}

    .top_cat_btn:hover {
        color: #d63384;
    }

.top_cat.open .top_cat_btn {
    color: #d63384;
}

.top_cat_dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    box-shadow: 0 6px 14px rgba(0,0,0,0.15);
    border-radius: 6px;
    padding: 8px 0;
    min-width: 200px;
    z-index: var(--z-dropdown);
    margin-top: 10px;
}

.top_cat.open .top_cat_dropdown {
    display: block;
}

.top_cat_dropdown a {
    display: block;
    padding: 8px 18px;
    font-size: 14px;
    font-family: "Roboto", sans-serif;
    color: #444;
    white-space: nowrap;
}

    .top_cat_dropdown a:hover {
        background-color: mistyrose;
        color: #d63384;
    }

/* Подсветка товаров выбранной подкатегории */
.swiper-slide.subcat-highlight img {
    box-shadow: 0 0 0 3px #d63384, 0 4px 8px rgba(0,0,0,0.1);
}

/* Кнопка "В корзину" на карточке товара */
.add-to-cart-btn {
    margin-top: 8px;
    padding: 11px 16px;
    font-size: 13px;
    font-family: "Roboto", sans-serif;
    background-color: #780404;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

    .add-to-cart-btn:hover {
        background-color: #d63384;
    }

    .add-to-cart-btn.added {
        background-color: #2e7d32;
    }

@media (max-width: 768px) {
    .top_categories {
        gap: 20px;
    }
}

/* ==========================================================
   Страница /catalog — обзор всех категорий и подкатегорий
   ========================================================== */
.catalog-index {
    max-width: var(--container);
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.catalog-index__title {
    font-family: "Roboto", sans-serif;
    font-size: 36px;
    text-align: center;
    margin-bottom: 32px;
}

.catalog-index__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    align-items: start;
}

.catalog-index__card {
    display: flex;
    flex-direction: column;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .catalog-index__card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
    }

.catalog-index__card-title {
    display: block;
    font-family: "Roboto", sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--color-ink);
    text-align: center;
    padding-bottom: 12px;
}

    .catalog-index__card-title:hover {
        color: var(--color-brand);
    }

.catalog-index__subs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
    border-top: 1px solid var(--color-border);
    padding-top: 12px;
}

.catalog-index__sub-card {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background-color: var(--color-bg);
    font-size: 13px;
    font-family: "Roboto", sans-serif;
    color: var(--color-ink-muted);
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

    .catalog-index__sub-card:hover {
        border-color: var(--color-brand);
        color: var(--color-brand);
        background-color: var(--color-brand-soft);
    }

@media (max-width: 480px) {
    .catalog-index__title {
        font-size: 28px;
    }
}

/* ==========================================================
   Страница категории каталога — сетка товаров
   ========================================================== */
.catalog-page {
    max-width: var(--container);
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.catalog-page__title {
    font-family: "Roboto", sans-serif;
    font-size: 36px;
    text-align: center;
    margin-bottom: 32px;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

.catalog-grid__empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--color-ink-muted);
    font-family: "Roboto", sans-serif;
    padding: 40px 0;
}

.product-card {
    display: flex;
    flex-direction: column;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 14px 14px 18px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
    }

.product-card__image-link {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--radius-md);
}

    .product-card__image-link img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.3s ease;
    }

.product-card:hover .product-card__image-link img {
    transform: scale(1.05);
}

.product-card__name {
    display: block;
    margin-top: 12px;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-ink);
    font-family: "Roboto", sans-serif;
    text-decoration: none;
}

    .product-card__name:hover {
        color: var(--color-brand);
    }

.product-card__price {
    margin-top: 4px;
    font-size: 15px;
    color: var(--color-brand);
    font-family: "Roboto", sans-serif;
}

.product-card .add-to-cart-btn {
    margin-top: 12px;
    width: 100%;
}

/* ==========================================================
   Страница товара (/product/{id})
   ========================================================== */
.product_page {
    max-width: var(--container);
    margin: 0 auto;
    padding: 30px 20px 60px;
    display: grid;
    grid-template-columns: minmax(0, 320px) 1fr;
    gap: 32px;
}

.product_page__photo {
    max-width: 320px;
}

.product_page__photo img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* Галерея из нескольких фото на странице товара */
.product-gallery__main-wrap {
    position: relative;
}

.product-gallery__main {
    cursor: pointer;
    user-select: none;
}

.product-gallery__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    color: var(--color-ink);
    font-size: 16px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.2s ease;
}

    .product-gallery__arrow:hover {
        background: white;
    }

    .product-gallery__arrow--prev {
        left: 10px;
    }

    .product-gallery__arrow--next {
        right: 10px;
    }

.product-gallery__counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    font-size: 12px;
    font-family: "Roboto", sans-serif;
}

.product-gallery__thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.product-gallery__thumb {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    background: none;
    opacity: 0.7;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

    .product-gallery__thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .product-gallery__thumb.is-active,
    .product-gallery__thumb:hover {
        opacity: 1;
        border-color: var(--color-brand);
    }

.product_page__name {
    font-family: "Roboto", sans-serif;
    font-size: 28px;
}

.product_page__price {
    margin-top: 10px;
    font-size: 22px;
    font-weight: 600;
    color: var(--color-brand);
    font-family: "Roboto", sans-serif;
}

.product_page__description {
    margin-top: 16px;
    color: var(--color-ink-muted);
    font-family: "Roboto", sans-serif;
    line-height: 1.5;
    max-width: 480px;
}

.product_page__colors {
    margin-top: 24px;
}

.product_page__colors-label {
    display: block;
    font-size: 14px;
    color: var(--color-ink-muted);
    font-family: "Roboto", sans-serif;
    margin-bottom: 10px;
}

.color-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.color-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 10px;
    border: 1px solid #ddd;
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

    .color-option:has(input:checked) {
        border-color: var(--color-brand);
        background-color: var(--color-brand-soft);
    }

    .color-option input {
        margin: 0;
        accent-color: var(--color-brand);
    }

.color-option__swatch {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.color-option__name {
    font-size: 14px;
    font-family: "Roboto", sans-serif;
}

.product_page .cart_submit_btn {
    margin-top: 0;
    max-width: 320px;
}

.product_page__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.product_page__call_btn {
    border: 1px solid var(--color-brand);
    border-radius: 4px;
    background-color: transparent;
    color: var(--color-brand);
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    font-weight: 500;
    padding: 14px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

    .product_page__call_btn:hover {
        background-color: var(--color-brand);
        color: white;
    }

@media (max-width: 480px) {
    .product_page__actions {
        flex-direction: column;
    }

    .product_page .cart_submit_btn,
    .product_page__call_btn {
        max-width: none;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .product_page {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .product_page__photo {
        max-width: 280px;
        margin: 0 auto;
    }

    .product_page__description {
        max-width: none;
    }
}

/* Блок "Так же может понравиться" — появляется под товаром после "В корзину" */
.also-like-section {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px 60px;
}

.also-like-section[hidden] {
    display: none;
}

.also-like-section__title {
    font-family: "Roboto", sans-serif;
    font-size: 26px;
    margin-bottom: 20px;
}

.also-like-section__grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

@media (max-width: 480px) {
    .also-like-section__title {
        font-size: 20px;
    }
}

/* ==========================================================
   Страница корзины (cart.html)
   ========================================================== */

.cart_page_header {
    background-color: #780404;
    color: white;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: "Roboto", sans-serif;
}

    .cart_page_header a {
        color: white;
        font-size: 15px;
    }

.cart_page_title {
    font-size: 26px;
}

.cart_container {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px 60px;
    font-family: "Roboto", sans-serif;
}

.cart_empty {
    text-align: center;
    padding: 60px 20px;
    color: #555;
    font-size: 18px;
}

.cart_item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

    .cart_item img {
        width: 80px;
        height: 80px;
        object-fit: cover;
        border-radius: 8px;
        flex-shrink: 0;
    }

/* Дублируется здесь же (а не только в блоке 480px выше) по той же причине,
   что и .cart_icon_link — иначе более позднее безусловное правило .cart_item img
   с шириной 80px тихо побеждает и на телефоне уменьшение не срабатывает. */
@media (max-width: 480px) {
    .cart_item img {
        width: 64px;
        height: 64px;
    }
}

.cart_item_info {
    flex-grow: 1;
}

.cart_item_name {
    font-size: 16px;
    margin-bottom: 6px;
}

.cart_item_price {
    color: #780404;
    font-size: 14px;
}

.cart_item_qty {
    display: flex;
    align-items: center;
    gap: 6px;
}

    .cart_item_qty button {
        width: 36px;
        height: 36px;
        border: 1px solid #ccc;
        background: white;
        border-radius: 4px;
        cursor: pointer;
        font-size: 16px;
        line-height: 1;
        flex-shrink: 0;
    }

.cart_item_actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.cart_item_remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    margin-left: 4px;
    flex-shrink: 0;
}

    .cart_item_remove:hover {
        color: #780404;
    }

.cart_summary {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 2px solid #780404;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
}

.cart_note {
    font-size: 13px;
    color: #777;
    margin-top: 8px;
}

.cart_submit_btn {
    margin-top: 10px;
    padding: 14px 20px;
    background-color: #780404;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

    .cart_submit_btn:hover {
        background-color: #d63384;
    }

.cart_checkout_btn {
    display: block;
    margin-top: 24px;
    padding: 14px 20px;
    background-color: var(--color-brand);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 17px;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.2s ease;
}

    .cart_checkout_btn:hover {
        background-color: var(--color-accent);
    }

/* ==========================================================
   Страница оформления заказа (/checkout)
   ========================================================== */

.checkout_summary {
    padding: 18px 20px;
    background: var(--color-brand-soft);
    border-radius: var(--radius-lg);
    margin-bottom: 28px;
}

    .checkout_summary h3 {
        margin-bottom: 10px;
        font-size: 18px;
    }

.checkout_summary_item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    font-size: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

    .checkout_summary_item:last-of-type {
        border-bottom: none;
    }

.checkout_summary_item_name {
    color: var(--color-ink);
}

.checkout_summary_item_price {
    color: var(--color-brand);
    white-space: nowrap;
}

.checkout_form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.checkout_field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checkout_field_label {
    font-size: 14px;
    color: var(--color-ink-muted);
}

.checkout_field input,
.checkout_field .checkout_textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #ccc;
    border-radius: var(--radius-sm);
    font-family: "Roboto", sans-serif;
    font-size: 15px;
}

.checkout_field .checkout_textarea {
    resize: vertical;
    min-height: 70px;
}

.option_group {
    border: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .option_group legend {
        font-size: 15px;
        font-weight: 600;
        color: var(--color-ink);
        padding: 0;
        margin-bottom: 4px;
    }

.option_tile {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

    .option_tile:has(input:checked) {
        border-color: var(--color-brand);
        background-color: var(--color-brand-soft);
    }

    .option_tile:has(input:disabled) {
        cursor: not-allowed;
        opacity: 0.5;
    }

    .option_tile.disabled {
        cursor: not-allowed;
        opacity: 0.5;
        background-color: transparent;
        border-color: #ddd;
    }

    .option_tile input[type="radio"] {
        width: 16px;
        height: 16px;
        accent-color: var(--color-brand);
        flex-shrink: 0;
    }

.option_tile_title {
    font-size: 15px;
}

.option_tile_hint {
    display: none;
    width: 100%;
    margin-left: 26px;
    font-size: 12px;
    color: var(--color-ink-muted);
}

.cart_form_message {
    margin-top: 4px;
    font-size: 14px;
}
