/* ============ Верхняя панель ============ */
.header-top-bar {
    background: rgba(27, 26, 26, 0.90);
    font-family: 'Inter Tight', sans-serif;
    font-size: 14px;
    font-weight: 400;
}

.header-top-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 10px 0px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

/* Левая часть — контакты */
.header-top-left {
    display: flex;
    align-items: center;
    gap: 24px;
    color: #fff;
}

.header-top-phones,
.header-top-email {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-top-city {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.header-top-city img {
    width: 13px;
    height: 16px;
}

/* Правая часть — меню */
.header-top-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-top-right a {
    color: #818084;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s;
}

.header-top-right a:hover {
    color: #ffffff;
}

/* ============ Основная строка шапки ============ */
.header-main-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
    padding: 10px 0px;
    background: rgba(255, 255, 255, 0.90);
    box-sizing: border-box;
}

/* Логотип */
.header-logo img {
width: 200px;
  height: 56px;
  display: block;
  margin-top: 0px;
}

/* Обёртка логотипа и кнопок */
.header-logo-and-catalog {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Каталог + поиск */
.header-catalog-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

/* Кнопка "Каталог" */
.btn-catalog {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 24px;
    background: transparent;
    border: 1px solid #ce2e2e;
    color: #ce2e2e;
    font-family: 'Bebas Neue Cyrillic', sans-serif;
    font-size: 20px;
    font-weight: 400;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Обычная иконка (изначальная) - видна по умолчанию */
.btn-catalog .icon-catalog {
    width: 16px;
    height: 16px;
    display: block;
    transition: opacity 0.3s ease, transform 0.3s ease;
	position: relative;
	top:2px;
}

/* Контейнер для анимированных полосок - по умолчанию скрыт */
.btn-catalog .catalog-icon-wrapper {
    display: none; /* Просто скрыт, без absolute */
}

/* Стили для всех полосок */
.btn-catalog .catalog-icon-wrapper span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ce2e2e;
    border-radius: 1px;
    transition: transform 0.3s ease, opacity 0.3s ease, top 0.3s ease, background-color 0.3s ease;
    display: block;
}

/* Верхняя полоска */
.btn-catalog .catalog-icon-wrapper span:nth-child(1) {
    top: 2px;
}

/* Средняя полоска */
.btn-catalog .catalog-icon-wrapper span:nth-child(2) {
    top: 7px;
    opacity: 1;
}

/* Нижняя полоска */
.btn-catalog .catalog-icon-wrapper span:nth-child(3) {
    top: 12px;
}

/* Состояние при наведении */
.btn-catalog:hover {
    background: #ce2e2e;
    color: white;
}

/* При наведении - обычная иконка становится белой */
.btn-catalog:hover .icon-catalog {
    filter: brightness(0) invert(1);
}

/* АКТИВНОЕ СОСТОЯНИЕ (меню открыто) */
.btn-catalog.active .icon-catalog {
    display: none; /* Полностью скрываем обычную иконку */
}

.btn-catalog.active .catalog-icon-wrapper {
    display: inline-block; /* Показываем контейнер с полосками */
    width: 20px;
    height: 20px;
    position: relative;
	top:4px;
}

/* Трансформируем полоски в крестик */
.btn-catalog.active .catalog-icon-wrapper span:nth-child(1) {
    transform: rotate(45deg);
    top: 7px;
}

.btn-catalog.active .catalog-icon-wrapper span:nth-child(2) {
    opacity: 0;
}

.btn-catalog.active .catalog-icon-wrapper span:nth-child(3) {
    transform: rotate(-45deg);
    top: 7px;
}

/* При наведении в активном состоянии - полоски становятся белыми */
.btn-catalog.active:hover .catalog-icon-wrapper span {
    background-color: white;
}

/* Текст кнопки */
.btn-catalog .catalog-text {
    position: relative;
    top: 1.5px;
}


/* ===== ПОИСК С ВЫЕЗЖАЮЩИМ ПОЛЕМ ===== */
.header-search-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

/* Контейнер для выезжающего поля */
.search-slide-container {
    width: 0;
    opacity: 0;
    transition: width 0.3s ease, opacity 0.2s ease;
    position: relative;
    z-index: 5;
}

/* Активное состояние - поле развернуто */
.search-slide-container.active {
    width: 300px;
    opacity: 1;
    margin-right: 6px;
	height:40px;
}

/* Состояние скрытия - только прозрачность */
.search-slide-container.hiding {
    width: 300px;
    opacity: 0;
    pointer-events: none;
	height:40px;
	margin-right: 6px;
    transition: opacity 0.2s ease, width 0s linear 0.2s; /* Ширина схлопнется после исчезновения */
}

/* Обертка для поля ввода */
.search-input-wrapper {
    width: 300px;
    padding-right: 10px;
}

.search-input-wrapper .search-form {
    width: 100%;
    max-width: 100%;
}

/* Стили для поля ввода */
.search-input-wrapper .search-input,
.search-input-wrapper .search-form__input {
    width: 100%;
    height: 40px;
    padding: 10px 15px;
    border: 1px solid #090909;
    outline: none;
    font-family: 'Inter Tight', sans-serif;
    font-size: 14px;
    background: white;
    box-sizing: border-box;
    color: #303030;
}

.search-input-wrapper .search-input:focus,
.search-input-wrapper .search-form__input:focus {
    border-color: #ce2e2e;
}

/* Кнопка поиска */
.btn-search-toggle {
    width: 40px;
    height: 40px;
    background: #ce2e2e;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    z-index: 10;
    transition: transform 0.3s ease;
}

/* При скрытии кнопка двигается сразу */
.search-slide-container.hiding + .btn-search-toggle {
    transform: translateX(-306px);
}

.icon-search {
    width: 18px;
    height: 18px;
    display: block;
}

/* ===== ВЫПАДАЮЩЕЕ МЕНЮ КАТАЛОГА ===== */
.catalog-menu-wrapper {
    position: relative;
}

.catalog-dropdown {
    position: fixed;
    top: 106px;
    left: 50%;
    transform: translateX(-50%);
    width: 1240px;
    background: white;
    box-shadow: 2.1670804023742676px 1.7730658054351807px 19.5px rgba(0, 0, 0, 0.04), 10.835402488708496px 8.865328788757324px 120px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    display: none;
    margin-top: 0;
}

.catalog-dropdown.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.catalog-dropdown__container {
    width: 1240px;
    margin: 0 auto;
    padding: 0;
}

.catalog-dropdown__content {
    display: flex;
    position: relative;
    min-height: 498px;
}

/* Левая колонка с разделами */
.catalog-sections {
    width: 281px;
	margin-bottom: 6px;
    background: #fff;
    max-height: 498px;
    overflow-y: auto;
    position: relative;
	padding-top:10px;
    scrollbar-width: thin;
    scrollbar-color: #E1E1E1 #F2F3F5;
}

.catalog-sections::-webkit-scrollbar {
    width: 4px;
}

.catalog-sections::-webkit-scrollbar-track {
    background: #F2F3F5;
}

.catalog-sections::-webkit-scrollbar-thumb {
    background: #E1E1E1;
    border-radius: 900px;
}

.catalog-sections-list {
    padding: 0;
}

.catalog-section-item {
    padding: 16px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
   background: #F2F3F5;
  margin-bottom: 8px;
  margin-right: 8px;
  margin-left: 8px;
}

.catalog-section-item:hover {
    background: rgba(242, 243, 245, 0.60);
    border-left-color: #ce2e2e;
}

.catalog-section-item.active {
    background: rgba(242, 243, 245, 0.60);
    border-left-color: #ce2e2e;
}

.section-item-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-name {
    color: #ce2e2e;
    font-size: 22px;
    font-family: 'Bebas Neue Cyrillic', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
}

.section-count {
    color: rgba(129, 128, 132, 0.50);
    font-size: 16px;
    font-family: 'Inter Tight', sans-serif;
    font-weight: 400;
}

/* Правая колонка с подразделами */
.catalog-subsections {
    flex: 1;
    padding: 10px 34px;
    background: white;
    max-height: 498px;
    overflow-y: auto;
}

.subsections-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #818084;
    font-size: 18px;
    font-family: 'Inter Tight', sans-serif;
}

.subsections-title {
    font-size: 24px;
    color: #ce2e2e;
    font-family: 'Bebas Neue Cyrillic', sans-serif;
}

/* Заголовок раздела в правой колонке */
.current-section-title {
    color: #303030;
    font-size: 36px;
    font-family: 'Bebas Neue Cyrillic', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    margin-bottom: 30px;
}

/* Сетка подразделов */
.subsections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.subsection-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subsection-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 5px 0;
	text-decoration:none;
}

