/*
Theme Name: SABR
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: Тема для интернет-магазина на WooCommerce
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sabr
Tags: e-commerce, woocommerce, shop, custom-menu, featured-images

SABR - тема для интернет-магазина на WooCommerce
*/
.other-products {
	overflow: hidden;
}
.hero__init {
	overflow: hidden;
}

body .sidebar-auth__panel {
	top: 0;
	height: 100%;
}

body .sidebar-auth {
	z-index: 9999;
}

.sidebar-auth__footer {
	font-size: 14px;
	line-height: 1.2;
}

.sidebar-auth__footer a:link {
	text-decoration: underline;
	display: inline-block;
}

.order-page__promo-messages {
	margin-top: 10px;
	font-size: 12px;
	line-height: 1.2;
	min-height: 20px;
	display: block;
}

.order-page__promo-error {
	color: #f03636;
	font-size: 12px;
	line-height: 1.4;
}

.order-page__promo-success {
	color: #28a745;
	font-size: 12px;
	line-height: 1.4;
}

.order-page__promo-applied {
	margin-top: 10px;
	font-size: 14px;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 5px;
}

.order-page__promo-remove {
	font-size: 12px;
	font-weight: bold;
}

.cart-empty__wrapper {
	display: flex;
	flex-direction: column;
	gap: 30px;
}

.product-card__price-sale {
	color: var(--skidka);
}

.product-card__price-old {
	font-weight: 400;
	text-decoration: line-through;
}

.product-card__price {
	display: flex;
	align-items: center;
	gap: 5px;
}

.lc-lost,
.cart-empty,
.site-main,
.entry-content {
	margin-top: 40px;
}

.lc .woocommerce-error,
.lc .woocommerce-info,
.lc .woocommerce-message {
	margin-bottom: 0;
}

.product-page__mobile-slider {
	overflow: hidden;
}

.product-page__mobile-slider {
	min-width: 0;
}

.shops-nav__item.active {
	font-weight: bold;
}

.section-product__price {
	display: flex;
	align-items: center;
	gap: 5px;
}

.section-product__price-sale {
	color: var(--skidka);
}

.section-product__price-old {
	font-weight: 400;
	text-decoration: line-through;
}

/* Стили для цены на странице товара */
.product-page__price {
	font-weight: 900;
	font-size: 1.5rem;
	line-height: 1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin-bottom: 1.875rem;
}

.product-page__price-old {
	text-decoration: line-through;
	opacity: 0.6;
	font-weight: 400;
	margin-right: 0.5rem;
}

@media (max-width: 40rem) {
	.product-page__price {
		margin-bottom: 1.25rem;
		font-size: 1.125rem;
	}
}

.product-card__image img {
	max-height: 780px;
}

/* Стили для цветов товара */
.product-page__color-item--disabled,
.product-page__color-item:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	pointer-events: none;
}

/* Стили для сообщений об ошибках валидации */
.field-error {
	color: red;
	font-size: 12px;
	display: block;
}

.form-field--error .form-checkbox__text {
	color: #d63638;
}

.form-field--error input[type="checkbox"].error {
	border-color: #d63638;
	outline: 1px solid #d63638;
}

.form-field--error {
	position: relative;
}

@media(min-width: 768px) {
	.field-order-email {
		grid-column: span 2;
	}
}

.out-of-stock {
	margin-bottom: 20px;
}


/* Мобильная панель поиска */
.header__mobile-search {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	z-index: 1001;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.header__mobile-search--active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.header__mobile-search-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.header__mobile-search--active .header__mobile-search-overlay {
	opacity: 1;
}

.header__mobile-search-panel {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: #fff;
	transform: translateY(-100%);
	transition: transform 0.3s ease;
	display: flex;
	flex-direction: column;
}

.header__mobile-search--active .header__mobile-search-panel {
	transform: translateY(0);
}

.header__mobile-search-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem;
	border-bottom: 0.0625rem solid var(--border02);
}

