/* WINE SPLASH — базовые стили: сброс, типографика, контейнер, кнопки, формы */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--wspl-font-sans);
	font-weight: var(--wspl-font-weight-regular);
	font-size: var(--wspl-fs-body);
	line-height: 1.5;
	color: var(--wspl-color-black);
	background: var(--wspl-color-white);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
/*
 * Любой элемент со своим display (flex/grid/position и т.д.) в обычном CSS
 * "забивает" стандартное display:none, которое браузер подставляет за
 * атрибутом hidden — из-за этого hidden-элементы (битое фото оборота,
 * панель полей гравировки и т.п.) оставались видимыми, хотя JS честно
 * выставлял hidden=true. Это правило восстанавливает ожидаемое поведение
 * атрибута hidden везде на сайте, независимо от собственных стилей элемента.
 */
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; }

.wspl-container {
	width: 100%;
	max-width: var(--wspl-container-max);
	margin: 0 auto;
	padding-left: var(--wspl-container-pad);
	padding-right: var(--wspl-container-pad);
}
@media (max-width: 1400px) {
	.wspl-container { padding-left: var(--wspl-container-pad-tablet); padding-right: var(--wspl-container-pad-tablet); }
}
@media (max-width: 640px) {
	.wspl-container { padding-left: var(--wspl-container-pad-mobile); padding-right: var(--wspl-container-pad-mobile); }
}

.wspl-section { padding-top: var(--wspl-space-12); padding-bottom: var(--wspl-space-12); }
.wspl-section--tight { padding-top: var(--wspl-space-8); padding-bottom: var(--wspl-space-8); }

.wspl-section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wspl-space-6);
	margin-bottom: var(--wspl-space-8);
	flex-wrap: wrap;
}
.wspl-section-header h2 {
	font-family: var(--wspl-font-display);
	font-size: var(--wspl-fs-h2);
	font-weight: 400;
}

.wspl-underline-link {
	display: inline-flex;
	flex-direction: column;
	gap: var(--wspl-space-1);
	font-family: var(--wspl-font-sans);
	font-size: var(--wspl-fs-tiny);
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--wspl-color-black);
}
.wspl-underline-link::after {
	content: '';
	display: block;
	height: 1px;
	background: currentColor;
	width: 100%;
}

/* Кнопки */
.wspl-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--wspl-space-2);
	border-radius: var(--wspl-radius-sm);
	padding: 14px 36px;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	border: 1px solid transparent;
	transition: background var(--wspl-transition-fast), color var(--wspl-transition-fast), border-color var(--wspl-transition-fast);
	white-space: nowrap;
}
.wspl-btn--primary {
	background: var(--wspl-color-black);
	color: var(--wspl-color-white);
	border-color: var(--wspl-color-black);
}
.wspl-btn--primary:hover { background: #1a1a1a; }
.wspl-btn--white {
	background: var(--wspl-color-white);
	color: var(--wspl-color-black);
	border-color: var(--wspl-color-white);
}
.wspl-btn--white:hover { background: transparent; color: var(--wspl-color-white); }
.wspl-btn--outline {
	background: transparent;
	color: var(--wspl-color-black);
	border-color: var(--wspl-color-black);
}
.wspl-btn--outline:hover { background: var(--wspl-color-black); color: var(--wspl-color-white); }
.wspl-btn--full { width: 100%; }
.wspl-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Количество товара (степпер -/+) — WooCommerce сам выводит .quantity/.qty
   на странице товара, в корзине и на чекауте; кнопки добавляет JS
   (initQuantitySteppers() в main.js), здесь только стилизуем. */
.quantity { display: inline-flex; align-items: center; border: 1px solid var(--wspl-color-border); border-radius: var(--wspl-radius-sm); flex: none; }
.quantity .qty { width: 48px; text-align: center; border: none; background: none; -moz-appearance: textfield; }
.quantity .qty::-webkit-outer-spin-button,
.quantity .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.wspl-qty-btn { width: 32px; height: 32px; border: none; background: none; font-size: 16px; flex: none; }
.wspl-qty-btn:hover { background: var(--wspl-color-border); }

/* Хлебные крошки */
.wspl-breadcrumbs {
	display: flex;
	gap: var(--wspl-space-2);
	font-size: var(--wspl-fs-small);
	color: var(--wspl-color-text-muted);
}
.wspl-breadcrumbs a { color: var(--wspl-color-text-muted); }
.wspl-breadcrumbs a:hover { color: var(--wspl-color-black); }
.wspl-breadcrumbs .is-current { color: var(--wspl-color-black); }

/* Карточка товара, переиспользуется в Home / Коллекции / related products */
.wspl-product-card { display: block; }
.wspl-product-card__photo {
	position: relative;
	border-radius: var(--wspl-radius-md);
	overflow: hidden;
	aspect-ratio: 346 / 400;
	background: #f2f2f2;
}
.wspl-product-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.wspl-product-card__badge {
	position: absolute;
	top: 16px;
	left: 16px;
	background: var(--wspl-color-white);
	border-radius: 999px;
	padding: 4px 12px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}
/* Плашка «Предзаказ» — чёрная, слева сверху на фото, во всех списках товаров */
.wspl-product-card__badge--preorder {
	z-index: 2;
	background: #000;
	color: #fff;
	border-radius: 5px;
	padding: 4px 10px;
	font-size: 10px;
	line-height: normal;
	letter-spacing: 0;
}
.wspl-product-card__meta { margin-top: var(--wspl-space-4); }
.wspl-product-card__name-price {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--wspl-space-4);
	font-size: var(--wspl-fs-body);
}
.wspl-product-card__name { font-weight: var(--wspl-font-weight-regular); }
.wspl-product-card__price { white-space: nowrap; }
.wspl-product-card__desc {
	margin-top: var(--wspl-space-2);
	color: var(--wspl-color-text-muted);
	font-size: var(--wspl-fs-small);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wspl-grid-3 {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--wspl-space-8) 32px;
}
@media (max-width: 1024px) { .wspl-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .wspl-grid-3 { grid-template-columns: 1fr; } }

.wspl-grid-4 {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--wspl-space-8) 24px;
}
@media (max-width: 1024px) { .wspl-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .wspl-grid-4 { grid-template-columns: 1fr; } }

/* Star rating (отзывы) */
.wspl-stars { display: inline-flex; gap: 2px; color: var(--wspl-color-black); }
.wspl-stars svg { width: 13px; height: 13px; }

/* Формы */
.wspl-field {
	width: 100%;
	border: 1px solid var(--wspl-color-border);
	border-radius: var(--wspl-radius-sm);
	padding: 12px 16px;
	font-size: var(--wspl-fs-small);
	background: var(--wspl-color-white);
}
.wspl-field:focus { outline: none; border-color: var(--wspl-color-black); }
label.wspl-label { display: block; font-size: var(--wspl-fs-small); margin-bottom: var(--wspl-space-2); }

.wspl-notice {
	border-radius: var(--wspl-radius-sm);
	padding: var(--wspl-space-4);
	font-size: var(--wspl-fs-small);
	margin-bottom: var(--wspl-space-4);
}
.wspl-notice--success { background: #eef7ee; color: var(--wspl-color-success); }
.wspl-notice--error { background: #fdecea; color: var(--wspl-color-danger); }

.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); overflow: hidden; height: 1px; width: 1px; }
