/*header.css === ХЕДЕР === */
.header { background: var(--white-color); box-shadow: var(--shadow); position: relative; top: 0; z-index: 1000; transition: var(--transition); }

/* === ВЕРХНЯЯ ЧАСТЬ ХЕДЕРА === */
.header__top { background: var(--light-color); padding: 8px 0; border-bottom: 1px solid var(--border-color); }
.header__top-right { display: flex; align-items: center; justify-content: flex-end; gap: 20px; }

/* Верхнее меню */
.header__top-menu-list { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; gap: 1rem; }
.header__top-menu-list a { color: var(--dark-color); text-decoration: none; font-size: 0.9rem; transition: var(--transition); }
.header__top-menu-list a:hover { color: var(--primary-color); }

/* Телефон */
.header__phone { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.header__phone i { color: var(--primary-color); }
.header__phone a { color: var(--dark-color); text-decoration: none; font-weight: 600; }
.header__phone a:hover { color: var(--primary-color); }

/* Выбор города */
.city-selector { position: relative; }
.city-selector__btn { display: flex; align-items: center; gap: 8px; background: none; border: none; color: var(--dark-color); font-size: 0.9rem; cursor: pointer; transition: var(--transition); padding: 8px 12px; border-radius: var(--border-radius-sm); }
.city-selector__btn:hover { background: var(--primary-color); color: var(--white-color); }
.city-selector__btn i:last-child { font-size: 0.7rem; transition: var(--transition); }
.city-selector__btn.active i:last-child { transform: rotate(180deg); }

.city-selector__dropdown { position: absolute; top: 100%; right: 0; min-width: 280px; max-width: 400px; background: var(--white-color); border: 1px solid var(--border-color); border-radius: var(--border-radius-sm); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-10px); transition: var(--transition); z-index: 1100; padding: 10px 0; max-height: 400px; overflow-y: auto; }
.city-selector__dropdown.show { opacity: 1; visibility: visible; transform: translateY(0); }

.city-selector__search { padding: 10px 15px; border-bottom: 1px solid var(--border-color); }
.city-selector__input { width: 100%; padding: 8px 12px; border: 1px solid var(--border-color); border-radius: var(--border-radius-sm); font-size: 0.9rem; }

.city-selector__list { max-height: 300px; overflow-y: auto; }
.city-selector__item { display: block; padding: 10px 15px; color: var(--dark-color); text-decoration: none; transition: var(--transition); border-bottom: 1px solid var(--border-light); }
.city-selector__item:hover { background: var(--light-color); color: var(--primary-color); }
.city-selector__item:last-child { border-bottom: none; }

/* Социальные сети */
.header__social { display: flex; gap: 10px; }
.header__social-link { width: 35px; height: 35px; display: flex; align-items: center; justify-content: center; background: var(--white-color); border-radius: 50%; color: var(--secondary-color); transition: var(--transition); text-decoration: none; }
.header__social-link:hover { background: var(--primary-color); color: var(--white-color); transform: translateY(-2px); }

/* === ОСНОВНАЯ ЧАСТЬ ХЕДЕРА === */
.header__main { padding: 20px 0; transition: var(--transition); }
.header__main--sticky { position: fixed; top: 0; width: 100%; z-index: 1001; background: var(--white-color); box-shadow: var(--shadow-lg); padding: 15px 0; }

/* Логотип */
.header__logo-box { display: flex; gap: 1rem; align-items: center; }
.header__logo-box-img { max-width: 100px; }
.header__logo-box-text { color: var(--primary-color); font-size: 0.7rem; text-transform: uppercase; }

/* === КНОПКА И МЕНЮ КАТАЛОГА === */
.catalog-wrapper { position: static; }
.catalog-btn { display: flex; align-items: center; gap: 10px; padding: 15px 20px; background: var(--primary-color); color: var(--white-color); border: none; border-radius: var(--border-radius-sm); font-weight: 600; cursor: pointer; transition: var(--transition); text-decoration: none; }
.catalog-btn:hover { background: var(--primary-dark); color: var(--white-color); }
.catalog-btn i { font-size: 1.1rem; }

/* Основной dropdown */
.catalog-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: var(--white-color); border: 1px solid var(--border-color); border-radius: var(--border-radius-sm); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-0px); transition: var(--transition); z-index: 1100; width: 100%;margin-left:auto;margin-right:auto;/* margin-left: calc(-50vw + 50%);*/ }
.catalog-dropdown.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* Контент dropdown */
.catalog-dropdown__content { padding: 30px; max-width: 1200px; margin: 0 auto; }

/* Сетка секций */
.catalog-categories { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }

/* Секции меню */
.catalog-section { }

