



/* ============================================
   HEADER STYLES - ROTANO
   ============================================ */

:root {
    --header-chocolate: #4A3226;
    --header-caramel: #C89B6A;
    --header-brown: #8B6F47;
    --header-ivory: #FAF8F5;
    --header-charcoal: #3A3A3A;
    --header-border: #E5DFD7;
    --header-height: 76px;
    --header-nav-height: 52px;
    --header-utility-height: 36px;
}

/* ============================================
   UTILITY BAR
   ============================================ */
.header-utility {
    background: var(--header-ivory);
    border-bottom: 1px solid var(--header-border);
    font-size: 13px;
    color: var(--header-brown);
    transition: transform 0.3s ease;
}

.header-utility .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-utility-height);
    padding-top: 0;
    padding-bottom: 0;
}

.header-utility__left,
.header-utility__right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-utility__sep {
    color: var(--header-border);
}

.header-utility__link {
    color: var(--header-chocolate);
    font-weight: 500;
    transition: color 0.2s;
}

.header-utility__link:hover {
    color: var(--header-caramel);
    text-decoration: none;
}

.header-utility__social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--header-brown);
    transition: color 0.2s;
}

.header-utility__social:hover {
    color: var(--header-chocolate);
}

/* Hide utility bar on scroll */
body.scrolled .header-utility {
    transform: translateY(-100%);
}

/* ============================================
   MAIN HEADER
   ============================================ */
.site-header {
    background: #FFFFFF;
    border-bottom: 1px solid var(--header-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(74, 50, 38, 0.05);
}

.site-header .container {
    display: grid;
    grid-template-columns: 180px 1fr auto auto auto;
    align-items: center;
    gap: 24px;
    height: var(--header-height);
    padding-top: 0;
    padding-bottom: 0;
}

/* ============================================
   LOGO
   ============================================ */
.logo {
    display: block;
    line-height: 0;
}

.logo img {
    display: block;
    width: 180px;
    height: 48px;
}

.logo:focus-visible {
    outline: 2px solid var(--header-caramel);
    outline-offset: 4px;
    border-radius: 4px;
}

/* ============================================
   SEARCH
   ============================================ */
.header-search {
    position: relative;
    max-width: 480px;
}

.header-search__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--header-brown);
    pointer-events: none;
}

.header-search__input {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 44px;
    border: 1px solid var(--header-border);
    border-radius: 999px;
    font-size: 14px;
    background: var(--header-ivory);
    color: var(--header-chocolate);
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.header-search__input::placeholder {
    color: var(--header-brown);
    opacity: 0.7;
}

.header-search__input:focus {
    outline: none;
    border-color: var(--header-caramel);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(200, 155, 106, 0.1);
}

/* ============================================
   PHONE & CALLBACK
   ============================================ */
.header-contact {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-phone {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-decoration: none;
    transition: opacity 0.2s;
}

.header-phone:hover {
    opacity: 0.8;
    text-decoration: none;
}

.header-phone__number {
    font-size: 18px;
    font-weight: 600;
    color: var(--header-chocolate);
    letter-spacing: -0.01em;
}

.header-phone__label {
    font-size: 11px;
    color: var(--header-brown);
}

.btn-callback {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border: 2px solid var(--header-caramel);
    border-radius: 999px;
    background: transparent;
    color: var(--header-caramel);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn-callback:hover {
    background: var(--header-caramel);
    color: #FFFFFF;
}

.btn-callback:focus-visible {
    outline: 2px solid var(--header-caramel);
    outline-offset: 2px;
}

.btn-callback svg {
    flex-shrink: 0;
}

/* ============================================
   CART
   ============================================ */
.header-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    text-decoration: none;
    color: var(--header-chocolate);
    position: relative;
    transition: color 0.2s;
}

.header-cart:hover {
    color: var(--header-caramel);
    text-decoration: none;
}

.header-cart svg {
    flex-shrink: 0;
}

.header-cart__count {
    position: absolute;
    top: 4px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--header-caramel);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    line-height: 1;
}

.header-cart__count:empty {
    display: none;
}

.header-cart__label {
    font-size: 12px;
}

/* ============================================
   MOBILE MENU BUTTON
   ============================================ */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--header-chocolate);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
    margin: 0 auto;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   NAVIGATION
   ============================================ */