.subsection-item:hover {
    color: #ce2e2e;
}

.subsection-name {
    color: #818084;
    font-size: 16px;
    font-family: 'Inter Tight', sans-serif;
    font-weight: 400;
    transition: color 0.2s;
}

.subsection-name:hover {text-decoration:underline;}

.subsection-item:hover .subsection-name {
    color: #ce2e2e;
}

.subsection-count {
    color: rgba(129, 128, 132, 0.50);
    font-size: 16px;
    font-family: 'Inter Tight', sans-serif;
    font-weight: 400;
}

/* Товары раздела */
.menu-section-products {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #F2F3F5;
}

.menu-products-title {
    color: #303030;
    font-size: 24px;
    font-family: 'Bebas Neue Cyrillic', sans-serif;
    margin-bottom: 20px;
}

.menu-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.menu-product-item {
    text-decoration: none;
}

.menu-product-image {
    width: 100%;
    height: 120px;
    background: #F2F3F5;
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
}

.menu-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.menu-product-name {
    color: #303030;
    font-size: 14px;
    font-family: 'Inter Tight', sans-serif;
    font-weight: 500;
    text-align: center;
}

/* Правая часть: звонок и корзина */
.header-call-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-link {
    display: flex;
    align-items: center;
}

.icon-cart {
    width: 24px;
    height: 27px;
    display: block;
}

