/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/

/* ===== Checkout: order notes always at the very bottom ===== */
/* The compact form sits in the billing column; the notes stay at the bottom. */
form.woocommerce-checkout > .woocommerce-additional-fields {
	order: 100;
	flex: 1 1 100%;
	max-width: 100%;
	width: 100%;
	margin-top: 24px;
}

/* The page title is removed, but the body is .wd-header-overlap (the header floats over
   the content) — the title used to provide the top spacing. We add it back so the form
   doesn't collide with the header. (Mirror of the cart fix — same header.) */
body.woocommerce-checkout #main-content {
	padding-bottom: 60px;
}
@media (min-width: 1025px) {
	body.woocommerce-checkout.wd-header-overlap #main-content {
		padding-top: calc(var(--wd-header-h, 100px) + 50px);
	}
}
@media (max-width: 1024px) {
	/* A fixed value, NOT --wd-header-h (that carries the desktop ~199px). The compact
	   mobile/tablet header is ~98px — 40px didn't clear it and the "Order details"
	   heading tucked under the menu (visible on tablet/mobile). */
	body.woocommerce-checkout #main-content {
		padding-top: 115px;
	}
}

/* "PLACE ORDER" button — moderately rounded. WoodMart reads --btn-accented-brd-radius
   (default 0 = rectangular); we set the variable so it rounds, hover included. */
body.woocommerce-checkout #place_order {
	--btn-accented-brd-radius: 30px;
}

/* ===== Header: solid dark background on cart/checkout + legal pages =======
   The overlap header is transparent with light elements (whb-color-light) — it works over
   dark heroes, but where the dark page-title bar is removed (cart/checkout, and the plain
   legal pages: Доставка / Поверителност / Общи условия / Връщане), the white logo/menu get
   lost over the light content until scroll. We give the main row (.whb-general-header) a
   solid dark background there (as it gets on scroll/sticky). The top bar (brown) and other
   pages (categories with a dark title bar) are left untouched. `km-solid-header` is added
   to the legal pages by kafe_mashini_solid_header_body_class() in functions.php (by slug).
   `!important`, because WoodMart forces transparency with a high-specificity rule
   (body:not(.single-product) .whb-overcontent:not(.whb-sticked) .whb-row:not(.whb-with-bg),
   0-5-1) only in the non-scrolled state. */
body.woocommerce-cart .whb-general-header,
body.woocommerce-checkout .whb-general-header,
body.km-solid-header .whb-general-header {
	background-color: #0a0a0a !important;
}

/* ==========================================================================
   Custom widget styles — WoodMart widgets, styled via an Elementor CSS class.
   Convention: the class is added in Elementor (Advanced → CSS Classes), the style is here.
   No Elementor Pro. Brand values: blue #0054AC, Montserrat / Lato.
   ========================================================================== */

/* --- home-search : wd_search (the home page search) --------------------- */
.home-search form.searchform {
	border: 1px solid #e3e3e3;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0, 84, 172, .06);
	transition: border-color .25s ease, box-shadow .25s ease;
}
.home-search form.searchform:focus-within {
	border-color: #0054AC;
	box-shadow: 0 4px 16px rgba(0, 84, 172, .14);
}
.home-search form.searchform input.s {
	font-family: "Lato", sans-serif;
	font-size: 15px;
	padding-left: 20px;
}
.home-search button.searchsubmit {
	background-color: #0054AC;
	color: #fff;
	padding: 0 22px;
	transition: background-color .25s ease;
}
.home-search button.searchsubmit:hover {
	background-color: #003f80;
}
.home-search button.searchsubmit span {
	color: #fff;
}

/* --- products-wire : wd_products ("Popular components" grid) ------------ */
.products-wire .wd-product .wd-product-wrapper {
	border: 1px solid #ececec;
	border-radius: 12px;
	padding: 10px;
	background: #fff;
	transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.products-wire .wd-product:hover .wd-product-wrapper {
	transform: translateY(-6px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, .10);
	border-color: #d9e6f3;
}
.products-wire .wd-product-thumb {
	border-radius: 10px;
	overflow: hidden;
}
.products-wire .wd-entities-title {
	font-family: "Montserrat", sans-serif;
	font-weight: 600;
}
.products-wire .wd-entities-title a:hover {
	color: #0054AC;
}
.products-wire .wrapp-product-price .price {
	color: #0054AC;
	font-weight: 700;
	font-size: 1.05em;
}
.products-wire .wd-product-cats a {
	color: #9a9a9a;
}

/* --- logo-footer : floating animation of the footer logo -------------------- */
@keyframes kafe-logo-float {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-10px); }
}
.logo-footer img {
	animation: kafe-logo-float 3s ease-in-out infinite;
	will-change: transform;
}
/* Accessibility: stop the animation for "reduce motion" */
@media (prefers-reduced-motion: reduce) {
	.logo-footer img {
		animation: none;
	}
}

/* --- Add-to-cart button in product cards — color + rounding (global) ----
   WoodMart reads the color/radius from CSS variables, so we override those —
   it works regardless of specificity and covers all hover types. */
.wd-product .wd-add-btn {
	--btn-accented-bgcolor: #884329;
	--btn-accented-bgcolor-hover: #6d3521;
	--btn-accented-brd-radius: 20px;
}

