/*
Theme Name: HTWP P001 Child
Description: Neutral starter child theme for an Elementor project. It provides the presentation/customisation boundary and nothing else: project application logic belongs in ht-site-core, and owner-editable design and content belong in Elementor.
Template: woodmart
Version: 0.1.0
Requires at least: 7.0
Requires PHP: 8.3
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: htwp-p001-child
Tags: child-theme
*/

/* ===========================================================================
 * Madness Accessories — project presentation layer (V3)
 *
 * This file is the single presentation layer for the project. It reproduces the
 * approved V3 prototype (htwp-work/visual-prototype) on the production
 * architecture: WoodMart's native header, archive shell, product loop, filter
 * drawer, gallery and product form; WooCommerce's own product data, states and
 * queries; and Elementor's editable homepage document.
 *
 * It is NOT the source of brand values. Colours, families and sizes come from
 * the project's token configuration — Elementor Global Colors / Global
 * Typography and WoodMart Theme Settings — through the framework's own custom
 * properties (`--wd-*`, `--color-*`, `--brdcolor-*`). The local `--madness-*`
 * properties in §1 are aliases onto those tokens plus structural measures that
 * no settings screen owns.
 *
 * Order of the file: tokens → chrome → canonical card → archive → product page
 * → homepage → transactional → responsive → motion. There is one rule per
 * fact: later historical M7/M7B/M7C passes are consolidated here rather than
 * left stacked, and no section exists purely to re-state an earlier one.
 *
 * Specificity note: WoodMart prints its own part stylesheets inside <body>,
 * after this file, so equal-specificity rules would lose. Rules that fight a
 * framework default therefore state one more selector than the framework does,
 * which is why several selectors below repeat a class the framework also uses.
 * No `!important` is used for presentation; the two frameworks' own layout
 * overrides that Elementor inlines (below) are the only ones needed.
 * =========================================================================== */

/* ---------------------------------------------------------------------------
 * 1 · Tokens
 *
 * Every alias below resolves to an owner-editable token. The structural values
 * (the 1320px measure, the rhythm steps, the two control heights) are the V3
 * geometry the approved prototype fixed, and are stated once here.
 * ------------------------------------------------------------------------- */
