/**
 * WooCommerce & Theme Overrides
 *
 * Toast, WC notices, language switcher, catalog filters, cart inputs.
 * Loaded after main.css via wp_enqueue_style dependency.
 */

/* ─── Cart quantity input ─── */
.cart-item__quantity-value {
	-moz-appearance: textfield;
	-webkit-appearance: none;
	appearance: none;
	border: none;
	background: transparent;
	padding: 0;
	margin: 0;
	outline: none;
	text-align: center;
	font: inherit;
	color: inherit;
	width: 100%;
}
.cart-item__quantity-value::-webkit-inner-spin-button,
.cart-item__quantity-value::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* ─── Cart page ─── */
.cart2-page .woocommerce-cart-form {
	width: 100%;
}

/* ─── Order summary / payment ─── */
.order-summary__payment-fields {
	font-size: 14px;
	color: #6b7b5e;
	line-height: 1.4;
}
.order-summary__payment-fields p {
	margin: 0;
}

/* ─── WooCommerce notices ─── */
.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
	list-style: none;
	margin: 0 0 16px;
	padding: 16px;
	border-radius: 8px;
	font-size: 14px;
	font-family: "Inter Tight", sans-serif;
	line-height: 1.5;
	width: 100%;
	max-width: 1147px;
	box-sizing: border-box;
}
.woocommerce-error {
	background: #FFF5F4;
	border: 1px solid #CD4631;
	color: #CD4631;
}
.woocommerce-error li {
	margin-bottom: 4px;
}
.woocommerce-error li:last-child {
	margin-bottom: 0;
}
.woocommerce-message {
	background: #F2F7EE;
	border: 1px solid #3C7A55;
	color: #3C4534;
}
.woocommerce-info {
	background: #F2F4F3;
	border: 1px solid #C7D7A1;
	color: #3C4534;
}

/* ─── Payment form errors ─── */
.payment-details-form__field--error .payment-details-form__select {
	outline: 1px solid #CD4631;
	outline-offset: -1px;
}
.payment-details-form__error {
	position: static !important;
	transform: translateY(-10px);
}

/* ─── Toast notification (dark theme) ─── */
.toast {
	background-color: #151A0F !important;
	color: #fff;
	transform: translateX(calc(100% + 48px));
	min-width: 320px;
}
.toast--active {
	transform: translateX(0) !important;
}
.toast__title {
	color: #fff !important;
	font-family: "Inter Tight", sans-serif;
}
.toast__description {
	color: rgba(255, 255, 255, 0.8) !important;
	font-family: "Inter Tight", sans-serif;
}
.toast__close svg path {
	stroke: #fff;
}

/* ─── Favorites active state ─── */
.product-card__action-btn--active .icon-favorite-white,
.product-card__action-btn--active .icon-favorite {
	color: #CD4631;
}
.product-card__action-btn--active {
	background: rgba(205, 70, 49, 0.15) !important;
}

/* ─── Catalog filters ─── */
.catalog-filters__category-item--active {
	background: #F2F4F3;
	border-radius: 6px;
	font-weight: 600;
}
.catalog-filters__category-item--back {
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 4px;
	opacity: 0.6;
}
.catalog-filters__category-item--back:hover {
	opacity: 1;
}

/* ─── Language switcher (desktop) ─── */
.header__language {
	position: relative;
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	padding: 6px 8px;
	border-radius: 8px;
	transition: background-color 0.2s;
	user-select: none;
}
.header__language:hover {
	background-color: #F2F4F3;
}
.header__language-flag {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	object-fit: cover;
}
.header__language-text {
	font-size: 14px;
	font-weight: 500;
	color: #3C4534;
	font-family: "Inter Tight", sans-serif;
}
.header__language-icon {
	font-size: 12px;
	color: #3C4534;
	transition: transform 0.3s;
}
.header__language--active .header__language-icon {
	transform: rotate(180deg);
}
.header__language-dropdown {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	min-width: 160px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 24px rgba(0,0,0,0.12);
	padding: 8px;
	z-index: 100;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}