/* --- Side cart: match the rounding of the "CHECKOUT" button ----
   Checkout is an accented button (radius from --btn-accented-brd-radius = 0), while
   "View cart" is a default button (--btn-default-brd-radius = 35px). */
.cart-widget-side .shopping-cart-widget-footer .buttons a.checkout {
	--btn-accented-brd-radius: 35px;
}

/* --- Side cart: blurred background behind the overlay -------------------
   WoodMart dims the screen with a solid overlay (rgba(0,0,0,.7)). We add a light
   blur behind it; we lower the opacity to .4 so the blur is visible. We scope it
   to the opened state so there's no effect/GPU cost while it's hidden. */
.wd-close-side.wd-close-side-opened {
	background-color: rgba(0, 0, 0, 0.4);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

/* ==========================================================================
   Footer — responsiveness (tablet ≤1024 / mobile ≤767).
   The columns already stack via Elementor; here we clip the overflowing shape divider
   and tidy the stacked view. Scoped to .wd-footer — no Elementor class.
   ========================================================================== */

/* 1) Fix: the decorative shape divider up top overflows in width (SVG path = 1920px).
   Applies at all sizes — the shape is fixed at 1920px and causes horizontal
   scroll on narrower desktop screens too (laptops 1280–1440), not just mobile. */
.wd-footer .elementor-shape-top,
.wd-footer .elementor-shape {
	overflow: hidden;
}

/* 2) The stacked columns — centered and tidy */
@media (max-width: 1024px) {
	.wd-footer .elementor-29178 .e-con-inner > .e-con {
		text-align: center;
		align-items: center;
	}
	.wd-footer .elementor-29178 .e-con-inner > .e-con + .e-con {
		margin-top: 28px;
	}
}

/* 3) Mobile — the copyright bar in a single centered column */
@media (max-width: 767px) {
	.wd-footer .wd-copyrights .container {
		grid-template-columns: 1fr;
		text-align: center;
		row-gap: 8px;
	}
}

/* ==========================================================================
   Header: "ЧАСТИ" (Parts) full-width dropdown → compact vertical menu.
   The category dropdown is set to full-width (inline sub-items); here we
   shrink it to a narrow vertical list with a branded background. Only this dropdown is
   full-width, so we scope it structurally.
   ========================================================================== */
.whb-header li.item-level-0 > .wd-dropdown-menu.wd-design-full-width {
	left: 0;
	width: auto;
	min-width: 230px;
	max-width: 320px;
	background-color: #74351eba; /* a bit lighter than #884329 */
	padding: 8px 0;
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
/* keep the inner WoodMart .container from forcing width/centering */
.whb-header li.item-level-0 > .wd-dropdown-menu.wd-design-full-width .container {
	width: auto;
	max-width: none;
	min-width: 0;
	padding: 0;
	margin: 0;
}
/* the list vertical (one below another) */
.whb-header li.item-level-0 > .wd-dropdown-menu.wd-design-full-width .wd-sub-menu {
	display: block;
	gap: 0;
}
/* smaller, compact links, light text */
.whb-header li.item-level-0 > .wd-dropdown-menu.wd-design-full-width .wd-sub-menu > li > a {
	display: block;
	padding: 7px 16px;
	font-size: 13px;
	white-space: nowrap;
	color: #fff;
}
.whb-header li.item-level-0 > .wd-dropdown-menu.wd-design-full-width .wd-sub-menu > li > a:hover {
	color: #fff;
	background-color: rgba(255, 255, 255, .12);
}

/* ==========================================================================
   Single product page — narrower buttons, a trust row under the price, a phone
   "Quick order" button, and tabs always open (Description | Additional info).
   Paired with the hooks in functions.php. All reversible.
   ========================================================================== */

/* 1) Quantity on its own row → the buttons stack below it, narrower (≤340px).
   (The form stays row+wrap; we set flex-basis on the children — more reliable than column.) */
.single-product form.cart .quantity {
	flex: 0 0 100%;
	max-width: 100%;
	margin-bottom: 12px;
}
.single-product form.cart .single_add_to_cart_button,
.single-product form.cart .kafe-phone-order {
	flex: 0 0 100%;
	max-width: 340px;
}

/* 3) Hide the WoodMart order-form button (replaced by the phone one) */
.single-product .order-form-toggler {
	display: none !important;
}
/* The "Quick order" phone button — brown and rounded like add-to-cart */
.single-product .kafe-phone-order {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 10px;
	background-color: #884329;
	color: #fff;
	border-radius: 20px;
	text-align: center;
}
.single-product .kafe-phone-order:hover {
	background-color: #6d3521;
	color: #fff;
}
.single-product .kafe-phone-order svg {
	width: 18px;
	height: 18px;
	flex: none;
}

/* 2) Hide the short description (replaced by the trust row) */
.single-product .elementor-widget-wd_single_product_short_description {
	display: none;
}
/* Row of benefit icons under the price */
.kafe-trust-row {
	display: flex;
	flex-wrap: wrap;
	gap: 18px 24px;
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
}
.kafe-trust-row li {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #555;
}
.kafe-trust-row svg {
	width: 20px;
	height: 20px;
	color: #884329;
	flex: none;
}

/* 4) Tabs → always open, Description (left) | Additional info (right) */
.single-product .woocommerce-tabs .wd-nav-tabs-wrapper {
	display: none;
}
.single-product .woocommerce-tabs #tab-28948_custom,
.single-product .woocommerce-tabs #tab-title-28948_custom {
	display: none !important; /* fallback, if the PHP filter isn't applied */
}
.single-product .woocommerce-tabs .woocommerce-Tabs-panel {
	display: block !important;
}
.single-product .woocommerce-tabs {
	display: grid;
	/* Exactly two panels here (Description | Additional info): the Reviews tab is disabled and the
	   shipping tab is filtered out, so a fixed two-column grid is correct and avoids the
	   single-column window that repeat(auto-fit, …) introduced at some container widths. */
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	align-items: start;
}
.single-product .woocommerce-tabs #tab-description::before {
	content: "Описание";
}
.single-product .woocommerce-tabs #tab-additional_information::before {
	content: "Допълнителна информация";
}
.single-product .woocommerce-tabs .woocommerce-Tabs-panel::before {
	display: block;
	font-family: "Montserrat", sans-serif;
	font-weight: 600;
	font-size: 18px;
	color: #242424;
	margin-bottom: 12px;
}
@media (max-width: 767px) {
	.single-product .woocommerce-tabs {
		grid-template-columns: 1fr;
		gap: 28px;
	}
}

