.breizh-vt-wrapper {
	margin: 1em 0 1.5em;
}

.breizh-vt-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1em;
}

.breizh-vt-table thead th {
	background: #f2f2f2;
	text-align: left;
	font-weight: 600;
	padding: 0.75em 1em;
}

.breizh-vt-table thead th:last-child,
.breizh-vt-table tbody td:last-child {
	text-align: left;
}

.breizh-vt-table tbody tr {
	border-bottom: 1px solid #ececec;
}

.breizh-vt-table tbody tr:nth-child(even) {
	background: #fafafa;
}

.breizh-vt-table tbody td {
	padding: 0.6em 1em;
	vertical-align: middle;
}

.breizh-vt-col-attr {
	display: flex;
	align-items: center;
	gap: 0.75em;
}

/*
 * Taille des vignettes de variation : modifiez simplement la valeur de
 * --breizh-vt-swatch-size (ordinateur) et --breizh-vt-swatch-size-mobile.
 * Les !important empêchent Divi / WooCommerce d'écraser la taille.
 */
.breizh-vt-wrapper {
	--breizh-vt-swatch-size: 130px;
	--breizh-vt-swatch-size-mobile: 100px;
}

.breizh-vt-wrapper .breizh-vt-table img.breizh-vt-swatch {
	width: var(--breizh-vt-swatch-size) !important;
	height: var(--breizh-vt-swatch-size) !important;
	max-width: none !important;
	max-height: none !important;
	object-fit: contain;
	background: #fff;
	border-radius: 4px;
	flex-shrink: 0;
}

@media (max-width: 767px) {
	.breizh-vt-wrapper .breizh-vt-table img.breizh-vt-swatch {
		width: var(--breizh-vt-swatch-size-mobile) !important;
		height: var(--breizh-vt-swatch-size-mobile) !important;
	}
}

/* ---- Zoom au survol de la photo principale ---- */

.breizh-vt-zoom-host {
	position: relative !important;
	overflow: hidden !important;
}

.breizh-vt-zoom-pane {
	position: absolute;
	inset: 0;
	background-repeat: no-repeat;
	background-color: #fff;
	opacity: 0;
	transition: opacity 0.2s ease;
	pointer-events: none;
	z-index: 5;
}

.breizh-vt-zoom-host.is-zooming .breizh-vt-zoom-pane {
	opacity: 1;
}

.breizh-vt-zoom-host.is-zooming {
	cursor: zoom-in;
}

.breizh-vt-swatch {
	cursor: pointer;
	transition: box-shadow 0.15s ease;
}

.breizh-vt-swatch--active {
	box-shadow: 0 0 0 2px #333;
}

.breizh-vt-qty {
	width: 70px;
	padding: 0.4em 0.5em;
	border: 1px solid #ccc;
	border-radius: 3px;
}

.breizh-vt-row--oos {
	opacity: 0.6;
}

.breizh-vt-oos-label {
	font-size: 0.85em;
	color: #a00;
}

.breizh-vt-submit {
	cursor: pointer;
}

.breizh-vt-submit:disabled {
	cursor: not-allowed;
	opacity: 0.7;
}

.breizh-vt-message {
	min-height: 1.2em;
	font-size: 0.9em;
	margin: 0 0 0.75em;
}

.breizh-vt-message--success {
	color: #2a7a2a;
}

.breizh-vt-message--error {
	color: #a00;
}

/* ---- Panier en tiroir (slide-in) ---- */

.breizh-vt-cart-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease;
	z-index: 999998;
}

.breizh-vt-cart-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.breizh-vt-cart-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 400px;
	max-width: 92vw;
	background: #fff;
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
	transform: translateX(100%);
	transition: transform 0.3s ease;
	z-index: 999999;
	display: flex;
	flex-direction: column;
}

.breizh-vt-cart-drawer.is-open {
	transform: translateX(0);
}

body.breizh-vt-lock-scroll {
	overflow: hidden;
}

.breizh-vt-cart-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.25em 1.5em;
	border-bottom: 1px solid #ececec;
	flex-shrink: 0;
}

.breizh-vt-cart-header h2 {
	margin: 0;
	font-size: 1.2em;
}