.header-nav {
    background: #FFFFFF;
    border-top: 1px solid var(--header-border);
}

.header-nav .container {
    display: flex;
    align-items: center;
    gap: 32px;
    height: var(--header-nav-height);
    padding-top: 0;
    padding-bottom: 0;
}

.header-nav__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 500;
    color: var(--header-chocolate);
    text-decoration: none;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.header-nav__item:hover {
    color: var(--header-caramel);
    border-bottom-color: var(--header-caramel);
    text-decoration: none;
}

.header-nav__item:focus-visible {
    outline: 2px solid var(--header-caramel);
    outline-offset: 4px;
    border-radius: 4px;
}

.header-nav__catalog {
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.header-nav__catalog svg {
    transition: transform 0.3s;
}

.header-nav__catalog[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

/* ============================================
   MEGA MENU
   ============================================ */






















/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .site-header .container {
        grid-template-columns: 160px 1fr auto auto;
        gap: 16px;
    }
    
    .logo img {
        width: 160px;
        height: 42px;
    }
    
    .header-contact {
        flex-direction: column;
        align-items: flex-end;
        gap: 6px;
    }
    
    .btn-callback span {
        display: none;
    }
    
    .btn-callback {
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
    }
    
    .header-nav .container {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .header-utility {
        font-size: 12px;
    }
    
    .header-utility__left span:nth-child(3),
    .header-utility__sep {
        display: none;
    }
    
    .site-header .container {
        grid-template-columns: 1fr auto auto auto;
        gap: 12px;
        height: 60px;
    }
    
    .logo {
        order: -1;
    }
    
    .logo img {
        width: 140px;
        height: 36px;
    }
    
    .header-search {
        display: none;
    }
    
    .header-contact {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-nav {
        display: none;
    }
    
    .header-cart__label {
        display: none;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .header-utility,
    .header-search__input,
    .btn-callback,
    .header-cart,
    .header-nav__item,
    
}

/* Focus visible polyfill for older browsers */
.js-focus-visible :focus:not(.focus-visible) {
    outline: none;
}

/* FIX: шапка — точка отсчёта для мега-меню */
.site-header { position: relative; /* mega-menu anchor */ }
.header-nav  { position: relative; }


/* FIX: мега-меню поверх контента */


/* ═══════════════════════════════════════════════════════════════
   MEGA MENU - правильное позиционирование и скрытие
   ═══════════════════════════════════════════════════════════════ */



/* Скрытое состояние через атрибут hidden */




















/* Кнопка Каталог - индикатор открытия */
.header-nav__catalog[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.header-nav__catalog svg {
    transition: transform 0.2s;
}

/* ═══════════════════════════════════════════════════════════════
   CRITICAL FIX: принудительное скрытие мега-меню
   ═══════════════════════════════════════════════════════════════ */





/* ═══════════════════════════════════════════════════════════════
   MEGA MENU — финальная версия с высокой специфичностью
   ═══════════════════════════════════════════════════════════════ */

.mega-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background: #fff !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    z-index: 9999 !important;
}

.mega-menu[hidden] {
    display: none !important;
}

.mega-menu .mega-menu__inner {
    display: block !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    height: auto !important;
    max-height: none !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 2rem 1rem !important;
}

.mega-menu .mega-menu__grid {
    display: grid !important;
    grid-template-columns: minmax(170px, 1fr) minmax(170px, 1fr) minmax(240px, 300px) !important;
    justify-content: start !important;
    align-items: start !important;
    gap: 2rem !important;
    min-width: 0 !important;
}


.mega-menu .mega-menu__col {
    min-width: 0;
}

.mega-menu .mega-menu__title {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8B6F47;
    margin: 0 0 1rem 0;
}

.mega-menu .mega-menu__list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.mega-menu .mega-menu__list li {
    margin: 0;
}

.mega-menu .mega-menu__list a {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.5rem 0 !important;
    color: #2C2416 !important;
    text-decoration: none !important;
    font-size: 0.95rem !important;
    transition: color 0.2s, padding-left 0.2s !important;
}

.mega-menu .mega-menu__list a:hover {
    color: #B86945 !important;
    padding-left: 0.5rem !important;
}

.mega-menu .mega-menu__count {
    font-size: 0.8rem;
    color: #8B6F47;
}

.mega-menu .mega-menu__cta {
    color: #B86945 !important;
    font-weight: 600;
}

.header-nav__catalog[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.header-nav__catalog svg {
    transition: transform 0.2s;
}

/* --- добивки мега-меню: треки, разделитель, фокус --- */


.mega-menu .mega-menu__divider {
    border: 0;
    border-top: 1px solid #E8E0D6;
    margin: 1.25rem 0;
}

.mega-menu .mega-menu__list--special a { color: #8B6F47 !important; }
.mega-menu .mega-menu__list--special a:hover { color: #B86945 !important; }

.mega-menu a:focus-visible,
.header-nav__catalog:focus-visible {
    outline: 2px solid #B86945;
    outline-offset: 3px;
    border-radius: 4px;
}

/* на мобильных мега-меню скрыто: там работает drawer */
@media (max-width: 768px) {
    .mega-menu { display: none !important; }
}


/* --- контраст: #B86945 (4.07:1) -> #9A5433 (5.18:1), только мега-меню --- */
.mega-menu .mega-menu__title { color: #9A5433 !important; }
.mega-menu .mega-menu__cta { color: #9A5433 !important; }
.mega-menu .mega-menu__list a:hover { color: #9A5433 !important; }
.mega-menu .mega-menu__list--special a:hover { color: #9A5433 !important; }

/* ── Промо-колонка мега-меню (опт / HoReCa / каталог) ───────────────── */
.mega-menu .mega-menu__col--promo {
    background: #FAF6F0;
    border: 1px solid #EFE6DA;
    border-radius: 12px;
    padding: 1.25rem 1.25rem 1.5rem;
}

.mega-menu .mega-menu__promo-text {
    margin: 0 0 1rem;
    font-size: 14px;
    line-height: 1.55;
    color: #5C5347;
}

.mega-menu .mega-menu__promo-list {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.mega-menu .mega-menu__promo-list a {
    font-size: 15px;
    line-height: 1.4;
    color: #9A5433 !important;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .15s;
}

.mega-menu .mega-menu__promo-list a:hover {
    color: #9A5433 !important;
    border-bottom-color: #9A5433;
}

.mega-menu .mega-menu__promo-cta {
    display: block;
    padding: .7rem 1rem;
    background: #9A5433;
    color: #FFFFFF !important;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    transition: background .15s;
}

.mega-menu .mega-menu__promo-cta:hover {
    background: #7E4429;
    color: #FFFFFF !important;
}

/* 769–1100px: две колонки категорий, промо во всю ширину снизу */
@media (max-width: 1100px) {
    .mega-menu .mega-menu__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .mega-menu .mega-menu__col--promo { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
    .mega-menu .mega-menu__promo-list a,
    .mega-menu .mega-menu__promo-cta { transition: none; }
}

/* Пока телефон не задан: битые ссылки на звонок скрыты */
a[href=""],
a[href="tel:"] {
    display: none !important;
}

/* ───────── product-card__img-фикс ─────────
   Обёртка картинки не должна наследовать height:100% от main.css:
   из-за него изображение растягивалось на всю карточку,
   а название и цена уходили под обрезку overflow:hidden. */
.product-grid .product-card { display: flex; flex-direction: column; }

.product-grid .product-card__img {
    height: auto !important;
    padding-top: 0 !important;
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
    background: #FAF8F5;
}

.product-grid .product-card__img > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-grid .product-card__link { flex: 1 1 auto; text-decoration: none; color: inherit; }

/* двойные отступы: __body задавал 1.25rem, а main.css ещё 1rem на h3/p */
.product-grid .product-card__body { padding: 1rem 1rem .75rem !important; }
.product-grid .product-card__body > * { padding-left: 0 !important; padding-right: 0 !important; }

.product-grid .product-card__title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    color: #2C2416;
    margin: 0 0 .5rem !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-grid .product-card__price {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #9A5433 !important;
    margin: 0 0 .5rem !important;
}

.product-grid .product-card__desc {
    font-size: .875rem;
    line-height: 1.45;
    color: #6B5B45 !important;
    margin: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-grid .product-card__footer {
    margin-top: auto;
    display: flex;
    gap: .5rem;
    padding: 0 1rem 1rem !important;
}

.product-grid .product-card__footer .btn { flex: 1 1 0; text-align: center; }

@media (max-width: 768px) {
    .product-grid .product-card__body { padding: .875rem .875rem .5rem !important; }
    .product-grid .product-card__footer { padding: 0 .875rem .875rem !important; }
}

/* ───────── faq-item__a-фикс ─────────
   В HTML используются faq-item__q / __icon / __a, а в pages.css
   описаны faq-question / faq-answer — их в разметке нет.
   Из-за этого ответы не скрывались, а overflow:hidden срезал текст. */
.faq-list { display: flex; flex-direction: column; gap: .75rem; }

.faq-list .faq-item {
    background: #fff;
    border: 1px solid #E5DFD7;
    border-radius: 8px;
    overflow: hidden;
}

.faq-list .faq-item__q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: none;
    border: 0;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: #2C2416;
    text-align: left;
    cursor: pointer;
}

.faq-list .faq-item__q:hover { background: #FAF8F5; }

.faq-list .faq-item__q:focus-visible {
    outline: 2px solid #9A5433;
    outline-offset: -2px;
}

.faq-list .faq-item__icon {
    flex: 0 0 auto;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1;
    color: #9A5433;
}

.faq-list .faq-item__a {
    padding: 0 1.25rem 1.25rem;
    font-size: .9375rem;
    line-height: 1.65;
    color: #4A4540;
}

.faq-list .faq-item__a[hidden] { display: none; }
.faq-list .faq-item__a > p { margin: 0; }
.faq-list .faq-item__a > p + p { margin-top: .75rem; }

/* ───────── Богатый футер (v2) ───────── */
.site-footer { margin-top: 80px; padding: 56px 0 0; }

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1.1fr 1fr 1fr 1.15fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col { min-width: 0; }

.footer-col strong {
    display: block;
    margin-bottom: 18px;
    color: #fff;
    font-size: .8rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.footer-col a,
.footer-col p {
    display: block;
    margin: 0 0 10px;
    color: #b5a99e;
    font-size: .92rem;
    line-height: 1.5;
    text-decoration: none;
}

.footer-col a:hover { color: #fff; }

.footer-logo {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: .06em;
    color: #fff;
    margin-bottom: 14px;
}

.footer-tagline {
    max-width: 34ch;
    color: #b5a99e;
    font-size: .92rem;
    line-height: 1.65;
    margin: 0 0 16px;
}

.footer-tgram {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #4a4037;
    border-radius: 6px;
    color: #d5c9bc !important;
    font-size: .85rem !important;
    transition: border-color .2s, color .2s;
}

.footer-tgram:hover { border-color: #B86945; color: #fff !important; }

.footer-phone {
    font-size: 1.1rem !important;
    font-weight: 600;
    color: #fff !important;
    margin-bottom: 12px !important;
}

.footer-phone-label { color: #8d8177; font-size: .9rem; }

.footer-callback {
    margin: 4px 0 14px;
    width: 100%;
    justify-content: center;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid #3d3028;
}

.footer-bottom p { margin: 0; }

.footer-copy { font-size: .8rem; color: #7a6e68; }
.footer-meta { font-size: .8rem; color: #7a6e68; }

@media (max-width: 1080px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-col--brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
    .site-footer { padding-top: 40px; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom { justify-content: center; text-align: center; }
}

