/*
 * Общие блоки страниц (БЭМ): section-head, btn, product-grid, product-card, reviews/review,
 * и секции главной (home-templates). Переменные — assets/css/base.css.
 */
/* ---------- section-head: centered title + lead above a section ---------- */
.section-head {
	margin-bottom: 48px;
	text-align: center;
}

.section-head--wide {
	margin-bottom: 64px;
}

.section-head__title {
	margin: 0 0 16px;
	color: var(--c-gray-900);
	font-size: 36px;
	font-weight: 700;
	line-height: 40px;
}

.section-head__lead {
	margin: 0;
	color: var(--c-gray-600);
	font-size: 20px;
	line-height: 28px;
}

/* ---------- btn ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border-radius: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.15s var(--ease);
}

.btn--lg {
	padding: 16px 32px;
}

.btn--gradient {
	background-image: var(--g-accent);
	color: var(--c-white);
	box-shadow: var(--shadow-lg);
}

.btn--gradient:hover {
	opacity: 0.9;
}

/* ---------- product-grid ---------- */
.product-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ---------- product-card (woocommerce/content-product.php) ---------- */
.product-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--c-gray-200);
	border-radius: 16px;
	background: var(--c-white);
	transition: all 0.3s var(--ease);
}

.product-card:hover {
	border-color: var(--c-violet-500);
	box-shadow: var(--shadow-2xl);
	transform: translateY(-4px);
}

.product-card__media {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background-image: linear-gradient(to bottom right, var(--c-gray-100), var(--c-gray-200));
}

.product-card__image-link {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: block;
	overflow: hidden;
}

.product-card:hover .product-card__image-link {
	pointer-events: none;
}

.product-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s var(--ease);
}

.product-card:hover .product-card__image {
	transform: scale(1.1);
}

.product-card__no-image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 12rem;
	background: var(--c-gray-100);
	color: var(--c-gray-400);
	font-size: 14px;
	line-height: 20px;
}

.product-card__badge {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 20;
	display: block;
	padding: 6px 12px;
	border-radius: 999px;
	color: var(--c-white);
	font-size: 12px;
	font-weight: 500;
	line-height: 16px;
	box-shadow: var(--shadow-sm);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	pointer-events: none;
}

.product-card__badge--hit {
	background: oklch(0.637 0.237 25.331 / 0.9);
}

.product-card__badge--new {
	background: oklch(0.723 0.219 149.579 / 0.9);
}

.product-card__badge--best {
	background: oklch(0.606 0.25 292.717 / 0.9);
}

/* Hover layer with «Demo» and «Buy» over the picture */
.product-card__actions {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	background: rgb(0 0 0 / 0.6);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s var(--ease);
}

.product-card:hover .product-card__actions {
	opacity: 1;
	pointer-events: auto;
}

.product-card__action {
	position: relative;
	z-index: 3;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	border-radius: 14px;
	background: var(--c-white);
	color: var(--c-gray-900);
	font-weight: 500;
	text-decoration: none;
	box-shadow: var(--shadow-lg);
	pointer-events: auto;
}

