/* ============================================================
   druoutlet — WordPress / WooCommerce glue.
   Bridges WP markup to the design system. Keep additive.
   ============================================================ */

/* cart count badge empty state */
.cart-count.is-empty { display: none; }

/* WP admin bar offset for the sticky header */
body.admin-bar .hdr { top: 32px; }
@media (max-width: 782px) { body.admin-bar .hdr { top: 46px; } }

/* generic WooCommerce content wrapper */
.wc-wrap { padding: 32px 24px 64px; }

/* WooCommerce notices -> match design */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	list-style: none;
	border: 1px solid var(--line);
	background: var(--surface);
	border-left: 3px solid var(--accent);
	border-radius: var(--r);
	padding: 14px 18px;
	margin: 0 0 20px;
	font-size: 14.5px;
	color: var(--ink-2);
}
.woocommerce-error { border-left-color: #e11d48; }
.woocommerce-message a.button,
.woocommerce-info a.button { float: right; }

/* keep focus styles visible */
a:focus-visible, button:focus-visible, input:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* search form (header) submit reset */
.search-go { border: 0; }

/* ---------- checkout: map WC fields/payment onto the design system ---------- */
.checkout .form-grid .form-row { margin: 0; padding: 0; }
.checkout .form-row.f2 { grid-column: span 2; }
.checkout .form-row label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.checkout .form-row label .required { color: var(--accent-ink); border: 0; text-decoration: none; }
.checkout .form-row .input-text,
.checkout .form-row input[type="text"],
.checkout .form-row input[type="email"],
.checkout .form-row input[type="tel"],
.checkout .form-row select,
.checkout .form-row textarea {
	width: 100%;
	border: 1px solid var(--line-2);
	background: var(--surface);
	border-radius: var(--r);
	padding: 13px 15px;
	font-size: 15px;
	font-family: inherit;
	color: var(--ink);
	transition: border-color .15s, box-shadow .15s;
}
.checkout .form-row .input-text:focus,
.checkout .form-row select:focus,
.checkout .form-row textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
/* Invalid fields after a failed submit — WC adds .woocommerce-invalid to the
   form-row. Red border + soft ring so the buyer sees exactly what to fix. */
.checkout .form-row.woocommerce-invalid .input-text,
.checkout .form-row.woocommerce-invalid input[type="text"],
.checkout .form-row.woocommerce-invalid input[type="email"],
.checkout .form-row.woocommerce-invalid input[type="tel"],
.checkout .form-row.woocommerce-invalid select,
.checkout .form-row.woocommerce-invalid textarea,
.checkout .form-row.woocommerce-invalid .select2-container--default .select2-selection--single {
	border-color: #d92d20 !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, #d92d20 13%, transparent);
}
.checkout .form-row.woocommerce-invalid label { color: #d92d20; }
/* country is BG-only -> hide the select */
.checkout #billing_country_field { display: none; }

/* payment methods */
#payment { margin-top: 18px; background: none; border-radius: 0; }
#payment ul.payment_methods { list-style: none; margin: 0 0 14px; padding: 0; border: 0; display: flex; flex-direction: column; gap: 10px; }
#payment ul.payment_methods li {
	border: 1.5px solid var(--line-2); border-radius: var(--r); padding: 14px 16px;
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px; transition: border-color .15s, background .15s;
}
#payment ul.payment_methods li.wc_payment_method input[type="radio"] { accent-color: var(--accent); width: 18px; height: 18px; }
#payment ul.payment_methods li label { font-weight: 700; font-size: 15px; color: var(--ink); margin: 0; display: inline-flex; align-items: center; gap: 8px; }
#payment ul.payment_methods li:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, transparent); }
#payment .payment_box { flex-basis: 100%; font-size: 13px; color: var(--ink-3); background: none; margin: 6px 0 0; padding: 0; }
#payment .payment_box::before { display: none; }
#payment .place-order { margin-top: 16px; padding: 0; }
#payment .woocommerce-terms-and-conditions-wrapper { font-size: 12px; color: var(--ink-3); margin-bottom: 14px; }
#place_order {
	display: inline-flex; align-items: center; justify-content: center; gap: 9px; width: 100%;
	border: 0; border-radius: var(--r-pill); font-weight: 700; font-size: 16px; padding: 16px 28px; line-height: 1;
	background: var(--accent); color: #fff; box-shadow: var(--shadow-accent); cursor: pointer;
	transition: background .15s, transform .12s;
}
#place_order:hover { background: var(--accent-press); }
#place_order:active { transform: translateY(1px); }

/* WooCommerce drops a .blockOverlay over #order_review during each update_checkout; in
   classic checkout the shipping-method radios live under it, so a click during the ~1s
   overlay lands on the overlay and is swallowed ("first click doesn't register" when
   switching couriers). Let clicks pass through to the controls underneath. (Generic WC
   behaviour, fixed store-side — same approach as the Drushop platform.) */
.woocommerce-checkout .blockUI.blockOverlay { pointer-events: none !important; }

/* ---------- checkout: re-skin stock WC billing + order review to the design ---------- */
/* billing fields: drop WC's heading, lay out as a 2-column grid */
.checkout .woocommerce-billing-fields > h3 { display: none; }
.checkout .woocommerce-billing-fields__field-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
/* BG locale renders no form-row-first/last classes, so default every field full-width
   and pair name + phone/email by id into the two columns. */