:root {
	--madness-measure: 1320px;
	--madness-gutter: clamp(20px, 4vw, 66px);
	--madness-section: clamp(72px, 8vw, 132px);
	--madness-rhythm: 1px solid var(--brdcolor-gray-200);
	--madness-rule: 1px solid var(--brdcolor-gray-300);
	--madness-control: 48px;
	--madness-control-touch: 44px;
	--madness-eyebrow-size: 11px;
	--madness-eyebrow-tracking: 0.16em;

	/* Warm paper, stone, ink and the controlled red, all aliased. */
	--madness-paper: var(--wd-main-bgcolor);
	--madness-stone: var(--e-global-color-madnessstone, #e9e6e1);
	--madness-ink: var(--wd-title-color);
	--madness-body: var(--wd-text-color);
	--madness-muted: var(--color-gray-500);
	--madness-faint: var(--color-gray-400);
	--madness-red: var(--wd-alternative-color);
	--madness-serif: var(--wd-title-font);
	--madness-sans: var(--wd-text-font);
}

/* ---------------------------------------------------------------------------
 * 2 · Brand mark and header register
 * ------------------------------------------------------------------------- */
.site-logo {
	line-height: 0;
}

.site-logo img {
	display: block;
	padding: 0;
	width: auto;
	height: auto;
	/* The supplied mark is a PNG with an opaque white field: multiply blends
	 * that field into the warm canvas while black and red stay intact. */
	mix-blend-mode: multiply;
}

.whb-header .wd-nav-header > li > a,
.whb-header .wd-header-text {
	font-size: var(--madness-eyebrow-size);
	font-weight: 600;
	letter-spacing: 0.12em;
}

/* The announcement is one restrained line in the dark utility strip. */
.whb-top-bar .wd-header-text.madness-topbar-note,
.whb-top-bar .wd-header-text.madness-topbar-note > span {
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 0.13em;
}

/* Navigation: compact editorial register with a hairline hover rule. */
.whb-header .wd-nav-header > li > a {
	font-size: 12px;
	letter-spacing: 0.09em;
}

.whb-header .wd-nav-header > li > a .nav-link-text {
	letter-spacing: 0.09em;
}

/* The approved header relationship is navigation left, brand mark centred,
 * tool icons right. The logo owns a protected centre track and both side
 * columns are allowed to shrink inside their tracks instead of overflowing
 * into it. */
@media (min-width: 1025px) {
	.whb-general-header .whb-general-header-inner {
		display: grid;
		grid-template-columns: minmax(0, 1fr) clamp(78px, 7.5vw, 108px) minmax(0, 1fr);
		column-gap: clamp(12px, 1.4vw, 22px);
		align-items: center;
	}

	.whb-general-header .whb-col-left {
		min-width: 0;
		justify-content: flex-start;
	}

	.whb-general-header .whb-col-center {
		min-width: 0;
		justify-content: center;
	}

	.whb-general-header .whb-col-right {
		min-width: 0;
		justify-content: flex-end;
	}

	.whb-general-header .whb-col-center .site-logo,
	.whb-general-header .whb-col-center .site-logo img {
		max-width: 100%;
	}

	.whb-header .wd-nav-main {
		flex-wrap: nowrap;
		column-gap: clamp(6px, 0.7vw, 10px);
	}

	.whb-header .wd-nav-main > li > a {
		font-size: clamp(9.5px, 0.72vw, 10.5px);
		letter-spacing: 0.045em;
		white-space: nowrap;
	}
}

@media (min-width: 1025px) and (max-width: 1160px) {
	.whb-general-header .whb-general-header-inner {
		grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
		column-gap: 8px;
	}

	.whb-header .wd-nav-main {
		column-gap: 3px;
	}

	.whb-header .wd-nav-main > li > a {
		font-size: 8.5px;
		letter-spacing: 0;
	}
}

.wd-nav[class*="wd-style-underline"] .nav-link-text:after {
	height: 1px;
}

/* Red is the accent, never a surface: the promotions entry and the cart count
 * are the only two places the header spends it. */
.wd-nav-main > .madness-nav-accent > a,
.whb-top-bar .wd-nav > .madness-nav-accent > a,
.mobile-pages-menu > .madness-nav-accent > a,
ul.wd-nav.wd-nav-mobile > .madness-nav-accent > a {
	color: var(--madness-red);
}

.whb-header .wd-tools-element > a {
	min-width: var(--madness-control-touch);
	min-height: var(--madness-control-touch);
}

.whb-header .wd-tools-element.wd-design-icon > a .wd-tools-count,
.whb-header .cart-widget-opener .wd-tools-count {
	background-color: var(--madness-red);
	color: var(--wd-main-bgcolor);
	font-weight: 600;
}

/* ---------------------------------------------------------------------------
 * 3 · Page-title bar
 *
 * The archive identity is composed here (§5.1). A plain information page keeps
 * only the shallow editorial title and one closing hairline.
 * ------------------------------------------------------------------------- */
.wd-page-title {
	border-bottom: var(--madness-rhythm);
}

/* ---------------------------------------------------------------------------
 * 4 · Footer
 *
 * One typographic anchor in the editorial serif, quiet navigation groups, the
 * near-black surface and a restrained utility bar. Content stays in the
 * WoodMart footer widgets, so the owner keeps editing it.
 * ------------------------------------------------------------------------- */
.madness-footer-statement {
	max-width: 11ch;
	margin: 0;
	font-family: var(--madness-serif);
	font-weight: 400;
	font-size: clamp(34px, 3.4vw, 52px);
	line-height: 0.92;
	letter-spacing: -0.01em;
	/* The footer carries WoodMart's light colour scheme, which remaps the
	 * framework's surface token to its own dark value; the title token is the
	 * one that stays legible on that surface. */
	color: var(--wd-title-color);
}

.madness-footer-statement em {
	font-style: italic;
	color: var(--madness-red);
}

.madness-footer-note {
	max-width: 34ch;
	margin-top: 18px;
	font-size: 13px;
	line-height: 1.7;
}

.wd-footer .footer-sidebar {
	align-items: start;
}

.wd-footer .footer-sidebar .footer-widget .widget-title {
	margin-bottom: 22px;
	font-size: 10px;
	letter-spacing: 0.15em;
	color: var(--color-gray-400);
}

.wd-footer .footer-sidebar .footer-widget ul.menu li a {
	font-family: var(--madness-serif);
	font-size: 19px;
	line-height: 1.7;
}

.wd-footer .footer-sidebar .footer-widget ul.menu li a:hover {
	color: var(--madness-red);
}

/* The four columns carry unequal weight: the statement leads. */
@media (min-width: 1025px) {
	.wd-footer .footer-sidebar.wd-grid-g {
		grid-template-columns: 1.6fr 1fr 1fr 1fr;
	}

	/* WoodMart states each footer column's span inline (3 of 12). The columns
	 * are re-tracked here, so their own spans are released with them. */
	.wd-footer .footer-sidebar > .footer-column {
		grid-column: auto;
	}
}

/* ===========================================================================
 * 5 · The canonical Madness product card
 *
 * One card for shop, category, search, related products and Elementor product
 * elements, because it is WoodMart's own loop with one presentation layer on
 * top of it. The approved principle: image and identity lead, commerce stays
 * secondary — and every state WooCommerce can put a product in is covered.
 * =========================================================================== */

.wd-loop-builder-off .wd-product {
	/* WoodMart's predefined loops centre their text; the editorial card is
	 * flush with the image edge. */
	--text-align: start;
}

.wd-loop-builder-off .wd-product .product-wrapper {
	border: 0;
	background: none;
	box-shadow: none;
}

/* 5.1 · Image */
.wd-loop-builder-off .wd-product .product-image-wrap img {
	width: 100%;
	object-fit: cover;
}

/* 5.2 · Identity, in the UI sans register. Elementor's global H3 would
 * otherwise pull the product name into the display serif. */
.wd-loop-builder-off .wd-product .wd-entities-title,
.wd-loop-builder-off .wd-product .wd-entities-title a {
	font-family: var(--wd-entities-title-font);
	font-weight: 500;
	font-style: normal;
	font-size: 15px;
	line-height: 1.32;
	letter-spacing: 0;
}

.wd-loop-builder-off .wd-product .product-element-bottom {
	gap: 2px;
	padding-top: 12px;
}

.wd-loop-builder-off .wd-product .wd-entities-title {
	margin-bottom: 2px;
}

/* The one-line collection fact under the name. */
.wd-loop-builder-off .wd-product .wd-product-cats,
.wd-loop-builder-off .wd-product .wd-product-cats a {
	color: var(--madness-muted);
	font-size: 11px;
	line-height: 1.4;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

/* 5.3 · Price. Sale price is the promotional register; the regular price stays
 * quiet and struck through. DOM order is kept, because WooCommerce's own
 * screen-reader text names both amounts. */
.wd-loop-builder-off .wd-product .price {
	margin-top: 4px;
	font-family: var(--madness-sans);
	font-size: 14px;
	font-weight: 500;
	color: var(--madness-ink);
}

.wd-loop-builder-off .wd-product .price ins,
.wd-loop-builder-off .wd-product .price ins .woocommerce-Price-amount {
	color: var(--madness-red);
	font-weight: 600;
	text-decoration: none;
}

.wd-loop-builder-off .wd-product .price del,
.wd-loop-builder-off .wd-product .price del .woocommerce-Price-amount {
	color: var(--madness-faint);
	font-weight: 400;
	text-decoration: line-through;
}

.wd-loop-builder-off .wd-product .price del + ins {
	margin-inline-start: 0.5em;
}

/* 5.4 · Actions. On a pointer device the action resolves on intent, and returns
 * for keyboard focus; on touch it is always present, because there is no hover
 * to reveal it. */
.wd-loop-builder-off .wd-product .wd-add-btn {
	margin-top: 6px;
}

.wd-products.wd-loop-builder-off .wd-product .wd-add-btn > a,
.wd-products.wd-loop-builder-off .wd-product .wd-add-btn .add-to-cart-loop {
	display: inline-flex;
	align-items: center;
	min-height: 30px;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	color: var(--madness-ink);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 5px;
}

.wd-products.wd-loop-builder-off .wd-product .wd-add-btn .add-to-cart-loop span {
	min-height: 30px;
	padding: 0;
}

.wd-products.wd-loop-builder-off .wd-product .wd-add-btn > a:hover,
.wd-products.wd-loop-builder-off .wd-product .wd-add-btn > a:focus-visible {
	background: transparent;
	color: var(--madness-red);
}

@media (min-width: 1025px) and (hover: hover) and (pointer: fine) {
	.wd-products.wd-loop-builder-off .wd-product .wd-add-btn {
		opacity: 0;
		transition: opacity 160ms ease;
	}

	.wd-products.wd-loop-builder-off .wd-product:hover .wd-add-btn,
	.wd-products.wd-loop-builder-off .wd-product:focus-within .wd-add-btn {
		opacity: 1;
	}
}

/* Touch and small screens: the action holds the 44px target and one line, even
 * for the longer Greek add-to-cart label in a two-column grid. */
@media (pointer: coarse), (max-width: 1024px) {
	.wd-products.wd-loop-builder-off .wd-product .wd-add-btn > a,
	.wd-products.wd-loop-builder-off .wd-product .wd-add-btn .add-to-cart-loop,
	.wd-products.wd-loop-builder-off .wd-product .wd-add-btn .add-to-cart-loop span {
		min-height: var(--madness-control-touch);
	}
}

@media (max-width: 480px) {
	.wd-products.wd-loop-builder-off .wd-product .wd-add-btn > a,
	.wd-products.wd-loop-builder-off .wd-product .wd-add-btn .add-to-cart-loop {
		font-size: 10px;
		letter-spacing: 0.08em;
	}

	.wd-products.wd-loop-builder-off .wd-product .wd-add-btn .add-to-cart-loop span {
		padding-inline: 0;
		white-space: nowrap;
	}
}

/* 5.5 · Secondary image actions: one row in the image's top corner, each still a
 * 44px target. WoodMart hides the labels with `display:none`, which removes them
 * from the accessibility tree, so they are restored visually hidden. */
.wd-loop-builder-off .wd-product .wd-buttons.wd-pos-r-t {
	flex-direction: row;
}

.wd-loop-builder-off .wd-product .wd-buttons .wd-action-btn > a {
	min-width: var(--madness-control-touch);
	min-height: var(--madness-control-touch);
}

.wd-loop-builder-off .wd-product .wd-buttons .wd-action-btn > a .wd-action-text {
	display: block;
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	white-space: nowrap;
	clip-path: inset(50%);
	border: 0;
	visibility: visible;
}

.wd-loop-builder-off .wd-product .wd-wishlist-btn a.added,
.wd-loop-builder-off .wd-product .wd-wishlist-btn a.added .wd-action-icon {
	color: var(--madness-red);
}

/* 5.6 · Badges. Compact, rectangular, tracked uppercase; never rounded, never
 * shadowed. Colour comes from Theme Settings per label type; the project's own
 * merchandising badges take the neutral surface/ink pair. */
.product-labels {
	gap: 6px;
}

.product-labels .product-label {
	padding: 4px 9px;
	font-family: var(--madness-sans);
	font-size: 9.5px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	line-height: 1.5;
	border-radius: 0;
	box-shadow: none;
}

.product-labels .product-label[class*="madness-badge-"] {
	background-color: var(--wd-main-bgcolor);
	color: var(--madness-ink);
}

.product-labels .product-label[class*="madness-badge-"],
.product-labels .product-label.new,
.product-labels .product-label.out-of-stock,
.product-labels .product-label.attribute-label:not(.label-with-img) {
	box-shadow: inset 0 0 0 1px var(--brdcolor-gray-300);
}

/* M10.5 · Flycart's documented Discount Bar action supplies its own exact
 * per-rule message. A loop presents that same provider output as one compact
 * Madness badge, rather than importing the bar's PDP dimensions. When more
 * than one provider bar applies, the card has room for its first exact fact;
 * the full rule set still remains visible on the PDP. */
.product-labels .madness-flycart-discount-bar,
.product-labels .madness-flycart-discount-bar .awdr_discount_bar {
	display: block;
	margin: 0;
	padding: 4px 9px;
	background-color: var(--madness-red);
	color: var(--wd-main-bgcolor);
	font-family: var(--madness-sans);
	font-size: 9.5px;
	font-weight: 600;
	letter-spacing: 0.1em;
	line-height: 1.5;
	text-transform: uppercase;
	border-radius: 0;
	box-shadow: none;
}

.product-labels .madness-flycart-discount-bar .awdr_discount_bar:not(:first-child) {
	display: none;
}

.product-labels .madness-flycart-discount-bar .awdr_discount_bar_content {
	padding: 0;
}

/* 5.7 · Out of stock: the photograph stays, state reads in the badge and the
 * card keeps a way back into the catalogue instead of a dead black control. */
.wd-loop-builder-off .wd-product.outofstock .product-image-wrap img {
	filter: grayscale(1);
	opacity: 0.58;
}

.wd-loop-builder-off .wd-product.outofstock .wd-add-btn > a {
	background-color: transparent;
	box-shadow: none;
	color: var(--madness-muted);
}

/* ===========================================================================
 * 6 · Archive
 * =========================================================================== */

/* 6.1 · Collection identity: context eyebrow, one large editorial title and a
 * summary column. The eyebrow and the summary are printed inside WoodMart's own
 * `.wd-title-wrapp` (inc/catalogue.php) and placed here, so the theme keeps the
 * page-title behaviour it already owns. */
.woodmart-archive-shop .wd-page-title {
	min-height: 0;
	padding: clamp(38px, 5vw, 74px) 0 clamp(26px, 3vw, 44px);
}

.woodmart-archive-shop .wd-page-title .wd-back-btn {
	display: none;
}

.woodmart-archive-shop .wd-page-title .wd-title-wrapp {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
	column-gap: clamp(24px, 5vw, 72px);
	row-gap: 10px;
	align-items: end;
}

.woodmart-archive-shop .wd-page-title .madness-archive-eyebrow {
	grid-column: 1;
	grid-row: 1;
	font-family: var(--madness-sans);
	font-size: var(--madness-eyebrow-size);
	font-weight: 600;
	letter-spacing: var(--madness-eyebrow-tracking);
	text-transform: uppercase;
	color: var(--madness-muted);
}

.woodmart-archive-shop .wd-page-title .entry-title {
	grid-column: 1;
	grid-row: 2;
	margin: 6px 0 0;
	font-size: clamp(58px, 10.4vw, 150px);
	font-weight: 400;
	line-height: 0.86;
	letter-spacing: -0.035em;
	overflow-wrap: anywhere;
}

.woodmart-archive-shop .wd-page-title .madness-archive-summary {
	grid-column: 2;
	grid-row: 1 / 3;
	align-self: end;
	padding: 0 0 8px clamp(20px, 2.4vw, 34px);
	border-left: var(--madness-rule);
}

.woodmart-archive-shop .wd-page-title .madness-archive-summary-text {
	max-width: 38ch;
	margin: 0 0 16px;
	font-size: 13.5px;
	line-height: 1.7;
	color: var(--madness-body);
}

.woodmart-archive-shop .wd-page-title .madness-archive-summary-count {
	font-family: var(--madness-sans);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--madness-ink);
}

.woodmart-archive-shop .content-layout-wrapper {
	padding-top: 0;
}

/* 6.2 · Utility rail: quiet, one hairline, filters and context left, sorting
 * right. Never a second title bar. */
.woodmart-archive-shop .shop-loop-head {
	align-items: center;
	min-height: 62px;
	margin-bottom: clamp(26px, 3vw, 44px);
	padding: 0;
	border-top: var(--madness-rhythm);
	border-bottom: var(--madness-rhythm);
}

.woodmart-archive-shop .shop-loop-head .wd-shop-tools {
	gap: 22px;
}

@media (min-width: 1025px) {
	.woodmart-archive-shop .shop-loop-head {
		display: grid;
		grid-template-columns: minmax(200px, 1fr) auto auto auto;
		grid-template-rows: 62px;
		column-gap: clamp(20px, 3vw, 40px);
	}

	.woodmart-archive-shop .shop-loop-head > .wd-shop-tools {
		display: contents;
	}

	.woodmart-archive-shop .shop-loop-head .wd-breadcrumbs {
		grid-column: 1;
		grid-row: 1;
	}

	.woodmart-archive-shop .wd-show-sidebar-btn {
		display: inline-flex;
		grid-column: 2;
		grid-row: 1;
	}

	.woodmart-archive-shop .shop-loop-head .woocommerce-result-count {
		display: block;
		grid-column: 3;
		grid-row: 1;
		margin: 0;
	}

	.woodmart-archive-shop .shop-loop-head .woocommerce-ordering {
		grid-column: 4;
		grid-row: 1;
	}

	.woodmart-archive-shop .woocommerce-ordering select {
		width: 240px;
		min-width: 240px;
		max-width: none;
	}
}

.woodmart-archive-shop .shop-loop-head .wd-breadcrumbs {
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--madness-muted);
}

