/* ==========================================================================
   TriStyle Shop Belarus — Адаптивная вёрстка
   ========================================================================== */

/* --- Узкий десктоп: жмём шрифт/отступы меню --- */
@media (max-width: 1200px) {
    .header__nav .nav-menu {
        gap: 14px;
    }
    .header__nav .nav-menu li a {
        font-size: 12px;
        letter-spacing: 0.06em;
    }
}

/* --- Планшет (до 960px) — убираем меню, показываем бургер --- */
@media (max-width: 960px) {
    :root {
        --container-padding: 1.25rem;
    }

    /* Хедер: меню скрываем, бургер появляется */
    .header__nav {
        display: none;
    }

    .header__inner {
        grid-template-columns: auto 1fr auto;
    }

    .header__burger {
        display: flex;
    }

    .header__search-toggle {
        display: flex;
    }

    .header__search-btn {
        display: none;
    }

    /* Hero */
    .hero__title {
        font-size: var(--font-size-4xl);
    }

    /* Сетки */
    .products-grid,
    ul.products {
        grid-template-columns: repeat(3, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }

    /* Товар */
    .product-layout {
        gap: var(--spacing-xl);
    }

    /* Корзина */
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 80px 1fr auto auto;
    }

    .cart-item__price {
        display: none;
    }

    /* Чекаут */
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .checkout-order {
        position: static;
    }
}

/* --- Мобильный (до 768px) --- */
@media (max-width: 768px) {
    :root {
        --header-height: 64px;
        --container-padding: 1rem;
    }

    /* Хедер */
    .top-bar {
        font-size: 10px;
        padding: 6px 0;
    }
    .top-bar__text {
        white-space: normal;
        text-align: center;
        display: block;
    }

    .header__actions {
        gap: 2px;
    }
    .header__actions .header__action-btn {
        padding: 6px;
    }
    /* На совсем узких — компактная корзина/акк */
    .header__points { display: none; }

    .header--transparent {
        top: 26px;
    }

    .logo-name {
        font-size: 1.5rem;
    }

    .logo-subtitle {
        font-size: 7px;
    }

    .header__actions {
        gap: 4px;
    }

    .header__action-btn {
        width: 36px;
        height: 36px;
    }

    /* Hero */
    .hero {
        min-height: 400px;
    }

    .hero__title {
        font-size: var(--font-size-3xl);
    }

    .hero__subtitle {
        font-size: var(--font-size-base);
        white-space: normal; /* на мобильных — разрешаем перенос */
    }

    .hero__label {
        font-size: 10px;
    }

    .btn--large {
        padding: 14px 28px;
        font-size: var(--font-size-sm);
    }

    /* Секции */
    .section {
        padding: var(--spacing-2xl) 0;
    }

    .section__title {
        font-size: var(--font-size-2xl);
    }

    .section__header {
        margin-bottom: var(--spacing-xl);
    }

    .section__link {
        position: static;
        margin-top: var(--spacing-sm);
    }

    /* Категории */
    .categories-grid {
        grid-template-columns: 1fr;
    }

    .category-card__title {
        font-size: var(--font-size-xl);
    }

    /* Товары */
    .products-grid,
    ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }

    .product-card__info {
        padding: var(--spacing-sm);
    }

    .product-card__title,
    ul.products li.product .woocommerce-loop-product__title {
        font-size: var(--font-size-xs);
    }

    .product-card__price,
    ul.products li.product .price {
        font-size: var(--font-size-sm);
    }

    /* О бренде */
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    /* Преимущества */
    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-md);
    }

    .feature-card {
        padding: var(--spacing-md);
    }

    .feature-card__icon {
        width: 56px;
        height: 56px;
    }

    /* Рассылка */
    .newsletter__form {
        flex-direction: column;
    }

    .newsletter__title {
        font-size: var(--font-size-2xl);
    }

    /* Подвал */
    .footer__grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    .footer__bottom-inner {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }

    /* Каталог */
    .shop-header__title {
        font-size: var(--font-size-2xl);
    }

    .shop-toolbar {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: flex-start;
    }

    /* Товар (одиночный) */
    .product-layout {
        grid-template-columns: 1fr;
    }

    .product-gallery {
        position: static;
    }

    .product-info__title {
        font-size: var(--font-size-2xl);
    }

    /* Корзина */
    .cart-page__title {
        font-size: var(--font-size-2xl);
    }

    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: var(--spacing-sm);
    }

    .cart-item__quantity,
    .cart-item__subtotal,
    .cart-item__remove {
        grid-column: 2;
    }

    .cart-actions {
        flex-direction: column;
    }

    /* Страница 404 */
    .error-404__code {
        font-size: 5rem;
    }

    /* Поиск */
    .search-form__input {
        font-size: var(--font-size-xl);
    }

    .search-overlay {
        padding-top: 80px;
    }

    /* Боковая панель мобильная */
    .shop-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        z-index: 1500;
        background-color: var(--color-white);
        padding: var(--spacing-xl);
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform var(--transition);
    }

    .shop-sidebar.active {
        display: block;
        transform: translateX(0);
    }
}