.checkout .woocommerce-billing-fields__field-wrapper .form-row { grid-column: 1 / -1; margin: 0; padding: 0; }
.checkout #billing_first_name_field { grid-column: 1 / 2; }
.checkout #billing_last_name_field  { grid-column: 2 / 3; }
.checkout #billing_phone_field      { grid-column: 1 / 2; }
.checkout #billing_email_field      { grid-column: 2 / 3; }
@media (max-width: 560px) {
	.checkout .woocommerce-billing-fields__field-wrapper { grid-template-columns: 1fr; }
	.checkout #billing_first_name_field, .checkout #billing_last_name_field,
	.checkout #billing_phone_field, .checkout #billing_email_field { grid-column: 1 / -1; }
}

/* order-review table -> clean rows */
.woocommerce-checkout-review-order-table { width: 100%; display: block; }
.woocommerce-checkout-review-order-table thead { display: none; }
.woocommerce-checkout-review-order-table tbody, .woocommerce-checkout-review-order-table tfoot { display: block; }
.woocommerce-checkout-review-order-table tr { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.woocommerce-checkout-review-order-table .cart_item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.woocommerce-checkout-review-order-table .product-name { font-size: 14px; color: var(--ink); font-weight: 600; line-height: 1.4; }
.woocommerce-checkout-review-order-table .product-total { white-space: nowrap; font-weight: 700; color: var(--ink); }
.woocommerce-checkout-review-order-table tfoot tr { padding: 9px 0; }
.woocommerce-checkout-review-order-table tfoot th { font-weight: 600; color: var(--ink-2); text-align: left; }
.woocommerce-checkout-review-order-table tfoot td { font-weight: 700; text-align: right; color: var(--ink); }
.woocommerce-checkout-review-order-table .order-total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 14px; }
.woocommerce-checkout-review-order-table .order-total th { font-size: 16px; font-weight: 800; color: var(--ink); }
.woocommerce-checkout-review-order-table .order-total .amount,
.woocommerce-checkout-review-order-table .order-total td { font-size: 18px; font-weight: 800; color: var(--ink); }

/* shipping row: label on top, courier methods as accent cards */
.woocommerce-checkout-review-order-table .woocommerce-shipping-totals { flex-direction: column; align-items: stretch; gap: 9px; padding: 12px 0; }
.woocommerce-checkout-review-order-table .woocommerce-shipping-totals > th { font-size: 13px; font-weight: 700; color: var(--ink-2); }
/* On mobile the radios move to the top card, so this row shows only the read-only
   shipping cost — render it like the other summary rows (label left, price right). */
@media (max-width: 980px) {
  .woocommerce-checkout-review-order-table .woocommerce-shipping-totals { flex-direction: row; align-items: baseline; gap: 12px; }
  .woocommerce-checkout-review-order-table .woocommerce-shipping-totals > th { font-size: 15px; font-weight: 600; }
  .woocommerce-checkout-review-order-table .woocommerce-shipping-totals > td { font-weight: 700; text-align: right; color: var(--ink); }
}
/* While the courier re-quotes (form gets .dru-recalc), skeleton the changing
   prices (shipping + grand total) so the buyer never sees intermediate values
   flicker — e.g. the address→office price on page reload. */
@keyframes dru-skel { 0%, 100% { opacity: .45; } 50% { opacity: .8; } }
.checkout.dru-recalc #dru-ship-top .woocommerce-Price-amount,
.checkout.dru-recalc .woocommerce-shipping-totals .woocommerce-Price-amount,
.checkout.dru-recalc .order-total .woocommerce-Price-amount {
	color: transparent !important; background: var(--line-2); border-radius: 5px;
	display: inline-block; animation: dru-skel 1.1s ease-in-out infinite;
}

ul#shipping_method { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
ul#shipping_method li {
	display: flex; align-items: center; gap: 11px; margin: 0;
	background: var(--surface); border: 1.5px solid var(--line-2); border-radius: var(--r);
	padding: 12px 14px; cursor: pointer; transition: border-color .15s, background .15s;
}
ul#shipping_method li:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, transparent); }
ul#shipping_method li input[type="radio"] { accent-color: var(--accent); width: 18px; height: 18px; flex: none; margin: 0; }
ul#shipping_method li label { margin: 0; font-weight: 700; font-size: 14px; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
ul#shipping_method li label .amount { margin-left: auto; font-weight: 700; }
/* the courier pickers (city/office/map) injected after the radios */
ul#shipping_method li .form-row, .woocommerce-shipping-totals .form-row { width: 100%; margin: 8px 0 0; }

/* the [hidden] attribute must win over component display rules (.empty, .sort-menu, etc.) */
[hidden] { display: none !important; }

/* The design's .hdr-top-inner uses `padding: 16px 0`, which overrides the .shell's
   horizontal padding -> the logo goes flush-left once the burger hides (desktop widths).
   Restore the shell's horizontal padding (vertical stays from the base rule). */
.hdr-top-inner { padding-left: 24px !important; padding-right: 24px !important; }
@media (max-width: 640px) { .hdr-top-inner { padding-left: 16px !important; padding-right: 16px !important; } }

/* hand the header to the burger/mobile-search a touch earlier (≤840) — that's where
   the full category nav stops fitting; avoids a sliver of overflow at the edge. */
