/* ===== HEADER STYLES ===== */
/* Палитра для премиального тёмного стиля */
:root {
    --color-gold: #b59460;
    --color-gold-light: #d4b47a;
    --color-gold-dark: #8d6e3a;
    --gradient-gold: linear-gradient(90deg, #EEC982 0.02%, #C89024 100.01%);
    --gradient-gold-hover: linear-gradient(90deg, #C89024 0.02%, #EEC982 100.01%);
    --color-bg-dark: #000000;
    --color-bg-dark-alt: #0c0c14;
    --color-text-light: #f0f0f0;
    --color-text-gray: #a0a0b0;
    --color-border: #2a2a3c;
    --border-radius-sm: 2px;
    --border-radius-md: 4px;
}

/* Основной контейнер шапки */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--color-bg-dark);
    border-bottom: 1px solid rgba(181, 148, 96, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
    font-family: "Manrope", sans-serif;
    box-sizing: border-box;
}

/* Верхняя строка с контактами и лого */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px;
    max-width: 1400px;
    margin: 0 auto;
    gap: 20px;
    box-sizing: border-box;
}

/* Обертка для логотипа и слогана */
.logo-slogan-wrapper {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-sizing: border-box;
}

/* Логотип */
.site-logo {
    margin-bottom: 8px;
    box-sizing: border-box;
}

.site-logo img {
    width: 160px;
    height: auto;
    display: block;
    box-sizing: border-box;
    max-width: 100%;
}

/* Слоган под логотипом */
.site-slogan {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-align: left;
    max-width: 200px;
    box-sizing: border-box;
}

/* Контактная информация с иконками */
.contact-info-icons {
    display: flex;
    gap: 35px;
    align-items: center;
    box-sizing: border-box;
}

/* Блок адреса отдельно */
.contact-address-block {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    box-sizing: border-box;
}

/* Блок телефонов */
.contact-phones-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
    box-sizing: border-box;
}

/* Блок почты отдельно */
.contact-email-column {
    min-width: 150px;
    box-sizing: border-box;
}

.contact-icon-block {
    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
}

.icon-wrapper {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    box-sizing: border-box;
}

.icon-wrapper svg {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.contact-value {
    font-size: 15px;
    color: var(--color-text-light);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    line-height: 1.4;
    box-sizing: border-box;
}

.contact-value:hover {
    color: var(--color-gold-light);
}

/* Иконки мессенджеров */
.header-icons {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-left: 20px;
    box-sizing: border-box;
}

.header-icons .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: var(--color-bg-dark);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.header-icons .social-icon::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border-radius: 2px;
    background: var(--color-bg-dark);
    z-index: 1;
    box-sizing: border-box;
}

.header-icons .social-icon svg {
    position: relative;
    z-index: 2;
    width: 22px;
    height: 22px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.header-icons .social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(200, 144, 36, 0.3);
    border-color: var(--color-gold);
}

/* Кнопка "Узнать цены" с анимацией перелива */
.callback-button {
    margin-left: 25px;
    box-sizing: border-box;
}

.callback-button .btn {
    background: var(--gradient-gold);
    background-size: 200% auto;
    color: var(--color-bg-dark);
    border: none;
    padding: 14px 32px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
    display: inline-block;
    text-decoration: none;
    text-align: center;
    min-width: 160px;
    box-sizing: border-box;
}

.callback-button .btn:hover {
    background-position: right center;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(200, 144, 36, 0.3);
}

.callback-button .btn:active {
    transform: translateY(-1px);
}