.header__mobile-search-close {
	background: none;
	border: none;
	padding: 0.5rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.header__mobile-search-close svg {
	width: 1.5rem;
	height: 1.5rem;
}

.header__mobile-search-title {
	font-size: 1rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	margin: 0;
}

.header__mobile-search-content {
	flex: 1;
	overflow-y: auto;
	padding: 1rem;
}

.header__mobile-search-wrapper {
	position: relative;
	margin-bottom: 1rem;
}

.header__mobile-search-input {
	width: 100%;
	padding: 0.875rem 3rem 0.875rem 0;
	border: none;
	border-bottom: 0.0625rem solid var(--border02);
	font-size: 0.875rem;
	line-height: 130%;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	background-color: transparent;
	outline: none;
	color: var(--osnovnoy);
}

.header__mobile-search-submit {
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	padding: 0.5rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.header__mobile-search-submit svg {
	width: 1.5rem;
	height: 1.5rem;
}

.header__mobile-search-results {
	margin-top: 1rem;
	max-height: calc(100vh - 10rem);
	overflow-y: auto;
}

/* Стили для поиска в шапке */
.header__search {
	flex-shrink: 0;
	position: relative;
}

@supports (flex-basis: clamp(12.5rem, 0.2638071116rem + 19.7361928884vw, 20rem)) {
	.header__search {
		flex-basis: clamp(12.5rem, 0.2638071116rem + 19.7361928884vw, 20rem);
	}
}

@supports not (flex-basis: clamp(12.5rem, 0.2638071116rem + 19.7361928884vw, 20rem)) {
	.header__search {
		flex-basis: calc(12.5rem + 7.5 * (100vw - 61.99875rem) / 38.00125);
	}
}

.header__search-wrapper {
	position: relative;
}

.header__search input {
	width: 100%;
	padding-right: 1.875rem;
	padding-bottom: 0.625rem;
	padding-top: 0.125rem;
	border-bottom: 0.0625rem solid var(--border02);
	font-size: 0.75rem;
	line-height: 130%;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	background-color: transparent;
	outline: none;
	color: var(--osnovnoy);
}

.header__search-results {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: #fff;
	border: 0.0625rem solid var(--border02);
	border-top: none;
	overflow-y: auto;
	z-index: 1000;
	display: none;
	box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.header__search-list {
	display: flex;
	flex-direction: column;
}

.header__search-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem;
	text-decoration: none;
	color: var(--osnovnoy);
	border-bottom: 0.0625rem solid var(--border02);
	transition: background-color 0.2s;
}

.header__search-item:last-child {
	border-bottom: none;
}

.header__search-item:hover {
	background-color: #f5f5f5;
}

.header__search-item-image {
	flex-shrink: 0;
	width: 3rem;
	height: 3rem;
	overflow: hidden;
}

.header__search-item-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.header__search-item-info {
	flex: 1;
	min-width: 0;
}

.header__search-item-name {
	font-size: 0.875rem;
	line-height: 1.4;
	margin-bottom: 0.25rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.header__search-item-price {
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--osnovnoy);
}

.header__search-loading,
.header__search-empty {
	padding: 1rem;
	text-align: center;
	font-size: 0.875rem;
	color: var(--osnovnoy);
}

.header__search-more {
	padding: 0.75rem;
	background-color: #f9f9f9;
}

.header__search-more-link {
	display: block;
	text-align: center;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--osnovnoy);
	text-decoration: none;
	transition: color 0.2s;
}

.header__search-more-link:hover {
	color: var(--osnovnoy);
	text-decoration: underline;
}

/* Стили для промокодов на странице корзины */
.order-page__promo {
	margin-top: 3.125rem;
	position: relative;
}

.order-page__promo-field {
	width: 100%;
	font-weight: 700;
	font-size: 0.625rem;
	line-height: 110%;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	padding-bottom: 0.625rem;
	outline: none;
}

.order-page__promo-field::-moz-placeholder {
	color: var(--osnovnoy);
}

.order-page__promo-field::placeholder {
	color: var(--osnovnoy);
}

.order-page__promo-input {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.375rem;
	padding-right: 1.5rem;
	border-bottom: 0.0625rem solid var(--obvodki-i-linii);
	position: relative;
}

.order-page__promo-btn {
	position: absolute;
	right: 0;
	top: -0.25rem;
	width: 1.125rem;
	height: 1.125rem;
}

.order-page__promo-btn svg {
	width: 100%;
	max-height: 100%;
}

/* Уведомление о добавлении в корзину */
.sabr-cart-notice {
	position: fixed;
	bottom: 30px;
	right: 30px;
	background: #fff;
	color: #000;
	padding: 0;
	border-radius: 8px;
	z-index: 9999;
	font-size: 14px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: none;
	min-width: 300px;
	max-width: 400px;
}

.sabr-cart-notice--show {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.sabr-cart-notice__content {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 20px;
}

.sabr-cart-notice__icon {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	color: #4CAF50;
}

.sabr-cart-notice__text {
	flex: 1;
	font-weight: 500;
	line-height: 1.4;
}

.sabr-cart-notice--error .sabr-cart-notice__icon {
	color: #f44336;
}

/* Стили для кнопки личного кабинета в сайдбаре */
.sidebar-menu__btn-lc {
	text-decoration: none;
	border: none;
	cursor: pointer;
}

.sidebar-menu__btn-lc:hover {
	text-decoration: none;
}

/* Стили для счетчика корзины */
.header__cart-wrapper {
	position: relative;
	display: inline-block;
}

.header__cart-count {
	position: absolute;
	top: -8px;
	right: -8px;
	background-color: var(--skidka, #f03636);
	color: var(--belyy, #fff);
	border-radius: 50%;
	min-width: 18px;
	height: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	padding: 0 4px;
	box-sizing: border-box;
}

/* Стили для формы регистрации в программе лояльности */
#loyaltyRegisterForm {
	padding: 20px;
	background: #f9f9f9;
	border-radius: 8px;
}

#loyaltyRegisterForm p {
	margin-bottom: 15px;
	line-height: 1.6;
}

#loyaltyRegisterForm p:last-child {
	margin-bottom: 0;
}

/* Кастомные чекбоксы для формы регистрации в программе лояльности */
#loyaltyRegisterForm label.checkbox-label {
	position: relative;
	padding-left: 28px;
	display: flex;
	align-items: flex-start;
	cursor: pointer;
	user-select: none;
}