@media (max-width: 840px) {
	.hdr-nav { display: none; }
	.hdr-burger { display: inline-flex; }
	.hdr-search-wrap { display: none; }
	.hdr-search-mobile { display: block; }
	.hdr-action-label { display: none; }
}

/* tablet / landscape-phone (nav still shown, ~841-980px): tighten the category nav
   so "Топ оферти" doesn't overflow the row into a horizontal scroll */
@media (max-width: 980px) {
	.hdr-nav-inner { gap: 4px; }
	.nav-links { gap: 0; margin-left: 4px; }
	.nav-links a { padding: 8px 9px; font-size: 13.5px; white-space: nowrap; }
	.nav-all { padding: 9px 13px; white-space: nowrap; }
	.nav-deals { padding: 8px 6px; white-space: nowrap; }
}

/* small phones: tighten the header top row so actions don't overflow the wordmark */
@media (max-width: 400px) {
	.hdr-top-inner { gap: 8px; }
	.hdr-actions { gap: 0; }
	.hdr-action { padding: 4px 3px; }
	.hdr-action .icon-btn { width: 36px; height: 36px; }
	.wm-link .wordmark { font-size: 21px; }
}

/* The design's .fade-in entrance animates `transform` with fill-mode `both`. A
   forwards-filling transform animation makes the element a CONTAINING BLOCK for
   position:fixed descendants (Chrome), so the mobile filter drawer (.cat-side.is-open)
   and its scrim — both position:fixed — anchored to .shell instead of the viewport:
   the drawer stretched to full page height (scrollHeight==clientHeight, unscrollable)
   and its "Покажи продуктите" button fell below the fold. Re-define the entrance as
   opacity-only (no transform) so fixed positioning is viewport-relative again. The only
   loss is the subtle 8px slide-up; the fade is preserved.
   NO fill-mode: a forwards-filling opacity animation also keeps a STACKING CONTEXT
   alive forever (Chrome), which trapped the drawer's z-index:110 inside .shell — the
   sticky header (z-index:60) painted over the drawer head, making its ✕ untappable.
   Without fill, the animation (and its stacking context) ends at .4s and the
   element's natural opacity:1 takes over. */
.fade-in { animation: druFadeIn .4s ease; }
@keyframes druFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- category page: filter rail + mobile drawer ---------- */
/* grid items default to min-width:auto and won't shrink below content -> the 1fr
   column (.cat-main) overflows the viewport. min-width:0 lets it shrink correctly. */
.cat-main { min-width: 0; }
/* 1fr tracks are really minmax(auto,1fr) and refuse to shrink below the items'
   content. Giving the grid ITEMS min-width:0 drops the track minimum to 0 so the
   columns fit the viewport; letting the add-to-cart label wrap removes its hard
   width floor. (Column counts stay as pages.css defines them per breakpoint.) */
.cat-grid, .grid-cards { min-width: 0; }
.cat-grid > .card, .grid-cards > .card { min-width: 0; }
.card-foot .btn { white-space: normal; }
/* Hide WooCommerce's bare AJAX "Преглед на количката" link in product cards — it
   looks unstyled and shifts the card. Feedback is the button's "✓ Добавено" state
   (theme.js) + the header cart badge (fragment). */
