:root {
	--mb-bordeaux: #9e321f;
	--mb-ink: #171717;
	--mb-muted: #67645f;
	--mb-line: #ddd9d1;
	--mb-paper: #fbfaf7;
	--mb-soft: #f2f0ec;
	--mb-green: #506448;
	--mb-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--mb-sans: Arial, Helvetica, sans-serif;

	/* Ratio commun des photos produit (galerie principale + produits liés).
	   Les vignettes (carré) et l'image "story" (4/3) restent volontairement
	   différentes, car leur rôle visuel n'est pas le même. */
	--mb-product-photo-ratio: 1.5 / 1;
}

body.single-product .site-main,
body.single-product .content-area,
body.single-product .ct-container-full,
body.single-product .ct-container {
	max-width: none !important;
}

body.single-product .site-main {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.mille-bols-product-page,
.mille-bols-product-page * {
	box-sizing: border-box;
}

.mille-bols-product-page {
	display: block !important;
	width: min(1510px, calc(100vw - 78px)) !important;
	max-width: none !important;
	margin: 0 auto !important;
	padding: 54px 0 74px !important;
	color: var(--mb-ink);
	font-family: var(--mb-sans);
}

/* ===== Partie haute ===== */
.mille-bols-product-page .mb-product-top {
	display: grid !important;
	grid-template-columns: minmax(0, 720px) 258px 350px !important;
	gap: 36px !important;
	align-items: start !important;
	width: 100% !important;
}

/* ===== Galerie ===== */
.mille-bols-product-page .mb-gallery {
	min-width: 0;
}

.mille-bols-product-page .mb-gallery .woocommerce-product-gallery {
	display: grid !important;
	grid-template-columns: 88px minmax(0, 1fr) !important;
	grid-template-rows: auto !important;
	column-gap: 18px !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
}

.mille-bols-product-page .mb-gallery .flex-viewport {
	grid-column: 2 !important;
	grid-row: 1 !important;
	width: 100% !important;
	margin: 0 !important;
	background: var(--mb-soft);
}

.mille-bols-product-page .mb-gallery .woocommerce-product-gallery__wrapper {
	margin: 0 !important;
}

.mille-bols-product-page .mb-gallery .woocommerce-product-gallery__image,
.mille-bols-product-page .mb-gallery .woocommerce-product-gallery__image > div {
	width: 100% !important;
}

.mille-bols-product-page .mb-gallery .woocommerce-product-gallery__image a {
	display: block !important;
	width: 100% !important;
	aspect-ratio: var(--mb-product-photo-ratio) !important;
	overflow: hidden !important;
	background: var(--mb-soft);
}

.mille-bols-product-page .mb-gallery .woocommerce-product-gallery__image img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	object-fit: cover !important;
	object-position: center !important;
}

.mille-bols-product-page .mb-gallery .flex-control-thumbs {
	grid-column: 1 !important;
	grid-row: 1 !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 10px !important;
	width: 88px !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.mille-bols-product-page .mb-gallery .flex-control-thumbs li {
	display: block !important;
	width: 88px !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
}

.mille-bols-product-page .mb-gallery .flex-control-thumbs img {
	display: block !important;
	width: 88px !important;
	height: 59px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid transparent !important;
	border-radius: 0 !important;
	object-fit: cover !important;
	opacity: 1 !important;
	cursor: pointer;
}

.mille-bols-product-page .mb-gallery .flex-control-thumbs img.flex-active {
	border-color: var(--mb-bordeaux) !important;
}

/* ===== Résumé ===== */
.mille-bols-product-page .mb-summary {
	min-width: 0;
	padding-top: 6px;
}

.mille-bols-product-page .mb-eyebrow-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px 12px;
	margin: 0 0 12px !important;
}

.mille-bols-product-page .mb-eyebrow-type,
.mille-bols-product-page .mb-eyebrow-stock {
	font: 500 11px/1.2 var(--mb-sans) !important;
	letter-spacing: .16em;
	text-transform: uppercase;
}

.mille-bols-product-page .mb-eyebrow-type {
	color: var(--mb-bordeaux);
}

.mille-bols-product-page .mb-eyebrow-stock {
	color: var(--mb-muted);
}

.mille-bols-product-page .mb-eyebrow-row::after {
	display: block;
	flex-basis: 100%;
	width: 30px;
	height: 1px;
	margin-top: 4px;
	background: var(--mb-bordeaux);
	content: "";
}