.woodmart-archive-shop .shop-loop-head .wd-breadcrumbs a {
	color: var(--madness-muted);
}

.woocommerce-result-count {
	font-size: 12px;
	letter-spacing: 0.02em;
	color: var(--madness-muted);
}

.wd-show-sidebar-btn .wd-action-text {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.woocommerce-ordering select {
	font-family: var(--madness-sans);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

@media (max-width: 1024px) {
	.wd-show-sidebar-btn.wd-action-btn > a,
	.wd-sidebar .close-side-widget.wd-action-btn > a {
		display: inline-flex;
		align-items: center;
		min-height: var(--madness-control-touch);
	}

	.woocommerce-ordering select {
		min-height: var(--madness-control-touch);
	}
}

@media (max-width: 768.98px) {
	.woocommerce-ordering.wd-ordering-mb-icon {
		width: var(--madness-control-touch);
		height: var(--madness-control-touch);
	}
}

/* 6.3 · The catalogue grid, and the approved editorial feature for one card.
 *
 * The feature is a loop-level class (`madness-feature-card`) that
 * inc/catalogue.php adds to the first card on page 1 of an eligible unfiltered
 * archive. It spans two columns, sits on the stone surface and gives its
 * identity room beside the photograph. Ineligible items are ordinary cards and
 * the grid never reserves an empty feature area. */
@media (min-width: 1025px) {
	.woodmart-archive-shop .products.elements-grid {
		--wd-gap: 30px;
		row-gap: 52px;
	}
}

@media (min-width: 769px) and (max-width: 1024px) {
	.woodmart-archive-shop .products.elements-grid {
		--wd-col: 3;
		--wd-gap: 24px;
	}
}

.products.elements-grid > .wd-product.madness-feature-card {
	grid-column: span 2;
	display: grid;
	grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.55fr);
	align-items: end;
	gap: 20px;
	padding: 0 26px 26px 0;
	background-color: var(--madness-stone);
}

.products.elements-grid > .wd-product.madness-feature-card .wd-product-wrapper {
	display: contents;
}

.products.elements-grid > .wd-product.madness-feature-card .product-element-top {
	grid-column: 1;
	grid-row: 1;
}

.products.elements-grid > .wd-product.madness-feature-card .product-image-wrap img {
	aspect-ratio: 1.45 / 1;
	object-fit: cover;
}

.products.elements-grid > .wd-product.madness-feature-card .product-element-bottom {
	grid-column: 2;
	grid-row: 1;
	align-self: end;
	padding: 28px 6px 6px;
}

.products.elements-grid > .wd-product.madness-feature-card .wd-entities-title,
.products.elements-grid > .wd-product.madness-feature-card .wd-entities-title a {
	font-family: var(--madness-serif);
	font-weight: 400;
	font-size: clamp(26px, 2.4vw, 35px);
	line-height: 1;
	letter-spacing: -0.01em;
}

.products.elements-grid > .wd-product.madness-feature-card .wd-product-cats,
.products.elements-grid > .wd-product.madness-feature-card .wd-product-cats a {
	margin-top: 10px;
}

.products.elements-grid > .wd-product.madness-feature-card .price {
	margin-top: 16px;
	font-family: var(--madness-serif);
	font-size: 21px;
}

/* 6.4 · Filter drawer. WoodMart's own off-canvas panel, the grid stays in
 * place behind the scrim, and the panel keeps its single scroll region. */
.wd-sidebar.wd-side-hidden {
	width: min(420px, 90vw);
	padding: 0 clamp(22px, 3vw, 36px) 40px;
	background: var(--wd-main-bgcolor);
}

.wd-sidebar.wd-side-hidden .close-side-widget {
	margin: 0;
	padding: 0;
}

.wd-sidebar.wd-side-hidden .wd-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 64px;
	height: 64px;
	padding: 0;
	border-bottom: var(--madness-rhythm);
}

