/**
 * VDP — Fiches produit unifiées
 * Typographie lisible, layout simple.
 */

:root {
	--vdp-pu-max: min(1140px, calc(100vw - 2rem));
	--vdp-pu-red: var(--vdp-hh-red, #5e0202);
	--vdp-pu-red-hover: var(--vdp-hh-red-hover, #480101);
	--vdp-pu-ink: var(--vdp-hh-ink, #1d1d1f);
	--vdp-pu-muted: var(--vdp-hh-muted, #686868);
	--vdp-pu-border: var(--vdp-hh-border, #e0e0e0);
	--vdp-pu-bg: #ffffff;
	--vdp-pu-white: #ffffff;
	--vdp-pu-font: 'Poppins', system-ui, sans-serif;
	--vdp-pu-text: 1rem;
	--vdp-pu-text-sm: 0.9375rem;
	--vdp-pu-text-lg: 1.125rem;
}

/* ── Base lisible sur toute la fiche ── */
body.vdp-product-unified.single-product {
	background: var(--vdp-pu-bg);
	font-family: var(--vdp-pu-font);
	font-size: var(--vdp-pu-text);
	line-height: 1.55;
	color: var(--vdp-pu-ink);
}

body.vdp-product-unified.single-product .elementor-location-single,
body.vdp-product-unified.single-product .elementor-widget-shortcode,
body.vdp-product-unified.single-product .elementor-widget-woocommerce-product-meta {
	font-size: var(--vdp-pu-text);
}

/* ── Pleine largeur ── */
body.vdp-product-unified.single-product #content-wrap .content-area,
body.vdp-product-unified.single-product .content-area {
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

body.vdp-product-unified.single-product #sidebar,
body.vdp-product-unified.single-product .widget-area,
body.vdp-product-unified.single-product #secondary {
	display: none !important;
}

body.vdp-product-unified.single-product #content-wrap {
	padding-top: 0;
	max-width: 100%;
}

body.vdp-product-unified.single-product .elementor-section.elementor-section-boxed > .elementor-container {
	max-width: var(--vdp-pu-max);
}

body.vdp-product-unified.single-product .elementor-location-single .elementor-section,
body.vdp-product-unified.single-product .elementor-location-single .elementor-container,
body.vdp-product-unified.single-product .elementor-location-single .elementor-column,
body.vdp-product-unified.single-product .elementor-location-single .elementor-widget-wrap,
body.vdp-product-unified.single-product .elementor-location-single .elementor-widget-container {
	border-radius: 0 !important;
	box-shadow: none !important;
}

/* ── Grille image / achat ── */
body.vdp-product-unified .vdp-pu-hero-wrap > .elementor-container {
	display: grid !important;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	align-items: start;
	padding: 1.25rem 1rem 2.5rem !important;
	border-bottom: 1px solid var(--vdp-pu-border);
}

body.vdp-product-unified .vdp-pu-hero-wrap > .elementor-container > .elementor-column {
	width: 100% !important;
	max-width: 100% !important;
}

/* ── Fil d'Ariane — ne jamais couper le texte ── */
body.vdp-product-unified .elementor-location-single > .elementor-section:first-child {
	min-height: 0 !important;
	height: auto !important;
	overflow: visible !important;
}

body.vdp-product-unified .elementor-location-single > .elementor-section:first-child .elementor-container {
	align-items: flex-start !important;
	min-height: 0 !important;
}

body.vdp-product-unified .elementor-section-height-min-height {
	min-height: 0 !important;
	height: auto !important;
}

body.vdp-product-unified .woocommerce-breadcrumb,
body.vdp-product-unified .site-breadcrumbs {
	font-size: var(--vdp-pu-text-sm);
	color: var(--vdp-pu-muted);
	margin: 0;
	padding: 0;
	line-height: 1.6 !important;
	overflow: visible !important;
	position: relative;
	z-index: 1;
}

body.vdp-product-unified .woocommerce-breadcrumb a {
	color: var(--vdp-pu-muted);
	text-decoration: none;
}

body.vdp-product-unified .woocommerce-breadcrumb a:hover {
	color: var(--vdp-pu-red);
}

/* ── Galerie ── */
body.vdp-product-unified .woocommerce-product-gallery {
	border: 1px solid var(--vdp-pu-border);
	overflow: hidden;
	background: var(--vdp-pu-white);
}

body.vdp-product-unified .flex-control-thumbs {
	display: flex;
	gap: 8px;
	margin-top: 10px;
	padding: 0;
	list-style: none;
}

body.vdp-product-unified .flex-control-thumbs li {
	flex: 0 0 64px;
	border: 1px solid var(--vdp-pu-border);
	overflow: hidden;
	cursor: pointer;
}

body.vdp-product-unified .flex-control-thumbs li.flex-active,
body.vdp-product-unified .flex-control-thumbs li:hover {
	border-color: var(--vdp-pu-red);
}

/* Avis garantis — taille normale */
body.vdp-product-unified .vdp-pu-reviews-badge {
	margin-top: 1rem;
	font-size: var(--vdp-pu-text-sm) !important;
}

body.vdp-product-unified .vdp-pu-reviews-badge * {
	font-size: inherit !important;
}

body.vdp-product-unified .vdp-pu-reviews-badge img {
	max-width: 180px;
	height: auto;
}

/* ── Colonne achat ── */
body.vdp-product-unified .vdp-pu-buy-box {
	display: flex;
	flex-direction: column;
	gap: 0;
	width: 100%;
	max-width: none;
}

body.vdp-product-unified .product_title {
	font-family: var(--vdp-pu-font) !important;
	font-size: clamp(1.5rem, 2.8vw, 1.875rem) !important;
	font-weight: 600 !important;
	color: var(--vdp-pu-ink) !important;
	line-height: 1.25 !important;
	margin: 0 0 1rem !important;
}

body.vdp-product-unified .price {
	font-size: clamp(1.5rem, 2.5vw, 1.75rem) !important;
	font-weight: 700 !important;
	color: var(--vdp-pu-red) !important;
	margin: 0 0 1.25rem !important;
}

body.vdp-product-unified.product-type-variable .elementor-widget-woocommerce-product-price {
	display: none !important;
}

body.vdp-product-unified .woocommerce-variation-price .price {
	font-size: clamp(1.5rem, 2.5vw, 1.75rem) !important;
	margin: 0 0 1rem !important;
}

body.vdp-product-unified .vdp-pu-kilo-price {
	font-size: var(--vdp-pu-text);
	color: var(--vdp-pu-muted);
	margin: 0.75rem 0 0;
}

body.vdp-product-unified .vdp-pu-kilo-price--below {
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--vdp-pu-border);
}

body.vdp-product-unified .prix-au-kilo {
	display: none !important;
}

/* ── Formulaire achat ── */
body.vdp-product-unified form.cart,
body.vdp-product-unified form.variations_form.cart {
	display: block;
	margin: 0 !important;
	padding: 0;
}

body.vdp-product-unified table.variations {
	width: 100%;
	margin: 0 0 1.25rem;
}

body.vdp-product-unified table.variations tr {
	display: block;
	margin-bottom: 1rem;
}

body.vdp-product-unified table.variations th,
body.vdp-product-unified table.variations td {
	display: block;
	padding: 0;
	border: none;
	text-align: left;
}

body.vdp-product-unified table.variations .label label {
	font-size: var(--vdp-pu-text-sm);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--vdp-pu-ink);
	margin-bottom: 8px;
	display: block;
}

body.vdp-product-unified table.variations select {
	width: 100%;
	max-width: 320px;
	height: 48px;
	padding: 0 14px;
	font-size: var(--vdp-pu-text);
	font-family: var(--vdp-pu-font);
	border: 1px solid var(--vdp-pu-border);
	border-radius: 0;
	background: var(--vdp-pu-white);
}

body.vdp-product-unified .reset_variations {
	display: inline-block;
	margin-top: 8px;
	font-size: var(--vdp-pu-text-sm);
	color: var(--vdp-pu-muted);
}

body.vdp-product-unified .woocommerce-variation-add-to-cart,
body.vdp-product-unified form.cart:not(.variations_form) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

body.vdp-product-unified form.cart .quantity .qty {
	width: 60px;
	height: 48px;
	text-align: center;
	font-size: var(--vdp-pu-text-lg);
	font-weight: 600;
	border: 1px solid var(--vdp-pu-border);
	border-radius: 0;
}

body.vdp-product-unified .single_add_to_cart_button,
body.vdp-product-unified form.cart .button {
	flex: 1 1 220px;
	min-height: 48px !important;
	padding: 0 1.5rem !important;
	font-family: var(--vdp-pu-font) !important;
	font-size: var(--vdp-pu-text) !important;
	font-weight: 600 !important;
	text-transform: uppercase;
	background: var(--vdp-pu-red) !important;
	border: 1px solid var(--vdp-pu-red) !important;
	border-radius: 0 !important;
	color: #fff !important;
}

body.vdp-product-unified .stock {
	font-size: var(--vdp-pu-text-sm);
	font-weight: 600;
	margin: 0 0 1rem;
}

/* Masquer éléments inutiles dans la zone achat */
body.vdp-product-unified .elementor-widget-woocommerce-product-short-description,
body.vdp-product-unified .elementor-widget-woocommerce-product-content,
body.vdp-product-unified .woocommerce-tabs,
body.vdp-product-unified .owp-product-nav,
body.vdp-product-unified .vdp-lascours-trust-list,
body.vdp-product-unified .vdp-pu-buy-box .vdp-lascours-chars-panel {
	display: none !important;
}

/* ── Meta SKU / catégories ── */
body.vdp-product-unified .product_meta {
	font-size: var(--vdp-pu-text-sm) !important;
	color: var(--vdp-pu-muted);
	border-top: 1px solid var(--vdp-pu-border);
	padding-top: 1rem;
	margin-top: 1.5rem;
	line-height: 1.6;
}

body.vdp-product-unified .product_meta > span {
	display: block;
	margin-bottom: 0.35rem;
}

body.vdp-product-unified .product_meta .sku,
body.vdp-product-unified .product_meta .posted_in {
	font-size: var(--vdp-pu-text-sm) !important;
}

body.vdp-product-unified .product_meta a {
	color: var(--vdp-pu-muted);
	text-decoration: none;
}

body.vdp-product-unified .vdp-pu-intro {
	font-size: var(--vdp-pu-text);
	color: var(--vdp-pu-muted);
	line-height: 1.55;
	margin: 0 0 1rem;
}

/* ── Zone bas de page — design pro ── */
body.vdp-product-unified .vdp-pu-lower {
	max-width: var(--vdp-pu-max);
	margin: 0 auto;
	padding: 2rem 1rem 3.5rem;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

body.vdp-product-unified .vdp-pu-panel {
	background: var(--vdp-pu-white);
	border: 1px solid var(--vdp-pu-border);
	padding: 2rem;
}

body.vdp-product-unified .vdp-pu-panel__eyebrow {
	margin: 0 0 0.5rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--vdp-pu-red);
}

body.vdp-product-unified .vdp-pu-panel__title {
	margin: 0 0 1.25rem;
	padding-bottom: 0.75rem;
	border-bottom: 2px solid var(--vdp-pu-red);
	font-size: 1.25rem !important;
	font-weight: 600 !important;
	color: var(--vdp-pu-ink) !important;
	line-height: 1.3;
}

body.vdp-product-unified .vdp-pu-panel__body {
	font-size: var(--vdp-pu-text);
	line-height: 1.7;
	color: var(--vdp-pu-muted);
}

/* ── Caractéristiques ── */
body.vdp-product-unified .vdp-pu-lower .vdp-pu-panel--chars,
body.vdp-product-unified .vdp-pu-lower .vdp-lascours-lower-block--chars {
	display: block !important;
}

body.vdp-product-unified .vdp-pu-specs {
	background: var(--vdp-pu-white);
	border: 1px solid var(--vdp-pu-border);
}

body.vdp-product-unified .vdp-lascours-chars {
	margin: 0;
}

body.vdp-product-unified .vdp-lascours-chars__row {
	display: grid;
	grid-template-columns: minmax(200px, 32%) 1fr;
	gap: 1rem 2rem;
	padding: 0.9rem 1.25rem;
	border-bottom: 1px solid var(--vdp-pu-border);
	font-size: var(--vdp-pu-text) !important;
	line-height: 1.55;
}

body.vdp-product-unified .vdp-lascours-chars__row:nth-child(even) {
	background: transparent;
}

body.vdp-product-unified .vdp-lascours-chars__row:last-child {
	border-bottom: none;
}

body.vdp-product-unified .vdp-lascours-chars__label {
	margin: 0;
	font-size: var(--vdp-pu-text) !important;
	font-weight: 600 !important;
	color: var(--vdp-pu-ink) !important;
}

body.vdp-product-unified .vdp-lascours-chars__value {
	margin: 0;
	font-size: var(--vdp-pu-text) !important;
	color: var(--vdp-pu-muted) !important;
}

/* ── Description ── */
body.vdp-product-unified .vdp-lascours-desc-body p {
	font-size: var(--vdp-pu-text) !important;
	margin-bottom: 1rem;
	max-width: 72ch;
}

body.vdp-product-unified .vdp-lascours-desc-body p:last-child {
	margin-bottom: 0;
}

/* ── Livraison ── */
body.vdp-product-unified .vdp-pu-panel--delivery {
	background: var(--vdp-pu-white);
}

body.vdp-product-unified .vdp-pu-delivery__intro {
	margin-bottom: 2rem;
	max-width: 680px;
}

body.vdp-product-unified .vdp-pu-delivery__lead {
	margin: 0 0 1.25rem;
	font-size: var(--vdp-pu-text-lg) !important;
	line-height: 1.6;
	color: var(--vdp-pu-muted);
}

body.vdp-product-unified .vdp-pu-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

body.vdp-product-unified .vdp-pu-badges li {
	padding: 0.4rem 0.85rem;
	font-size: var(--vdp-pu-text-sm);
	font-weight: 600;
	color: var(--vdp-pu-red);
	background: var(--vdp-pu-white);
	border: 1px solid rgba(94, 2, 2, 0.15);
}

body.vdp-product-unified .vdp-pu-steps {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: none;
}

body.vdp-product-unified .vdp-pu-step {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1.25rem;
	background: var(--vdp-pu-white);
	border: 1px solid var(--vdp-pu-border);
	border-top: 3px solid var(--vdp-pu-red);
	min-height: 100%;
}

body.vdp-product-unified .vdp-pu-step__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
}

body.vdp-product-unified .vdp-pu-step__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--vdp-pu-white);
	background: var(--vdp-pu-red);
}