/* Вторая полоса с меню и поиском */
.header-second-row {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    background: var(--color-bg-dark-alt);
    border-top: 1px solid var(--color-border);
    padding: 0 40px;
    max-width: unset;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Меню навигации */
.main-menu {
    display: flex;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
    list-style: none;
    box-sizing: border-box;
}

.menu-item {
    position: relative;
    box-sizing: border-box;
}

.menu-item a {
    color: var(--color-text-light);
    padding: 18px 24px;
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    border-left: 1px solid transparent;
    border-right: 1px solid transparent;
    box-sizing: border-box;
    position: relative;
    padding-right: 30px;
    /* Добавляем место для стрелочки */
}

header .menu-item:first-child a {
    border-left: 1px solid var(--color-border);
}

header .menu-item:last-child a {
    border-right: 1px solid var(--color-border);
}

.menu-item a:hover,
.current-menu-item a {
    color: var(--color-gold);
    background: rgba(181, 148, 96, 0.05);
}

.menu-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    background: var(--gradient-gold);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

.menu-item a:hover::after,
.current-menu-item a::after {
    transform: scaleX(1);
}

/* ===== ВЫПАДАЮЩЕЕ МЕНЮ (ДЛЯ ПК) ===== */

/* Пункты меню с подменю */
.menu-item-has-children {
    position: relative;
}

/* Стрелка для пунктов с подменю */
.menu-item-has-children>a::before {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--color-gold);
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

.menu-item-has-children:hover>a::before {
    transform: translateY(-50%) rotate(180deg);
}

/* Подменю */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--color-bg-dark-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    list-style: none;
    margin: 0;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.menu-item-has-children:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Пункты подменю */
.sub-menu .menu-item {
    margin: 0;
    width: 100%;
}

.sub-menu .menu-item a {
    display: block;
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
    text-transform: none;
    letter-spacing: normal;
    background: transparent;
    padding-right: 24px;
    /* Убираем лишний отступ для стрелочки в подменю */
}

.sub-menu .menu-item:last-child a {
    border-bottom: none;
}

.sub-menu .menu-item a:hover {
    background: rgba(181, 148, 96, 0.1);
    color: var(--color-gold-light);
}

.sub-menu .menu-item a::after {
    display: none;
}

.sub-menu .menu-item a::before {
    display: none;
    /* Убираем стрелочки у пунктов подменю */
}

/* Иконка корзины */
.header-cart {
    margin-left: 30px;
    box-sizing: border-box;
}

.cart-link {
    display: block;
    text-decoration: none;
    box-sizing: border-box;
}

.cart-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.cart-icon-wrapper:hover {
    border-color: var(--color-gold);
    background: rgba(181, 148, 96, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(200, 144, 36, 0.2);
}

.cart-icon-wrapper svg {
    width: 24px;
    height: 24px;
    box-sizing: border-box;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--gradient-gold);
    color: var(--color-bg-dark);
    font-size: 12px;
    font-weight: 600;
    min-width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 8px rgba(200, 144, 36, 0.3);
    box-sizing: border-box;
}

/* Поиск во второй полосе */
.header-search {
    margin-left: 30px;
    box-sizing: border-box;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
}

.search-input {
    width: 280px;
    height: 42px;
    padding: 0 20px;
    font-size: 14px;
    color: var(--color-text-light);
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    font-family: "Manrope";
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-gold);
    background-color: rgba(255, 255, 255, 0.08);
}

.search-input::placeholder {
    color: var(--color-text-gray);
    font-size: 14px;
}

.search-button {
    background: var(--gradient-gold);
    color: var(--color-bg-dark);
    border: none;
    padding: 0 24px;
    height: 42px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    min-width: 120px;
    box-sizing: border-box;
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(200, 144, 36, 0.2);
}

/* Бургер меню для мобильных */
.mobile-toggle {
    display: none;
    width: 24px;
    height: 18px;
    position: relative;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    box-sizing: border-box;
}

.mobile-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--color-gold);
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.mobile-toggle span:nth-child(1) {
    top: 0;
}

.mobile-toggle span:nth-child(2) {
    top: 8px;
}

.mobile-toggle span:nth-child(3) {
    top: 16px;
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 8px;
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 8px;
}

/* ===== МОБИЛЬНАЯ ВЕРСИЯ ===== */
@media (max-width: 1200px) {
    .header-top {
        padding: 15px 25px;
        gap: 25px;
    }

    .header-second-row {
        padding: 0 25px;
    }

    .site-logo img {
        width: 130px;
    }

    .contact-info-icons {
        gap: 25px;
    }

    .contact-address-block {
        min-width: 180px;
    }

    .contact-phones-column {
        min-width: 170px;
    }

    .contact-email-column {
        min-width: 180px;
    }

    .search-input {
        width: 220px;
    }

    /* Подменю на средних экранах */
    .sub-menu {
        min-width: 200px;
    }
}