.product-card__action--buy {
	background-color: var(--c-violet-600);
	background-image: linear-gradient(to right, #684dff, #4928d1);
	color: var(--c-white);
}

.product-card__action-icon {
	width: 16px;
	height: 16px;
}

.product-card__body {
	display: flex;
	flex-direction: column;
	padding: 20px;
}

.product-card__cat {
	margin: 0 0 8px;
	color: var(--c-violet-600);
	font-size: 12px;
	font-weight: 500;
	line-height: 16px;
}

.product-card__title,
.product-card__excerpt {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.product-card__title {
	margin: 0 0 8px;
	color: var(--c-gray-900);
	font-size: 18px;
	font-weight: 600;
	line-height: calc(1.75 / 1.125); /* 28px; stays proportional where WooCommerce sets font-size: 1em */
}

.product-card__title-link {
	color: inherit;
	text-decoration: none;
}

.product-card__excerpt {
	margin: 0 0 16px;
	color: var(--c-gray-600);
	font-size: 14px;
	line-height: 20px;
}

.product-card__rating {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
}

.product-card__stars {
	display: flex;
	align-items: center;
}

.product-card__star {
	width: 16px;
	height: 16px;
	fill: var(--c-amber-400);
}

.product-card__star--empty {
	fill: var(--c-gray-200);
}

.product-card__rating-value {
	color: var(--c-gray-600);
	font-size: 14px;
	line-height: 20px;
}

.product-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-top: 16px;
	border-top: 1px solid var(--c-gray-200);
}

.product-card__sales {
	display: flex;
	align-items: center;
	gap: 4px;
	min-width: 0;
	color: var(--c-gray-500);
	font-size: 14px;
	line-height: 20px;
}

.product-card__sales-icon {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
}

.product-card__sales-text {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.product-card__price {
	display: block;
	flex-shrink: 0;
	color: var(--c-gray-900);
	font-size: 24px;
	font-weight: 700;
	line-height: 32px;
}

/* ---------- reviews ---------- */
.reviews {
	padding: 80px 0;
	background: var(--c-white);
}

.reviews__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px;
}

.review {
	margin: 0;
	padding: 32px;
	border: 1px solid var(--c-gray-200);
	border-radius: 16px;
	background: var(--c-gray-50);
}

.review__stars {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-bottom: 16px;
}

.review__star {
	width: 20px;
	height: 20px;
	fill: var(--c-amber-400);
}

.review__quote {
	margin: 0 0 24px;
	color: var(--c-gray-700);
	font-size: 18px;
	line-height: 28px;
}

.review__author {
	display: flex;
	align-items: center;
	gap: 16px;
}

.review__avatar {
	display: block;
	width: 48px;
	height: 48px;
	border-radius: 999px;
	object-fit: cover;
}

.review__name {
	display: block;
	color: var(--c-gray-900);
	font-weight: 600;
}

.review__role {
	display: block;
	color: var(--c-gray-600);
	font-size: 14px;
	line-height: 20px;
}

/* ---------- home: «Популярные шаблоны» ---------- */
.home-templates {
	padding-top: 80px;
	padding-bottom: 80px;
}

.home-templates__more {
	margin: 48px 0 0;
	text-align: center;
}

/* ---------- breakpoints ---------- */
@media (min-width: 768px) {
	.section-head__title {
		font-size: 48px;
		line-height: 48px;
	}

	.product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.reviews__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.product-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* ---------- page-hero: violet band with the page title (catalog, «Магазин» template) ---------- */
.page-hero {
	position: relative;
	overflow: hidden;
	padding: 48px 0;
	background-image: var(--g-accent);
	color: var(--c-white);
}

.page-hero--pattern::before {
	content: "";
	position: absolute;
	inset: 0;
	opacity: 0.3;
	background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiNmZmZmZmYiIGZpbGwtb3BhY2l0eT0iMC4wNSI+PHBhdGggZD0iTTM2IDE2YzAtNi42MjcgNS4zNzMtMTIgMTItMTJzMTIgNS4zNzMgMTIgMTItNS4zNzMgMTItMTIgMTItMTItNS4zNzMtMTItMTJ6TTAgMTZjMC02LjYyNyA1LjM3My0xMiAxMi0xMnMxMiA1LjM3MyAxMiAxMi01LjM3MyAxMi0xMiAxMi0xMi01LjM3My0xMi0xMnoiLz48L2c+PC9nPjwvc3ZnPg==");
}

.page-hero__inner {
	position: relative;
	text-align: center;
}

.page-hero__title {
	margin: 0;
	font-size: 30px;
	font-weight: 700;
	line-height: 36px;
}

.page-hero__lead {
	margin: 16px 0 0;
	color: rgb(255 255 255 / 0.9);
	font-size: 18px;
	line-height: 28px;
}

/* «Магазин» page template: the grid under the hero */
.catalog {
	padding-top: 48px;
	padding-bottom: 48px;
}

@media (min-width: 768px) {
	.page-hero__title {
		font-size: 48px;
		line-height: 48px;
	}
}
