/* ================================================================
   Coutellerie des Dômes — Single Product Page
   Matches "Le Balthazar" mockup: 2-column layout
   ================================================================ */

/* ── Variables ── */
:root {
	--cd-left-col: 150px;       /* white strip width — knife lives here */
	--cd-gutter: 40px;          /* gap between columns */
	--cd-max: 1200px;
	--cd-beige: #f5f3ef;
	--cd-text: #1f1f1f;
	--cd-muted: #5a5a5a;
	--cd-accent: #7f514e;
}

/* ── Block-theme integration: full-width bleed ── */
[data-block-name="woocommerce/legacy-template"] {
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	background: #fff !important;
}

[data-block-name="woocommerce/legacy-template"] > main {
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: #fff !important;
}

/* Hide breadcrumb on custom product page */
[data-block-name="woocommerce/legacy-template"] .woocommerce-breadcrumb {
	display: none !important;
}

/* Hide WooCommerce notices wrapper if empty */
[data-block-name="woocommerce/legacy-template"] .woocommerce-notices-wrapper:empty {
	display: none !important;
}

/* Kill constrained layout max-width on children inside the template.
   NOTE: .cd-single-product is wrapped with an inline-style div, so this
   rule no longer fights us. Keep only for safety on other WC notices. */
[data-block-name="woocommerce/legacy-template"] > main > .woocommerce-notices-wrapper {
	max-width: none !important;
}

/* White background on entire wp-site-blocks when product template active */
body.single-product .wp-site-blocks {
	background: #fff !important;
	padding-bottom: 0 !important;
}

/* ── Reset WooCommerce defaults ── */
.cd-single-product .woocommerce-product-gallery,
.cd-single-product > .summary.entry-summary {
	display: none !important;
}
/* Express payment buttons (G Pay, Apple Pay) — hide all entry points */
.cd-single-product [id*="payment-request"],
.cd-single-product [class*="payment-request"],
.cd-single-product button.gpay-button,
.cd-single-product .gpay-button-container,
.cd-single-product .wcpay-express-checkout-wrapper,
.cd-single-product #wcpay-express-checkout-element,
.cd-single-product [id*="wcpay-express"],
.cd-single-product [class*="wcpay-express"] {
	display: none !important;
}


/* Hide any WooCommerce gallery / flexslider dots that leak through */
.cd-single-product .flex-control-thumbs,
.cd-single-product .flex-control-nav,
.cd-single-product .woocommerce-product-gallery__trigger,
.cd-single-product .woocommerce-product-gallery__image,
.cd-single-product .zoomImg,
.cd-single-product ol.flex-control-nav {
	display: none !important;
}

/* Also hide gallery elements rendered outside .cd-single-product */
[data-block-name="woocommerce/legacy-template"] .woocommerce-product-gallery {
	display: none !important;
}

/* ── Root container ── */
.cd-single-product,
.cd-single-product * {
	box-sizing: border-box;
}

.cd-single-product {
	max-width: 860px;
	width: 100%;
	background: #fff;
	color: var(--cd-text);
	font-family: "Manrope", "Open Sans", sans-serif;
}

.cd-single-product .cd-product {
	position: relative;
	margin: 0 !important;
	padding: 0 !important;
}

.cd-single-product .cd-product > * {
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
}

/* ================================================================
   HERO SECTION — wood background + knife + title
   ================================================================ */
.cd-single-product .cd-hero {
	position: relative;
	display: grid;
	grid-template-columns: var(--cd-left-col) 1fr;
	min-height: 420px;
	background-color: #6b4c3b;
	background-size: cover !important;
	background-position: center !important;
	background-repeat: no-repeat !important;
	overflow: visible;
}

/* Dark overlay only on the wood part (right of left-col) */
.cd-single-product .cd-hero-overlay {
	position: absolute;
	top: 0;
	left: var(--cd-left-col);
	right: 0;
	bottom: 0;
	background: rgba(35, 26, 18, 0.38);
	z-index: 1;
	pointer-events: none;
}

/* ── Left column: white strip ── */
.cd-single-product .cd-hero-left {
	background: #fff;
	z-index: 3;
	position: relative;
	border-right: 1px solid rgba(0, 0, 0, 0.06);
}

