/*
Theme Name: Flatsome Child
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: flatsome
Version: 3.0
*/

/*************** ADD CUSTOM CSS HERE.   ***************/

/* Кнопка «В каталог» на главной — текст цвета #207873 */
.home .section a.button.white.shade[href="/shop/"],
.home .section a.button.white[href="/shop/"],
body.home a.button.shade[href="/shop/"] {
	color: #207873 !important;
}
body.home a.button.shade[href="/shop/"] span {
	color: #207873 !important;
}

/* Скрыть мета-категорию «Каталог» на главной и в каталоге */
.product-category a[href*="/product-category/katalog"],
.product-category a[href*="/product-category/katalog/"] {
	display: none !important;
}
.product-category a[href*="/product-category/katalog"]::after {
	display: none !important;
}
/* Скрыть карточку «Каталог» и саму ячейку сетки (иначе остаётся пустой квадрат) */
body.home .col .product-category a[href*="katalog"],
body .product-categories .product-category:has(a[href*="katalog"]) {
	display: none !important;
}
body.home li.product-category:has(a[href*="katalog"]),
body.home li.product-category:has(a[href*="/product-category/katalog"]) {
	display: none !important;
}
/* UX Builder / сетка Flatsome: скрываем колонку целиком */
body.home .section .row .col:has(.product-category a[href*="katalog"]),
body.home .section .row .col:has(.product-category a[href*="/product-category/katalog"]) {
	display: none !important;
}


/* ── Фильтры: показываем везде кнопку ФИЛЬТРАЦИЯ, открывающую сайдбар ── */

/* Кнопка ФИЛЬТРАЦИЯ: показываем на планшетах и мобильных (до 849px) */
@media screen and (max-width: 849px) {
	body.kyphy-product-listing .category-filtering.category-filter-row.show-for-medium,
	body.woocommerce .category-filtering.category-filter-row.show-for-medium {
		display: flex !important;
		align-items: center;
		justify-content: center;
		flex-wrap: wrap;
		gap: 0.35rem 0.75rem;
		margin-top: 0.15rem;
	}
}

/* На десктопе эта кнопка скрыта (сайдбар выводится слева открытым) */
@media screen and (min-width: 850px) {
	body.kyphy-product-listing .category-filtering.category-filter-row.show-for-medium,
	body.woocommerce .category-filtering.category-filter-row.show-for-medium {
		display: none !important;
	}
}

body.kyphy-product-listing .category-filtering .filter-button strong {
	color: #207873;
}

/* Не растягивать колонки по высоте — иначе «пустота» между сортировкой и кнопкой фильтра */
body.kyphy-product-listing .shop-page-title .page-title-inner.flex-row {
	align-items: flex-start !important;
}

/* ── Панель поиска: выводится через woocommerce_before_shop_loop, перед сеткой товаров ── */
.kyphy-shop-toolbar {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	width: 100%;
	max-width: none;
	margin: 0.5rem 0 1.5rem;
	box-sizing: border-box;
}

.kyphy-shop-toolbar__search {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
}

.kyphy-shop-search-form {
	display: flex;
	align-items: stretch;
	width: 100%;
	height: 44px;
	border: 1px solid rgba(0,0,0,0.12);
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	transition: border-color 0.2s, box-shadow 0.2s;
	box-sizing: border-box;
}

.kyphy-shop-search-form:focus-within {
	border-color: #207873;
	box-shadow: 0 0 0 3px rgba(32, 120, 115, 0.12);
}

.kyphy-shop-search-input {
	flex: 1;
	padding: 0 1rem;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	font-size: 0.95rem;
	font-family: inherit;
	color: #333;
	background: transparent !important;
	margin: 0 !important;
	height: 100%;
	min-width: 0;
}

.kyphy-shop-search-input::placeholder {
	color: #aaa;
}

.kyphy-shop-search-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 100%;
	background: #207873 !important;
	color: #fff !important;
	border: none !important;
	margin: 0 !important;
	padding: 0;
	cursor: pointer;
	transition: background 0.15s;
	flex-shrink: 0;
}

.kyphy-shop-search-btn:hover {
	background: #1a6360 !important;
}

/* ── Кнопка «Применить фильтры» (Filter Everything) — в цвет темы ── */
a.wpc-filters-apply-button,
.wpc-filter-layout-submit-button a {
	display: inline-block;
	background: #207873 !important;
	color: #fff !important;
	padding: 0.55rem 1.25rem !important;
	border-radius: 6px !important;
	font-size: 0.875rem !important;
	font-weight: 600 !important;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	text-decoration: none !important;
	transition: background 0.15s !important;
	border: none !important;
	margin-top: 0.75rem;
}

a.wpc-filters-apply-button:hover,
.wpc-filter-layout-submit-button a:hover {
	background: #1a6360 !important;
	color: #fff !important;
}

/* Сброс фильтра */
a.wpc-filters-reset-button {
	color: #888 !important;
	font-size: 0.82rem !important;
	text-decoration: underline !important;
	margin-left: 0.75rem;
}

/* ── CF7 форма «Задать вопрос» — компактнее ── */
.wpcf7-form .wpcf7-textarea {
	min-height: 90px !important;
	max-height: 130px !important;
	resize: vertical;
}

/* ── Описание товара в карточках: обрезка до 1 предложения ── */
.kyphy-product-excerpt-more {
	display: inline-block;
	margin-top: 0.25rem;
	font-size: 0.82em;
	font-weight: 600;
	color: #207873 !important;
	text-decoration: none !important;
	transition: color 0.15s;
}
.kyphy-product-excerpt-more:hover {
	color: #1a6360 !important;
	text-decoration: underline !important;
}

/* ── Адаптив ── */
@media only screen and (max-width: 48em) {
/*************** ADD MOBILE ONLY CSS HERE  ***************/
}