/* =========================================================
   Belotex — фирменият стил на БЕЛОТЕКС-95, Златоград.
   Палитрата, шрифтовете и знаците идват от брандбука:
   бордо + кремаво + топъл бежов + графит + приглушено злато.
   Интерфейсът остава сдържан, за да не се бие с 13-те цвята
   на изделията.
   ========================================================= */

:root {
	/* Мастило и хартия */
	--bx-ink: #292725;          /* Графит */
	--bx-ink-soft: #5B534A;
	--bx-ink-faint: #8A8075;
	--bx-paper: #F7F1E8;        /* Кремаво */
	--bx-paper-2: #F1E7D9;
	--bx-paper-warm: #EDE1CE;
	--bx-card: #FFFCF7;

	/* Акцент: бордо */
	--bx-accent: #722F3A;
	--bx-accent-deep: #5A222D;
	--bx-accent-ink: #FFFFFF;
	--bx-accent-soft: #F4E7E7;

	/* Топъл бежов и приглушено злато — фините детайли */
	--bx-beige: #D7C3A5;
	--bx-gold: #B99A61;
	--bx-gold-deep: #9C7F49;
	--bx-star: #C9AE7C;

	/* Съвместимост със заварени правила */
	--bx-navy: #292725;
	--bx-line: rgba(41, 39, 37, 0.15);
	--bx-line-soft: rgba(41, 39, 37, 0.075);
	--bx-line-gold: rgba(185, 154, 97, 0.45);
	--bx-danger: #A33A33;

	/* Cormorant Garamond носи заглавията, Lora — по-дребните.
	   Двата са от брандбука; Cormorant е с ниска x-височина,
	   затова е само за едър кегел. */
	--bx-display: "Cormorant Garamond", "Lora", Georgia, "Times New Roman", serif;
	--bx-serif: "Lora", Georgia, "Times New Roman", serif;
	--bx-sans: "Manrope", "Inter", -apple-system, "Segoe UI", sans-serif;

	--bx-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--bx-ease-drawer: cubic-bezier(0.16, 1, 0.3, 1);
	--bx-dur: 0.55s;

	--bx-radius: 3px;
	--bx-max: 1240px;
	--bx-pad: clamp(20px, 5vw, 56px);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--bx-sans);
	font-size: 17.5px;
	line-height: 1.68;
	color: var(--bx-ink);
	background: var(--bx-paper);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--bx-serif); font-weight: 600; line-height: 1.18; margin: 0 0 0.5em; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.bx-skip {
	position: absolute; left: -9999px; top: 0;
	background: var(--bx-ink); color: var(--bx-paper); padding: 10px 16px; z-index: 200;
}
.bx-skip:focus { left: 12px; top: 12px; }

/* ---------- Announcement ---------- */
.bx-announce {
	background: var(--bx-ink); color: var(--bx-paper);
	text-align: center; font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase;
}
.bx-announce p { margin: 0; padding: 9px var(--bx-pad); }