.breizh-vt-cart-close {
	background: none;
	border: none;
	font-size: 1.6em;
	line-height: 1;
	cursor: pointer;
	color: #333;
	padding: 0;
}

.breizh-vt-cart-items {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 0.5em 1.5em;
}

.breizh-vt-cart-empty {
	color: #666;
	padding: 1.5em 0;
}

.breizh-vt-cart-item {
	display: flex;
	align-items: center;
	gap: 0.85em;
	padding: 1em 0;
	border-bottom: 1px solid #f0f0f0;
}

.breizh-vt-cart-item img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 4px;
	flex-shrink: 0;
}

.breizh-vt-cart-item-info {
	flex: 1 1 auto;
	min-width: 0;
}

.breizh-vt-cart-item-name {
	margin: 0 0 0.25em;
	font-weight: 600;
	font-size: 0.95em;
}

.breizh-vt-cart-item-price {
	margin: 0;
	color: #555;
	font-size: 0.9em;
}

.breizh-vt-cart-item-qty {
	width: 56px;
	padding: 0.3em 0.4em;
	border: 1px solid #ccc;
	border-radius: 3px;
	flex-shrink: 0;
}

.breizh-vt-cart-item-remove {
	background: none;
	border: none;
	font-size: 1.3em;
	line-height: 1;
	color: #999;
	cursor: pointer;
	flex-shrink: 0;
	padding: 0 0 0 0.25em;
}

.breizh-vt-cart-item-remove:hover {
	color: #801818;
}

.breizh-vt-cart-footer {
	flex-shrink: 0;
	padding: 1.25em 1.5em 1.5em;
	border-top: 1px solid #ececec;
}

.breizh-vt-cart-subtotal {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 600;
	margin-bottom: 1em;
}

/* Same look as the site's other buttons: black pill, white text; on hover
 * white background, dark text and burgundy border (Divi global colours). */