/* СТИЛИ ДЛЯ МОБИЛЬНОГО МЕНЮ ВНЕ МЕДИА-ЗАПРОСА */
.main-navigation.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--color-bg-dark);
    z-index: 999;
    padding-top: 80px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

.main-navigation.mobile-menu.active {
    display: block;
    transform: translateX(0);
}

.main-navigation.mobile-menu .main-menu {
    flex-direction: column;
    width: 100%;
    padding: 0;
    margin: 0;
}

.main-navigation.mobile-menu .menu-item {
    width: 100%;
}

.main-navigation.mobile-menu .menu-item a {
    padding: 18px 25px;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-light);
    background: transparent;
}

/* Стрелка для мобильного меню */
.main-navigation.mobile-menu .menu-item-has-children>a .mobile-menu-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
    color: var(--color-gold);
    margin-left: 10px;
}

.main-navigation.mobile-menu .menu-item-has-children.submenu-open>a .mobile-menu-arrow {
    transform: rotate(180deg);
}

.main-navigation.mobile-menu .menu-item:first-child a {
    border-left: none;
}

.main-navigation.mobile-menu .menu-item:last-child a {
    border-right: none;
    border-bottom: none;
}

/* Подменю в мобильной версии */
.main-navigation.mobile-menu .sub-menu {
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: rgba(10, 10, 20, 0.8);
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    border-radius: 0;
}

.main-navigation.mobile-menu .sub-menu.active {
    display: block;
}

.main-navigation.mobile-menu .sub-menu .menu-item a {
    padding-left: 40px;
    font-size: 14px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.02);
    padding-right: 25px;
    /* Убираем лишний отступ для стрелочки */
}

.main-navigation.mobile-menu .sub-menu .menu-item a:hover {
    background: rgba(181, 148, 96, 0.1);
}

.pmenu-main {
    display: none;
}

/* Мобильная иконка корзины */
.mobile-cart {
    display: none;
    position: relative;
    z-index: 1001;
    margin-left: 0;
    box-sizing: border-box;
}

.mobile-cart .cart-link {
    display: block;
    text-decoration: none;
}

.mobile-cart .cart-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.mobile-cart .cart-icon-wrapper:hover {
    border-color: var(--color-gold);
    background: rgba(181, 148, 96, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(200, 144, 36, 0.2);
}

.mobile-cart .cart-icon-wrapper svg {
    width: 20px;
    height: 20px;
    box-sizing: border-box;
}

.mobile-cart .cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--gradient-gold);
    color: var(--color-bg-dark);
    font-size: 10px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 6px rgba(200, 144, 36, 0.3);
    box-sizing: border-box;
}