.header__language-dropdown--active {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.header__language-item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 8px 12px;
	border: none;
	background: transparent;
	border-radius: 8px;
	cursor: pointer;
	font-size: 14px;
	font-family: "Inter Tight", sans-serif;
	color: #3C4534;
	transition: background-color 0.2s;
}
.header__language-item:hover {
	background-color: #F2F4F3;
}
.header__language-item--active {
	background-color: #F2F4F3;
	font-weight: 600;
}
.header__language-item img {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	object-fit: cover;
}

/* ─── Language & Currency switchers (mobile) — pill style ─── */
.header__mobile-catalog-menu-top {
	gap: 8px;
}
.header__mobile-catalog-menu-selectors {
	display: flex;
	align-items: center;
	gap: 8px;
}
.header__mobile-catalog-menu-language,
.header__mobile-catalog-menu-currency {
	position: relative;
	flex-shrink: 0;
	width: auto !important;
	max-width: none !important;
}
.header__mobile-catalog-menu-language-wrapper,
.header__mobile-catalog-menu-currency-wrapper {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 16px !important;
	border: none !important;
	border-radius: 90px !important;
	background: #EDEDEE !important;
	cursor: pointer;
	font-family: "Inter Tight", sans-serif;
	font-size: 15px;
	font-weight: 500;
	color: #3C4534;
	transition: background-color 0.2s ease;
}
.header__mobile-catalog-menu-language-wrapper:active,
.header__mobile-catalog-menu-currency-wrapper:active {
	background: #E0E0E2 !important;
}
.header__mobile-catalog-menu-language--open .header__mobile-catalog-menu-language-wrapper,
.header__mobile-catalog-menu-currency--open .header__mobile-catalog-menu-currency-wrapper {
	background: #E0E0E2 !important;
}
.header__mobile-catalog-menu-language-flag img {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	object-fit: cover;
}
.header__mobile-catalog-menu-language-text,
.header__mobile-catalog-menu-currency-text {
	font-weight: 500;
}
.header__mobile-catalog-menu-language-arrow svg,
.header__mobile-catalog-menu-currency-arrow svg {
	width: 14px;
	height: 14px;
}
.header__mobile-catalog-menu-language-dropdown,
.header__mobile-catalog-menu-currency-dropdown {
	display: none;
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	min-width: 160px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 24px rgba(0,0,0,0.12);
	padding: 8px;
	z-index: 100;
}
.header__mobile-catalog-menu-language-dropdown--active,
.header__mobile-catalog-menu-currency-dropdown--visible {
	display: block;
}
.header__mobile-catalog-menu-language-option,
.header__mobile-catalog-menu-currency-option {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 8px 12px;
	border: none;
	background: transparent;
	border-radius: 8px;
	cursor: pointer;
	font-size: 14px;
	font-family: "Inter Tight", sans-serif;
	color: #3C4534;
}
.header__mobile-catalog-menu-language-option:hover,
.header__mobile-catalog-menu-currency-option:hover {
	background-color: #F2F4F3;
}
.header__mobile-catalog-menu-language-option--active,
.header__mobile-catalog-menu-currency-option--active {
	background-color: #F2F4F3;
	font-weight: 600;
}
.header__mobile-catalog-menu-language-option img,
.header__mobile-catalog-menu-currency-option img {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	object-fit: cover;
}

/* ─── WPML footer widget (hide) ─── */
.wpml-ls-statics-footer {
	display: none !important;
}

/* ─── Catalog filters row ─── */
.catalog-filters-row {
	padding-top: 24px;
}
.catalog-filters-row__chip--filters {
	gap: 6px;
	padding: 4px 14px 4px 10px;
}
.catalog-filters-row__chip-icon--left {
	display: flex;
	align-items: center;
}
.catalog-filters-row__chip-icon--left svg {
	display: block;
	width: 16px;
	height: 16px;
}
.catalog-filters-row__count {
	margin-left: auto;
	font-family: "Inter Tight", sans-serif;
	font-size: 12px;
	font-weight: 400;
	color: #6B7B5E;
	white-space: nowrap;
}