.breizh-vt-cart-checkout {
	display: block;
	text-align: center;
	background: #000;
	color: #fff !important;
	border: 1px solid #000;
	padding: 0.6em 1em;
	border-radius: 100px;
	text-decoration: none !important;
	font-weight: 500;
	line-height: 1.5;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.breizh-vt-cart-checkout:hover,
.breizh-vt-cart-checkout:focus-visible {
	background: var(--gcid-yq2l1zh8ng, #fff);
	color: var(--gcid-1olo6ohxlg, #333) !important;
	border-color: var(--gcid-primary-color, #801818);
	font-weight: 300;
}

/* ====================================================================
 * 1.7.0 — Ordinateur (768 px et plus) : couleurs en grille compacte
 * (plusieurs coloris par ligne) au lieu d'une ligne par coloris.
 * Le balisage du tableau ne change pas (le carrousel mobile s'en sert) :
 * seule la mise en page change. Sur mobile, rien ne bouge.
 * ==================================================================== */

@media (min-width: 768px) {
	.breizh-vt-wrapper {
		--breizh-vt-swatch-size: 110px;
	}

	.breizh-vt-wrapper .breizh-vt-table,
	.breizh-vt-wrapper .breizh-vt-table tbody {
		display: block !important;
		width: 100% !important;
		border: 0 !important;
	}

	.breizh-vt-wrapper .breizh-vt-table thead {
		display: none !important;
	}

	.breizh-vt-wrapper .breizh-vt-table tbody {
		display: grid !important;
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
		gap: 12px;
	}

	.breizh-vt-wrapper .breizh-vt-table tbody tr {
		display: flex !important;
		flex-direction: column;
		align-items: center;
		justify-content: space-between;
		margin: 0 !important;
		padding: 10px 8px 12px !important;
		border: 1px solid #ececec !important;
		border-radius: 6px;
		background: #fff !important;
		text-align: center;
		transition: border-color 0.15s ease, box-shadow 0.15s ease;
	}

	.breizh-vt-wrapper .breizh-vt-table tbody tr.is-filled {
		border-color: #000 !important;
		box-shadow: inset 0 0 0 1px #000;
	}

	.breizh-vt-wrapper .breizh-vt-table tbody td {
		display: block !important;
		width: 100% !important;
		padding: 0 !important;
		border: 0 !important;
		text-align: center !important;
	}

	.breizh-vt-wrapper .breizh-vt-table tbody td.breizh-vt-col-attr {
		display: flex !important;
		flex-direction: column;
		align-items: center;
		gap: 6px;
	}

	.breizh-vt-wrapper .breizh-vt-table tbody td.breizh-vt-col-attr span {
		display: block;
		font-size: 0.9em;
		line-height: 1.3;
		text-align: center;
	}

	.breizh-vt-wrapper .breizh-vt-col-qty {
		margin-top: 8px;
	}

	.breizh-vt-wrapper .breizh-vt-qty {
		width: 80px;
		text-align: center;
	}

	.breizh-vt-wrapper .breizh-vt-oos-label {
		display: inline-block;
		line-height: 1.3;
		padding: 0.45em 0;
	}
}

/* ====================================================================
 * 1.7.0 — Barre « Ajouter au panier » qui reste visible en bas de
 * l'écran dès qu'une quantité est saisie et que le bouton du tableau
 * n'est pas à l'écran (ordinateur uniquement).
 * ==================================================================== */

.breizh-vt-sticky {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99990;
	background: #fff;
	border-top: 1px solid #ececec;
	box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.08);
	transform: translateY(110%);
	transition: transform 0.25s ease;
}

.breizh-vt-sticky.is-visible {
	transform: translateY(0);
}

.breizh-vt-sticky-inner {
	display: flex;
	align-items: center;
	gap: 1.25em;
	max-width: 1080px;
	margin: 0 auto;
	padding: 12px 20px;
}

.breizh-vt-sticky-info {
	display: flex;
	flex-direction: column;
	line-height: 1.35;
	margin-right: auto;
}

.breizh-vt-sticky-count {
	font-size: 0.9em;
	color: #555;
}

.breizh-vt-sticky-total {
	font-weight: 600;
	font-size: 1.05em;
}

.breizh-vt-sticky-msg {
	margin: 0;
	padding: 0;
	font-size: 0.9em;
}

.breizh-vt-sticky-msg--error {
	color: #a00;
}

.breizh-vt-sticky-btn {
	flex-shrink: 0;
	min-width: 220px;
	padding: 0.7em 1.6em;
	border: 1px solid #000;
	border-radius: 100px;
	background: #000;
	color: #fff;
	font-family: inherit;
	font-size: 1em;
	font-weight: 500;
	line-height: 1.4;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.breizh-vt-sticky-btn:hover,
.breizh-vt-sticky-btn:focus-visible {
	background: #fff;
	color: #000;
	border-color: var(--gcid-primary-color, #801818);
}

.breizh-vt-sticky-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

@media (max-width: 767px) {
	.breizh-vt-sticky {
		display: none !important;
	}
}

@media (min-width: 768px) {
	/* La barre ne cache jamais le bas de page. */
	body.breizh-vt-sticky-on {
		padding-bottom: 72px;
	}
}

/* ====================================================================
 * 1.7.1 — Listes produits (boutique, catégories) : bloc quantité +
 * « Ajouter au panier » des produits à couleurs. Sur mobile, la carte
 * est étroite : le bouton passe sous la quantité au lieu de déborder,
 * et son texte est toujours blanc sur fond noir.
 * ==================================================================== */

ul.products li.product .variations_form .woocommerce-variation-add-to-cart {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: stretch;
	gap: 10px !important;
	width: 100%;
	padding-bottom: 10px !important;
}

ul.products li.product .variations_form .woocommerce-variation-add-to-cart .quantity {
	flex: 0 0 auto;
	margin: 0 !important;
}

ul.products li.product .variations_form .woocommerce-variation-add-to-cart button.single_add_to_cart_button {
	flex: 1 1 130px;
	min-width: 0;
	margin: 0 !important;
	white-space: normal !important;
	line-height: 1.3 !important;
	background: #000 !important;
	color: #fff !important;
	border: 1px solid #000 !important;
}

ul.products li.product .variations_form .woocommerce-variation-add-to-cart button.single_add_to_cart_button:hover,
ul.products li.product .variations_form .woocommerce-variation-add-to-cart button.single_add_to_cart_button:focus-visible {
	background: #fff !important;
	color: #000 !important;
	border-color: #801818 !important;
}