.card .added_to_cart, .grid-cards .added_to_cart, .product .added_to_cart.wc-forward { display: none !important; }
/* add-to-cart success state (card buttons + PDP "Добави в количката") */
.add_to_cart_button.is-added, .pdp-buy-form button.is-added { background: var(--ok, #16a34a) !important; color: #fff !important; border-color: transparent !important; }
.add_to_cart_button.is-added svg, .pdp-buy-form button.is-added svg { stroke: #fff; }
/* cart qty stepper / line while its AJAX update is in flight */
[data-dru-qty].is-loading, .cart-line.is-loading { opacity: .5; pointer-events: none; }

/* removed-item undo notice (AJAX remove) */
.dru-cart-notices { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 18px; }
.dru-cart-notices:empty { margin: 0; }
.dru-notice {
	display: flex; align-items: center; gap: 12px;
	background: var(--surface); border: 1px solid var(--line-2); border-left: 4px solid var(--accent);
	border-radius: var(--r); padding: 13px 14px 13px 16px; box-shadow: var(--shadow-sm);
	font-size: 14.5px; color: var(--ink);
	opacity: 0; transform: translateY(-6px); transition: opacity .25s ease, transform .25s ease;
}
.dru-notice.is-in { opacity: 1; transform: none; }
.dru-notice.is-leaving { opacity: 0; transform: translateY(-6px); }
.dru-notice-msg { flex: 1; min-width: 0; }
.dru-notice-undo { font-weight: 700; color: var(--accent); text-decoration: none; white-space: nowrap; }
.dru-notice-undo:hover { text-decoration: underline; }
.dru-notice-close {
	flex: none; width: 28px; height: 28px; border-radius: 50%; border: 0; background: none;
	color: var(--ink-3); font-size: 20px; line-height: 1; cursor: pointer;
}
.dru-notice-close:hover { background: var(--surface-2); color: var(--ink); }

/* ---------- cart drawer (mini-cart) ---------- */
.cart-drawer-scrim {
	position: fixed; inset: 0; z-index: 200; background: rgba(15, 22, 45, .45);
	opacity: 0; transition: opacity .25s ease;
}
.cart-drawer-scrim.is-open { opacity: 1; }
.cart-drawer-scrim[hidden] { display: none; }
.cart-drawer-panel {
	position: absolute; top: 0; right: 0; bottom: 0;
	width: min(420px, 100vw); background: var(--surface);
	display: flex; flex-direction: column;
	box-shadow: var(--shadow-lg);
	transform: translateX(100%); transition: transform .28s ease;
}
.cart-drawer-scrim.is-open .cart-drawer-panel { transform: none; }
.cart-drawer-head {
	flex: none; display: flex; align-items: center; justify-content: space-between;
	padding: 16px 18px; border-bottom: 1px solid var(--line);
}
.cart-drawer-head strong { font-size: 17px; font-weight: 800; }
.dru-minicart-inner { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.mc-body { flex: 1; overflow-y: auto; padding: 6px 18px; }
.mc-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.mc-item.is-loading { opacity: .5; pointer-events: none; }
.mc-thumb { flex: none; width: 60px; height: 60px; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); }
.mc-thumb img, .mc-thumb svg { width: 100%; height: 100%; object-fit: cover; }
.mc-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.mc-title { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.35; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mc-title:hover { color: var(--accent); }
.mc-line2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mc-price { font-weight: 800; font-size: 14px; white-space: nowrap; }
.mc-remove { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; background: none; color: var(--ink-3); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.mc-remove:hover { background: var(--surface-2); color: var(--accent); }
.mc-foot { flex: none; border-top: 1px solid var(--line); padding: 16px 18px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
.mc-total { display: flex; align-items: baseline; justify-content: space-between; font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.mc-total .muted { font-size: 13px; font-weight: 600; }
.mc-continue { background: none; border: 0; color: var(--ink-3); font: inherit; font-size: 13px; cursor: pointer; padding: 4px; }
.mc-continue:hover { color: var(--ink); text-decoration: underline; }
.mc-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 40px 24px; text-align: center; }
.mc-empty-ic { width: 72px; height: 72px; border-radius: 50%; background: var(--surface-2); color: var(--ink-3); display: inline-flex; align-items: center; justify-content: center; }
.mc-empty p { color: var(--ink-2); font-weight: 600; margin: 0; }
.mc-empty .btn { max-width: 260px; }
.cat-title-wrap { display: flex; flex-direction: column; min-width: 0; }
.cat-title { overflow-wrap: anywhere; }

/* dual-handle price range (two overlaid inputs + filled track) */
.price-range-val { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--ink); font-weight: 700; margin-bottom: 10px; }
.dual-range { position: relative; height: 26px; }
.dual-track { position: absolute; top: 50%; left: 0; right: 0; height: 4px; transform: translateY(-50%); background: var(--line-2); border-radius: 2px; }
.dual-fill { position: absolute; top: 0; height: 100%; background: var(--accent); border-radius: 2px; }
.dual-range input[type="range"] {
	position: absolute; top: 0; left: 0; width: 100%; height: 26px; margin: 0;
	-webkit-appearance: none; appearance: none; background: none; pointer-events: none;
}
.dual-range input[type="range"]::-webkit-slider-runnable-track { background: none; border: 0; }
.dual-range input[type="range"]::-moz-range-track { background: none; border: 0; }
.dual-range input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none; pointer-events: auto; width: 20px; height: 20px; margin-top: -8px;
	border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: var(--shadow-sm); cursor: pointer;
}
.dual-range input[type="range"]::-moz-range-thumb {
	pointer-events: auto; width: 20px; height: 20px;
	border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: var(--shadow-sm); cursor: pointer;
}
.dual-range .range-min { z-index: 3; }   /* keep the lower thumb grabbable on overlap */
.dual-range .range-max { z-index: 4; }

.filters-head-actions { display: flex; align-items: center; gap: 8px; }
.filters-close { display: none; width: 38px; height: 38px; }
/* drop the trailing divider line between the last facet group and the sticky
   "Покажи продуктите" button in the mobile drawer */
.filter-group:has(+ .filter-sheet-foot) { border-bottom: 0; }
.filter-sheet-foot { display: none; }      /* mobile-only "show N" button */
.cat-scrim { position: fixed; inset: 0; background: rgba(15, 22, 45, .45); z-index: 105; animation: fadeIn .2s ease; }
.active-chips .chip span { font-size: 11px; opacity: .8; }

@media (max-width: 980px) {
	/* CLOSED: stays display:none (from pages.css) — no off-screen box, so no phantom
	   horizontal scroll. OPEN: becomes a fixed right-hand drawer, fading in (opacity
	   only — never an off-screen transform that would extend the scroll width). */
	.cat-side.is-open {
		display: block;
		position: fixed; top: 0; right: 0; bottom: 0;
		width: min(90vw, 360px);
		background: var(--surface);
		z-index: 110;
		overflow-y: auto;
		box-shadow: var(--shadow-lg);
		padding: 0 18px 18px;
		animation: druDrawerIn .2s ease;
	}
	.cat-side.is-open .filters-head { position: sticky; top: 0; background: var(--surface); padding-top: 18px; z-index: 1; }
	.cat-side.is-open .filter-sheet-foot { display: block; position: sticky; bottom: 0; background: var(--surface); padding: 16px 0 4px; margin-top: 8px; border-top: 0; }
	.filters-close { display: inline-flex; }
}
@keyframes druDrawerIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Speedy / Econt picker buttons + modals -> druoutlet brand ---------- */
/* WC default buttons used by the pickers (e.g. "Избери от карта") */
.checkout .button, .econt-modal .button, .speedy-modal .button, .drushfe-map-modal .button, .drushfe-map-popup .button {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: inherit;
	background: var(--surface); color: var(--ink); border: 1.5px solid var(--line-2);
	border-radius: var(--r-pill); padding: 11px 18px; font-weight: 700; font-size: 14px; line-height: 1; cursor: pointer; white-space: nowrap;
}
.checkout .button:hover { border-color: var(--ink); background: var(--surface-2); }
.button-primary, .drushfe-map-popup__pick, .econt-modal .button-primary, .speedy-modal .button-primary, .drushfe-map-modal .button-primary {
	background: var(--accent) !important; color: #fff !important; border-color: transparent !important; box-shadow: var(--shadow-accent);
}
.button-primary:hover, .drushfe-map-popup__pick:hover { background: var(--accent-press) !important; }

/* modal cards */
.econt-modal-content, .speedy-modal-content, .drushfe-map-modal__content {
	background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
	max-width: 560px; width: calc(100% - 32px); max-height: 88vh; overflow: auto; font-family: var(--sans); color: var(--ink);
}
.drushfe-map-modal__content { max-width: 900px; }
.econt-modal-header, .speedy-modal-header, .drushfe-map-modal__title-bar, .drushfe-map-modal__title {
	display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line);
	font-size: 18px; font-weight: 800; color: var(--ink); margin: 0;
}
.econt-modal-title, .speedy-modal-title { font-size: 18px; font-weight: 800; color: var(--ink); margin: 0; }
.econt-close, .speedy-close, .drushfe-map-modal__close {
	width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface);
	display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); font-size: 18px; line-height: 1;
}
.econt-close:hover, .speedy-close:hover, .drushfe-map-modal__close:hover { border-color: var(--ink); }
.econt-modal-body, .speedy-modal-body { padding: 20px 22px; }

/* service-type options (до адрес / офис / автомат) */
.econt-service-option, .speedy-service-option {
	display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line-2); border-radius: var(--r);
	padding: 14px 16px; margin-bottom: 10px; cursor: pointer; font-weight: 600; color: var(--ink); transition: border-color .15s, background .15s;
}
.econt-service-option:hover, .speedy-service-option:hover { border-color: var(--ink-3); }
.econt-service-option.is-selected, .speedy-service-option.is-selected,
.econt-service-option:has(input:checked), .speedy-service-option:has(input:checked) {
	border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, transparent);
}

