/*
Theme Name: GeneratePress Child
Theme URI: https://generatepress.com
Description: Современная child-тема для GeneratePress с кастомным адаптивным хедером
Author: Your Name
Author URI: https://yourwebsite.com
Template: generatepress
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: generatepress-child
*/

/* ========================================
   КАСТОМНЫЙ ХЕДЕР
   ======================================== */

.custom-header {
	background: #ffffff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	position: sticky;
	top: 0;
	z-index: 1000;
	transition: all 0.3s ease;
}

.custom-header-container {
	padding: 15px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 30px;
}

/* ========================================
   ЛОГОТИП
   ======================================== */

.custom-logo {
	flex-shrink: 0;
}

.custom-logo a {
	display: flex;
	align-items: center;
	text-decoration: none;
	font-size: 24px;
	font-weight: 700;
	color: #2c3e50;
	transition: color 0.3s ease;
}

.custom-logo a:hover {
	color: #3498db;
}

.custom-logo img {
	max-height: 50px;
	width: auto;
}

/* ========================================
   МЕНЮ (ЦЕНТР)
   ======================================== */

.custom-nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.custom-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 30px;
	align-items: center;
}

.custom-menu li {
	position: relative;
}

.custom-menu a {
	text-decoration: none;
	color: #2c3e50;
	font-size: 16px;
	font-weight: 500;
	padding: 8px 15px;
	border-radius: 6px;
	transition: all 0.3s ease;
	display: block;
}

.custom-menu a:hover,
.custom-menu .current-menu-item a {
	color: #3498db;
	background: rgba(52, 152, 219, 0.1);
}

/* Подменю */
.custom-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background: #ffffff;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	border-radius: 8px;
	padding: 10px 0;
	margin-top: 10px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all 0.3s ease;
	list-style: none;
	z-index: 100;
}

.custom-menu li:hover>.sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.custom-menu .sub-menu a {
	padding: 12px 20px;
	border-radius: 0;
}

.custom-menu .sub-menu a:hover {
	background: rgba(52, 152, 219, 0.1);
}

/* ========================================
   ПРАВЫЙ БЛОК (Поиск, Корзина, CTA)
   ======================================== */

.custom-actions {
	display: flex;
	align-items: center;
	gap: 15px;
	flex-shrink: 0;
}

/* Поиск */
.custom-search {
	position: relative;
}

.search-toggle {
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: all 0.3s ease;
}

.search-toggle:hover {
	background: rgba(52, 152, 219, 0.1);
}

.search-toggle svg {
	width: 22px;
	height: 22px;
	fill: #2c3e50;
}

.search-form {
	position: absolute;
	top: calc(100% + 15px);
	right: 0;
	background: #ffffff;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	border-radius: 8px;
	padding: 15px;
	min-width: 300px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all 0.3s ease;
}