#loyaltyRegisterForm label.checkbox-label input[type="checkbox"] {
	position: absolute;
	left: 0;
	top: 2px;
	width: 18px;
	height: 18px;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 2;
}

#loyaltyRegisterForm label.checkbox-label::before {
	content: "";
	position: absolute;
	left: 0;
	top: 2px;
	width: 18px;
	height: 18px;
	border: 1px solid #333;
	border-radius: 3px;
	background-color: #fff;
	transition: all 0.3s ease;
	box-sizing: border-box;
	z-index: 1;
}

/* Используем :has() для современных браузеров, fallback через JavaScript */
#loyaltyRegisterForm label.checkbox-label:has(input[type="checkbox"]:checked)::before {
	background-color: #333;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M10 3L4.5 8.5 2 6l1.5-1.5L4.5 6 8.5 2z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 12px 12px;
	border-color: #333;
}

#loyaltyRegisterForm label.checkbox-label input[type="checkbox"]:focus {
	outline: 1px solid var(--obvodki-i-linii);
	outline-offset: 2px;
	border-radius: 3px;
}

/* Fallback для браузеров без поддержки :has() - через класс */
#loyaltyRegisterForm label.checkbox-label.checkbox-checked::before {
	background-color: #333;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M10 3L4.5 8.5 2 6l1.5-1.5L4.5 6 8.5 2z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 12px 12px;
	border-color: #333;
}

#loyaltyRegisterForm input[type="text"] {
	width: 100%;
	max-width: 300px;
	padding: 10px 15px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.5;
	box-sizing: border-box;
}

#loyaltyRegisterForm input[type="text"]:focus {
	outline: none;
	border-color: #333;
}

#loyaltyRegisterForm input[type="text"][readonly] {
	background-color: #f5f5f5;
	cursor: not-allowed;
	opacity: 0.8;
}

#loyaltyRegisterForm input[type="submit"] {
	padding: 12px 30px;
	background-color: #333;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

#loyaltyRegisterForm input[type="submit"]:hover {
	background-color: #555;
}

#loyaltyRegisterForm a {
	color: #333;
	text-decoration: underline;
}

#loyaltyRegisterForm a:hover {
	color: #555;
	text-decoration: none;
}

/* Вариации в карточке товара корзины (номинал подарочной карты и т.п.) */
.order-item .variation {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 0.5rem;
	margin-top: 0.5rem;
	margin-bottom: 0;
	font-size: 0.625rem;
	line-height: 1.3;
}

.order-item .variation dt {
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--osnovnoy);
	margin: 0;
}

.order-item .variation dt::after {
	content: " ";
}

.order-item .variation dd {
	margin: 0;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--osnovnoy);
}

.order-item .variation dd p {
	margin: 0;
}