/* ---------- Header ---------- */
.bx-header {
	position: sticky; top: 0; z-index: 90;
	background: color-mix(in srgb, var(--bx-paper) 88%, transparent);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--bx-line-soft);
	transition: box-shadow 0.3s var(--bx-ease);
}
.bx-header.is-scrolled { box-shadow: 0 8px 30px rgba(27, 24, 21, 0.07); }
.bx-header__in {
	max-width: var(--bx-max); margin: 0 auto; padding: 0 var(--bx-pad);
	display: flex; align-items: center; justify-content: space-between; gap: 20px;
	height: 64px;
}
.bx-logo {
	display: inline-flex; align-items: center; gap: 9px;
	font-family: var(--bx-serif); font-size: 19px; font-weight: 700;
	text-decoration: none; letter-spacing: 0.12em; text-transform: uppercase;
}
.bx-logo__mark { color: var(--bx-accent); flex-shrink: 0; }
.bx-header__nav { display: none; gap: 28px; }
.bx-header__nav a {
	text-decoration: none; font-size: 14px; color: var(--bx-ink-soft);
	transition: color 0.2s;
}
.bx-header__nav a:hover { color: var(--bx-ink); }
.bx-header__actions { display: flex; align-items: center; gap: 14px; }
.bx-header__cta { display: none; }
.bx-cart-toggle {
	position: relative; background: none; border: 0; padding: 6px; color: var(--bx-ink);
	display: inline-flex;
}
.bx-cart-count {
	position: absolute; top: -2px; right: -4px;
	min-width: 17px; height: 17px; border-radius: 50%;
	background: var(--bx-accent); color: var(--bx-accent-ink);
	font-size: 10.5px; font-weight: 600; line-height: 17px; text-align: center;
	transition: transform 0.25s var(--bx-ease);
}
.bx-cart-count[data-count="0"] { opacity: 0; transform: scale(0.4); }
.bx-cart-count.is-bumped { animation: bx-bump 0.45s var(--bx-ease); }
@keyframes bx-bump { 40% { transform: scale(1.45); } }
.bx-cart-toggle.is-wiggle { animation: bx-wiggle 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes bx-wiggle {
	30% { transform: scale(1.15) rotate(-12deg); }
	60% { transform: scale(1.08) rotate(8deg); }
}

@media (min-width: 900px) {
	.bx-header__nav { display: flex; }
	.bx-header__cta { display: inline-flex; }
}

/* ---------- Reveal on scroll ---------- */
[data-bx-reveal] {
	opacity: 0; transform: translateY(26px);
	transition: opacity var(--bx-dur) var(--bx-ease), transform var(--bx-dur) var(--bx-ease);
	transition-delay: var(--reveal-delay, 0ms);
	will-change: opacity, transform;
}
[data-bx-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Sections ---------- */
.bx-section { padding: clamp(56px, 9vw, 110px) 0; }
.bx-section__in { max-width: var(--bx-max); margin: 0 auto; padding: 0 var(--bx-pad); }
.bx-section__in--narrow { max-width: 820px; }
.bx-section__head { max-width: 640px; margin-bottom: clamp(32px, 5vw, 56px); }
.bx-section__title { font-size: clamp(30px, 4.6vw, 46px); }
.bx-eyebrow {
	font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
	color: var(--bx-gold); font-weight: 600; margin-bottom: 14px;
}

/* Футърът се стилизира изцяло в shop.css */

/* ---------- Generic pages / prose ---------- */
.bx-page { padding: clamp(40px, 6vw, 80px) 0; min-height: 50vh; }
.bx-page__in { max-width: var(--bx-max); margin: 0 auto; padding: 0 var(--bx-pad); }
.bx-page__in--narrow { max-width: 760px; }
.bx-page__title { font-size: clamp(30px, 4.5vw, 44px); margin-bottom: 0.8em; }
.bx-prose { color: var(--bx-ink-soft); }
.bx-prose h2 { font-size: 26px; margin-top: 1.6em; color: var(--bx-ink); }
.bx-prose h3 { font-size: 20px; margin-top: 1.4em; color: var(--bx-ink); }
.bx-prose ul { list-style: disc; padding-left: 22px; margin-bottom: 1em; }
.bx-prose a { color: var(--bx-accent); }

/* ---------- WooCommerce изчистване (checkout / account / thankyou) ---------- */
.bx-wc .woocommerce { font-size: 15px; }
.bx-wc h1, .bx-wc h2, .bx-wc h3 { font-family: var(--bx-serif); }
.bx-wc .woocommerce form .form-row input.input-text,
.bx-wc .woocommerce form .form-row textarea,
.bx-wc .woocommerce form .form-row select {
	border: 1px solid var(--bx-line); border-radius: var(--bx-radius);
	padding: 13px 14px; background: var(--bx-card); font: inherit; width: 100%;
}
.bx-wc .woocommerce form .form-row input.input-text:focus,
.bx-wc .woocommerce form .form-row select:focus {
	outline: none; border-color: var(--bx-accent); box-shadow: 0 0 0 1px var(--bx-accent);
}
.bx-wc .woocommerce form .form-row label { font-size: 13px; font-weight: 500; margin-bottom: 4px; display: block; }
.bx-wc .woocommerce button.button,
.bx-wc .woocommerce a.button,
.bx-wc .woocommerce #place_order {
	background: var(--bx-ink); color: var(--bx-paper); border: 1px solid var(--bx-ink);
	border-radius: var(--bx-radius); padding: 15px 32px;
	font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
	transition: background 0.25s var(--bx-ease);
}
.bx-wc .woocommerce button.button:hover,
.bx-wc .woocommerce #place_order:hover { background: var(--bx-accent); border-color: var(--bx-accent); color: var(--bx-paper); }
.bx-wc .woocommerce-checkout-review-order-table,
.bx-wc table.shop_table {
	border: 1px solid var(--bx-line-soft); border-radius: 4px; border-collapse: separate;
	background: var(--bx-card);
}
.bx-wc table.shop_table th, .bx-wc table.shop_table td { border-color: var(--bx-line-soft); }
.bx-wc .woocommerce-info, .bx-wc .woocommerce-message, .bx-wc .woocommerce-error {
	border-top-color: var(--bx-accent); background: var(--bx-card); border-radius: 3px;
}
.bx-wc .woocommerce-error { border-top-color: var(--bx-danger); }
.bx-wc #payment { background: var(--bx-paper-warm); border-radius: 4px; }
.bx-wc #payment div.payment_box { background: var(--bx-card); border-radius: 3px; }
.bx-wc #payment div.payment_box::before { display: none; }

/* Доставка (bx-fulfillment checkout блок) */
.s1-delivery { margin: 26px 0; }
.s1-delivery__title { font-family: var(--bx-serif); font-size: 20px; margin-bottom: 14px; }
.s1-delivery__step { font-size: 13px; font-weight: 600; color: var(--bx-ink-soft); margin: 0 0 10px; }
.s1-delivery__types { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

/* Първо куриерът (карти с лога), после къде да пристигне. */
.s1-delivery__couriers {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 10px; margin-bottom: 22px;
}
.s1-delivery__courier {
	position: relative; display: flex; align-items: center; justify-content: center;
	min-height: 64px; padding: 12px; background: var(--bx-card);
	border: 1px solid var(--bx-line); border-radius: var(--bx-radius); cursor: pointer;
	transition: border-color 0.2s var(--bx-ease), box-shadow 0.2s var(--bx-ease), transform 0.2s var(--bx-ease);
}
.s1-delivery__courier:hover { transform: translateY(-1px); }
/* Радиото е скрито — цялата карта е мишената. */
.s1-delivery__courier input { position: absolute; opacity: 0; pointer-events: none; }
.s1-delivery__courier:has(input:focus-visible) { outline: 2px solid var(--bx-accent); outline-offset: 2px; }
/* height бие глобалното img { height: auto } по специфичност на класа. */
.s1-delivery__logo {
	height: 24px; width: auto; max-width: 100%; object-fit: contain;
	filter: grayscale(1); opacity: 0.55;
	transition: filter 0.2s var(--bx-ease), opacity 0.2s var(--bx-ease);
}
.s1-delivery__courier:hover .s1-delivery__logo,
.s1-delivery__courier:has(input:checked) .s1-delivery__logo { filter: none; opacity: 1; }
.s1-delivery__name { font-weight: 600; font-size: 14px; }

.s1-delivery__type {
	border: 1px solid var(--bx-line); border-radius: var(--bx-radius);
	padding: 11px 18px; cursor: pointer; background: var(--bx-card);
	font-size: 14px; display: inline-flex; align-items: center; gap: 8px;
	transition: border-color 0.2s var(--bx-ease), background 0.2s var(--bx-ease);
}
.s1-delivery__type[hidden], .s1-delivery__courier[hidden] { display: none; }
.s1-delivery__type:hover { border-color: var(--bx-ink-soft); }
.s1-delivery__type:has(input:checked), .s1-delivery__courier:has(input:checked) {
	border-color: var(--bx-accent); background: var(--bx-accent-soft);
	box-shadow: inset 0 0 0 1px var(--bx-accent);
}
.s1-office-picker { position: relative; }
.s1-office-search {
	width: 100%; border: 1px solid var(--bx-line); border-radius: var(--bx-radius);
	padding: 13px 14px; background: var(--bx-card); font: inherit;
}
.s1-office-search:focus { outline: none; border-color: var(--bx-accent); box-shadow: 0 0 0 1px var(--bx-accent); }
.s1-office-results {
	position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px);
	background: var(--bx-card); border: 1px solid var(--bx-line); border-radius: 3px;
	max-height: 260px; overflow-y: auto; box-shadow: 0 16px 40px rgba(27, 24, 21, 0.12);
	list-style: none; margin: 0; padding: 4px;
}
.s1-office-results__item { padding: 10px 12px; cursor: pointer; border-radius: 2px; font-size: 14px; }
.s1-office-results__item:hover { background: var(--bx-accent-soft); }
.s1-office-results__item strong { display: block; font-size: 13.5px; }
.s1-office-results__item span { color: var(--bx-ink-soft); font-size: 12.5px; }
.s1-office-selected {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	border: 1px solid var(--bx-accent); background: var(--bx-accent-soft);
	border-radius: var(--bx-radius); padding: 12px 14px; font-size: 14px;
}
.s1-office-change { background: none; border: 0; color: var(--bx-accent); text-decoration: underline; font-size: 13px; padding: 0; }

/* ---------- Accessibility / motion ---------- */
:focus-visible { outline: 2px solid var(--bx-accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
	[data-bx-reveal] { opacity: 1; transform: none; }
	.bx-ticker__track { animation: none; }
}

/* ---------- Страницата никога не се разпъва хоризонтално (zoom-out фикс) ---------- */
html, body { overflow-x: hidden; }
@supports (overflow-x: clip) {
	html, body { overflow-x: clip; }
}

/* Тесни екрани: бързата поръчка се подрежда вертикално */
@media (max-width: 480px) {
	.bx-quick__row { flex-direction: column; }
	.bx-quick__btn { width: 100%; }
}

/* Drawer: пълно скриване когато е затворен (бял ръб не наднича на мобилно) */
.bx-drawer:not(.is-open) .bx-drawer__panel {
	visibility: hidden;
	transition: transform 0.4s var(--bx-ease-drawer), visibility 0s 0.4s;
}
.bx-drawer.is-open .bx-drawer__panel { visibility: visible; }

/* Анонс лентата: винаги на един ред */
.bx-announce p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) {
	.bx-announce p { font-size: 10.5px; letter-spacing: 0.06em; padding: 8px 10px; }
}

/* Checkout: qty контрол в резюмето */
.bx-co-qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--bx-line);
	border-radius: var(--bx-radius);
	margin-left: 8px;
	vertical-align: middle;
}
.bx-co-qty .bx-qty__btn { width: 26px; height: 26px; font-size: 14px; cursor: pointer; }
.bx-co-qty .bx-qty__val { min-width: 20px; text-align: center; font-weight: 600; }

/* Checkout: редът Доставка на един ред */
.woocommerce-checkout-review-order tr.woocommerce-shipping-totals td {
	white-space: nowrap;
	font-size: 13.5px;
}

/* Drawer trust редове: иконки */
.bx-drawer__trust span { display: inline-flex; align-items: center; gap: 6px; }
.bx-drawer__trust svg { color: var(--bx-accent-deep); flex-shrink: 0; }

/* Количество: цената чака сървъра — вижда се, че се обновява */
.bx-drawer__row.is-updating .bx-drawer__price,
tr.is-updating .product-total {
	opacity: 0.4;
	transition: opacity 0.15s ease;
}