.mille-bols-product-page .mb-title {
	margin: 0 !important;
	color: var(--mb-ink) !important;
	font: 500 36px/1.02 var(--mb-serif) !important;
	letter-spacing: -.025em !important;
	text-transform: none !important;
}

.mille-bols-product-page .mb-byline {
	margin: 8px 0 0 !important;
	font: 400 23px/1.2 var(--mb-serif) !important;
}

.mille-bols-product-page .mb-byline span {
	color: var(--mb-bordeaux);
}

.mille-bols-product-page .mb-divider {
	width: 31px;
	height: 1px;
	margin: 12px 0;
	background: #aaa69e;
}

.mille-bols-product-page .mb-price {
	margin: 0 0 14px !important;
	color: var(--mb-bordeaux) !important;
	font: 500 30px/1 var(--mb-serif) !important;
}

.mille-bols-product-page .mb-price .amount,
.mille-bols-product-page .mb-price bdi {
	color: inherit !important;
}

.mille-bols-product-page .mb-short-description {
	margin: -4px 0 12px;
	color: #4c4a46;
	font: 13px/1.55 var(--mb-sans);
}

.mille-bols-product-page .mb-short-description p {
	margin: 0;
}

/* ===== Achat ===== */
.mille-bols-product-page .mb-purchase form.cart {
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
}

.mille-bols-product-page .mb-purchase .quantity {
	display: none !important;
}

.mille-bols-product-page .mb-purchase .single_add_to_cart_button,
.mille-bols-product-page .mb-primary-button,
.mille-bols-product-page .mb-secondary-button {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	min-height: 46px !important;
	margin-left: 0 !important;
	padding: 12px 16px !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	font: 14px/1.2 var(--mb-sans) !important;
	text-decoration: none !important;
}

.mille-bols-product-page .mb-purchase .single_add_to_cart_button,
.mille-bols-product-page .mb-primary-button {
	border: 1px solid var(--mb-bordeaux) !important;
	background: var(--mb-bordeaux) !important;
	color: #fff !important;
	opacity: 1 !important;
}

.mille-bols-product-page .mb-ceramist-card-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.mille-bols-product-page .mb-shipping-note {
	margin: 8px 0 0;
	color: #67645f;
	font: 12px/1.4 var(--mb-sans);
}

.mille-bols-product-page .mb-contact-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.mille-bols-product-page .mb-contact-modal[hidden] {
	display: none;
}

.mille-bols-product-page .mb-contact-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(23, 23, 23, 0.55);
}

.mille-bols-product-page .mb-contact-modal-panel {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 420px;
	max-height: 90vh;
	overflow-y: auto;
	padding: 28px;
	background: #fbfaf7;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.mille-bols-product-page .mb-contact-modal-close {
	position: absolute;
	top: 12px;
	right: 14px;
	border: 0;
	background: none;
	color: var(--mb-ink);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.mille-bols-product-page .mb-contact-modal-title {
	margin: 0 0 16px;
	color: var(--mb-ink);
	font: 500 22px/1.1 var(--mb-serif);
}

.mille-bols-product-page .mb-contact-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.mille-bols-product-page .mb-contact-form label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	color: #67645f;
	font: 12px/1.3 var(--mb-sans);
}

.mille-bols-product-page .mb-contact-form input,
.mille-bols-product-page .mb-contact-form textarea {
	padding: 8px 10px;
	border: 1px solid #ddd9d1;
	background: #fff;
	color: var(--mb-ink);
	font: 13px/1.4 var(--mb-sans);
}

.mille-bols-product-page .mb-contact-form .mb-primary-button {
	margin-top: 4px;
}

.mille-bols-product-page .mb-contact-error {
	margin: 0;
	color: #c0392b;
	font: 12px/1.4 var(--mb-sans);
}

.mille-bols-product-page .mb-contact-success {
	margin-top: 10px;
	padding: 12px 14px;
	background: #f0f2eb;
	color: var(--mb-green);
	font: 13px/1.3 var(--mb-sans);
	text-align: center;
}

.mille-bols-product-page .mb-secondary-button {
	margin-top: 10px !important;
	border: 1px solid #676d65 !important;
	background: transparent !important;
	color: var(--mb-ink) !important;
}

.mille-bols-product-page .mb-favourite {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 11px !important;
	width: 100% !important;
	margin: 14px 0 0 !important;
	padding: 9px !important;
	border: 0 !important;
	background: transparent !important;
	color: var(--mb-ink) !important;
	font: 13px/1.2 var(--mb-sans) !important;
	cursor: pointer;
}