.btn-call {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    background: #303030;
    color: white;
    text-decoration: none;
    font-family: 'Bebas Neue Cyrillic', sans-serif;
    font-size: 18px;
    font-weight: 400;
    text-transform: uppercase;
    cursor: pointer;
}

/* Адаптивность */
@media (max-width: 1240px) {
    .catalog-dropdown {
        width: 100%;
        left: 0;
        transform: none;
    }
}

@media (max-width: 1024px) {
    .catalog-dropdown__content {
        flex-direction: column;
    }
    
    .catalog-sections {
        width: 100%;
        max-height: 300px;
    }
    
    .subsections-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .menu-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .search-slide-container.active {
        width: 200px;
    }
    
    .search-slide-container.hiding + .btn-search-toggle {
        transform: translateX(-206px);
    }
    
    .search-input-wrapper {
        width: 200px;
    }
    
    .header-logo img {
        width: 150px;
        height: auto;
    }
    
    .btn-catalog {
        padding: 5px 12px;
        font-size: 16px;
    }
    
    .btn-call {
        padding: 5px 12px;
        font-size: 14px;
    }
    
    .catalog-dropdown {
        display: none !important;
    }
}


/* ============ СТИЛИ ДЛЯ ФИКСИРОВАННОЙ ШАПКИ (БЕЗ АНИМАЦИИ) ============ */

/* Когда шапка фиксирована - верхняя панель прижимается к верху */
.header-top-bar.fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001;
    /* Убираем animation */
}

/* Основная шапка фиксируется сразу под верхней панелью */
.site-header.fixed {
    position: fixed;
    top: 46px; /* Высота header-top-bar */
    left: 0;
    width: 100%;
    z-index: 1000;
    /* Убираем animation */
}

/* Затемнение при фиксации */
.site-header.fixed .header-main-row {
  /*  background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);*/
}

.header-top-bar.fixed {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Отступ для контента, чтобы не перекрывался шапкой */
body.has-fixed-header main,
body.has-fixed-header .content,
body.has-fixed-header .main-content {
    padding-top: 100px; /* 44px (top-bar) + 56px (header) */
    /* Убираем transition */
}

/* Корректировка выпадающего меню каталога */
body.has-fixed-header .catalog-dropdown.active {
    top: 100px !important;
}

/* Отключаем фиксацию на мобильных устройствах */
@media (max-width: 768px) {
    .header-top-bar.fixed,
    .site-header.fixed {
        position: static;
        box-shadow: none;
    }
    
    .site-header.fixed .header-main-row {
        background: rgba(255, 255, 255, 0.9);
    }
    
    body.has-fixed-header main,
    body.has-fixed-header .content,
    body.has-fixed-header .main-content {
        padding-top: 0;
    }
}




/* === СТИЛИ ВЫБОРА ГОРОДА === */

.header-top-city {
    position: relative; /* Для позиционирования выпадающего списка */
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 5px 0; /* Увеличим кликабельную область */
}

.city-selected-block {
    display: flex;
    align-items: center;
    gap: 8px;
}

.city-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 13px;
    height: 16px;
}

.city-selected-block span {
    color: #fff;
    font-size: 14px;
    font-family: 'Inter Tight', sans-serif;
    font-weight: 400;
}

.city-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 10px;
    height: 5px;
    margin-left: 2px; /* Небольшой отступ от текста */
    transition: transform 0.3s ease; /* Плавный поворот */
}

.city-arrow svg {
    width: 100%;
    height: 100%;
}

.city-arrow path {
    fill: #fff; /* Цвет стрелки */
}

/* Выпадающий список */
.city-dropdown {
    position: absolute;
    top: 100%; /* Сразу под родителем */
    left: 0;
    margin-top: 10px; /* Небольшой отступ от кнопки */
    background: #FFFFFF;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 0px;
    z-index: 1002; /* Выше шапки */
    min-width: 150px;
    padding: 0px 0;
    border: 1px solid #E1E1E1;
}

.city-item {
    padding: 10px 16px;
    color: #818084;
    font-size: 14px;
    font-family: 'Inter Tight', sans-serif;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.city-item:hover {
    background: #F2F3F5;
    color: #ce2e2e;
}

.city-item.active {
    /*color: #ce2e2e;
    font-weight: 400;
    background: #F2F3F5;*/
}

/* Стили для подвала */
.footer-city-name {
    font-weight: 500;
    color: #303030;
    margin-bottom: 5px;
}

.footer-contact-info p {
    margin: 5px 0;
}


/* Скрываем мобильное меню на ПК (ширина экрана > 768px) */
@media (min-width: 769px) {
    #mobile-menu,
    .mobile-menu,
    .mobile-menu-overlay,
    #hamburger-menu {
        display: none !important;
    }
}

@media (max-width: 768px) {
	.content-wrapper, .container {padding:0 16px !important;}
	..page-title {font-size:24px; padding: 0 16px;}
	.catalog-header  {margin:0;}
	#sticky-aside {display:none;}
	
	}