/* --- Маленький мобильный (до 480px) --- */
@media (max-width: 480px) {
    .hero__title {
        font-size: var(--font-size-2xl);
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .product-gallery__thumbs {
        gap: 4px;
    }

    .product-gallery__thumb {
        width: 56px;
        height: 56px;
    }
}

/* ==========================================================================
   Телефон: верхние полосы строго по высоте (34 + 40 + 14 = 88px), шапка не перекрывается
   ========================================================================== */
@media (max-width: 768px) {
    body .top-bar {
        height: 34px;
        padding: 0 8px;
        line-height: 34px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 9.5px;
        letter-spacing: .02em;
    }
    body .top-bar .top-bar__text { display: inline; white-space: nowrap; }

    body .ccn-gift-topbanner {
        flex-wrap: nowrap;
        height: 40px;
        padding: 0 12px;
        gap: 10px;
    }
    body .ccn-gift-topbanner__icon { display: none; }
    /* На телефоне — только «Подарочный сертификат TriStyle Shop» + кнопка */
    body .ccn-gift-topbanner__text {
        order: 0;
        flex: 0 1 auto;
        font-size: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: left;
    }
    body .ccn-gift-topbanner__text b { font-size: 12.5px; }
    body .ccn-gift-topbanner__cta { order: 1; font-size: 11.5px; padding: 4px 10px; }

    /* Первый слайд: фото начинается под шапкой, лицо не уходит под полосы */
    .hero__slide--vitrina .hero__vitrina-frame { top: 140px; }
}

/* ==========================================================================
   Телефон: слайдер выше, слайд «шлемы» под шапкой, подпись логотипа не наезжает
   ========================================================================== */
@media (max-width: 768px) {
    .header__logo .logo-subtitle { display: none; }      /* «SPORT & LIFESTYLE» вылезала за шапку */
    .hero { height: 86vh; min-height: 620px; }

    .safety-slide { padding: 162px 16px 56px; gap: 14px; justify-content: flex-start; }
    .safety-slide__badge { margin-bottom: 10px; font-size: 9.5px; letter-spacing: 2px; padding: 4px 10px; }
    .safety-slide__title { font-size: 26px; line-height: 1.1; margin-bottom: 8px; }
    .safety-slide__sub { font-size: 13px; line-height: 1.45; margin-bottom: 12px; }
    .safety-slide__cta { gap: 8px; }
    .safety-slide__btn { padding: 10px 14px; font-size: 11px; letter-spacing: 1px; }
    .safety-slide__marquee { width: 100%; }
    .safety-card { flex: 0 0 132px; }
    .safety-card__img { height: 104px; aspect-ratio: auto; }
    .safety-card__info { padding: 8px 10px 10px; }
    .safety-card__name { font-size: 11.5px; }
    .safety-card__price { font-size: 13px; }
}
@media (max-width: 768px) {
    body:not(.admin-bar) .site-header { top: 74px; } /* шапка вплотную к плашке сертификата — без белой полосы */
}

/* Узкий ноутбук/планшет в горизонтали (961–1199 px): три пункта справа не помещаются рядом
   со значками → как на планшете, меню в бургере (02.10.2026) */
@media (min-width: 961px) and (max-width: 1199px) {
    .header__nav { display: none; }
    .header__inner { grid-template-columns: auto 1fr auto; }
    .header__burger { display: flex; }
    .header__search-toggle { display: flex; }
    .header__search-btn { display: none; }
    .mobile-menu { top: 168px; height: calc(100vh - 168px); overflow-y: auto; }
}
.mobile-nav--right { margin-top: 0; }

/* Телефон: чат и «наверх» над нижним меню (62 px), не друг на друге */
@media (max-width: 768px) {
    .ccn-float-contacts { bottom: 76px !important; right: 14px !important; }
    .ccn-scroll-top { bottom: 144px !important; right: 20px !important; }
}