/* ==========================================================================
   repair-timeline — wd_timeline on the "Service and repair" page (29446).
   The service photos fill the visual area of the secondary card; they are
   generated at 3:2 and cropped moderately to keep the timeline compact.
   ========================================================================== */
.repair-timeline .timeline-col-secondary {
	display: flex;
	align-items: stretch;
	justify-content: center;
}
.repair-timeline .timeline-col-secondary .wd-timeline-image {
	display: block;
	width: 100%;
	height: clamp(210px, 23vw, 300px);
	margin: 0;
	overflow: hidden;
	border-radius: inherit;
	background: #e9e2de;
}
.repair-timeline .timeline-col-secondary .wd-timeline-image img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	object-fit: cover;
	object-position: center;
}
.repair-timeline .timeline-col-secondary .wd-timeline-content:empty {
	display: none;
}

@media (max-width: 1024px) {
	.repair-timeline .timeline-col-secondary .wd-timeline-image {
		height: 320px;
	}
}

@media (max-width: 767.98px) {
	.repair-timeline .timeline-col-secondary .wd-timeline-image {
		height: 200px;
	}
}

/* ==========================================================================
   Mobile/tablet cleanup — step 1 (REVERSIBLE: delete the whole block to restore).
   Hides only in the mobile menu (.wd-header-mobile-nav) — desktop is unchanged.
   Data is left untouched (account page, taxonomies, products remain).
   The bottom sticky toolbar is disabled separately via the WoodMart option
   `sticky_toolbar` (restore: Theme Settings → General → ON;
   original fields ["shop","sidebar","wishlist","cart","account"]).
   ========================================================================== */
.mobile-nav .menu-item-account {
	display: none !important;
}
.mobile-nav .menu-item-29053,
.mobile-nav .menu-item-29055,
.mobile-nav .menu-item-29056,
.mobile-nav .menu-item-29058 {
	display: none !important;
}

/* ==========================================================================
   Repair request — a CF7 form section on the "Service and repair" page
   (29446, container 480b48a). On desktop the info sits in a branded panel
   on the left, and the compact two-column form is in a light panel on the right.
   ========================================================================== */
.elementor-element-480b48a {
	--km-repair-accent: #884329;
	--km-repair-accent-dark: #6d3521;
	--km-repair-surface: #fbfaf9;
	--km-repair-border: #ddd4cf;
}
.elementor-element-480b48a > .e-con-inner {
	display: grid;
	grid-template-columns: minmax(280px, 36%) minmax(0, 64%);
	grid-template-rows: auto auto 1fr;
	gap: 0;
	align-items: stretch;
	width: 100%;
	max-width: 1160px;
	padding: 0 !important;
	border-radius: 24px;
	background: var(--km-repair-surface);
	box-shadow: 0 18px 48px rgba(45, 27, 20, 0.12);
	overflow: hidden;
}
.elementor-element-480b48a > .e-con-inner > .elementor-element {
	width: 100%;
	min-width: 0;
	margin: 0;
}
.elementor-element-480b48a .elementor-element-1e9fc05,
.elementor-element-480b48a .elementor-element-239487f,
.elementor-element-480b48a .elementor-element-a70593c {
	grid-column: 1;
	background: var(--km-repair-accent);
}
.elementor-element-480b48a .elementor-element-1e9fc05 {
	grid-row: 1;
	padding: 56px 48px 12px;
}
.elementor-element-480b48a .elementor-element-1e9fc05 .elementor-heading-title {
	color: #fff;
	font-size: clamp(28px, 2.4vw, 36px);
	line-height: 1.15;
	text-align: left;
}
.elementor-element-480b48a .elementor-element-239487f {
	grid-row: 2;
	padding: 0 48px 24px;
	color: rgba(255, 255, 255, 0.82);
}
.elementor-element-480b48a .elementor-element-239487f .elementor-widget-container,
.elementor-element-480b48a .elementor-element-239487f p {
	color: inherit;
	text-align: left !important;
}
.elementor-element-480b48a .elementor-element-239487f p:last-child {
	margin-bottom: 0;
}
.elementor-element-480b48a .elementor-element-a70593c {
	grid-row: 3;
	display: flex;
	align-items: flex-end;
	height: 100%;
	padding: 0 48px 56px;
	text-align: left;
}
.elementor-element-480b48a .elementor-element-a70593c .elementor-button {
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 30px;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}
.elementor-element-480b48a .elementor-element-a70593c .elementor-button:hover {
	border-color: #fff;
	background: #fff;
	color: var(--km-repair-accent);
}
.elementor-element-480b48a .elementor-element-38db039 {
	grid-column: 2;
	grid-row: 1 / 4;
	padding: 48px;
	background: var(--km-repair-surface);
}
.elementor-element-480b48a .wpcf7 {
	max-width: none;
	width: 100%;
	margin: 0;
}
/* Fallback spacing for when the .km-form-* template markup is absent (e.g. a DB import
   without the updated CF7 form). CF7's default output wraps each field in <p>; without this
   the fields render flush-stacked. Harmless with the template, which uses .km-form-field
   wrappers rather than <p>. */