.wd-sidebar.wd-side-hidden .wd-heading::before {
	content: "ΦΙΛΤΡΑ";
	font-family: var(--madness-sans);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.16em;
}

.wd-sidebar.wd-side-hidden .widget-area {
	padding-top: 0;
}

.wd-sidebar .widget,
.wd-sidebar .wd-widget {
	border-bottom: var(--madness-rhythm);
}

.wd-sidebar .widget-title,
.wd-sidebar .wd-widget-title {
	font-family: var(--madness-sans);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--madness-ink);
}

.wd-sidebar .widget_layered_nav ul li,
.wd-sidebar .widget_product_categories ul li,
.wd-sidebar .wd-product-category-filter ul li,
.wd-sidebar .wd-swatches-filter li {
	font-size: 14px;
	line-height: 1.6;
}

.woodmart-archive-shop .wd-sidebar.wd-side-hidden .widget_layered_nav .count,
.woodmart-archive-shop .wd-sidebar.wd-side-hidden .wd-product-category-filter .count,
.woodmart-archive-shop .wd-sidebar.wd-side-hidden .wd-filter-list .count {
	flex: 0 0 auto;
	min-width: 0;
	height: auto;
	margin-inline-start: auto;
	padding: 0 0 0 10px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	font-size: 11px;
	line-height: inherit;
	text-align: end;
	color: var(--madness-muted);
}

/* The fixed shell does not scroll. Its widget area is the drawer's single
 * intentional vertical scroll region; individual long filter lists expand
 * into it instead of creating their own tracks. */
.woodmart-archive-shop .wd-sidebar.wd-side-hidden {
	overflow: hidden;
	overflow-y: hidden;
}

.woodmart-archive-shop .wd-sidebar.wd-side-hidden .widget-area {
	flex: 1 1 0;
	min-height: 0;
	height: 0;
	max-height: none;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

.woodmart-archive-shop .wd-sidebar.wd-side-hidden .widget-area .wd-scroll,
.woodmart-archive-shop .wd-sidebar.wd-side-hidden .widget-area .wd-scroll-content {
	max-height: none;
	overflow: visible;
}

.wd-sidebar .chosen > a {
	font-weight: 600;
	color: var(--madness-ink);
}

@media (max-width: 1024px) {
	/* Filter rows keep a comfortable touch rhythm inside the single scroller. */
	.wd-sidebar .widget_layered_nav ul li,
	.wd-sidebar .widget_product_categories ul li,
	.wd-sidebar .wd-product-category-filter ul li,
	.wd-sidebar .wd-swatches-filter li {
		line-height: 1.9;
	}

	.wd-sidebar.wd-side-hidden .widget_layered_nav ul li > a,
	.wd-sidebar.wd-side-hidden .widget_product_categories ul li > a,
	.wd-sidebar.wd-side-hidden .wd-product-category-filter ul li > a,
	.wd-sidebar.wd-side-hidden .wd-swatches-filter li > a {
		display: inline-flex;
		align-items: center;
		min-height: 36px;
	}
}

/* 6.5 · Active filters: compact removable chips, with "clear all" secondary. */
.wd-active-filters {
	row-gap: 8px;
	padding-bottom: 18px;
}

.wd-active-filters li.chosen > a,
.wd-active-filters li.chosen > span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 11px;
	border: var(--madness-rule);
	background: none;
	color: var(--madness-body);
	font-size: 12px;
	line-height: 1.6;
	text-decoration: none;
}

.wd-active-filters li.chosen > a:hover {
	border-color: var(--wd-primary-color);
	color: var(--wd-primary-color);
}

.wd-active-filters .widget_layered_nav_filters ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.wd-active-filters .wd-clear-filters a {
	font-size: 12px;
	color: var(--madness-muted);
}

.wd-active-filters .wd-clear-filters a:hover {
	color: var(--wd-primary-color);
}

/* 6.6 · Pagination: one previous control, the page numbers, one next control.
 * The arrows are the controls' own text, never a pseudo-element, so the
 * rendered markup cannot show a second chevron. */
.wd-loop-builder-off .wd-pagination,
.wd-loop-builder-off .woocommerce-pagination {
	margin-top: clamp(32px, 4vw, 56px);
}

.woocommerce-pagination .page-numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	border: 0;
}

.woocommerce-pagination .page-numbers li {
	border: 0;
}

.woocommerce-pagination .page-numbers li a,
.woocommerce-pagination .page-numbers li span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	min-height: 42px;
	padding: 0 12px;
	border: var(--madness-rule);
	border-radius: 0;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.04em;
	color: var(--madness-body);
}

.woocommerce-pagination .page-numbers li span.current {
	border-color: var(--madness-ink);
	background-color: var(--madness-ink);
	color: var(--wd-main-bgcolor);
}

.woocommerce-pagination .page-numbers li a:hover {
	border-color: var(--madness-ink);
	color: var(--madness-ink);
}

.woocommerce-pagination .page-numbers li .prev,
.woocommerce-pagination .page-numbers li .next {
	padding: 0 18px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* WoodMart draws its own chevron on the two moves with the icon font and hides
 * the link's own text. The approved pagination labels the move instead, so the
 * framework's glyph is removed rather than shown beside the label — that is the
 * one defect this control can produce (two arrows for one move). */
.woocommerce-pagination .page-numbers li .prev::before,
.woocommerce-pagination .page-numbers li .next::before {
	content: none;
}

/* 6.7 · Zero-result recovery panel (rendered by inc/catalogue.php). */
.madness-empty-state {
	max-width: 46ch;
	padding: 56px 0 72px;
}

.madness-empty-state p {
	margin-bottom: 20px;
	color: var(--madness-body);
}

.madness-empty-state .madness-empty-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 18px;
	align-items: center;
}

.madness-empty-state .madness-empty-actions .button {
	display: inline-flex;
	align-items: center;
	min-height: var(--madness-control-touch);
	padding: 0 22px;
}