.mille-bols-product-page .mb-favourite span:first-child {
	font-size: 25px;
	line-height: 1;
}

.mille-bols-product-page .mb-exchange-badge {
	margin-top: 22px;
	padding: 13px 14px;
	background: #f0f2eb;
	color: var(--mb-green);
	font: 13px/1.3 var(--mb-sans);
	text-align: center;
}

.mille-bols-product-page .mb-exchange-badge span {
	padding: 0 7px;
}

/* ===== Colonne droite ===== */
.mille-bols-product-page .mb-side-column {
	display: grid !important;
	gap: 14px !important;
	min-width: 0;
}

.mille-bols-product-page .mb-card {
	width: 100%;
	margin: 0;
	padding: 24px 24px 22px;
	border: 1px solid var(--mb-line);
	background: rgba(255,255,255,.72);
}

.mille-bols-product-page .mb-card h2,
.mille-bols-product-page .mb-story-block h2,
.mille-bols-product-page .mb-passport-card h2,
.mille-bols-product-page .mb-related-block h2 {
	margin: 0 !important;
	color: var(--mb-ink) !important;
	font: 500 12px/1.2 var(--mb-sans) !important;
	letter-spacing: .11em !important;
	text-transform: uppercase !important;
}

.mille-bols-product-page .mb-specs-card dl {
	margin: 20px 0 0 !important;
}

.mille-bols-product-page .mb-specs-card dl div {
	display: grid !important;
	grid-template-columns: 118px minmax(0, 1fr) !important;
	gap: 12px !important;
	padding: 3px 0 !important;
}

.mille-bols-product-page .mb-specs-card dt,
.mille-bols-product-page .mb-specs-card dd {
	margin: 0 !important;
	font: 13px/1.35 var(--mb-sans) !important;
}

.mille-bols-product-page .mb-specs-card dt {
	color: #44413d;
}

.mille-bols-product-page .mb-ceramist-card figure {
	margin: 18px 0 13px !important;
	overflow: hidden;
	background: var(--mb-soft);
}

.mille-bols-product-page .mb-ceramist-card figure img {
	display: block !important;
	width: 100% !important;
	height: 155px !important;
	margin: 0 !important;
	object-fit: cover !important;
	filter: grayscale(1);
}

.mille-bols-product-page .mb-ceramist-card h3 {
	margin: 0 !important;
	color: var(--mb-bordeaux) !important;
	font: 500 22px/1.1 var(--mb-serif) !important;
}

.mille-bols-product-page .mb-location {
	margin: 7px 0 0 !important;
	font: 12px/1.4 var(--mb-sans) !important;
}

.mille-bols-product-page .mb-bio {
	margin: 10px 0 0 !important;
	color: var(--mb-muted);
	font: 12px/1.55 var(--mb-sans) !important;
}

.mille-bols-product-page .mb-text-link {
	display: inline-block;
	margin-top: 15px;
	color: var(--mb-green) !important;
	font: 12px/1.3 var(--mb-sans) !important;
	text-decoration: none !important;
}

/* ===== Ligne inférieure ===== */
.mille-bols-product-page .mb-product-bottom {
	display: grid !important;
	grid-template-columns: minmax(0, 520px) minmax(0, 450px) minmax(0, 1fr) !important;
	gap: 24px !important;
	align-items: stretch !important;
	width: 100% !important;
	margin-top: 24px !important;
}

.mille-bols-product-page .mb-story-block {
	display: grid !important;
	grid-template-columns: 205px minmax(0, 1fr) !important;
	gap: 24px !important;
	min-width: 0;
	padding-top: 26px;
	border-top: 1px solid var(--mb-line);
}

.mille-bols-product-page .mb-rule {
	width: 30px;
	height: 1px;
	margin: 14px 0 22px;
	background: var(--mb-bordeaux);
}

.mille-bols-product-page .mb-story-text {
	font: 16px/1.65 var(--mb-serif) !important;
}

.mille-bols-product-page .mb-story-text p {
	margin: 0 0 13px !important;
}

.mille-bols-product-page .mb-story-image {
	min-width: 0;
	margin: 0 !important;
	background: var(--mb-soft);
}

.mille-bols-product-page .mb-story-image img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	min-height: 285px;
	margin: 0 !important;
	object-fit: cover !important;
}

.mille-bols-product-page .mb-passport-card {
	min-width: 0;
	padding: 24px;
	border: 1px solid #ebe8e0;
	background: var(--mb-paper);
}