.elementor-element-480b48a .wpcf7-form p {
	margin-bottom: 18px;
}
.elementor-element-480b48a .km-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px 20px;
}
.elementor-element-480b48a .km-form-field {
	min-width: 0;
}
.elementor-element-480b48a .km-form-field--full {
	grid-column: 1 / -1;
}
.elementor-element-480b48a .km-form-field label {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	color: #342721;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
}
.elementor-element-480b48a .wpcf7-form-control-wrap {
	display: block;
}
.elementor-element-480b48a .wpcf7 input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.elementor-element-480b48a .wpcf7 select,
.elementor-element-480b48a .wpcf7 textarea {
	width: 100%;
	border: 1px solid var(--km-repair-border);
	border-radius: 12px;
	background: #fff;
	box-shadow: none;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.elementor-element-480b48a .wpcf7 input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.elementor-element-480b48a .wpcf7 select {
	height: 48px;
}
.elementor-element-480b48a .wpcf7 textarea {
	height: 150px;
	min-height: 150px;
	resize: vertical;
}
.elementor-element-480b48a .wpcf7 input:focus,
.elementor-element-480b48a .wpcf7 select:focus,
.elementor-element-480b48a .wpcf7 textarea:focus {
	border-color: var(--km-repair-accent);
	box-shadow: 0 0 0 3px rgba(136, 67, 41, 0.12);
	outline: 0;
}
.elementor-element-480b48a .km-form-actions {
	display: grid;
	gap: 16px;
	margin-top: 22px;
}
.elementor-element-480b48a .km-form-consent,
.elementor-element-480b48a .km-form-submit,
.elementor-element-480b48a .km-form-actions p {
	margin: 0;
}
.elementor-element-480b48a .wpcf7-acceptance .wpcf7-list-item {
	margin: 0;
}
.elementor-element-480b48a .wpcf7-acceptance label {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 10px;
	align-items: start;
	font-size: 13px;
	line-height: 1.45;
}
.elementor-element-480b48a .wpcf7-acceptance input[type="checkbox"] {
	margin-top: 3px;
	accent-color: var(--km-repair-accent);
}
.elementor-element-480b48a .wpcf7-submit {
	--btn-accented-bgcolor: #884329;
	--btn-accented-bgcolor-hover: #6d3521;
	--btn-default-bg: #884329;
	--btn-default-color: #ffffff;
	--btn-default-brd-radius: 30px;
	background-color: #884329 !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 30px !important;
	width: 100%;
	min-height: 50px;
	margin: 0;
	padding: 13px 34px !important;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .2s ease;
}
.elementor-element-480b48a .wpcf7-submit:hover {
	background-color: #6d3521 !important;
}
.elementor-element-480b48a .wpcf7-spinner {
	display: block;
	margin: 10px auto 0;
}
.elementor-element-480b48a .wpcf7-response-output {
	margin: 20px 0 0 !important;
	border-radius: 10px;
}

@media (max-width: 991.98px) {
	.elementor-element-480b48a > .e-con-inner {
		grid-template-columns: 1fr;
		grid-template-rows: auto;
		max-width: 760px;
	}
	.elementor-element-480b48a .elementor-element-1e9fc05,
	.elementor-element-480b48a .elementor-element-239487f,
	.elementor-element-480b48a .elementor-element-a70593c,
	.elementor-element-480b48a .elementor-element-38db039 {
		grid-column: 1;
	}
	.elementor-element-480b48a .elementor-element-1e9fc05 {
		grid-row: 1;
		padding: 40px 36px 10px;
	}
	.elementor-element-480b48a .elementor-element-239487f {
		grid-row: 2;
		padding: 0 36px 20px;
	}
	.elementor-element-480b48a .elementor-element-a70593c {
		grid-row: 3;
		padding: 0 36px 40px;
	}
	.elementor-element-480b48a .elementor-element-38db039 {
		grid-row: 4;
		padding: 36px;
	}
}

@media (max-width: 767.98px) {
	.elementor-element-480b48a > .e-con-inner {
		border-radius: 18px;
	}
	.elementor-element-480b48a .elementor-element-1e9fc05 {
		padding: 32px 22px 10px;
	}
	.elementor-element-480b48a .elementor-element-239487f {
		padding: 0 22px 18px;
	}
	.elementor-element-480b48a .elementor-element-a70593c {
		padding: 0 22px 32px;
	}
	.elementor-element-480b48a .elementor-element-38db039 {
		padding: 28px 20px 32px;
	}
	.elementor-element-480b48a .km-form-grid {
		grid-template-columns: 1fr;
		gap: 15px;
	}
	.elementor-element-480b48a .km-form-field--full {
		grid-column: auto;
	}
}

/* ==========================================================================
   "Standard order" — the only checkout flow.
   The form is ALWAYS shown, while the native WooCommerce fields and the
   shipping section are hidden. Mapping/validation happen in functions.php.
   ========================================================================== */
#kafe-standard-order-fields {
	clear: both;
	padding-top: 4px;
}
/* Hide the native fields (heading + fields) and the whole shipping section — the standard
   form replaces them and maps to billing/shipping on order. */