/* 6.8 · The archive on a phone is recomposed, not squeezed: the identity
 * becomes one column with a title sized to the screen, and the editorial
 * feature stacks so its identity never sits in a sliver beside the photograph. */
@media (max-width: 768.98px) {
	.woodmart-archive-shop .wd-page-title .wd-title-wrapp {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 14px;
		align-items: start;
	}

	.woodmart-archive-shop .wd-page-title .entry-title {
		grid-column: 1;
		grid-row: 2;
		font-size: clamp(38px, 13vw, 58px);
		line-height: 0.9;
		overflow-wrap: normal;
	}

	.woodmart-archive-shop .wd-page-title .madness-archive-summary {
		grid-column: 1;
		grid-row: 3;
		padding: 14px 0 0;
		border-top: var(--madness-rule);
		border-left: 0;
	}

	.woodmart-archive-shop .wd-page-title .madness-archive-summary-text {
		margin-bottom: 12px;
	}

	.products.elements-grid > .wd-product.madness-feature-card {
		grid-template-columns: minmax(0, 1fr);
		padding: 0 0 18px;
	}

	.products.elements-grid > .wd-product.madness-feature-card .product-element-top,
	.products.elements-grid > .wd-product.madness-feature-card .product-element-bottom {
		grid-column: 1;
		grid-row: auto;
	}

	.products.elements-grid > .wd-product.madness-feature-card .product-image-wrap img {
		aspect-ratio: 1.1 / 1;
	}

	.products.elements-grid > .wd-product.madness-feature-card .product-element-bottom {
		padding: 16px;
	}

	.products.elements-grid > .wd-product.madness-feature-card .wd-entities-title,
	.products.elements-grid > .wd-product.madness-feature-card .wd-entities-title a {
		font-size: 26px;
	}

	.products.elements-grid > .wd-product.madness-feature-card .price {
		margin-top: 10px;
		font-size: 18px;
	}
}

/* ===========================================================================
 * 7 · Product page
 *
 * WoodMart's own single-product machinery carries the page: layouts, gallery,
 * lightbox, the variations form, swatches, sticky behaviour, tabs/accordions
 * and the related query. This section sets the V3 hierarchy — photograph
 * first, a narrow commercial summary, then the editorial registers — and the
 * three places where a framework default contradicts the approved direction.
 *
 * Scoping note: every rule is scoped to `.single-product-page` (or
 * `.summary-inner`) so it outranks the theme's part stylesheets whatever order
 * they print in.
 * =========================================================================== */

/* 7.1 · Gallery and summary columns */
@media (min-width: 1025px) {
	.single-product-page .product-image-summary-inner > .product-images {
		grid-column: span 7;
	}

	.single-product-page .product-image-summary-inner > .summary {
		grid-column: span 5;
		padding-inline: clamp(48px, 6vw, 96px) 0;
	}

	.single-product-page .summary-inner {
		max-width: 440px;
		margin-inline: auto 0;
		padding-top: clamp(24px, 3.4vw, 52px);
	}
}

.single-product-page .summary-inner {
	max-width: 100%;
}

.single-product-page .woocommerce-product-gallery {
	background-color: var(--madness-stone);
}

.single-product-page .woocommerce-product-gallery .wd-gallery-images,
.single-product-page .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
	background-color: var(--madness-stone);
}

/* The expand control is the only gallery chrome the page keeps. */
.single-product-page .woocommerce-product-gallery .wd-gallery-btn.wd-action-btn > a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 0;
	background: none;
	box-shadow: none;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--madness-muted);
}

.single-product-page .woocommerce-product-gallery .wd-gallery-btn.wd-action-btn > a:hover {
	color: var(--madness-ink);
}

.single-product-page .woocommerce-product-gallery .wd-gallery-btn .wd-action-text {
	font-size: 12px;
}

/* 7.2 · Purchase-area register: title → price → facts → controls.
 * Elementor's global H1 outranks WoodMart's product-title rule, so the PDP
 * title states its own size. The dominant element on the page is the
 * photograph, so the title sits one step below the archive register. */
.single-product-page .product_title {
	margin: 0 0 14px;
	font-family: var(--madness-serif);
	font-weight: 400;
	line-height: 0.98;
	letter-spacing: -0.02em;
	color: var(--madness-ink);
	overflow-wrap: break-word;
}

@media (min-width: 1025px) {
	.single-product-page .product_title {
		font-size: clamp(38px, 3vw, 46px);
	}
}

@media (max-width: 1024px) {
	.single-product-page .product_title {
		font-size: clamp(33px, 4.2vw, 40px);
	}
}

@media (max-width: 768.98px) {
	.single-product-page .product_title {
		font-size: clamp(30px, 8vw, 36px);
		line-height: 1.03;
	}
}

.single-product-page .summary-inner .woocommerce-product-details__short-description {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.75;
	color: var(--madness-body);
}

@media (min-width: 1025px) {
	.single-product-page .summary-inner .woocommerce-product-details__short-description {
		max-width: 46ch;
	}
}

/* Price: minimal and immediately legible; sale state is the only use of the
 * accent colour in the purchase area. DOM order is kept so WooCommerce's own
 * screen-reader text still names both amounts. */
.single-product-page .summary-inner > .price {
	margin: 18px 0 0;
	font-family: var(--madness-sans);
	font-size: 22px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.01em;
	color: var(--madness-ink);
}

.single-product-page .summary-inner > .price del,
.single-product-page .summary-inner > .price del .woocommerce-Price-amount {
	color: var(--madness-faint);
	font-weight: 400;
	text-decoration: line-through;
}

.single-product-page .summary-inner > .price ins,
.single-product-page .summary-inner > .price ins .woocommerce-Price-amount {
	color: var(--madness-red);
	font-weight: 600;
	text-decoration: none;
}

.single-product-page .summary-inner > .price del ~ ins {
	margin-inline-start: 0.6em;
}

/* Stock: a quiet availability statement. Sold out earns emphasis by weight,
 * never by colour. */
.single-product-page .summary-inner p.stock {
	margin: 14px 0 0;
	font-family: var(--madness-sans);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.6;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.single-product-page .summary-inner p.stock.in-stock {
	color: var(--madness-muted);
}

.single-product-page .summary-inner p.stock.out-of-stock {
	color: var(--madness-ink);
}

/* 7.3 · Product facts, as the approved compact chips. Values come from native
 * product data only (inc/product.php); the labelled table stays in the
 * information area below. */
.madness-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 22px 0 0;
	padding: 0;
	list-style: none;
}

.madness-fact {
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 8px 11px;
	border: var(--madness-rule);
	font-family: var(--madness-sans);
	font-size: 10px;
	font-weight: 600;
	line-height: 1.5;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--madness-body);
}

.madness-fact-icon {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	margin-inline-end: 8px;
	color: var(--madness-muted);
}

/* 7.4 · Delivery / payment / returns: one hairline row of three columns, in
 * the order the purchase area needs it. */
.madness-commerce {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 26px 0 0;
	padding: 0;
	list-style: none;
}

.madness-commerce-row {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0;
	padding-top: 12px;
	border-top: var(--madness-rhythm);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.5;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--madness-muted);
}

.madness-commerce-icon {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	color: var(--madness-faint);
}