.mille-bols-product-page .mb-passport-id {
	margin: 7px 0 24px !important;
	font: 16px/1.2 var(--mb-sans) !important;
}

.mille-bols-product-page .mb-passport-content {
	display: grid !important;
	grid-template-columns: 1fr 1fr !important;
	gap: 24px !important;
}

.mille-bols-product-page .mb-passport-content dl {
	margin: 0 !important;
}

.mille-bols-product-page .mb-passport-content dl div {
	display: grid !important;
	grid-template-columns: 78px minmax(0, 1fr) !important;
	gap: 10px !important;
	padding: 4px 0 !important;
}

.mille-bols-product-page .mb-passport-content dt,
.mille-bols-product-page .mb-passport-content dd {
	margin: 0 !important;
	font: 11px/1.35 var(--mb-sans) !important;
}

.mille-bols-product-page .mb-passport-history {
	padding-left: 24px;
	border-left: 1px solid var(--mb-line);
}

.mille-bols-product-page .mb-passport-history h3 {
	margin: 0 0 11px !important;
	font: 500 11px/1.2 var(--mb-sans) !important;
}

.mille-bols-product-page .mb-passport-history ul {
	margin: 0 !important;
	padding: 0 0 0 14px !important;
}

.mille-bols-product-page .mb-passport-history li {
	margin: 0 0 10px !important;
	color: #42413d;
	font: 10px/1.35 var(--mb-sans) !important;
}

.mille-bols-product-page .mb-certified {
	margin: 24px 0 0 !important;
	padding-top: 14px;
	border-top: 1px solid var(--mb-line);
	color: var(--mb-muted);
	font: 10px/1.3 var(--mb-sans) !important;
}

.mille-bols-product-page .mb-related-block {
	min-width: 0;
	padding-top: 24px;
	border-top: 1px solid var(--mb-line);
}

.mille-bols-product-page .mb-related-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 18px;
}

.mille-bols-product-page .mb-related-grid {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	gap: 14px !important;
}

.mille-bols-product-page .mb-related-card {
	min-width: 0;
}

.mille-bols-product-page .mb-related-image {
	display: block;
	aspect-ratio: var(--mb-product-photo-ratio);
	overflow: hidden;
	background: var(--mb-soft);
}

.mille-bols-product-page .mb-related-image img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	object-fit: cover !important;
}

.mille-bols-product-page .mb-related-meta {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
	margin-top: 10px;
}

.mille-bols-product-page .mb-related-card h3 {
	margin: 0 !important;
	font: 500 16px/1.15 var(--mb-serif) !important;
}

.mille-bols-product-page .mb-related-card h3 a {
	color: var(--mb-ink) !important;
	text-decoration: none !important;
}

.mille-bols-product-page .mb-related-card p {
	margin: 5px 0 0 !important;
	color: var(--mb-bordeaux) !important;
	font: 12px/1.2 var(--mb-sans) !important;
}

.mille-bols-product-page .mb-related-empty {
	grid-column: 1 / -1;
	color: var(--mb-muted);
	font: 12px/1.5 var(--mb-sans);
}

/* ===== Responsive ===== */
@media (max-width: 1380px) {
	.mille-bols-product-page {
		width: min(1320px, calc(100vw - 54px)) !important;
	}

	.mille-bols-product-page .mb-product-top {
		grid-template-columns: minmax(0, 1fr) 250px 330px !important;
		gap: 28px !important;
	}

	.mille-bols-product-page .mb-product-bottom {
		grid-template-columns: minmax(0, 1.12fr) minmax(0, .92fr) !important;
	}

	.mille-bols-product-page .mb-related-block {
		grid-column: 1 / -1;
	}
}

@media (max-width: 1050px) {
	.mille-bols-product-page {
		width: min(960px, calc(100vw - 40px)) !important;
		padding-top: 36px !important;
	}

	.mille-bols-product-page .mb-product-top {
		grid-template-columns: minmax(0, 1fr) 300px !important;
	}

	.mille-bols-product-page .mb-side-column {
		grid-column: 1 / -1;
		grid-template-columns: 1fr 1fr !important;
	}

	.mille-bols-product-page .mb-product-bottom {
		grid-template-columns: 1fr !important;
	}
}

