/*
Theme Name:   Tovar-Katalog (Storefront Child)
Theme URI:    https://tovar-katalog.ru/
Description:  Дочерняя тема Storefront для витрины товаров: плотная сетка каталога, карточка товара с таблицей характеристик, внешние ссылки, авто-меню категорий.
Author:       Tovar-Katalog
Template:     storefront
Version:      1.3.0
Text Domain:  tovar-katalog
*/

/* =========================================================
   [LOCKED] Карточки каталога — эталонный вид, НЕ ПЕРЕПИСЫВАТЬ
   ========================================================= */
ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
	margin: 0 0 32px !important;
	padding: 0 !important;
	list-style: none;
}
ul.products::before,
ul.products::after { content: none !important; }

ul.products li.product {
	width: auto !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex;
	flex-direction: column;
	border: 1px solid #e6e8eb;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow .18s ease, transform .18s ease;
}
ul.products li.product:hover {
	box-shadow: 0 12px 28px rgba(16, 24, 40, .10);
	transform: translateY(-2px);
}
ul.products li.product .woocommerce-loop-product__link { display: block; }
ul.products li.product img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background: #fafbfc;
	padding: 12px;
	box-sizing: border-box;
}
ul.products li.product .woocommerce-loop-product__title {
	font-size: 15px;
	line-height: 1.35;
	font-weight: 600;
	color: #1f2937;
	padding: 12px 14px 6px;
	margin: 0;
	min-height: 3.9em;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
ul.products li.product .price {
	padding: 0 14px 12px;
	font-size: 16px;
	font-weight: 700;
	color: #0b57d0;
	margin-top: auto;
}
ul.products li.product .button {
	margin: 0 14px 14px !important;
	text-align: center;
}
/* ===================== [LOCKED] конец блока ===================== */

/* Полная ширина */
.storefront-full-width-content .content-area { width: 100% !important; float: none !important; }
.storefront-full-width-content .site-content { padding-left: 24px; padding-right: 24px; }
.tk-visit .site-content { max-width: 1400px; margin: 0 auto; }

/* Карточка товара: две колонки */
.tk-visit .single-product div.product {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 40px;
	align-items: start;
}
.tk-visit .single-product div.product .woocommerce-product-gallery { position: sticky; top: 24px; }
.tk-visit .single-product div.product .summary { max-width: 720px; }
.tk-visit .single-product div.product .entry-title { font-size: 26px; line-height: 1.25; }

/* Таблица характеристик */
.tk-specs { margin: 24px 0; }
.tk-specs-title { font-size: 19px; margin: 0 0 12px; }
.tk-specs-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tk-specs-table th,
.tk-specs-table td { padding: 10px 12px; border-bottom: 1px solid #e6e8eb; text-align: left; vertical-align: top; }
.tk-specs-table th { width: 42%; color: #667085; font-weight: 500; }
.tk-specs-table td { color: #1f2937; }

/* Кнопка «Перейти в магазин» */
.single_add_to_cart_button,
ul.products li.product .button {
	background: #0b57d0 !important;
	border-color: #0b57d0 !important;
	color: #fff !important;
	border-radius: 8px !important;
	padding: 12px 20px !important;
	font-weight: 600 !important;
}
.single_add_to_cart_button:hover,
ul.products li.product .button:hover { background: #0846a8 !important; border-color: #0846a8 !important; }

/* Адаптив */
@media (max-width: 1100px) {
	ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.tk-visit .single-product div.product { grid-template-columns: 1fr; gap: 24px; }
	.tk-visit .single-product div.product .woocommerce-product-gallery { position: static; }
}
@media (max-width: 720px) {
	ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
	.storefront-full-width-content .site-content { padding-left: 16px; padding-right: 16px; }
}