.madness-commerce-row a {
	color: var(--madness-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

.madness-commerce-row a:hover {
	color: var(--madness-red);
}

@media (max-width: 480px) {
	.madness-commerce {
		gap: 10px;
	}

	.madness-commerce-row {
		font-size: 10px;
		letter-spacing: 0.06em;
	}
}

/* 7.5 · Sold-out route forward. WooCommerce already removes the form and
 * WoodMart already prints the stock state; this only adds the way out. No
 * back-in-stock notification is offered, because the project has no such
 * system (unit spec §16). */
.madness-oos-note {
	margin: 16px 0 0;
	font-size: 14px;
	line-height: 1.7;
	color: var(--madness-body);
}

.madness-oos-note .madness-oos-link {
	margin-inline-start: 6px;
	color: var(--madness-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
	white-space: nowrap;
}

.madness-oos-note .madness-oos-link:hover {
	color: var(--madness-red);
}

/* 7.6 · Variation selectors. WoodMart's own swatch system at a size a thumb can
 * hit, with a selected state that is not carried by colour alone: the ring is
 * the state, the text chip is the control. */
.single-product-page .wd-swatches-single {
	--wd-swatch-size: 30px;
	--wd-swatch-w: 30px;
	--wd-swatch-h: 30px;
	--wd-swatch-h-sp: 12px;
	--wd-swatch-v-sp: 12px;
}

.single-product-page .wd-swatches-single .wd-swatch.wd-bg {
	border-radius: 50%;
	box-shadow: inset 0 0 0 1px rgba(17, 17, 15, 0.16);
}

.single-product-page .wd-swatches-single .wd-swatch.wd-bg.wd-active {
	box-shadow: inset 0 0 0 1px rgba(17, 17, 15, 0.16);
	outline: 1px solid var(--madness-ink);
	outline-offset: 3px;
}

.single-product-page .wd-swatches-single .wd-swatch.wd-disabled {
	cursor: default;
	opacity: 0.35;
}

/* Text chips: a bordered control rather than a bare label. */
.single-product-page .wd-swatches-product.wd-swatches-single .wd-swatch.wd-text {
	display: inline-flex;
	align-items: center;
	min-height: 42px;
	padding: 0 15px;
	border: var(--madness-rule);
	border-radius: 0;
	font-size: 13px;
	font-weight: 500;
	transition: none;
}

.single-product-page .wd-swatches-product.wd-swatches-single .wd-swatch.wd-text .wd-swatch-text {
	padding: 0;
	font-size: 13px;
	line-height: 1.2;
}

.single-product-page .wd-swatches-product.wd-swatches-single .wd-swatch.wd-text:after {
	display: none;
}

@media (hover: hover) {
	.single-product-page .wd-swatches-product.wd-swatches-single .wd-swatch.wd-text:hover:not(.wd-disabled) {
		border-color: var(--wd-primary-color);
	}
}

.single-product-page .wd-swatches-product.wd-swatches-single .wd-swatch.wd-text.wd-active {
	border-color: var(--wd-primary-color);
	background-color: var(--wd-primary-color);
	color: var(--wd-main-bgcolor);
}

.single-product-page .wd-swatches-product.wd-swatches-single .wd-swatch.wd-text.wd-disabled {
	text-decoration: line-through;
	text-decoration-thickness: 1px;
}

.single-product-page .wd-swatch:focus-visible {
	outline: 2px solid var(--madness-red);
	outline-offset: 2px;
}

/* Attribute label and the selected value the framework prints beside it. */
.single-product-page table.variations .label {
	padding-bottom: 10px;
}

.single-product-page table.variations .label label {
	font-family: var(--madness-sans);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--madness-muted);
}

.single-product-page .wd-attr-selected {
	margin-inline-start: 8px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: none;
	color: var(--madness-ink);
}

.single-product-page .wd-reset-var .reset_variations {
	font-size: 12px;
	color: var(--madness-muted);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

.single-product-page .wd-reset-var .reset_variations:hover {
	color: var(--madness-red);
}

.single-product-page .variations_form .woocommerce-variation-price,
.single-product-page .variations_form .woocommerce-variation-availability {
	font-size: 14px;
}

/* 7.7 · Add to cart. WooCommerce keeps a hidden native quantity input set to
 * one on the PDP; cart quantity editing remains on the cart screen. */
.single-product-page .summary-inner form.cart {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	margin-top: 24px;
}

.single-product-page .summary-inner form.cart .single_add_to_cart_button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 54px;
	padding: 0 24px;
	margin: 0;
}

@media (min-width: 1025px) {
	.single-product-page .summary-inner form.cart {
		min-height: var(--madness-control);
	}

	.single-product-page .summary-inner form.cart .woocommerce-variation-add-to-cart {
		display: block;
		width: 100%;
	}

	.single-product-page .summary-inner form.cart .single_add_to_cart_button,
	.single-product-page .summary-inner form.cart .woocommerce-variation-add-to-cart > .single_add_to_cart_button {
		width: 100%;
		min-height: var(--madness-control);
	}
}

/* 7.8 · Wishlist: a secondary action under the CTA, not a second CTA. */
.single-product-page .summary-inner .wd-wishlist-btn.wd-style-text > a,
.single-product-page .summary-inner .wd-wishlist-btn.wd-style-text > span {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: var(--madness-control-touch);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--madness-body);
}

.single-product-page .summary-inner .wd-wishlist-btn a.added,
.single-product-page .summary-inner .wd-wishlist-btn a.added .wd-action-icon {
	color: var(--madness-red);
}

/* 7.9 · Editorial description. Woo Long Description is printed once by
 * inc/story.php between the summary and information area. Inherited headline
 * defaults and product-owned image metadata only enhance presentation; both
 * image and headline may be absent without reserving an empty column. */
.madness-story {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(240px, 370px);
	align-items: start;
	gap: clamp(32px, 4vw, 60px);
	margin-top: var(--madness-section);
	padding: clamp(44px, 4.5vw, 64px) var(--madness-gutter);
	overflow: hidden;
	background-color: var(--madness-ink);
	color: var(--wd-main-bgcolor);
}

.madness-story--text-only {
	grid-template-columns: minmax(0, 1fr);
	padding-block: clamp(44px, 4.5vw, 64px);
}

.madness-story--text-only .madness-story-copy {
	width: min(100%, 680px);
}

.madness-story--with-image .madness-story-copy {
	padding-top: clamp(6px, 1.3vw, 18px);
}

.madness-story-title {
	max-width: 14ch;
	margin: 0 0 24px;
	font-family: var(--madness-serif);
	font-weight: 400;
	font-size: clamp(38px, 3.2vw, 46px);
	line-height: 0.94;
	letter-spacing: -0.025em;
	text-transform: none;
}

.madness-story-title-primary,
.madness-story-title-accent {
	display: block;
}

.madness-story-title-primary {
	color: var(--wd-main-bgcolor);
}

.madness-story-title-accent {
	margin-top: 0.08em;
	font-style: italic;
	color: var(--madness-red);
}

.madness-story-body {
	max-width: 42ch;
	margin: 0;
	font-size: 14.5px;
	line-height: 1.8;
	color: rgba(248, 247, 244, 0.82);
}

.madness-story--text-only .madness-story-body {
	max-width: 58ch;
}

.madness-story-body > :first-child {
	margin-top: 0;
}

.madness-story-body > :last-child {
	margin-bottom: 0;
}

.madness-story-media {
	align-self: start;
	justify-self: end;
	width: min(calc(100% - 12px), 360px);
	margin: 0 8px 12px 0;
	padding: 6px;
	background: #f0ece3;
	box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
	transform: translateY(-8px) rotate(-2.25deg);
	transform-origin: 50% 50%;
}

.madness-story-media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	object-position: center;
	opacity: 1;
	filter: none;
	mix-blend-mode: normal;
}

@media (max-width: 1024px) {
	.madness-story {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}

	.madness-story--with-image .madness-story-copy {
		padding-top: 0;
	}

	.madness-story-media {
		justify-self: center;
		width: min(calc(100% - 36px), 370px);
		margin-right: 0;
	}
}

/* 7.10 · Information area: the editorial heading on the left, WoodMart's own
 * expandable sections on the right, sharing one grid. */
.single-product-page .product-tabs-inner {
	display: grid;
	grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
	align-items: start;
	column-gap: clamp(40px, 8vw, 130px);
}

.madness-info-intro {
	padding-top: 6px;
}