/* Econt map modal bits */
.drushfe-map-modal__map { border-radius: var(--r); overflow: hidden; }
.drushfe-map-modal__search input, .drushfe-map-modal__search-wrap input {
	width: 100%; border: 1px solid var(--line-2); border-radius: var(--r); padding: 12px 14px; font-size: 15px; font-family: inherit; color: var(--ink);
}
.drushfe-map-modal__search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.drushfe-map-modal__radio-label {
	display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; margin: 0 6px 6px 0;
	border: 1px solid var(--line-2); border-radius: var(--r-pill); cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-2);
}
.drushfe-map-modal__suggestions { border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-md); }
.drushfe-map-modal__sug-name { font-weight: 700; color: var(--ink); }

/* select2 dropdowns -> our input look */
.checkout .select2-container--default .select2-selection--single {
	border: 1px solid var(--line-2) !important; border-radius: var(--r) !important; height: 48px !important; display: flex !important; align-items: center; padding: 0 12px;
}
.checkout .select2-container--default .select2-selection__rendered { color: var(--ink) !important; line-height: 1.4 !important; padding: 0 !important; }
.select2-results__option--highlighted { background: var(--accent) !important; }

/* Speedy injects its офис/адрес cascade into the address column. Tidy spacing and
   relabel its one hardcoded English <label> (checkout.js outputs "Delivery Method"
   directly, bypassing i18n — can't be caught by gettext, so swap the text in CSS). */
#speedy-delivery-type-field, #speedy-office-field, #speedy-service-field, #speedy-map-button-wrapper { margin-top: 12px; }
#speedy-delivery-type-field > label { font-size: 0; display: block; margin-bottom: 8px; }
#speedy-delivery-type-field > label::before {
	content: "Начин на доставка"; font-size: 13px; font-weight: 700; color: var(--ink-2); letter-spacing: 0;
}
/* Delivery-type radios: the plugin renders them as separate input+label siblings
   (input,label,input,label…). A flex row wraps them independently, so on a narrow
   screen a radio gets stranded next to the wrong label. A 2-column grid keeps each
   radio locked to its own label on its own row, on every screen size. */
#speedy-delivery-type-wrapper, #econt-delivery-type-wrapper {
	display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 11px 9px;
}
#speedy-delivery-type-wrapper label, #econt-delivery-type-wrapper label {
	margin: 0 !important; font-weight: 600; font-size: 14px; color: var(--ink); cursor: pointer;
}
#speedy-delivery-type-wrapper input[type="radio"], #econt-delivery-type-wrapper input[type="radio"] {
	margin: 0 !important; accent-color: var(--accent); width: 18px; height: 18px;
}