body.vdp-product-unified .vdp-pu-step__icon {
	display: inline-flex;
	width: 32px;
	height: 32px;
	color: var(--vdp-pu-red);
	opacity: 0.85;
}

body.vdp-product-unified .vdp-pu-step__icon svg {
	width: 100%;
	height: 100%;
}

body.vdp-product-unified .vdp-pu-step__title {
	margin: 0;
	font-size: var(--vdp-pu-text) !important;
	font-weight: 600 !important;
	color: var(--vdp-pu-ink) !important;
	line-height: 1.35;
}

body.vdp-product-unified .vdp-pu-step__text {
	margin: 0;
	font-size: var(--vdp-pu-text-sm) !important;
	line-height: 1.55;
	color: var(--vdp-pu-muted);
}

/* ── Avis ── */
body.vdp-product-unified .vdp-pu-panel--reviews .vdp-pu-panel__body {
	background: var(--vdp-pu-white);
	border: 1px solid var(--vdp-pu-border);
	padding: 1.25rem;
}

/* Masquer anciens blocs legacy */
body.vdp-product-unified .vdp-lascours-lower-block:not(.vdp-pu-panel):not(.vdp-lascours-lower-block--chars) {
	border: none;
	padding: 0;
}

/* Masquer bandeaux gris recette et boutons Elementor legacy */
body.vdp-product-unified .vdp-pu-panel--desc .elementor-widget-button,
body.vdp-product-unified .vdp-pu-panel--desc a[href*="recette"],
body.vdp-product-unified .vdp-lascours-desc-body .elementor-widget-button,
body.vdp-product-unified .vdp-lascours-desc-body a[href*="recette"] {
	display: none !important;
}