/* ── Knife: direct child of .cd-hero (position:relative), over the wood ── */
.cd-single-product .cd-knife {
	position: absolute;
	top: 0;
	bottom: -200px;          /* knife handle stops 200px below hero bottom */
	left: 162px;             /* knife center = 162+35 = 197px = 47px into wood */
	width: 70px;
	z-index: 20;
	pointer-events: none;
	display: flex;
	align-items: flex-end;   /* handle at the bottom */
	justify-content: center;
	background: transparent;
	padding: 0;
}

.cd-single-product .cd-knife img {
	display: block;
	width: 70px;
	height: 95%;
	max-height: 560px;
	object-fit: contain;
	background: transparent;
	transition: opacity 0.25s ease;
	filter: drop-shadow(3px 6px 16px rgba(0,0,0,0.50));
}

/* ── Right column: text over wood ── */
.cd-single-product .cd-hero-right {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 2rem 2.5rem 2.5rem 94px;  /* left=94px: text starts at 244px, clears knife right edge at 215px */
	color: #fff;
}

.cd-single-product .cd-kicker {
	display: inline-block;
	padding: 0.2rem 0.55rem;
	border: 1px solid rgba(255, 255, 255, 0.60);
	margin: 0 0 0.6rem;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 0.82rem;
	font-style: italic;
	font-weight: 400;
	letter-spacing: 0.03em;
	color: rgba(255, 255, 255, 0.92);
	text-transform: none;
	line-height: 1.4;
}

.cd-single-product .product_title {
	margin: 0 0 1rem !important;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: clamp(2.8rem, 5.5vw, 4.6rem);
	font-weight: 400;
	line-height: 1.05;
	letter-spacing: 0.01em;
	color: #fff !important;
}

.cd-single-product .cd-hero-right .woocommerce-product-details__short-description,
.cd-single-product .cd-hero-right .woocommerce-product-details__short-description p {
	max-width: 42ch;
	margin: 0.8rem 0 0;
	font-size: 0.88rem;
	line-height: 1.65;
	color: rgba(255, 255, 255, 0.88);
	font-family: "Manrope", "Open Sans", sans-serif;
	text-align: justify;
}

/* ================================================================
   DETAILS SECTION — variations, tabs, price
   ================================================================ */
.cd-single-product .cd-details {
	display: grid;
	grid-template-columns: var(--cd-left-col) 1fr;
	background: #fff;
}

.cd-single-product .cd-details-left {
	min-height: 210px; /* matches knife bottom: -200px */
	border-right: 1px solid rgba(0, 0, 0, 0.06);
}

.cd-single-product .cd-details-right {
	padding: 1.8rem 2rem 2.5rem 75px;  /* left=75px: text starts at 225px, clears knife right edge at 215px */
}

.cd-single-product .cd-details-body {
	display: grid;
	grid-template-columns: 1fr 200px;
	gap: 2rem;
	align-items: start;
}

/* ── Main: variations + tabs ── */
.cd-single-product .cd-details-main {
	min-width: 0;
}

/* ── Side: price + add-to-cart link ── */
.cd-single-product .cd-details-side {
	text-align: right;
	padding-top: 0.2rem;
}

.cd-single-product .cd-price-wrap {
	display: flex;
	align-items: baseline;
	justify-content: flex-end;
	gap: 0;
	margin: 0 0 0.6rem;
}

.cd-single-product .cd-price-wrap .price {
	margin: 0 !important;
}

.cd-single-product .cd-details-side .price {
	margin: 0 0 0.6rem;
	font-family: "Manrope", "Open Sans", sans-serif;
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	color: var(--cd-text);
}

.cd-single-product .cd-details-side .cd-price-suffix {
	font-size: 0.78rem;
	font-weight: 500;
	color: var(--cd-muted);
	margin-left: 0.25rem;
}

.cd-single-product .cd-details-side .price bdi {
	font-variant-numeric: tabular-nums;
}

/* "Ajouter au panier" styled link (like the mockup) */
.cd-single-product .cd-add-to-cart-link {
	display: inline-block;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 1.55rem;
	font-style: italic;
	font-weight: 400;
	color: var(--cd-accent);
	text-decoration: underline;
	text-underline-offset: 0.3rem;
	text-decoration-thickness: 1px;
	cursor: pointer;
}

.cd-single-product .cd-cart-link {
	margin-top: 0.4rem;
}

.cd-single-product .cd-add-to-cart-link:hover {
	color: #5f3a37;
}