@media (max-width: 720px) {
	.mille-bols-product-page {
		width: calc(100vw - 28px) !important;
		padding: 24px 0 56px !important;
	}

	.mille-bols-product-page .mb-product-top,
	.mille-bols-product-page .mb-product-bottom {
		grid-template-columns: 1fr !important;
		gap: 24px !important;
	}

	.mille-bols-product-page .mb-gallery .woocommerce-product-gallery {
		display: block !important;
	}

	.mille-bols-product-page .mb-gallery .flex-control-thumbs {
		display: grid !important;
		grid-template-columns: repeat(5, 1fr) !important;
		gap: 8px !important;
		width: 100% !important;
		margin-top: 9px !important;
	}

	.mille-bols-product-page .mb-gallery .flex-control-thumbs li {
		width: 100% !important;
	}

	.mille-bols-product-page .mb-gallery .flex-control-thumbs img {
		width: 100% !important;
		height: auto !important;
		aspect-ratio: 1.5 / 1 !important;
	}

	.mille-bols-product-page .mb-title {
		font-size: 42px !important;
	}

	.mille-bols-product-page .mb-side-column {
		grid-template-columns: 1fr !important;
	}

	.mille-bols-product-page .mb-story-block {
		grid-template-columns: 1fr !important;
	}

	.mille-bols-product-page .mb-story-image img {
		min-height: 0;
		aspect-ratio: 4 / 3;
	}

	.mille-bols-product-page .mb-passport-content {
		grid-template-columns: 1fr !important;
	}

	.mille-bols-product-page .mb-passport-history {
		padding: 18px 0 0;
		border-top: 1px solid var(--mb-line);
		border-left: 0;
	}

	.mille-bols-product-page .mb-related-grid {
		grid-template-columns: 1fr !important;
	}
}

/* ===== Correction du calque de zoom WooCommerce ===== */
/* Le zoom au survol (zoomImg) reste parfois visible au lieu de rester
   caché par défaut, ce qui produit un aplat flou par-dessus la photo
   principale. On le masque ici puisqu'il n'est pas utilisé sur cette
   mise en page. */
.mille-bols-product-page .mb-gallery .zoomImg {
	display: none !important;
}

/* ===== Neutraliser les styles injectés par FlexSlider ===== */
/* Même désactivé côté PHP, un style inline (width, float) reste parfois
   posé sur l'image active de la galerie — il décale la vraie photo hors
   de la zone visible et ne laisse apparaître que le fond crème autour.
   On force les bonnes valeurs avec !important, qui l'emporte sur un
   style inline non marqué !important lui-même. */
.mille-bols-product-page .mb-gallery .woocommerce-product-gallery__image {
	width: 100% !important;
	float: none !important;
	margin: 0 !important;
	display: block !important;
}

.mille-bols-product-page .mb-gallery .flex-viewport {
	height: auto !important;
}

.mille-bols-product-page .mb-gallery .woocommerce-product-gallery__wrapper {
	width: 100% !important;
	transform: none !important;
}

/* ===== Une seule image visible à la fois ===== */
/* FlexSlider étant désactivé, on gère nous-mêmes l'affichage d'une
   seule image : celle portant la classe "flex-active-slide" (la
   première par défaut, puis mise à jour par le petit script JS
   associé quand on clique sur une vignette). */
.mille-bols-product-page .mb-gallery .woocommerce-product-gallery__image {
	display: none !important;
}

.mille-bols-product-page .mb-gallery .woocommerce-product-gallery__image.flex-active-slide {
	display: block !important;
}

/* ===== Visionneuse plein écran maison (remplace PhotoSwipe) ===== */
.mb-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(10, 9, 8, 0.92);
}

.mb-lightbox.is-open {
	display: flex;
}

body.mb-lightbox-open {
	overflow: hidden;
}

.mb-lightbox-image {
	max-width: min(1200px, 90vw);
	max-height: 88vh;
	object-fit: contain;
}

.mb-lightbox-close,
.mb-lightbox-prev,
.mb-lightbox-next {
	position: absolute;
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
	line-height: 1;
}

.mb-lightbox-close {
	top: 24px;
	right: 28px;
	font-size: 34px;
}

.mb-lightbox-prev,
.mb-lightbox-next {
	top: 50%;
	transform: translateY(-50%);
	font-size: 30px;
	padding: 12px 16px;
}

.mb-lightbox-prev {
	left: 12px;
}

.mb-lightbox-next {
	right: 12px;
}

@media (max-width: 760px) {
	.mb-lightbox-image {
		max-width: 94vw;
		max-height: 80vh;
	}

	.mb-lightbox-close {
		top: 14px;
		right: 14px;
	}
}