body.vdp-product-unified .vdp-pu-panel--desc .elementor-button[style*="8F8F8F"],
body.vdp-product-unified .vdp-pu-panel--desc .elementor-button[style*="8f8f8f"] {
	display: none !important;
}

/* Masquer barre OceanWP legacy (filet de sécurité) */
body.single-product .owp-floating-bar,
body.vdp-product-unified .owp-floating-bar {
	display: none !important;
	visibility: hidden !important;
	height: 0 !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* ── Barre achat sticky (tous écrans) ── */
body.vdp-product-unified .vdp-pu-sticky-bar {
	display: none;
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 9990;
	align-items: center;
	justify-content: center;
	padding: 0;
	background: var(--vdp-pu-white);
	border-top: 1px solid var(--vdp-pu-border);
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
}

body.vdp-product-unified .vdp-pu-sticky-bar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
}

body.vdp-product-unified.vdp-pu-sticky-visible .vdp-pu-sticky-bar {
	display: flex;
}

body.vdp-product-unified .vdp-pu-sticky-bar__info {
	display: flex;
	align-items: baseline;
	gap: 12px;
	min-width: 0;
	flex: 1 1 auto;
}

body.vdp-product-unified .vdp-pu-sticky-bar__title {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--vdp-pu-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
}

body.vdp-product-unified .vdp-pu-sticky-bar__price {
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--vdp-pu-red);
	white-space: nowrap;
	flex-shrink: 0;
	line-height: 1.3;
}