/* Заголовки секций */
.catalog-section__header { display: flex; align-items: center; gap: 15px; padding-bottom: 15px; border-bottom: 2px solid var(--border-light); margin-bottom: 15px;line-height:120%; }
.catalog-section__header i { font-size: 2rem; color: var(--primary-color); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 2px dashed var(--primary-color); border-radius: 50%;font-size: 1.5rem; }
.catalog-section__title { font-weight: 500; color: var(--dark-color); font-size: 1.1rem;width: calc(100% - 60px); }

/* Ссылки в заголовках */
.catalog-section__link { color: var(--dark-color); text-decoration: none; transition: var(--transition); }
.catalog-section__link:hover { color: var(--primary-color); text-decoration: none; }

/* Пункты секций */
.catalog-section__items { }
.catalog-section__item { display: block; padding: 8px 0; color: var(--text-dark); text-decoration: none; transition: var(--transition); font-size: 0.95rem; border-bottom: 1px solid transparent; }
.catalog-section__item:hover { color: var(--primary-color); text-decoration: none; border-bottom-color: var(--primary-color); }
.catalog-section__item:last-child { border-bottom: none; }

/* Отключенные пункты */
.catalog-section__item--disabled { color: var(--text-muted); cursor: default; opacity: 0.6; }
.catalog-section__item--disabled:hover { color: var(--text-muted); border-bottom-color: transparent; }

/* Стрелка указывающая на кнопку */
.catalog-dropdown::before { content: ''; position: absolute; top: -8px; left: 50px; width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 8px solid var(--white-color); }

/* === ПОИСК В ХЕДЕРЕ === */
.header__search { position: relative; }
.search-form__wrapper { display: flex; }
.search-form__input { flex: 1; padding: 15px 20px; border: 2px solid var(--border-color); border-right: none; border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm); font-size: 1rem; outline: none; transition: var(--transition); }
.search-form__input:focus { border-color: var(--primary-color); }
.search-form__submit { padding: 15px 20px; background: var(--primary-color); border: 2px solid var(--primary-color); border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0; color: var(--white-color); cursor: pointer; transition: var(--transition); }
.search-form__submit:hover { background: var(--primary-dark); border-color: var(--primary-dark); }






