/* ==========================================================================
   1. СТИЛИ ДЛЯ ДЕСКТОПНОЙ ВЕРСИИ ШАПКИ
   ========================================================================== */

/* Контейнер и строка */
.v2gh-sticky-container {
    background: #167f2b;
    position: sticky;
    top: 0;
    z-index: 100000;
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.15);
    padding: 5px 0;
}

.v2gh-line {
    display: flex;
    align-items: center; 
    justify-content: space-between;
    height: 40px !important;
    gap: 15px;
}

.v2gh-line-middle {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 910px;
    height: 40px;
    min-width: 0;
    padding: 0 50px;
}

/* Логотип десктоп */
.v2gh-logo {
    flex: 0 0 200px; 
    height: 40px; 
    display: flex;
    align-items: center; 
    justify-content: center;
    text-decoration: none;
}

.v2gh-logo-img {
    height: 50px; 
    width: auto;
    display: block;
    flex-shrink: 0;
}

/* Кнопка "Каталог" десктоп */
.header-menu__button {
    width: 170px;
    height: 40px;
    background: #167f2b;
    border-radius: 999px;
    border: 1px solid #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: none !important; 
    outline: none;    
}

.header-menu__button:hover { background: #459d57; }

.header-menu__text {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    letter-spacing: normal; 
    color: #fff;
    font-weight: 600;
    font-size: 20px;
    padding-bottom: 5px;
}

/* Бургер десктоп */
.header-menu__burger {
    width: 18px;
    height: 2px;
    background: #fff;
    position: relative;
}
.header-menu__burger::before, .header-menu__burger::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 2px;
    background: #fff;
    left: 0;
    transition: 0.2s;
}
.header-menu__burger::before { top: -6px; }
.header-menu__burger::after { top: 6px; }

/* Состояния анимации кнопки десктоп */
.header-menu__button.active .header-menu__burger { background: transparent; }
.header-menu__button.active .header-menu__burger::before { transform: rotate(45deg); top: 0; }
.header-menu__button.active .header-menu__burger::after { transform: rotate(-45deg); top: 0; }
.header-menu__arrow {
    width: 0; height: 0;
    border-left: 5px solid transparent; border-right: 5px solid transparent;
    border-top: 6px solid #fff; transition: 0.2s;
}
.header-menu__button.active .header-menu__arrow { transform: rotate(180deg); }

.v2gh-catalog-btn-fixed { flex: 0 0 170px !important; margin: 0 !important; }

/* Навигационные ссылки */
.v2gh-nav-links { display: flex; align-items: center; gap: clamp(10px, 2vw, 25px); height: 40px; }
.v2gh-nav-item {
    color: white; text-decoration: none !important; font-size: 17px; font-weight: 400;
    display: flex; align-items: center; height: 100%; line-height: 1; transition: opacity 0.2s;
}
.v2gh-nav-item:hover { opacity: 0.8; }

/* Иконки связи десктоп */
.v2gh-t-block-t, .v2gh-m-block-m { height: 30px; display: flex; align-items: center; justify-content: flex-end; flex: 0 0 auto; }
.v2gh-t-img-t { height: 40px; width: auto; display: block; flex-shrink: 0; transition: all 0.3s ease; cursor: pointer; margin: 0; }
.v2gh-m-img-m { height: 25px; width: auto; display: block; flex-shrink: 0; transition: all 0.3s ease; cursor: pointer; margin-right: 20px; }

/* Ховер-эффекты и покачивание */
.v2gh-t-img-t:hover, .v2gh-m-img-m:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
    animation: shake 0.5s ease-in-out infinite;
}
@keyframes shake {
    0% { transform: scale(1.2) rotate(0deg); }
    25% { transform: scale(1.2) rotate(5deg); }
    50% { transform: scale(1.2) rotate(0deg); }
    75% { transform: scale(1.2) rotate(-5deg); }
    100% { transform: scale(1.2) rotate(0deg); }
}