/* Скрываем стрелку для десктопного меню в мобильной версии */
@media (max-width: 992px) {
    .menu-item-has-children>a::before {
        display: none;
    }

    .menu-item a {
        padding-right: 25px;
        /* Возвращаем нормальный padding для мобильных */
    }

    .logo-slogan-wrapper {
        display: none;
    }

    .contact-info-icons,
    .header-icons,
    .header-second-row {
        display: none !important;
    }

    .header-top {
        padding: 10px 12px !important;
        /* Уменьшаем padding */
        justify-content: space-between;
        flex-wrap: nowrap;
        position: relative;
        z-index: 1000;
        background-color: var(--color-bg-dark);
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        overflow: hidden;
    }

    .site-logo {
        display: block;
        margin-bottom: 0;
        flex-shrink: 0;
        z-index: 1001;
        min-width: 90px;
        max-width: 90px;
    }

    .site-logo img {
        width: 90px !important;
        height: auto;
        max-width: 100%;
    }

    .callback-button {
        display: none;
        /* Скрываем обычную кнопку */
    }

    /* Мобильная иконка корзины */
    .mobile-cart {
        display: flex !important;
        order: 4;
        flex-shrink: 0;
        z-index: 1001;
        margin: 0 6px;
        box-sizing: border-box;
    }

    /* Мобильная кнопка "Узнать цены" */
    .mobile-callback-button {
        display: flex !important;
        order: 5;
        flex-shrink: 0;
        margin: 0 6px;
        box-sizing: border-box;
    }

    .mobile-callback-button .btn {
        background: var(--gradient-gold);
        color: var(--color-bg-dark);
        border: none;
        padding: 7px 10px !important;
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        border-radius: var(--border-radius-sm);
        cursor: pointer;
        transition: all 0.3s ease;
        display: inline-block;
        text-decoration: none;
        text-align: center;
        white-space: nowrap;
        min-width: auto;
        height: 32px;
        line-height: 16px;
        box-sizing: border-box;
        max-width: 90px;
    }

    .mobile-callback-button .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(200, 144, 36, 0.2);
    }

    .mobile-toggle {
        display: flex !important;
        order: 6;
        flex-shrink: 0;
        z-index: 1002;
        margin-left: 0;
        width: 22px;
        height: 22px;
        min-width: 22px;
    }

    /* Мобильный телефон - показываем только первый */
    .mobile-phone {
        display: flex !important;
        align-items: center;
        gap: 5px;
        margin: 0 6px;
        order: 2;
        flex-shrink: 1;
        z-index: 1001;
        min-width: 0;
        /* overflow: hidden; */
        max-width: 100px;
        box-sizing: border-box;
    }

    .mobile-phone .icon-wrapper {
        width: 14px;
        height: 14px;
        flex-shrink: 0;
        min-width: 14px;
    }

    .mobile-phone .contact-value {
        font-size: 11px;
        white-space: nowrap;
        color: var(--color-gold);
        font-weight: 600;
        /* overflow: hidden; */
        /* text-overflow: ellipsis; */
        /* max-width: 90px; */
        flex-shrink: 1;
    }
}

@media (max-width: 576px) {
    .pmenu-main {
        display: block;
    }

    .header-top {
        padding: 8px 10px !important;
        height: 54px;
    }

    .site-logo {
        min-width: 80px;
        max-width: 80px;
    }

    .site-logo img {
        width: 80px !important;
    }

    /* Мобильная иконка корзины */
    .mobile-cart {
        margin: 0 4px;
    }

    .mobile-cart .cart-icon-wrapper {
        width: 32px;
        height: 32px;
    }

    .mobile-cart .cart-icon-wrapper svg {
        width: 18px;
        height: 18px;
    }

    .mobile-phone .contact-value {
        font-size: 10px;
        /* max-width: 80px; */
    }

    .mobile-phone {
        margin: 0 4px;
        gap: 3px;
        /* max-width: 90px; */
    }

    .mobile-callback-button {
        margin: 0 4px;
    }

    .mobile-callback-button .btn {
        padding: 6px 8px !important;
        font-size: 9px;
        height: 30px;
        line-height: 14px;
        /* max-width: 80px; */
    }

    .mobile-toggle {
        width: 20px;
        height: 20px;
        min-width: 20px;
    }

    .main-navigation.mobile-menu {
        padding-top: 60px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 380px) {
    .header-top {
        padding: 6px 8px !important;
    }

    .mobile-cart {
        margin: 0 3px;
    }

    .mobile-cart .cart-icon-wrapper {
        width: 30px;
        height: 30px;
    }

    .mobile-cart .cart-icon-wrapper svg {
        width: 16px;
        height: 16px;
    }

    .mobile-phone .contact-value {
        font-size: 9px;
        /* max-width: 70px; */
    }

    .mobile-callback-button .btn {
        padding: 5px 6px !important;
        font-size: 8px;
        height: 28px;
        line-height: 12px;
        /* max-width: 70px; */
    }

    .site-logo {
        min-width: 70px;
        max-width: 70px;
    }

    .site-logo img {
        width: 70px !important;
    }

    .mobile-toggle {
        width: 18px;
        height: 18px;
        min-width: 18px;
    }
}

/* ОСНОВНОЙ FIX ДЛЯ ШИРИНЫ */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

* {
    box-sizing: border-box;
}