/* === ПОИСК В ХЕДЕРЕ AWS === */
.header__search.my-smart-search { position: relative; }
.header__search.my-smart-search .aws-container { width: 100%; }
.header__search.my-smart-search .aws-search-form { display: flex; width: 100%;height:auto; }
.header__search.my-smart-search .aws-wrapper { flex: 1; position: relative; display: flex; align-items: center; border: 2px solid var(--border-color)!important; border-right: none; border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm); background: var(--white-color); transition: var(--transition); }
.header__search.my-smart-search .aws-wrapper:focus-within { border-color: var(--primary-color); }
.header__search.my-smart-search .aws-search-label { position: absolute; left: -9999px; opacity: 0; }
.header__search.my-smart-search .aws-search-field { flex: 1; padding: 15px 20px; border: none; outline: none; font-size: 1rem; background: transparent; }
.header__search.my-smart-search .aws-search-clear { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-right: 10px; cursor: pointer; opacity: 0.6; transition: var(--transition); }
.header__search.my-smart-search .aws-search-clear:hover { opacity: 1; }
.header__search.my-smart-search .aws-search-clear span { font-size: 1.5rem; line-height: 1; color: var(--text-color); }
.header__search.my-smart-search .aws-loader { width: 20px; height: 20px; margin-right: 10px; border: 2px solid var(--border-color); border-top-color: var(--primary-color); border-radius: 50%; animation: aws-spin 0.6s linear infinite; }
@keyframes aws-spin { to { transform: rotate(360deg); } }
.header__search.my-smart-search .aws-search-btn { padding: 15px 20px; background: var(--primary-color); border: 2px solid var(--primary-color)!important; border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0!important; color: var(--white-color)!important; cursor: pointer; transition: var(--transition); display: flex; align-items: center; justify-content: center;width:60px; }
.header__search.my-smart-search .aws-search-btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.header__search.my-smart-search .aws-search-btn_icon { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px;color:#fff; }
.header__search.my-smart-search .aws-search-btn_icon svg { fill: currentColor; }

.aws-search-result { font-size:0.9rem; }








/* === ДЕЙСТВИЯ В ХЕДЕРЕ === */
.header__actions { display: flex; align-items: center; justify-content: flex-end; gap: 20px; }

.header__action-link { display: flex; align-items: center; gap: 8px; color: var(--dark-color); text-decoration: none; transition: var(--transition); position: relative; }
.header__action-link:hover { color: var(--primary-color); }

/* Счетчики */
.header__cart-count, .header__wishlist-count { position: absolute; top: -8px; right: -8px; background: var(--danger-color); color: var(--white-color); border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; }
.header__wishlist-count { background: var(--success-color); }

/* === МОБИЛЬНАЯ ВЕРСИЯ === */
.header__mobile { padding: 15px 0; border-top: 1px solid var(--border-color); }
.header__mobile-search { margin-bottom: 15px; }
.header__mobile-menu { text-align: center; }
.catalog-btn--mobile { width: 100%; justify-content: center; }

/* === АДАПТИВНОСТЬ === */
@media (max-width: 1199px) {
	.header__main { padding: 15px 0; }
	.header__actions { gap: 15px; }
	.header__action-text { display: none; }
	.catalog-btn { padding: 12px 16px; }
	.catalog-categories { grid-template-columns: repeat(3, 1fr); gap: 30px; }
	.catalog-dropdown__content { padding: 25px; }
}

@media (max-width: 991px) {
	.header__top { text-align: center; }
	.header__top-right { justify-content: center; gap: 15px; }
	.header__phone { font-size: 0.85rem; }
	.header__social-link { width: 32px; height: 32px; }
	.catalog-categories { grid-template-columns: repeat(2, 1fr); gap: 25px; }
	.catalog-dropdown__content { padding: 20px; }
	.catalog-section__header i { font-size: 1.8rem; width: 36px; height: 36px; }
}

@media (max-width: 767px) {
	.header__top { padding: 10px 0; }
	.header__top-right { flex-direction: column; gap: 10px; }
	.header__main { padding: 10px 0; }
	.header__logo-box-text { font-size: 0.6rem; }
	.header__actions { gap: 10px; }
	.city-selector__dropdown { left: 0; right: auto; min-width: 250px; }
	.catalog-dropdown { position: fixed; top: 80px; left: 0; right: 0; margin-left: 0; width: 100%; max-height: calc(100vh - 80px); overflow-y: auto; }
	.catalog-categories { grid-template-columns: 1fr; gap: 20px; }
	.catalog-dropdown__content { padding: 15px; }
	.catalog-section__header i { font-size: 1.5rem; width: 32px; height: 32px; }
	.catalog-section__item { padding: 10px 0; font-size: 1rem; }
}

@media (max-width: 575px) {
	.header__top { display: none; }
	.header__main { padding: 8px 0; }
	.header__logo-box { flex-direction: column; gap: 5px; text-align: center; }
	.header__logo-box-text { font-size: 0.5rem; }
	.header__actions { gap: 8px; }
	.header__cart-count, .header__wishlist-count { width: 16px; height: 16px; font-size: 0.6rem; }
	.catalog-dropdown { top: 70px; max-height: calc(100vh - 70px); }
	.catalog-dropdown__content { padding: 10px; }
	.catalog-section__header { padding-bottom: 10px; margin-bottom: 10px; }
	.catalog-section__title { font-size: 1rem; }
}

.menu-pos-relative { position:Relative; }


/* === СОСТОЯНИЯ === */
body.catalog-open { overflow: hidden; }
.header.loading { opacity: 0.7; }
.header__cart-count.updating, .header__wishlist-count.updating { animation: pulse 1s infinite; }
.catalog-dropdown--empty { padding: 60px 20px; text-align: center; color: var(--text-muted); }

/* === АНИМАЦИИ === */
@keyframes pulse {
	0% { transform: scale(1); }
	50% { transform: scale(1.1); }
	100% { transform: scale(1); }
}

@keyframes slideDown {
	from { opacity: 0; transform: translateY(-10px); }
	to { opacity: 1; transform: translateY(0); }
}

.catalog-dropdown, .city-selector__dropdown { animation: slideDown 0.3s ease; }

/* === УЛУЧШЕНИЯ UX === */
.city-selector__dropdown::before { content: ''; position: absolute; top: -8px; right: 20px; width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 8px solid var(--white-color); }


/* === ТЕМНАЯ ТЕМА === */
@media (prefers-color-scheme: dark) {
	.header { background: var(--dark-color); color: var(--white-color); }
	.header__top { background: var(--darker-color); }
	.catalog-dropdown, .city-selector__dropdown { background: var(--dark-color); border-color: var(--border-dark); }
	.catalog-dropdown::before { border-bottom-color: var(--dark-color); }
	.city-selector__dropdown::before { border-bottom-color: var(--dark-color); }
}




/* === ЗАТЕМНЕНИЕ ДЛЯ МЕНЮ КАТАЛОГА === */

/* Overlay на весь экран */
.catalog-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); z-index: 999; opacity: 0; visibility: hidden; transition: all 0.3s ease; backdrop-filter: blur(2px); }
.catalog-overlay.show { opacity: 1; visibility: visible; }

/* Обновляем z-index для header и dropdown */
.header { z-index: 1000; }
.catalog-dropdown { z-index: 1100; }

/* Предотвращаем скачки от скроллбара */
html { scrollbar-gutter: stable; }

/* Блокируем скролл при открытом меню */
body.catalog-menu-open { overflow: hidden; }