/* ─── Drug Warning modal: mobile scroll fix ─── */
@media (max-width: 767px) {
	#modalDrugWarning .modal__overlay {
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		align-items: flex-start;
		padding: 16px 0;
	}

	#modalDrugWarning .modal__content--drug-warning {
		max-height: none;
		margin: auto 16px;
		flex-shrink: 0;
	}
}

/* ─── Quick View: "Подробнее" outline button ─── */
.quick-view__view-full {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	border: 1.5px solid #3C4534;
	border-radius: 90px;
	background: transparent;
	color: #3C4534;
	font-family: "Inter Tight", sans-serif;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: background-color 0.2s, color 0.2s;
	white-space: nowrap;
}
.quick-view__view-full:hover {
	background: #3C4534;
	color: #fff;
}

/* ─── Product card badges: mobile fix ─── */
@media (max-width: 767px) {
	.product-card__badges {
		top: 0px;
		right: 6px;
		gap: 0px;
		align-items: center;
	}

	.product-card__badge {
		padding: 4px;
		height: auto;
		min-width: auto;
	}

	.product-card__badge-label {
		font-size: 8px;
		padding: 4px 6px;
	}

	.product-card__drug-icon img {
		width: 20px;
		height: 20px;
	}
}

/* ─── Mobile cart count badge ─── */
a.header__mobile-catalog-menu-action--cart {
	position: relative;
	text-decoration: none;
	color: inherit;
}
.header__cart-count--mobile {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: #CD4631;
	color: #fff;
	font-family: "Inter Tight", sans-serif;
	font-size: 11px;
	font-weight: 600;
	line-height: 18px;
	text-align: center;
	box-sizing: border-box;
}
.header__cart-count--mobile:empty {
	display: none;
}

/* ─── Mobile favorites count badge ─── */
a.header__mobile-catalog-menu-action--favorites {
	position: relative;
	text-decoration: none;
	color: inherit;
}
.header__favorites-count--mobile {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: #CD4631;
	color: #fff;
	font-family: "Inter Tight", sans-serif;
	font-size: 11px;
	font-weight: 600;
	line-height: 18px;
	text-align: center;
	box-sizing: border-box;
}
.header__favorites-count--mobile:empty {
	display: none;
}

/* ─── Cart-item: mobile layout fix for sale prices ─── */
@media (max-width: 767px) {
	.cart-item__actions {
		flex-wrap: wrap;
		gap: 8px;
	}
	.cart-item__price {
		height: auto;
		flex: 0 0 100%;
	}
}

/* ═══════════════════════════════════════════════ */
/* ─── 404 Page                               ─── */
/* ═══════════════════════════════════════════════ */

.error-404-page {
	min-height: calc(100vh - 200px);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	padding: 60px 0;
}

.error-404-page__hero {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.error-404-page__image {
	width: 100%;
	max-width: 900px;
	height: auto;
	margin-bottom: 32px;
}

.error-404-page__title {
	font-family: "Inter Tight", sans-serif;
	font-size: 32px;
	font-weight: 700;
	color: #3C4534;
	margin: 0 0 16px;
	line-height: 1.2;
}

.error-404-page__text {
	font-family: "Inter Tight", sans-serif;
	font-size: 16px;
	font-weight: 400;
	color: #6B7B5E;
	line-height: 1.6;
	margin: 0 0 32px;
	max-width: 500px;
}

@media (max-width: 767px) {
	.error-404-page {
		min-height: auto;
		padding: 40px 0;
	}

	.error-404-page__hero {
		overflow: hidden;
		width: 100%;
	}

	.error-404-page__image {
		max-width: none;
		width: 160%;
		margin-bottom: 24px;
	}

	.error-404-page__title {
		font-size: 24px;
		margin-bottom: 12px;
	}

	.error-404-page__text {
		font-size: 14px;
		margin-bottom: 24px;
		max-width: 320px;
	}
}