.madness-info-intro-eyebrow {
	display: block;
	margin-bottom: 18px;
	font-family: var(--madness-sans);
	font-size: var(--madness-eyebrow-size);
	font-weight: 600;
	letter-spacing: var(--madness-eyebrow-tracking);
	text-transform: uppercase;
	color: var(--madness-muted);
}

.madness-info-intro-title {
	margin: 0;
	font-family: var(--madness-serif);
	font-weight: 400;
	font-size: clamp(34px, 3.6vw, 54px);
	line-height: 1;
	letter-spacing: -0.02em;
	color: var(--madness-ink);
}

.single-product-page .woocommerce-tabs .wd-nav-tabs > li > a {
	font-family: var(--madness-sans);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.single-product-page .woocommerce-tabs .wc-tab-inner {
	font-size: 15px;
	line-height: 1.8;
}

.single-product-page .woocommerce-tabs .wc-tab-inner > h2:first-child,
.single-product-page .woocommerce-tabs .wc-tab-inner > h3:first-child {
	display: none;
}

@media (min-width: 1025px) {
	.single-product-page .tabs-layout-accordion {
		margin-top: 0;
	}

	.single-product-page .woocommerce-tabs .wc-tab-inner {
		max-width: 74ch;
	}
}

.single-product-page .tabs-layout-accordion .wd-accordion-title {
	min-height: 66px;
	padding: 0;
	font-family: var(--madness-sans);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--madness-ink);
}

.single-product-page .tabs-layout-accordion .wd-accordion-content {
	padding: 4px 0 34px;
	border-bottom: var(--madness-rhythm);
}

/* The full specification table: hairlines, quiet labels, readable values. */
.single-product-page .shop_attributes {
	--wd-attr-brd-style: solid;
	--wd-attr-v-gap: 12px;
	margin: 0;
	font-size: 14px;
}

.single-product-page .shop_attributes th,
.single-product-page .shop_attributes td {
	padding: 10px 0;
	vertical-align: baseline;
}

.single-product-page .shop_attributes th .wd-attr-name {
	font-family: var(--madness-sans);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--madness-muted);
}

/* Reference meta (SKU, category, tags) closes the page in a quieter register. */
.single-product-page .product_meta {
	gap: 6px 10px;
	font-size: 12.5px;
	line-height: 1.7;
	color: var(--madness-muted);
}

.single-product-page .product_meta .meta-label {
	font-weight: 500;
	color: var(--madness-muted);
}

.single-product-page .product_meta a {
	color: var(--madness-muted);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.single-product-page .product_meta a:hover {
	color: var(--madness-ink);
}

/* Imported merchandising tags are implementation data, not customer-facing
 * product facts. The confirmed category and SKU remain in the reference row. */
.single-product-page .product_meta .tagged_as {
	display: none;
}

/* 7.11 · Related products: WooCommerce's own query on the canonical card. Only
 * the section rhythm and the column count are set here. */
.single-product-page .related-products {
	margin-top: clamp(56px, 7vw, 104px);
	padding-top: clamp(34px, 4vw, 52px);
	border-top: var(--madness-rhythm);
}

.single-product-page .related-products > .wd-el-title {
	max-width: 9em;
	margin: 0 0 clamp(28px, 3vw, 44px);
	font-family: var(--madness-serif);
	font-size: clamp(34px, 3vw, 44px);
	font-weight: 400;
	line-height: 0.96;
	letter-spacing: -0.02em;
	color: var(--madness-ink);
}

@media (min-width: 1025px) {
	.single-product-page .related-products .wd-products {
		--wd-col-lg: 4;
		--wd-col-md: 4;
	}
}

/* 7.12 · Sticky purchase bar. The purchase panel stays beside the gallery on
 * desktop (WoodMart's sticky summary), and the bar is restricted to the two
 * small breakpoints where it is the only way to reach the CTA — running both at
 * once is the fixed app panel the direction rejects. The framework already
 * offsets the bar above the mobile toolbar and pads the page by its height. */
@media (min-width: 769px) {
	body.single-product .wd-sticky-btn {
		display: none;
	}

	body.single-product.wd-sticky-btn-on {
		padding-bottom: 0;
	}
}

/* The mobile bottom toolbar is still present between 769 and 1024px, so the
 * page keeps that offset even though the bar itself is hidden there. */
@media (min-width: 769px) and (max-width: 1024px) {
	body.single-product.sticky-toolbar-on.wd-sticky-btn-on {
		padding-bottom: 55px;
	}
}

body.single-product .wd-sticky-btn .wd-entities-title {
	font-family: var(--madness-sans);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.01em;
}

@media (max-width: 768.98px) {
	body.single-product .wd-sticky-btn .single_add_to_cart_button,
	body.single-product .wd-sticky-btn .wd-sticky-add-to-cart {
		font-size: 12px;
		letter-spacing: 0.1em;
	}
}

/* 7.13 · Small screens: the information area becomes one column and the story
 * keeps its rhythm rather than shrinking into a caption. */
@media (max-width: 1024px) {
	.single-product-page .product-tabs-inner {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 34px;
	}

	.madness-info-intro-title {
		font-size: clamp(30px, 5vw, 40px);
	}
}

@media (max-width: 768.98px) {
	.madness-story {
		margin-top: 64px;
		gap: 28px;
		padding: 44px var(--madness-gutter);
	}

	.madness-story--text-only {
		padding-block: 44px;
	}

	.madness-story-title {
		max-width: 13ch;
		margin-bottom: 20px;
		font-size: clamp(28px, 8vw, 34px);
		line-height: 0.96;
	}

	.madness-story-media {
		width: min(calc(100% - 40px), 260px);
		margin: 0 auto 2px;
		padding: 6px;
		box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
		transform: translateY(0) rotate(-0.8deg);
	}

	.single-product-page .related-products {
		margin-top: 64px;
		padding-top: 34px;
	}

	.single-product-page .related-products > .wd-el-title {
		font-size: clamp(32px, 9vw, 40px);
	}

	.single-product-page .tabs-layout-accordion .wd-accordion-title {
		min-height: 58px;
	}
}

/* ===========================================================================
 * 8 · Homepage
 *
 * Four project widgets now own their complete internal components; their
 * stylesheet ships with htwp-p001-elementor and is loaded only when those
 * widgets are present. Campaign, sale, and trust are native Elementor
 * structures. This child-theme section is intentionally skin only: typography,
 * surfaces, image treatment, and borders. Elementor data owns proportions,
 * direction, gaps, ordering, spacing, positioning, and responsive stacking.
 * =========================================================================== */

/* The front-page document spans the viewport. Each widget or native container
 * owns its own measured inner composition. */
body.home .wd-content-layout.content-layout-wrapper {
	width: 100%;
	max-width: none;
	padding: 0;
}

/* Native Elementor Button widgets use the shared editorial link register. */
.madness-rule-button .elementor-button {
	display: inline-flex;
	align-items: center;
	gap: 15px;
	min-height: 0;
	padding: 0 0 6px;
	border: 0;
	border-bottom: 1px solid currentColor;
	border-radius: 0;
	background: none;
	box-shadow: none;
	font-family: var(--madness-sans);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: inherit;
}

.madness-rule-button .elementor-button::after {
	content: "↗";
	font-size: 14px;
	line-height: 1;
}

.madness-rule-button .elementor-button:hover,
.madness-rule-button .elementor-button:focus-visible {
	background: none;
	color: var(--madness-red);
}

/* 8.1 · Campaign / editorial story skin. */
.madness-home-campaign-native {
	background-color: var(--madness-stone);
}

.madness-home-campaign-collage-native {
	isolation: isolate;
}

.madness-home-campaign-big-native,
.madness-home-campaign-small-native,
.madness-home-campaign-big-native .elementor-widget-container,
.madness-home-campaign-small-native .elementor-widget-container {
	height: 100%;
}

.madness-home-campaign-big-native img,
.madness-home-campaign-small-native img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.madness-home-campaign-small-native {
	border: 10px solid var(--madness-stone);
}

.madness-home-campaign-mark-native {
	z-index: 2;
	pointer-events: none;
	mix-blend-mode: multiply;
}

.madness-home-campaign-mark-native .elementor-heading-title {
	margin: 0;
	font-family: var(--madness-serif);
	font-weight: 400;
	font-size: clamp(120px, 15vw, 210px);
	line-height: 0.8;
	color: var(--madness-red);
}

.madness-home-campaign-eyebrow-native .elementor-heading-title {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
	font-family: var(--madness-sans);
	font-size: var(--madness-eyebrow-size);
	font-weight: 600;
	letter-spacing: var(--madness-eyebrow-tracking);
	text-transform: uppercase;
	color: var(--madness-muted);
}

.madness-home-campaign-eyebrow-native .elementor-heading-title::before {
	content: "";
	width: 42px;
	height: 2px;
	background: var(--madness-red);
}

.madness-home-campaign-title-native .elementor-heading-title {
	margin: 0;
	font-family: var(--madness-serif);
	font-weight: 400;
	font-size: clamp(52px, 7vw, 108px);
	line-height: 0.82;
	letter-spacing: -0.05em;
	color: var(--madness-ink);
}

.madness-home-campaign-title-native em {
	display: block;
	font-style: italic;
}

.madness-home-campaign-lead-native p {
	max-width: 42ch;
	margin: 0;
	font-size: 13.5px;
	line-height: 1.75;
	color: var(--madness-body);
}

/* 8.2 · Sale / editorial campaign skin. */
.madness-home-sale-number-native .elementor-heading-title {
	margin: 0;
	font-family: var(--madness-serif);
	font-weight: 400;
	font-size: clamp(120px, 15vw, 232px);
	line-height: 0.7;
	letter-spacing: -0.07em;
	color: var(--madness-red);
}

.madness-home-sale-title-native .elementor-heading-title {
	margin: 0;
	font-family: var(--madness-serif);
	font-weight: 400;
	font-size: clamp(42px, 5vw, 72px);
	line-height: 0.95;
	letter-spacing: -0.03em;
	color: var(--madness-ink);
}

.madness-home-sale-lead-native p {
	max-width: 32ch;
	margin: 0;
	font-size: 13.5px;
	line-height: 1.75;
	color: var(--madness-muted);
}

.madness-home-sale-image-native,
.madness-home-sale-image-native .elementor-widget-container {
	height: 100%;
}

.madness-home-sale-image-native img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 34%;
	filter: saturate(0.6);
}