body.vdp-product-unified .vdp-pu-sticky-bar__price del {
	font-size: 0.875rem;
	font-weight: 400;
	color: var(--vdp-pu-muted);
	margin-right: 6px;
}

body.vdp-product-unified .vdp-pu-sticky-bar__btn {
	flex: 0 0 auto;
	min-width: 200px;
	min-height: 46px;
	padding: 0 1.5rem;
	font-family: var(--vdp-pu-font);
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	background: var(--vdp-pu-red);
	color: #fff;
	border: none;
	border-radius: 0;
	cursor: pointer;
	line-height: 1;
}

body.vdp-product-unified .vdp-pu-sticky-bar__btn:hover {
	background: var(--vdp-pu-red-hover);
}

body.vdp-product-unified.vdp-pu-sticky-visible {
	padding-bottom: 76px;
}

/* ── Sticky mobile overrides ── */

@media (max-width: 900px) {
	body.vdp-product-unified .vdp-pu-hero-wrap > .elementor-container {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	body.vdp-product-unified .vdp-lascours-chars__row {
		grid-template-columns: 1fr;
		gap: 0.35rem;
	}

	body.vdp-product-unified .vdp-pu-steps {
		grid-template-columns: repeat(2, 1fr);
	}

	body.vdp-product-unified .vdp-pu-panel {
		padding: 1.5rem;
	}
}

@media (max-width: 768px) {
	body.vdp-product-unified .vdp-pu-steps {
		grid-template-columns: 1fr;
	}

	body.vdp-product-unified .vdp-pu-sticky-bar__inner {
		padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
		gap: 10px;
	}

	body.vdp-product-unified .vdp-pu-sticky-bar__info {
		flex-direction: column;
		align-items: flex-start;
		gap: 2px;
	}

	body.vdp-product-unified .vdp-pu-sticky-bar__title {
		font-size: 0.8125rem;
	}

	body.vdp-product-unified .vdp-pu-sticky-bar__price {
		font-size: 1rem;
	}

	body.vdp-product-unified .vdp-pu-sticky-bar__btn {
		min-width: 130px;
		min-height: 42px;
		padding: 0 1rem;
		font-size: 0.75rem;
	}

	body.vdp-product-unified.vdp-pu-sticky-visible {
		padding-bottom: 72px;
	}

	body.vdp-product-unified .woocommerce-variation-add-to-cart,
	body.vdp-product-unified form.cart:not(.variations_form) {
		flex-direction: column;
		align-items: stretch;
	}

	body.vdp-product-unified form.cart .button {
		width: 100%;
	}

	body.vdp-product-unified table.variations select {
		max-width: 100%;
	}
}