.v2gh-t-link { font-size: 24px; font-weight: 700; color: white; text-decoration: none; line-height: 1; }
.v2gh-t-link.v2gh-js-t { display: flex; align-items: center; justify-content: flex-end; min-height: 40px; transition: all 0.3s ease; }


/* ==========================================================================
   2. СТИЛИ ДЛЯ МОБИЛЬНОЙ ВЕРСИИ ШАПКИ
   ========================================================================== */

.v2gh-sticky-container-mob {
    background: #167f2b;
    position: sticky;
    top: 0;
    z-index: 100000;
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.15);
    padding: 5px 0;
}

.v2gh-flex-row {
    display: flex;
    align-items: center;
    justify-content: space-between; 
    width: 100%;
    position: relative; 
    height: 50px;
    box-sizing: border-box;
}

/* Трехколоночная разметка флексов */
.v2gh-side-col-btn { flex: 0 0 40px; z-index: 5; }
.v2gh-center-col {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%); 
    z-index: 10;
    display: flex; justify-content: center;
}
.v2gh-side-col-t {
    flex: 0 0 40%; max-width: 40%;
    display: flex; justify-content: flex-end; align-items: center;
    z-index: 5; overflow: visible;
}

/* Логотип и иконка мобильные */
.v2gh-logo-mob { height: 40px; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.v2gh-logo-img-mob { height: 50px; width: auto; display: block; flex-shrink: 0; }
.v2gh-t-img-t-mob { height: 28px; width: auto; display: block; flex-shrink: 0; pointer-events: none; }

/* Кнопка бургер мобильная */
.header-menu__button-mob {
    width: 50px; height: 40px; background: #167f2b;
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; transition: 0.2s; box-shadow: none !important; border: none; outline: none;
}
.header-menu__burger-mob { width: 25px; height: 4px; background: #fff; position: relative; }
.header-menu__burger-mob::before, .header-menu__burger-mob::after {
    content: ""; position: absolute; width: 25px; height: 4px; background: #fff; left: 0; transition: 0.2s;
}
.header-menu__burger-mob::before { top: -8px; }
.header-menu__burger-mob::after { top: 8px; }

/* Анимация крестика мобильная */
.header-menu__button-mob.active .header-menu__burger-mob { background: transparent; }
.header-menu__button-mob.active .header-menu__burger-mob::before { transform: rotate(45deg); top: 0; }
.header-menu__button-mob.active .header-menu__burger-mob::after { transform: rotate(-45deg); top: 0; }

.v2gh-catalog-btn-fixed-mob { flex: 0 0 40px; margin: 0; }
.v2gh-t-link-mob { font-size: min(4vw, 24px); font-weight: 700; color: white; text-decoration: none; line-height: 1; white-space: nowrap; }
.v2gh-t-link-mob.v2gh-js-t { display: flex; align-items: center; justify-content: flex-end; min-height: 40px; transition: all 0.3s ease; }


/* ==========================================================================
   3. УПРАВЛЕНИЕ АДАПТИВНОСТЬЮ (MEDIA QUERIES) И ПЕРЕКЛЮЧЕНИЕ ШАПОК
   ========================================================================== */

/* --- Логика переключения версий по брейкпоинту 600px --- */
@media (min-width: 601px) {
    .d-only-mobile {
        display: none !important; /* Полностью убираем мобильный HTML на ПК */
    }
}

@media (max-width: 600px) {
    .d-only-desktop {
        display: none !important; /* Полностью убираем десктопный HTML на смартфонах */
    }
}

/* --- Вспомогательные адаптивные брейкпоинты из ваших файлов --- */
@media (max-width: 951px) {
    .v2gh-line-middle { padding: 0 0px !important; }
    .v2gh-nav-links { display: none !important; }
    .v2gh-phone-img { display: none !important; }
}

@media (max-width: 659px) {
    .v2gh-t-link { font-size: 18px !important; }
}