.madness-home-sale-caption-native {
	background: var(--madness-paper);
}

.madness-home-sale-caption-native p {
	margin: 0;
	writing-mode: vertical-rl;
	font-family: var(--madness-sans);
	font-size: 9.5px;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--madness-muted);
}

/* 8.3 · Trust / commerce skin. Structure, columns, gaps, stacking, item
 * alignment, and the outer borders are normal Elementor container settings. */
.madness-trust-number-native .elementor-heading-title {
	margin: 0;
	font-family: var(--madness-serif);
	font-weight: 400;
	font-size: 38px;
	line-height: 1;
	color: var(--color-gray-400);
}

.madness-trust-label-native .elementor-heading-title {
	margin: 0;
	font-family: var(--madness-sans);
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.11em;
	text-transform: uppercase;
	color: var(--madness-ink);
}

.madness-trust-detail-native p {
	margin: 0;
	font-size: 12px;
	line-height: 1.6;
	color: var(--madness-muted);
}

.madness-trust-link-native .elementor-button {
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: underline;
	text-underline-offset: 3px;
}

@media (max-width: 768.98px) {
	.madness-home-campaign-small-native {
		border-width: 7px;
	}

	.madness-home-campaign-mark-native .elementor-heading-title {
		font-size: 130px;
	}

	.madness-home-campaign-title-native .elementor-heading-title {
		font-size: clamp(46px, 14vw, 62px);
	}

	.madness-home-sale-number-native .elementor-heading-title {
		font-size: clamp(120px, 40vw, 168px);
	}

	.madness-home-sale-title-native .elementor-heading-title {
		font-size: clamp(40px, 12vw, 52px);
	}
}

/* ===========================================================================
 * 9 · Transactional surfaces — cart, mini-cart, checkout, order, account
 *
 * The block cart and checkout already arrive inside the project's system:
 * WoodMart's global button, form, colour and radius settings reach
 * WooCommerce's block CSS, and M6 confirmed the rest (ink rectangular primary
 * actions, 1px hairlines, 0 radius, no shadows, Manrope everywhere).
 *
 * Two things do not follow from those settings and are corrected here:
 *   9.1 the two data rows that would otherwise inherit the heading family — the
 *       cart's column headers and the totals labels move to the UI sans, while
 *       section headings keep the serif register they share with the checkout
 *       steps;
 *   9.2 the quantity stepper and the cart remove control on touch devices, which
 *       WooCommerce ships at 25×42 / 24×24. Both meet WCAG 2.2 AA (24×24), but
 *       the project's own baseline is a 44px target wherever a finger is the
 *       pointer.
 *
 * No commerce mechanism, markup or behaviour is changed by this section.
 * =========================================================================== */

.wc-block-cart-items__header span,
.wc-block-components-totals-item__label {
	font-family: var(--madness-sans);
}

.wc-block-cart-items__header span {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
}

.wc-block-components-totals-item__label {
	font-size: 14px;
}

@media (pointer: coarse) {
	div.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button,
	.wc-block-cart-item__remove-link,
	.wc-block-components-panel__button {
		min-width: var(--madness-control-touch);
		min-height: var(--madness-control-touch);
	}

	div.wc-block-components-quantity-selector .wc-block-components-quantity-selector__input {
		min-height: var(--madness-control-touch);
	}
}

/* ===========================================================================
 * 10 · Motion
 *
 * Component-owned motion is handled by the component package. The framework
 * motion below stops when the visitor asks for reduced motion.
 * =========================================================================== */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.wd-products.wd-loop-builder-off .wd-product .wd-add-btn {
		transition: none;
	}

	.whb-header,
	.whb-header *,
	.site-logo img {
		transition-duration: 0.001ms !important;
		animation-duration: 0.001ms !important;
	}
}

/* M10 · Compact offer countdown; timing/business rules remain in commerce plugin. */
.madness-offer-countdown {
	margin: 8px 0;
	color: var(--madness-ink, #181818);
	font-family: var(--madness-sans, Manrope, sans-serif);
	font-size: 11px;
	font-variant-numeric: tabular-nums;
	font-weight: 650;
	letter-spacing: 0.08em;
	line-height: 1.25;
	text-transform: uppercase;
}

.madness-offer-countdown__label {
	color: var(--madness-red, #b51f2e);
}

.madness-offer-countdown--card {
	margin: 5px 0 0;
	font-size: 10px;
}

.madness-offer-countdown--pdp,
.madness-offer-countdown--variation {
	margin: 10px 0 14px;
	font-size: 12px;
}

/* M10 follow-up · Flycart owns the rule title; Madness owns its quiet PDP skin. */
.single-product .summary-inner > .awdr_discount_bar {
	margin: 12px 0;
	padding: 8px 0;
	border-top: 1px solid var(--madness-red, #b51f2e);
	border-bottom: 1px solid var(--madness-ink, #181818);
	border-radius: 0;
	background: transparent !important;
	color: var(--madness-ink, #181818) !important;
	font-family: var(--madness-sans, Manrope, sans-serif);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.35;
	text-transform: uppercase;
}

.single-product .summary-inner > .awdr_discount_bar .awdr_discount_bar_content {
	padding: 0;
}