body.woocommerce-checkout .woocommerce-billing-fields > h3,
body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
body.woocommerce-checkout .woocommerce-shipping-fields,
body.woocommerce-checkout #ship-to-different-address,
body.woocommerce-checkout .shipping_address {
	display: none !important;
}
#kafe-standard-order-fields .kafe-standard-delivery-type .woocommerce-input-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 22px;
}
#kafe-standard-order-fields .kafe-standard-delivery-type label.radio {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0;
}
#kafe-standard-order-fields .kafe-standard-shipping-notice {
	clear: both;
	margin: 8px 0 0;
}
#kafe-standard-order-fields .kafe-standard-field-hidden {
	display: none !important;
}

@media (max-width: 768.98px) {
	#kafe-standard-order-fields .form-row-first,
	#kafe-standard-order-fields .form-row-last {
		float: none;
		width: 100%;
	}
}

/* ==========================================================================
   Coffee machines category hero (HTML block 29398) — tablet/mobile responsive.
   The overlay header (.whb-header ≈ 98px) floats over the hero
   (body.wd-header-overlap), so the hero's top content must clear it.
   The fixed min-height:1080px (set at every breakpoint) also leaves a huge
   empty area on phones. Scoped to the machines category by the body class;
   .elementor-element-727b8ddb is the hero root container in block 29398.
   ========================================================================== */
@media (max-width: 1024px) {
	body.term-kafe-mashini .elementor-element-727b8ddb {
		min-height: auto; /* drop the fixed 1080px on tablet/mobile */
	}
}

@media (max-width: 768.98px) {
	body.term-kafe-mashini .elementor-element-727b8ddb > .e-con-inner {
		padding-top: 120px;    /* clear the ~98px overlapping header */
		padding-bottom: 140px; /* room for the curved shape divider */
	}
}

/* Anchor for the hero "Разгледай Моделите" button and AJAX pagination —
   offset so it lands just below the sticky header, not under it. */
#modeli {
	scroll-margin-top: 110px;
}

/* ==========================================================================
   "CART" PAGE (/cart/) — restyled to a card-based, "premium" look.
   Takes the structure/feel of the approved reference, but in OUR palette
   (white + brand brown #884329). The page title is turned off via the WoodMart
   option _woodmart_title_off (DB), and the category badge comes from the hook
   kafe_mashini_cart_item_category_badge (functions.php). Everything here is scoped
   to body.woocommerce-cart so it doesn't leak to other pages.
   ========================================================================== */
body.woocommerce-cart {
	--km-cart-accent: #884329;
	--km-cart-accent-dark: #6d3521;
	--km-cart-ink: #342721;
	--km-cart-muted: #8a7f79;
	--km-cart-surface: #ffffff;
	--km-cart-border: #eae3df;
	--km-cart-shadow: 0 4px 18px rgba(45, 27, 20, 0.06);
	--km-cart-radius: 16px;
}

/* The page title is removed, but the body is .wd-header-overlap (the header floats over
   the content) — the title used to provide the top spacing. We add it back so the
   first card doesn't tuck under the header. Bottom spacing for air down to the footer. */
body.woocommerce-cart #main-content {
	padding-bottom: 80px;
}
@media (min-width: 1025px) {
	body.woocommerce-cart.wd-header-overlap #main-content {
		padding-top: calc(var(--wd-header-h, 100px) + 50px);
	}
}
@media (max-width: 1024px) {
	/* The header floats over the content here too (.wd-header-overlap), so we
	   give it spacing to clear it — otherwise the eyebrow and the top edge of the title
	   tuck under the menu (visible on mobile). A fixed value, NOT
	   --wd-header-h: that variable carries the desktop height (~199px) and inflated
	   the spacing here. The compact mobile/tablet header is ~98px. */
	body.woocommerce-cart #main-content {
		padding-top: 115px;
	}
}

/* --- Two-column layout (form + Summary) --------------------------------- */
/* .cart-content-wrapper is already flex (form flex:1, totals flex:.7 ≥1025px).
   Here we just add vertical spacing. */