/* ================================================================
   WooCommerce cart form — visually hidden but functional for JS
   The entire form (including G Pay, WC button, qty) is sr-only.
   JS reads variation data via found_variation event on this form.
   Our .cd-add-to-cart-link triggers the hidden button via .click().
   ================================================================ */
.cd-single-product form.variations_form {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0,0,0,0) !important;
	white-space: nowrap !important;
	border: 0 !important;
	pointer-events: none !important;
}

/* Re-enable pointer-events on the selects so JS can dispatch change events */
.cd-single-product form.variations_form select {
	pointer-events: auto !important;
}

/* ================================================================
   TABS — masquer l'onglet Description (affiché inline dans cd-description)
   ================================================================ */
.cd-single-product .woocommerce-tabs ul.tabs li#tab-title-description {
	display: none !important;
}
.cd-single-product #tab-panel-description {
	display: none !important;
}

.cd-single-product .cd-tabs {
	margin-top: 0;
}

.cd-single-product .woocommerce-tabs {
	margin: 0;
}

.cd-single-product .woocommerce-tabs ul.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	padding: 0;
	margin: 0 0 1rem;
	border: 0;
	list-style: none;
}

.cd-single-product .woocommerce-tabs ul.tabs::before,
.cd-single-product .woocommerce-tabs ul.tabs::after {
	display: none !important;
}

.cd-single-product .woocommerce-tabs ul.tabs li {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent !important;
	border-radius: 0;
}

.cd-single-product .woocommerce-tabs ul.tabs li::before,
.cd-single-product .woocommerce-tabs ul.tabs li::after {
	display: none !important;
}

.cd-single-product .woocommerce-tabs ul.tabs li a {
	display: inline-block;
	padding: 0.4rem 0.75rem;
	border: 1px solid #d4cfc8;
	font-family: "Manrope", "Open Sans", sans-serif;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	color: #333;
	background: #f0ece7;
	transition: background 0.15s, color 0.15s;
}

.cd-single-product .woocommerce-tabs ul.tabs li.active a {
	background: #333;
	color: #fff;
	border-color: #333;
}

.cd-single-product .woocommerce-Tabs-panel {
	margin: 0;
	padding: 0 !important;
}

.cd-single-product .woocommerce-Tabs-panel h2 {
	display: none;
}

.cd-single-product .woocommerce-Tabs-panel,
.cd-single-product .woocommerce-Tabs-panel p {
	margin: 0;
	font-family: "Manrope", "Open Sans", sans-serif;
	font-size: 0.88rem;
	line-height: 1.6;
	color: #444;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 860px) {
	:root {
		--cd-left-col: 90px;
		--cd-gutter: 24px;
	}

	.cd-single-product .cd-hero {
		min-height: 280px;
	}

	.cd-single-product .cd-hero-right {
		padding: 2rem 1.5rem 2rem 60px;  /* left=60px: clears knife right edge at 125px (65-90 col start) */
	}

	.cd-single-product .cd-knife {
		bottom: -60px;
		left: 65px;  /* knife center = 65+35 = 100px = 10px into wood at this breakpoint */
	}

	.cd-single-product .cd-details-right {
		padding: 1.2rem 1.2rem 2rem var(--cd-gutter);
	}

	.cd-single-product .cd-details-body {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.cd-single-product .cd-details-side {
		text-align: left;
	}
}

@media (max-width: 600px) {
	.cd-single-product .cd-hero {
		grid-template-columns: 1fr;
		min-height: auto;
	}

	.cd-single-product .cd-hero-left {
		display: none;
	}

	.cd-single-product .cd-knife {
		display: none;
	}

	.cd-single-product .cd-hero-overlay {
		left: 0;
	}

	.cd-single-product .cd-hero-right {
		padding: 2rem 1.2rem;
	}

	.cd-single-product .cd-details {
		grid-template-columns: 1fr;
	}

	.cd-single-product .cd-details-left {
		display: none;
	}

	.cd-single-product .cd-details-right {
		padding: 1rem;
	}
}

/* ================================================================
   COLOR SWATCHES — pa_materiau circles
   ================================================================ */

/* Row: selected value label on the left + circles on the right */
.cd-single-product .cd-swatch-row {
display: flex;
align-items: center;
gap: 1rem;
margin: 0 0 1rem;
}

.cd-single-product .cd-swatch-value {
font-family: "Manrope", "Open Sans", sans-serif;
font-size: 0.72rem;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--cd-text);
min-width: 4rem;
}