/* ---------- checkout: courier shipping methods (Speedy / Econt) ---------- */
.dru-shipping { margin: 4px 0; }
.dru-shipping-title { font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 10px; }
.dru-ship-method {
	display: flex; align-items: center; gap: 11px; position: relative;
	background: var(--surface); border: 1.5px solid var(--line-2); border-radius: var(--r);
	padding: 13px 14px; margin-bottom: 8px; cursor: pointer;
	transition: border-color .15s, background .15s;
}
.dru-ship-method:hover { border-color: var(--ink-3); }
/* Selected state follows the actual :checked radio via :has only — the radios live in
   block 2 (not reloaded by update_checkout), so any server-set class would go stale and
   stay lit after switching (both rows glowing). :has tracks the real, mutually-exclusive
   radio state, so exactly one row is ever accented. */
.dru-ship-method:has(input.shipping_method:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, transparent); }
.dru-ship-method input.shipping_method { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.dru-ship-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; position: relative; }
.dru-ship-method:has(input.shipping_method:checked) .dru-ship-radio { border-color: var(--accent); }
.dru-ship-method:has(input.shipping_method:checked) .dru-ship-radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
.dru-ship-label { font-weight: 700; font-size: 14px; color: var(--ink); line-height: 1.3; }

/* ---------- PDP: prevent the buy row from blowing out the mobile column ---------- */
.pdp-info, .pdp-gallery { min-width: 0; }
/* mobile: tabs scroll horizontally instead of wrapping unevenly */
@media (max-width: 640px) {
	.pdp-tabs .tabbar { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
	.pdp-tabs .tabbar::-webkit-scrollbar { display: none; }
	.pdp-tabs .tab { white-space: nowrap; flex: none; padding: 14px 14px; }
}
.pdp-buy { min-width: 0; }
.pdp-buy .btn { white-space: normal; min-width: 0; }
@media (max-width: 480px) {
	/* keep add-to-cart on one line beside the qty stepper: drop the (redundant) icon,
	   tighten padding so it matches the stepper height instead of wrapping to 2 lines */
	.pdp-buy .btn { flex: 1; white-space: nowrap; padding-left: 14px; padding-right: 14px; }
	.pdp-buy .btn svg { display: none; }
}

/* ---------- FiboSearch header bar + suggestions -> druoutlet look ---------- */
.dru-fibo, .dru-fibo .dgwt-wcas-search-wrapp { width: 100%; }
.dru-fibo .dgwt-wcas-search-wrapp { max-width: none; height: 50px; }
.dru-fibo .dgwt-wcas-search-form {
	display: flex; align-items: stretch; height: 50px; margin: 0;
	border: 1.5px solid var(--ink); border-radius: var(--r-pill);
	background: var(--surface); overflow: hidden; position: relative;
}
.dru-fibo .dgwt-wcas-search-input[type="search"] {
	flex: 1; border: 0 !important; outline: 0 !important; background: none !important;
	height: 46px !important; line-height: 46px !important; padding: 0 18px !important;
	font-family: inherit !important; font-size: 15px !important; color: var(--ink) !important; box-shadow: none !important;
}
.dru-fibo .dgwt-wcas-search-form button.dgwt-wcas-search-submit {
	position: absolute !important; top: 50% !important; right: 4px !important; bottom: auto !important; left: auto !important;
	transform: translateY(-50%) !important;
	width: 50px !important; min-width: 0 !important; height: 40px !important; min-height: 0 !important;
	margin: 0 !important; padding: 0 !important; line-height: 1 !important;
	border: 0 !important; border-radius: var(--r-pill) !important;
	background: var(--accent) !important; color: #fff !important;
	display: flex !important; align-items: center !important; justify-content: center !important; cursor: pointer; box-shadow: none !important;
}
.dru-fibo .dgwt-wcas-search-submit:hover { background: var(--accent-press) !important; }
.dru-fibo .dgwt-wcas-search-submit .dgwt-wcas-ico-magnifier { width: 19px; height: 19px; fill: #fff !important; }
.dru-fibo .dgwt-wcas-preloader { right: 70px !important; }
.dru-fibo .dgwt-wcas-voice-search,
.dru-fibo .dgwt-wcas-search-icon-arrow,
.dru-fibo .dgwt-wcas-voicesearch { display: none !important; }
.dru-fibo .dgwt-wcas-sf-wrapp { display: flex; align-items: center; width: 100%; }
.dru-fibo .dgwt-wcas-search-submit::before,
.dru-fibo .dgwt-wcas-search-submit::after { display: none !important; }

/* suggestions dropdown (appended to body) */
.dgwt-wcas-suggestions-wrapp {
	border: 1px solid var(--line) !important; border-radius: var(--r) !important;
	box-shadow: var(--shadow-lg) !important; background: var(--surface) !important; padding: 6px !important; margin-top: 6px !important;
}
.dgwt-wcas-suggestion { border-radius: var(--r-sm) !important; padding: 9px 10px !important; }
.dgwt-wcas-suggestion:hover, .dgwt-wcas-suggestion.dgwt-wcas-suggestion-hovered { background: var(--surface-2) !important; }
.dgwt-wcas-st-title { color: var(--ink) !important; font-weight: 600 !important; font-size: 14px !important; }
.dgwt-wcas-st-title mark, .dgwt-wcas-highlight { background: color-mix(in srgb, var(--accent) 18%, transparent) !important; color: inherit !important; padding: 0 1px; border-radius: 3px; }
.dgwt-wcas-sp, .dgwt-wcas-product-price { color: var(--accent-ink) !important; font-weight: 700 !important; }
.dgwt-wcas-sku { font-family: var(--mono) !important; color: var(--ink-3) !important; font-size: 11.5px !important; }
.dgwt-wcas-si img { border-radius: var(--r-sm) !important; }
.dgwt-wcas-suggestion-more { color: var(--accent-ink) !important; font-weight: 700 !important; }

/* ---------- FacetWP facets -> druoutlet filter-rail look ---------- */
/* FacetWP's front.css sets .facetwp-facet{margin-bottom:40px}; !important beats it.
   Inter-section spacing comes from .filter-group padding+border, so facets within a
   group (on_sale + in_stock under "Оферти") sit tight instead of 40px apart. */
.facetwp-facet { margin: 0 !important; display: block; }

/* checkbox facets (brand, on_sale, in_stock) */
.facetwp-checkbox {
	display: flex; align-items: center; gap: 11px;
	padding: 7px 10px; border-radius: var(--r-sm);
	font-size: 14.5px; color: var(--ink-2); cursor: pointer;
	background: none !important; position: relative;
}
.facetwp-checkbox:hover { background: var(--surface-2) !important; }
.facetwp-checkbox::before {
	content: ""; width: 19px; height: 19px; border-radius: 5px; flex: none;
	border: 1.5px solid var(--line-2); background: var(--surface);
	transition: background .15s, border-color .15s;
}
.facetwp-checkbox.checked { color: var(--ink); font-weight: 600; }
.facetwp-checkbox.checked::before {
	border-color: var(--accent);
	background: var(--accent) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="m5 12 5 5 9-10"/></svg>') center / 13px no-repeat;
}
.facetwp-checkbox.disabled { opacity: .45; }
.facetwp-counter { margin-left: auto; font-size: 12.5px; color: var(--ink-3); font-weight: 500; }

/* hierarchy facet (category) -> like .filter-radio */
.facetwp-type-hierarchy .facetwp-link {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	padding: 8px 10px; border-radius: var(--r-sm);
	font-size: 14.5px; font-weight: 500; color: var(--ink-2); text-decoration: none;
}
.facetwp-type-hierarchy .facetwp-link:hover { background: var(--surface-2); color: var(--ink); }
.facetwp-type-hierarchy .facetwp-link.checked { background: var(--ink); color: #fff; font-weight: 700; }
.facetwp-type-hierarchy .facetwp-counter { color: inherit; opacity: .7; }
.facetwp-type-hierarchy .facetwp-depth { margin-left: 10px; }

/* price slider (noUiSlider) */
.facetwp-type-slider .noUi-target { border: 0; box-shadow: none; background: var(--line-2); height: 4px; border-radius: 2px; margin: 14px 8px 0; }
.facetwp-type-slider .noUi-connect { background: var(--accent); }
.facetwp-type-slider .noUi-handle {
	width: 20px; height: 20px; right: -10px; top: -8px; border-radius: 50%;
	background: var(--accent); border: 3px solid #fff; box-shadow: var(--shadow-sm); cursor: pointer;
}
.facetwp-type-slider .noUi-handle::before, .facetwp-type-slider .noUi-handle::after { display: none; }
.facetwp-type-slider .facetwp-slider-label { margin: 12px 0 4px; font-size: 13px; font-weight: 700; color: var(--ink); text-align: left; }
.facetwp-type-slider .facetwp-slider-reset {
	background: none; border: 0; color: var(--accent-ink); font-weight: 700; font-size: 13px; padding: 6px 0 0; cursor: pointer;
}

/* sort facet (dropdown) */
.dru-sort { position: relative; display: flex; align-items: center; }
.dru-sort .facetwp-facet { margin: 0 !important; }   /* FacetWP adds a bottom margin -> misaligns the toolbar row */
.dru-sort .facetwp-type-sort select, .dru-sort select, .facetwp-type-sort select {
	appearance: none; -webkit-appearance: none; background: var(--surface);
	border: 1px solid var(--line-2); border-radius: var(--r-pill);
	height: 40px; margin: 0 !important; padding: 0 38px 0 16px;
	font-family: inherit; font-weight: 700; font-size: 14px; color: var(--ink); cursor: pointer;
}

/* ---------- cart: coupon + actions row (custom classes) ---------- */
.cart-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.cart-coupon { display: flex; gap: 8px; flex: 1; min-width: 240px; max-width: 360px; }
.cart-coupon .input { flex: 1; }
.cart-coupon .btn { flex: none; }
.dru-cart-update { white-space: nowrap; }
.cart-line-mid { min-width: 0; }
@media (max-width: 560px) {
	.cart-actions { flex-direction: column; align-items: stretch; }
	.cart-coupon { max-width: none; }
}

/* ---------- trust strip: marquee on mobile, spread row on desktop ---------- */
.trust-dupe { display: none; }                 /* duplicate set hidden by default (desktop) */
.trust-strip { overflow: hidden; }

@media (max-width: 820px) {
	.trust-strip-inner {
		justify-content: flex-start;
		flex-wrap: nowrap;
		width: max-content;
		max-width: none;
		margin: 0;
		padding-left: 0; padding-right: 0;
		overflow: visible;
		animation: dru-trust-marquee 22s linear infinite;
	}
	.trust-strip-inner:hover { animation-play-state: paused; }
	.trust-strip-item { padding: 0 18px; }
	.trust-dupe { display: inline-flex; }       /* show duplicate set for seamless loop */
}

@keyframes dru-trust-marquee {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

/* respect reduced-motion: no animation, wrap & center instead */
@media (max-width: 820px) and (prefers-reduced-motion: reduce) {
	.trust-strip-inner { animation: none; width: auto; flex-wrap: wrap; justify-content: center; row-gap: 6px; padding: 4px 16px; }
	.trust-dupe { display: none; }
}

/* ---------- mobile polish ---------- */
@media (max-width: 640px) {
	/* stack section header so the "see all" link drops below the heading, left-aligned */
	.section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
	.section-head .section-link { align-self: flex-start; }

	/* shorter card image on mobile -> price/CTA sit higher, more visible per swipe */
	.card .ph { aspect-ratio: 4 / 3; }
}

/* native category <select> styled as the design's cat button */
.search-cat { display: flex; align-items: center; }
.search-cat-select {
	appearance: none; -webkit-appearance: none; -moz-appearance: none;
	height: 100%;
	background: var(--surface-2);
	border: 0; border-right: 1px solid var(--line-2);
	border-radius: var(--r-pill) 0 0 var(--r-pill);
	padding: 0 38px 0 20px;
	font-family: inherit; font-weight: 600; font-size: 14px; color: var(--ink);
	white-space: nowrap; cursor: pointer;
}
.search-cat-select:hover { background: var(--surface-3); }
.search-cat-select:focus { outline: none; }
.search-cat-chev { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--ink-2); }
@media (max-width: 720px) {
	.search-cat-select { max-width: 132px; }
}

/* ============================ MY ACCOUNT ============================ */
/* Logged-out: login + register side by side as cards. */
.woocommerce-account #customer_login { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 940px; }
.woocommerce-account #customer_login > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; }
.woocommerce-account #customer_login h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 18px; }

.woocommerce-account form.woocommerce-form .form-row { margin: 0 0 16px; padding: 0; }
.woocommerce-account form.woocommerce-form label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.woocommerce-account form.woocommerce-form label .required { color: var(--accent-ink); border: 0; text-decoration: none; }
.woocommerce-account form.woocommerce-form .input-text {
	width: 100%;
	border: 1px solid var(--line-2);
	background: var(--surface);
	border-radius: var(--r);
	padding: 12px 14px;
	font: inherit;
	font-size: 14.5px;
}
.woocommerce-account form.woocommerce-form .input-text:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.woocommerce-account form.woocommerce-form button.button {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	background: var(--accent); color: #fff; border: 0; border-radius: 999px;
	padding: 13px 26px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
}
.woocommerce-account form.woocommerce-form button.button:hover { background: var(--accent-press); }
.woocommerce-account .woocommerce-form-login__rememberme { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.woocommerce-account .lost_password { margin: 14px 0 0; font-size: 14px; }
.woocommerce-account .lost_password a { color: var(--accent-ink); font-weight: 600; }
.woocommerce-account .woocommerce-privacy-policy-text p { font-size: 13.5px; color: var(--ink-3); line-height: 1.5; }

/* Logged-in: nav rail + content. */
.woocommerce-account .woocommerce-MyAccount-navigation { float: none; width: auto; margin-bottom: 8px; }
.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; margin: 0 0 26px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.woocommerce-account .woocommerce-MyAccount-navigation li a {
	display: inline-block; padding: 9px 16px; border: 1px solid var(--line-2); border-radius: 999px;
	font-size: 14px; font-weight: 600; color: var(--ink-2); background: var(--surface);
}
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation li a:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.woocommerce-account .woocommerce-MyAccount-content { float: none; width: auto; max-width: 940px; }
.woocommerce-account .woocommerce-MyAccount-content > p { line-height: 1.6; color: var(--ink-2); }
.woocommerce-account .woocommerce-MyAccount-content a { color: var(--accent-ink); font-weight: 600; }

@media (max-width: 760px) {
	.woocommerce-account #customer_login { grid-template-columns: 1fr; }
}

/* ============================ REAL PRODUCT IMAGES ============================ */
/* .ph-real keeps the placeholder's frame but shows an actual photo on white. */
.ph-real { background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ph-real img { width: 100%; height: 100%; object-fit: contain; padding: 8%; box-sizing: border-box; }
.pdp-thumb .ph-real { width: 100%; height: 100%; padding: 0; }
.pdp-stage .ph-real { aspect-ratio: 1/1; width: 100%; }

/* Small supplier thumbnails (Polycomp = 160px): don't blow them up to full
   stage width — a modest cap reads "small but sharp" instead of "big blur".
   .ph-small is added by single-product.php only when the ORIGINAL is small. */
.pdp-stage .ph-real.ph-small img { max-width: min(100%, 340px); max-height: 340px; margin: auto; }

/* Facet groups that can be empty for a listing (Памет on TVs etc.) — hide the
   whole titled group when FacetWP renders no choices inside it. */
.filter-group[data-facet-optional]:has(.facetwp-facet:empty) { display: none; }

/* ============================ VARIANT CHIPS (Phase 1) ============================ */
.pdp-variants { display: flex; align-items: flex-start; gap: 12px; margin: 14px 0 4px; }
.pdp-variant-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-chip {
	display: inline-block; padding: 7px 14px; border: 1px solid var(--line-2);
	border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--ink-2);
	background: var(--surface);
}
a.variant-chip:hover { border-color: var(--accent); color: var(--accent-ink); }
.variant-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