body.woocommerce-cart .cart-content-wrapper {
	--wd-row-gap: 40px;
}

/* WoodMart only enables the two columns from ≥1025px, so wide tablets (e.g.
   iPad Pro 12.9" = 1024px portrait) fall into single-column mode and the cards
   stretch too much. We fill the 992–1024px range with the same layout as
   desktop (form flex:1, Summary flex:.7). Narrower tablets (iPad mini
   768px, iPad Air 820px) stay single-column — that's fine there. km-cart-head
   keeps flex:1 1 100% from the base, so the title stays on a full row. */
@media (min-width: 992px) and (max-width: 1024.98px) {
	body.woocommerce-cart .cart-content-wrapper {
		align-items: flex-start;
	}
	body.woocommerce-cart .cart-content-wrapper > .woocommerce-cart-form {
		flex: 1 0 0px;
		width: auto;
	}
	body.woocommerce-cart .cart-content-wrapper > .cart_totals {
		flex: 0.7 0 0px;
		width: auto;
	}
}

/* --- The product table → cards ---------------------------------------- */
/* We break the table into blocks and hide the column headings (like in
   the reference — the cards are self-explanatory). */
body.woocommerce-cart .woocommerce-cart-form__contents,
body.woocommerce-cart .woocommerce-cart-form__contents tbody {
	display: block;
	width: 100%;
	border: 0;
}
body.woocommerce-cart .woocommerce-cart-form__contents thead {
	display: none;
}
/* We neutralize the responsive labels (data-title ::before) that WooCommerce
   adds for a table-as-block. */
body.woocommerce-cart .woocommerce-cart-form__contents td::before {
	display: none !important;
}

/* One product row = a card (CSS grid). Scoped to .cart_item so it does NOT
   catch the "Update" button row (.wd-cart-action-row). */
body.woocommerce-cart tr.woocommerce-cart-form__cart-item {
	position: relative;
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr) auto;
	grid-template-areas:
		"thumb name     subtotal"
		"thumb price    subtotal"
		"thumb quantity subtotal";
	column-gap: 20px;
	row-gap: 4px;
	align-items: center;
	margin: 0 0 12px;
	padding: 16px 20px;
	background: var(--km-cart-surface);
	border: 1px solid var(--km-cart-border);
	border-radius: var(--km-cart-radius);
	box-shadow: var(--km-cart-shadow);
	transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
body.woocommerce-cart tr.woocommerce-cart-form__cart-item:hover {
	border-color: rgba(136, 67, 41, 0.35);
	box-shadow: 0 8px 26px rgba(45, 27, 20, 0.1);
}
/* The cells: clear default borders/padding and map them to areas. */
body.woocommerce-cart tr.woocommerce-cart-form__cart-item > td {
	display: block;
	width: auto;
	padding: 0;
	border: 0;
	text-align: left;
}
body.woocommerce-cart .cart_item .product-thumbnail {
	grid-area: thumb;
	align-self: center;
}
body.woocommerce-cart .cart_item .product-name {
	grid-area: name;
	align-self: end;
}
body.woocommerce-cart .cart_item .product-price {
	grid-area: price;
	align-self: center;
}
body.woocommerce-cart .cart_item .product-quantity {
	grid-area: quantity;
	align-self: start;
}
body.woocommerce-cart .cart_item .product-subtotal {
	grid-area: subtotal;
	align-self: center;
	justify-self: end;
	text-align: right;
}

/* Image — a soft, branded tile (applies to the no-image placeholder too). */
body.woocommerce-cart .cart_item .product-thumbnail img {
	/* WoodMart pins the image with min-width:100px + max-width:100px (not just width),
	   so here we must reset all three — otherwise the image stays 100px,
	   overflows the 72px grid column and overlaps the name/badge. */
	width: 72px !important;
	min-width: 72px !important;
	max-width: 72px !important;
	height: 72px !important;
	object-fit: cover;
	border-radius: 10px;
	background: linear-gradient(135deg, #f3ede9, #e9ded7);
	border: 1px solid var(--km-cart-border);
}

/* Product name + category badge. The name is block so the badge drops below it. */
body.woocommerce-cart .cart_item .product-name > a,
body.woocommerce-cart .cart_item .product-name {
	color: var(--km-cart-ink);
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
}
body.woocommerce-cart .cart_item .product-name > a {
	display: block;
	font-size: 16px;
}
body.woocommerce-cart .cart_item .product-name > a:hover {
	color: var(--km-cart-accent);
}
body.woocommerce-cart .km-cart-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 10px;
	padding: 4px 11px;
	border-radius: 999px;
	background: rgba(136, 67, 41, 0.08);
	border: 1px solid rgba(136, 67, 41, 0.22);
	color: var(--km-cart-accent);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1;
}
body.woocommerce-cart .km-cart-badge__dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--km-cart-accent);
}

/* Unit price — readable (not pale gray) + a "/ pc." note. */
body.woocommerce-cart .cart_item .product-price {
	color: var(--km-cart-muted);
	font-size: 14px;
	font-weight: 500;
}
body.woocommerce-cart .cart_item .product-price .amount {
	color: #5f544e;
	font-weight: 600;
}
body.woocommerce-cart .cart_item .product-price::after {
	content: " / бр.";
	color: var(--km-cart-muted);
	font-weight: 500;
}