.cd-single-product .cd-swatches {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
align-items: center;
}

.cd-single-product .cd-swatch {
display: inline-block;
width: 24px;
height: 24px;
border-radius: 50%;
background-color: var(--swatch-color, #ccc);
border: 2px solid transparent;
outline: 2px solid transparent;
outline-offset: 2px;
cursor: pointer;
transition: outline 0.15s, transform 0.15s;
padding: 0;
box-shadow: inset 0 0 0 1px rgba(0,0,0,0.18), 0 1px 3px rgba(0,0,0,0.15);
}

.cd-single-product .cd-swatch:hover {
transform: scale(1.14);
outline: 2px solid rgba(0,0,0,0.3);
}

.cd-single-product .cd-swatch--selected {
outline: 2px solid var(--cd-accent, #7f514e);
outline-offset: 3px;
transform: scale(1.1);
}

.cd-single-product .cd-swatch-clear {
font-family: "Manrope", "Open Sans", sans-serif;
font-size: 0.72rem;
color: var(--cd-accent);
text-decoration: underline;
text-underline-offset: 2px;
}

.cd-single-product .cd-swatch-clear:hover {
color: #5f3a37;
}

/* ================================================================
   CONDITIONNEMENT PILLS (PAR 6, PAR 12, À L'UNITÉ)
   ================================================================ */
.cd-single-product .cd-pills {
display: flex;
flex-wrap: wrap;
gap: 0.4rem;
margin: 0 0 1.2rem;
}

.cd-single-product .cd-pill {
display: inline-block;
padding: 0.28rem 0.7rem;
border: 1px solid #b8b4ae;
border-radius: 999px;
font-family: "Manrope", "Open Sans", sans-serif;
font-size: 0.68rem;
font-weight: 600;
letter-spacing: 0.07em;
text-transform: uppercase;
color: #333;
background: transparent;
cursor: pointer;
transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.cd-single-product .cd-pill:hover,
.cd-single-product .cd-pill.cd-pill--active {
background: #1f1f1f;
color: #fff;
border-color: #1f1f1f;
}

/* ================================================================
   BOTTOM SPACE — kill all orphan whitespace below product
   ================================================================ */
body.single-product .entry-content,
body.single-product .wp-site-blocks > *:last-child {
padding-bottom: 0 !important;
margin-bottom: 0 !important;
}

body.single-product footer,
body.single-product .site-footer {
margin-top: 0 !important;
}

/* Kill Tailwind / theme padding that creates the beige void */
body.single-product .is-layout-constrained,
body.single-product .is-layout-flow {
padding-bottom: 0 !important;
}

/* ================================================================
   DESCRIPTION — long texte produit sous le hero
   ================================================================ */
.cd-single-product .cd-description {
	padding: 2.5rem 2rem;
	background: #faf8f5;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.cd-single-product .cd-description-inner {
	max-width: 100%;
	font-size: 1rem;
	line-height: 1.75;
	color: var(--cd-text);
}

.cd-single-product .cd-description-inner p {
	margin: 0 0 1rem;
}

.cd-single-product .cd-description-inner p:last-child {
	margin-bottom: 0;
}

@media (max-width: 860px) {
	.cd-single-product .cd-description {
		padding: 1.8rem 1.5rem;
	}
}

/* ================================================================
   ZONE ÉDITORIALE BAS DE PAGE — modifiable dans l'éditeur de site
   ================================================================ */
.cd-editorial-bottom {
	padding: 4rem 2rem !important;
	background: #f6f3f2 !important;
	max-width: none !important;
	margin: 0 !important;
}

.cd-editorial-bottom .cd-editorial-title {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: clamp(1.8rem, 3vw, 2.6rem);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: 0.01em;
	margin: 0 0 1rem !important;
	color: #1f1f1f;
}

.cd-editorial-bottom .cd-editorial-intro {
	max-width: 64ch;
	font-size: 1rem;
	line-height: 1.7;
	color: #5a5a5a;
	margin: 0 0 2.5rem !important;
}

.cd-editorial-bottom .wp-block-column h3 {
	font-family: "Manrope", system-ui, sans-serif;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #1f1f1f;
	margin: 0 0 0.6rem !important;
}

.cd-editorial-bottom .wp-block-column p {
	font-size: 0.88rem;
	line-height: 1.65;
	color: #5a5a5a;
	margin: 0 !important;
}