.search-form.active {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.search-form input[type="search"] {
	width: 85%;
	padding: 12px 15px;
	border: none;
	border-radius: 6px;
	font-size: 16px;
	background-color: transparent;
	transition: border-color 0.3s ease;
}

.search-form input[type="search"]:focus {
	outline: none;
	border-color: #3498db;
}

/* Корзина */
.custom-cart {
	position: relative;
}

.cart-toggle {
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: all 0.3s ease;
	position: relative;
}

.cart-toggle:hover {
	background: rgba(52, 152, 219, 0.1);
}

.cart-toggle svg {
	width: 22px;
	height: 22px;
	fill: #2c3e50;
}

.cart-count {
	position: absolute;
	top: 2px;
	right: 2px;
	background: #e74c3c;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* CTA Кнопка */
.custom-cta {
	background: linear-gradient(135deg, #3498db, #2980b9);
	color: #ffffff;
	padding: 12px 25px;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
	transition: all 0.3s ease;
	border: none;
	cursor: pointer;
	box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.custom-cta:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
	color: #ffffff;
}

/* ========================================
   МОБИЛЬНОЕ МЕНЮ
   ======================================== */

.burger-menu {
	display: none;
	flex-direction: column;
	gap: 5px;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 8px;
	border-radius: 6px;
	transition: all 0.3s ease;
}

.burger-menu:hover {
	background: rgba(52, 152, 219, 0.1);
}

.burger-menu span {
	width: 25px;
	height: 3px;
	background: #2c3e50;
	border-radius: 3px;
	transition: all 0.3s ease;
}

.burger-menu.active span:nth-child(1) {
	transform: rotate(45deg) translate(6px, 6px);
}

.burger-menu.active span:nth-child(2) {
	opacity: 0;
}

.burger-menu.active span:nth-child(3) {
	transform: rotate(-45deg) translate(6px, -6px);
}

/* Кнопка закрытия мобильного меню */
.menu-close {
	display: none;
	position: absolute;
	top: 20px;
	right: 20px;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 8px;
	border-radius: 50%;
	transition: all 0.3s ease;
	z-index: 10;
}

.menu-close:hover {
	background: rgba(52, 152, 219, 0.1);
}

.menu-close svg {
	fill: #2c3e50;
	display: block;
}

.menu-close:focus {
	outline: 2px solid #3498db;
	outline-offset: 2px;
}

/* ========================================
   АДАПТИВНОСТЬ
   ======================================== */

@media (max-width: 992px) {
	.burger-menu {
		display: flex;
		order: 2;
	}

	.custom-nav {
		position: fixed;
		top: 0;
		left: -100%;
		width: 300px;
		height: 100vh;
		background: #ffffff;
		box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
		transition: left 0.3s ease;
		z-index: 1001;
		overflow-y: auto;
	}

	.custom-nav.active {
		left: 0;
	}

	.custom-nav.active .menu-close {
		display: block;
	}

	.custom-menu {
		flex-direction: column;
		gap: 0;
		padding: 80px 0 20px;
		width: 100%;
	}

	.custom-menu li {
		width: 100%;
	}

	.custom-menu a {
		padding: 15px 25px;
		border-radius: 0;
		width: 100%;
	}

	.custom-menu .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		margin: 0;
		padding: 0;
		background: rgba(52, 152, 219, 0.05);
		display: none;
	}

	.custom-menu li.menu-item-has-children>a::after {
		content: '+';
		float: right;
		font-size: 20px;
		transition: transform 0.3s ease;
	}

	.custom-menu li.menu-item-has-children.active>a::after {
		transform: rotate(45deg);
	}

	.custom-menu li.menu-item-has-children.active>.sub-menu {
		display: block;
	}

	.custom-menu .sub-menu a {
		padding-left: 40px;
	}

	/* Оверлей для мобильного меню */
	.menu-overlay {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background: rgba(0, 0, 0, 0.5);
		opacity: 0;
		visibility: hidden;
		transition: all 0.3s ease;
		z-index: 999;
	}

	.menu-overlay.active {
		opacity: 1;
		visibility: visible;
	}

	.custom-header-container {
		gap: 15px;
	}
}

@media (max-width: 576px) {
	.custom-logo {
		order: 0;
	}

	.custom-header-container {
		padding: 12px 15px;
	}

	.custom-logo a {
		font-size: 20px;
	}

	.custom-logo img {
		max-height: 40px;
	}

	.custom-actions {
		gap: 10px;
	}

	.custom-cta {
		padding: 10px 18px;
		font-size: 16px;
	}

	.search-form {
min-width: 350px;
    right: -115px;
	}

	.custom-nav {
		width: 280px;
		order: 1;
	}
}

/* ========================================
   ДОПОЛНИТЕЛЬНЫЕ СТИЛИ
   ======================================== */

/* Анимация появления */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.custom-header {
	animation: fadeIn 0.5s ease;
}

/* Липкий хедер эффект */
.custom-header.scrolled {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* Accessibility */
.custom-menu a:focus,
.search-toggle:focus,
.cart-toggle:focus,
.custom-cta:focus,
.burger-menu:focus {
	outline: 2px solid #3498db;
	outline-offset: 2px;
}

/* ========================================
   AJAX ПОИСК
   ======================================== */

/* Контейнер формы поиска */
.ajax-search-container {
	position: relative;
	width: 100%;
}

/* Форма поиска */
.ajax-search-form {
	position: relative;
	display: flex;
	align-items: center;
}

.ajax-search-input-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	background: #f8f9fa;
	border-radius: 8px;
	overflow: hidden;
	border: 2px solid transparent;
	transition: all 0.3s ease;
}

.ajax-search-input-wrapper:focus-within {
	border-color: #3498db;
	box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}

.ajax-search-input {
	width: 100%;
	padding: 12px 50px 12px 15px;
	border: none;
	background: transparent;
	font-size: 15px;
	color: #2c3e50;
	outline: none;
}

.ajax-search-input::placeholder {
	color: #95a5a6;
}

.ajax-search-submit {
	position: absolute;
	right: 5px;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	transition: all 0.3s ease;
}

.ajax-search-submit:hover {
	background: rgba(52, 152, 219, 0.1);
}

.ajax-search-submit svg {
	width: 20px;
	height: 20px;
	fill: #3498db;
}

/* Результаты поиска */
.ajax-search-results {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	right: 0;
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
	max-height: 500px;
	overflow-y: auto;
	z-index: 1000;
	animation: slideDown 0.2s ease;
}

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

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Список результатов */
.ajax-results-list {
	padding: 10px;
}

/* Элемент результата */
.ajax-result-item {
	display: flex;
	align-items: center;
	gap: 15px;
	padding: 12px;
	border-radius: 8px;
	text-decoration: none;
	color: #2c3e50;
	transition: all 0.2s ease;
	border: 1px solid transparent;
}

.ajax-result-item:hover {
	background: rgba(52, 152, 219, 0.05);
	border-color: rgba(52, 152, 219, 0.2);
	transform: translateX(5px);
}

.ajax-result-image {
	flex-shrink: 0;
	width: 60px;
	height: 60px;
	border-radius: 6px;
	overflow: hidden;
	background: #f8f9fa;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ajax-result-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ajax-result-content {
	flex: 1;
	min-width: 0;
}

.ajax-result-title {
	font-size: 15px;
	font-weight: 600;
	color: #2c3e50;
	margin: 0 0 5px 0;
	line-height: 1.4;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.ajax-result-price {
	font-size: 14px;
	font-weight: 600;
	color: #3498db;
}

/* Кнопка "Посмотреть все результаты" */
.ajax-view-all {
	display: block;
	text-align: center;
	padding: 15px;
	background: rgba(52, 152, 219, 0.05);
	color: #3498db;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	border-radius: 0 0 12px 12px;
	transition: all 0.3s ease;
}

.ajax-view-all:hover {
	background: rgba(52, 152, 219, 0.1);
	color: #2980b9;
}

/* Сообщения */
.ajax-loading,
.ajax-no-results,
.ajax-error {
	padding: 30px 20px;
	text-align: center;
	color: #7f8c8d;
	font-size: 15px;
}

.ajax-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.ajax-loading .spinner {
	width: 18px;
	height: 18px;
	border: 3px solid rgba(52, 152, 219, 0.2);
	border-top-color: #3498db;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.ajax-error {
	color: #e74c3c;
}

.ajax-no-results {
	color: #95a5a6;
}

/* Скроллбар для результатов */
.ajax-search-results::-webkit-scrollbar {
	width: 8px;
}

.ajax-search-results::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 0 12px 12px 0;
}

.ajax-search-results::-webkit-scrollbar-thumb {
	background: #cbd5e0;
	border-radius: 10px;
}

.ajax-search-results::-webkit-scrollbar-thumb:hover {
	background: #3498db;
}

/* ========================================
   АДАПТИВНОСТЬ ДЛЯ AJAX ПОИСКА
   ======================================== */

@media (max-width: 576px) {
	.ajax-search-results {
		max-height: 400px;
		border-radius: 10px;
	}

	.ajax-result-item {
		gap: 10px;
		padding: 10px;
	}

	.ajax-result-image {
		width: 50px;
		height: 50px;
	}

	.ajax-result-title {
		font-size: 14px;
	}

	.ajax-result-price {
		font-size: 13px;
	}

	.ajax-view-all {
		padding: 12px;
		font-size: 13px;
	}
}

.footer-contacts {
	background: #ffffff;
	border-radius: 8px;
	padding: 15px 20px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	width: 100%;
}

.contacts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 30px;
	align-items: start;
	max-width: 1400px;
	margin: 0 auto;
}

.contact-item {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.contact-title {
	font-size: 18px;
	font-weight: 600;
	color: #2d3748;
	margin-bottom: 5px;
}

.contact-icon-link {
	text-decoration: none;
	display: inline-block;
}

.contact-icon {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	padding: 8px;
	transition: all 0.3s ease;
}

.contact-icon-link:hover .contact-icon,
.contact-item:hover .contact-icon {
	transform: translateY(-2px);
	box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.telegram-icon {
	background: rgba(0, 136, 204, 0.1);
}

.whatsapp-icon {
	background: rgba(37, 211, 102, 0.1);
}

.email-icon {
	background: rgba(234, 67, 53, 0.1);
}

.schedule-icon {
	background: rgba(52, 152, 219, 0.1);
}
.instagram-icon {
	background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}
.tiktok-icon {
	background: #000000;
}

.contact-icon svg {
	width: 22px;
	height: 22px;
}

.telegram-icon svg {
	fill: #0088cc;
}

.whatsapp-icon svg {
	fill: #25d366;
}

.email-icon svg {
	fill: #ea4335;
}

.schedule-icon svg {
	fill: #3498db;
}

.contact-content {
	font-size: 16px;
	color: #4a5568;
	line-height: 1.6;
}

.email-text {
	margin-top: 10px;
	font-size: 15px;
	color: #4a5568;
	word-break: break-all;
}

.schedule-text {
	background: rgba(52, 152, 219, 0.05);
	padding: 15px;
	border-radius: 6px;
	border-left: 3px solid #3498db;
}

.schedule-hours {
	font-weight: 600;
	color: #2d3748;
	margin-bottom: 5px;
}

.schedule-days {
	font-size: 14px;
	color: #718096;
}

/* Responsive Design */
@media (max-width: 992px) {
	.footer-contacts {
		padding: 30px 20px;
	}

	.contacts-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 25px;
	}
}

@media (max-width: 768px) {
	.contacts-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 20px;
	}

	.contact-item:last-child {
		grid-column: 1 / -1;
	}

	.contact-title {
		font-size: 16px;
	}

	.contact-content {
		font-size: 15px;
	}
}

@media (max-width: 576px) {
	.footer-contacts {
		padding: 25px 15px;
		border-radius: 6px;
	}

	.contact-title {
		font-size: 15px;
	}

	.contact-icon {
		width: 36px;
		height: 36px;
	}

	.contact-icon svg {
		width: 20px;
		height: 20px;
	}
}

/* Animations */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.contact-item {
	animation: fadeInUp 0.6s ease forwards;
	opacity: 0;
}

.contact-item:nth-child(1) {
	animation-delay: 0.1s;
}

.contact-item:nth-child(2) {
	animation-delay: 0.2s;
}

.contact-item:nth-child(3) {
	animation-delay: 0.3s;
}

.contact-item:nth-child(4) {
	animation-delay: 0.4s;
}

/* Accessibility */
.contact-icon-link:focus {
	outline: 2px solid #3498db;
	outline-offset: 2px;
	border-radius: 6px;
}

/* ///////// */
.gb-element-ce4b93b1 {
	background: radial-gradient(circle at center, rgba(52, 152, 219, 0.1) 0%, rgba(52, 152, 219, 0.1) 100%);
	filter: saturate(180%) brightness(0.9);
}