/* Line total — large and dark. */
body.woocommerce-cart .cart_item .product-subtotal {
	color: var(--km-cart-ink);
	font-size: 18px;
	font-weight: 800;
}

/* Quantity stepper — a white pill with a warm border; +/− turn brown on hover. */
body.woocommerce-cart .cart_item .product-quantity .quantity {
	--wd-form-brd-color: var(--km-cart-border);
	margin-top: 4px;
}
body.woocommerce-cart .cart_item .product-quantity .quantity .btn:hover {
	--btn-bgcolor-hover: var(--km-cart-accent);
	--btn-brd-color-hover: var(--km-cart-accent);
	color: #fff;
}

/* The "×" remove button — subtle, brown round hover, top right. */
body.woocommerce-cart .cart_item .product-remove {
	position: absolute;
	top: 14px;
	right: 16px;
	grid-area: unset;
}
body.woocommerce-cart .cart_item .product-remove .remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	color: var(--km-cart-muted) !important;
	/* font-size:0 hides the native &times; text — WoodMart shows the icon via ::before.
	   (font-size:20px previously exposed &times; and produced a double glyph "×x".) */
	font-size: 0;
	line-height: 1;
	transition: background 0.2s ease, color 0.2s ease;
}
/* Size of the WoodMart icon (\f112) inside the circle. */
body.woocommerce-cart .cart_item .product-remove .remove::before {
	font-size: 14px;
}
body.woocommerce-cart .cart_item .product-remove .remove:hover {
	background: rgba(136, 67, 41, 0.1);
	color: var(--km-cart-accent) !important;
}

/* --- Actions row ("Update cart" button) --------------------------- */
body.woocommerce-cart .wd-cart-action-row,
body.woocommerce-cart .wd-cart-action-row > td.actions {
	display: block;
	padding: 0;
	border: 0;
	background: none;
}
body.woocommerce-cart .cart-actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 4px;
}
/* "Update cart" — ghost/outline brown (fixes the invisible gray look). */
body.woocommerce-cart .cart-actions button[name="update_cart"] {
	--btn-default-bg: transparent;
	--btn-default-color: var(--km-cart-accent);
	background: transparent;
	color: var(--km-cart-accent);
	border: 1.5px solid rgba(136, 67, 41, 0.4);
	border-radius: 30px;
}
body.woocommerce-cart .cart-actions button[name="update_cart"]:hover {
	background: var(--km-cart-accent);
	color: #fff;
	border-color: var(--km-cart-accent);
}

/* --- "Summary" card (cart totals) ---------------------------- */
body.woocommerce-cart .cart_totals .cart-totals-inner {
	padding: 28px;
	background: var(--km-cart-surface);
	border: 1px solid var(--km-cart-border);
	border-radius: var(--km-cart-radius);
	box-shadow: var(--km-cart-shadow);
}
body.woocommerce-cart .cart_totals h2 {
	margin: 0 0 18px;
	font-size: 20px;
	font-weight: 800;
	color: var(--km-cart-ink);
}
body.woocommerce-cart .cart_totals table {
	border: 0;
	margin: 0;
}
/* WoodMart makes the row flex, which shrinks the th label to width:0 and it disappears
   (only the value on the right remained — e.g. "Items" with no label). We set the
   layout explicitly: label left, value right, on one row. */
body.woocommerce-cart .cart_totals table tr {
	display: flex;
	/* WoodMart's .shop_table_responsive tr sets flex-direction:column, which
	   puts the label ABOVE the value. We put them back on one row. */
	flex-direction: row;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
}
/* WoodMart adds a duplicate label via td::before (data-title) — e.g. a second
   "Total" next to the amount. We hide it; the label comes from th. */
body.woocommerce-cart .cart_totals table td::before {
	display: none !important;
}
body.woocommerce-cart .cart_totals table th {
	/* WoodMart hides all th below 769px (.shop_table_responsive :is(thead,th)),
	   which on mobile left the value without a label (e.g. "Items" with no label).
	   We put them back — here the card layout relies on a label on the left. */
	display: block !important;
	flex: 0 1 auto;
	white-space: nowrap;
}
body.woocommerce-cart .cart_totals table td {
	flex: 0 0 auto;
	text-align: right;
}
body.woocommerce-cart .cart_totals table th,
body.woocommerce-cart .cart_totals table td {
	padding: 12px 0;
	border: 0;
	background: none;
}
/* The divider is on the ROW (not on th/td separately) — otherwise the flex layout
   breaks it into two short dashes with a gap in the middle. */
body.woocommerce-cart .cart_totals table tr {
	border-bottom: 1px solid var(--km-cart-border);
}
body.woocommerce-cart .cart_totals table tr:last-child {
	border-bottom: 0;
}
body.woocommerce-cart .cart_totals .cart-subtotal th,
body.woocommerce-cart .cart_totals .cart-subtotal td {
	color: var(--km-cart-muted);
	font-weight: 500;
}
/* Grand total — large and brown. */
body.woocommerce-cart .cart_totals .order-total th {
	color: var(--km-cart-ink);
	font-size: 17px;
	font-weight: 700;
}
body.woocommerce-cart .cart_totals .order-total td,
body.woocommerce-cart .cart_totals .order-total .amount {
	color: var(--km-cart-accent);
	font-size: 26px;
	font-weight: 800;
}

/* CTA "Proceed to checkout" — a brown gradient pill with an arrow. */
body.woocommerce-cart .wc-proceed-to-checkout {
	margin-top: 22px;
	padding: 0;
}
body.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 16px 24px;
	background: linear-gradient(135deg, #8a4a2c, var(--km-cart-accent-dark));
	color: #fff;
	border: 0;
	border-radius: 999px;
	font-weight: 700;
	font-size: 16px;
	text-transform: none;
	box-shadow: 0 8px 20px rgba(136, 67, 41, 0.28);
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
body.woocommerce-cart .wc-proceed-to-checkout .checkout-button::after {
	content: "→";
	font-size: 18px;
	line-height: 1;
}
body.woocommerce-cart .wc-proceed-to-checkout .checkout-button:hover {
	filter: brightness(1.06);
	transform: translateY(-1px);
	box-shadow: 0 12px 26px rgba(136, 67, 41, 0.34);
}

/* --- Responsive: below 576px the card folds more compactly ------------------- */
@media (max-width: 575.98px) {
	body.woocommerce-cart tr.woocommerce-cart-form__cart-item {
		grid-template-columns: 64px minmax(0, 1fr);
		grid-template-areas:
			"thumb name"
			"thumb price"
			"quantity subtotal";
		column-gap: 16px;
		padding: 16px;
	}
	body.woocommerce-cart .cart_item .product-thumbnail img {
		width: 64px !important;
		min-width: 64px !important;
		max-width: 64px !important;
		height: 64px !important;
	}
	body.woocommerce-cart .cart_item .product-subtotal {
		align-self: center;
	}
}

/* --- Top heading (eyebrow "CART" + "Your order") ----------------- */
/* Output by kafe_mashini_cart_heading() on woocommerce_before_cart —
   replaces the removed WoodMart page title. */
body.woocommerce-cart .km-cart-head {
	flex: 1 1 100%;
	max-width: 100%;
	margin-bottom: 8px;
}
body.woocommerce-cart .km-cart-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 5px 13px;
	border-radius: 999px;
	background: rgba(136, 67, 41, 0.08);
	border: 1px solid rgba(136, 67, 41, 0.22);
	color: var(--km-cart-accent);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1;
}
body.woocommerce-cart .km-cart-eyebrow__dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--km-cart-accent);
}
body.woocommerce-cart .km-cart-title {
	margin: 14px 0 0;
	color: var(--km-cart-ink);
	font-size: clamp(30px, 4vw, 44px);
	font-weight: 800;
	line-height: 1.05;
}
body.woocommerce-cart .km-cart-title span {
	color: var(--km-cart-accent);
}

/* --- Right bar: remove the duplicate "Total" row (subtotal) ------------- */
/* Coupons/shipping are disabled → subtotal == total always. */
body.woocommerce-cart .cart_totals .cart-subtotal {
	display: none;
}

/* "Items: N" row (from kafe_mashini_cart_items_count_row). */
body.woocommerce-cart .cart_totals .km-cart-items-row th {
	color: var(--km-cart-muted);
	font-weight: 500;
}
body.woocommerce-cart .cart_totals .km-cart-items-row td {
	color: var(--km-cart-ink);
	font-weight: 700;
	text-align: right;
}

/* --- Second button "← Continue shopping" (under the CTA) ---------------------- */
body.woocommerce-cart .km-continue-shopping {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin-top: 12px;
	padding: 13px 24px;
	background: transparent;
	color: var(--km-cart-accent);
	border: 1.5px solid rgba(136, 67, 41, 0.4);
	border-radius: 999px;
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
body.woocommerce-cart .km-continue-shopping:hover {
	background: rgba(136, 67, 41, 0.06);
	border-color: var(--km-cart-accent);
	color: var(--km-cart-accent-dark);
}

/* ==========================================================================
   Archive (categories): a stable bar above the products.
   WoodMart puts the breadcrumb and the toolbar ("Show : … / sorting") in one
   `.shop-loop-head` with `flex-wrap: wrap`. So the toolbar stayed on the same row
   for short names (Дюзи, Маркучи) and wrapped to a new row for long ones
   (Електроника и платки, Нагреватели и бойлери) — the position "jumped" with
   the length of the category name. Here we pin the breadcrumb to a full row so
   the toolbar is ALWAYS on the row below — the same for every category. Reversible.
   ========================================================================== */
.shop-loop-head {
	row-gap: 8px;
}
.shop-loop-head > .wd-shop-tools:first-child {
	flex: 1 0 100%;
	max-width: 100%;
}

/* Hide the category description block (`term.description`) above the bar.
   It's filled on only 2 of 10 categories (Маркучи — redundantly repeats the name, and
   Пластмаси и корпуси), so a gray subheading appeared only there, which
   broke the uniformity. The data in the database is kept. Reversible. */
body.woodmart-archive-shop .wd-content-area > .term-description {
	display: none;
}
