/* =========================================================================
   VelarTrip — WooCommerce
   ========================================================================= */

.vt-woo {
	padding-bottom: 40px;
}

/* ---------- Grille produits ---------- */
/* WooCommerce pose un clearfix (content:" "; display:table) sur cette liste.
   Dans une grille CSS ces deux pseudo-elements deviennent des cellules a part
   entiere : la premiere carte partait en colonne 2 et la derniere passait a la
   ligne. */
.woocommerce ul.products::before,
.woocommerce ul.products::after {
	content: none;
	display: none;
}

.woocommerce ul.products {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 700px) {
	.woocommerce ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 20px;
	}
}

@media (min-width: 1000px) {
	.woocommerce ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 22px;
	}
}

.woocommerce ul.products li.product {
	background: transparent;
	border-radius: 0;
	overflow: visible;
	display: flex;
	flex-direction: column;
	margin: 0 !important;
	width: auto !important;
	float: none !important;
	padding: 0;
	position: relative;
}

/* La vignette porte le seul bloc coloré : l'image respire sur le sable
   plutôt que d'être enfermée dans une carte blanche. */
.woocommerce ul.products li.product > a:first-of-type {
	display: block;
	background: var(--vt-sand-deep);
	border-radius: 18px;
	overflow: hidden;
	min-height: 1px;
}

.woocommerce ul.products li.product a img,
.woocommerce ul.products li.product img.woocommerce-placeholder,
.woocommerce ul.products li.product img.attachment-woocommerce_thumbnail {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	/* Packshots detoures sur fond blanc : cover les rogne, et le rectangle
	   blanc du fichier reste visible sur le sable. multiply fait disparaitre
	   ce blanc sans retoucher les 1 394 medias un par un. */
	object-fit: contain;
	padding: 14px;
	mix-blend-mode: multiply;
	margin: 0;
	border-radius: 0;
	display: block;
	background: var(--vt-sand-deep);
	transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.woocommerce ul.products li.product:hover a img {
	transform: scale(1.03);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--vt-font);
	font-size: 14px;
	font-weight: 800;
	line-height: 1.3;
	color: var(--vt-ink);
	padding: 14px 2px 0;
	margin: 0;
}

.woocommerce ul.products li.product a {
	text-decoration: none;
}

.vt-loop-rating {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 2px 0;
	font-size: 11px;
	font-weight: 700;
	color: var(--vt-muted);
}

.vt-loop-rating .star-rating {
	font-size: 11px;
	margin: 0;
	float: none;
}

.woocommerce ul.products li.product .price {
	padding: 8px 2px 0;
	margin: auto 0 0;
	color: var(--vt-ink);
	font-size: 17px;
	font-weight: 800;
}

.woocommerce ul.products li.product .price del {
	color: var(--vt-faint);
	font-size: 13px;
	font-weight: 600;
	margin-left: 6px;
}

.woocommerce ul.products li.product .price ins {
	text-decoration: none;
	font-weight: 800;
}

.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product a.button,
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce ul.products li.product .product_type_variable {
	margin: 12px 0 0;
	display: block;
	width: 100%;
	font-size: 13px;
	font-weight: 800;
	padding: 13px;
	border-radius: var(--vt-radius-sm);
	background: var(--vt-ink);
	color: var(--vt-sand);
	text-align: center;
	text-decoration: none;
	border: 0;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product a.button:hover {
	background: var(--vt-ink-deep);
	color: var(--vt-sand);
}

.woocommerce ul.products li.product .button.loading,
.woocommerce ul.products li.product .button.added {
	opacity: 0.75;
}

.woocommerce ul.products li.product .added_to_cart {
	display: block;
	margin: 8px 0 0;
	font-size: 12px;
	font-weight: 800;
	color: var(--vt-cta);
	text-align: center;
}

.woocommerce span.onsale {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	background: var(--vt-cta);
	color: #fff;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 6px 11px;
	line-height: 1;
	min-height: 0;
	min-width: 0;
	margin: 0;
}

/* Tri */
.woocommerce .woocommerce-ordering {
	margin-bottom: 20px;
}

.woocommerce .woocommerce-ordering select {
	max-width: 280px;
	border-radius: 999px;
}

/* ---------- Fiche produit ---------- */
.vt-single-product div.product {
	display: grid;
	grid-template-columns: 1fr;
	gap: 28px;
}

.vt-single-product div.product > * {
	grid-column: 1 / -1;
	float: none;
	width: auto;
	margin: 0;
}

@media (min-width: 992px) {
	.vt-single-product div.product {
		grid-template-columns: minmax(0, 1fr) minmax(0, 470px);
		column-gap: 44px;
		align-items: start;
	}

	.vt-single-product div.product > .woocommerce-product-gallery {
		grid-column: 1;
		grid-row: 1;
	}

	.vt-single-product div.product > .vt-buybox {
		grid-column: 2;
		grid-row: 1;
		position: sticky;
		top: 96px;
	}
}

.vt-buybox {
	background: var(--vt-card);
	border-radius: 24px;
	padding: 26px;
}

.vt-buybox .product_title {
	font-size: clamp(28px, 4vw, 40px);
	line-height: 1.06;
	margin: 8px 0 12px;
}

.vt-buybox .price {
	font-size: 30px;
	font-weight: 800;
	color: var(--vt-ink);
	margin: 0 0 4px;
	display: block;
}

.vt-buybox .price del {
	color: var(--vt-faint);
	font-size: 17px;
	font-weight: 600;
	margin-left: 8px;
}

.vt-buybox .price ins {
	text-decoration: none;
}

.vt-buybox .woocommerce-product-details__short-description {
	font-size: 15px;
	color: var(--vt-ink-soft);
	margin-bottom: 18px;
}

.vt-buybox form.cart {
	margin: 0 0 8px;
}

.vt-buybox .single_add_to_cart_button {
	width: 100%;
	font-size: 16px;
	padding: 18px;
	border-radius: 14px;
}

.vt-buybox .variations select {
	border-radius: var(--vt-radius-sm);
}

.vt-buybox .product_meta {
	font-size: 12px;
	color: var(--vt-muted);
	margin-top: 16px;
}

/* Note cliquable */
.vt-rating-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 800;
	color: var(--vt-muted);
	text-decoration: none;
	margin-bottom: 4px;
}

.vt-rating-link .vt-stars {
	color: var(--vt-star);
	font-size: 14px;
	letter-spacing: 0.06em;
}

.vt-rating-link:hover {
	color: var(--vt-cta);
}

.vt-buybox .woocommerce-product-rating {
	display: none;
}

/* Galerie en mosaïque */
.woocommerce-product-gallery.vt-gallery {
	width: 100% !important;
	float: none !important;
	margin: 0;
	opacity: 1 !important;
}

.vt-gallery .woocommerce-product-gallery__wrapper {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin: 0;
	transform: none !important;
	width: auto !important;
}

.vt-gallery .woocommerce-product-gallery__image {
	margin: 0;
	border-radius: 18px;
	overflow: hidden;
	background: var(--vt-sand-deep);
	width: auto !important;
}

.vt-gallery .woocommerce-product-gallery__image a {
	display: block;
	height: 100%;
}

.vt-gallery .woocommerce-product-gallery__image img {
	width: 100%;
	height: 100%;
	/* Les visuels d'une fiche produit sont heterogenes : packshots, photos
	   d'usage, infographies, avec des fonds et des rapports differents. En
	   « contain » chacun laissait un vide different dans sa cellule et la
	   mosaique paraissait bancale. « cover » remplit chaque cellule, la
	   galerie devient reguliere. */
	object-fit: cover;
	padding: 0;
	background: #fff;
	border-radius: 0;
}

.vt-gallery .woocommerce-product-gallery__image:first-child {
	grid-column: 1 / -1;
	aspect-ratio: 4 / 3;
}

.vt-gallery .woocommerce-product-gallery__image:not(:first-child) {
	aspect-ratio: 1 / 1;
}

.vt-gallery .flex-control-thumbs,
.vt-gallery .flex-direction-nav {
	display: none;
}

.vt-gallery .woocommerce-product-gallery__trigger {
	z-index: 3;
	right: 14px;
	top: 14px;
}

@media (min-width: 992px) {
	/* Deux colonnes de meme largeur. La version precedente melait des colonnes
	   2fr/1fr avec des cellules carrees : la colonne etroite produisait des
	   vignettes deux fois plus petites, rien ne pouvait s'aligner. */
	.vt-gallery .woocommerce-product-gallery__wrapper {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.vt-gallery .woocommerce-product-gallery__image:first-child {
		grid-column: 1 / -1;
		grid-row: auto;
		aspect-ratio: 4 / 3;
	}
}

/* ---------- Sélecteur de lots ---------- */
.vt-bundles {
	margin: 0 0 18px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.vt-bundles__label {
	font-size: var(--vt-text-xs);
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--vt-muted);
}

.vt-bundle {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	text-align: left;
	background: var(--vt-sand);
	color: var(--vt-ink);
	border: 2px solid transparent;
	border-radius: var(--vt-radius);
	padding: 14px 16px;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.vt-bundle:hover {
	background: var(--vt-sand-deep);
	color: var(--vt-ink);
}

.vt-bundle.is-active {
	border-color: var(--vt-cta);
}

.vt-bundle__dot {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	border-radius: 999px;
	border: 2px solid #d6cdb8;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 800;
	color: transparent;
}

.vt-bundle.is-active .vt-bundle__dot {
	background: var(--vt-cta);
	border-color: var(--vt-cta);
	color: #fff;
}

.vt-bundle__body {
	flex: 1 1 auto;
	min-width: 0;
}

.vt-bundle__title {
	display: block;
	font-size: 15px;
	font-weight: 800;
	line-height: 1.25;
}

.vt-bundle__note {
	display: block;
	font-size: 12px;
	font-weight: 700;
	color: var(--vt-muted);
	margin-top: 2px;
}

.vt-bundle__note--save {
	color: var(--vt-cta);
}

.vt-bundle__price {
	font-size: 17px;
	font-weight: 800;
	white-space: nowrap;
}

.vt-bundle__flag {
	position: absolute;
	top: -10px;
	right: 14px;
	background: var(--vt-ink);
	color: var(--vt-sand);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 4px 9px;
	border-radius: 999px;
}

/* Quantité masquée quand le sélecteur pilote la valeur */
.vt-bundles ~ .quantity,
.vt-buybox form.cart .quantity:has(~ .single_add_to_cart_button) {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ---------- Réassurance ---------- */
.vt-stock-note {
	font-size: 12px;
	font-weight: 700;
	color: var(--vt-ink-soft);
	margin: 0 0 18px;
}

.vt-reassurance {
	list-style: none;
	margin: 16px 0 0;
	padding: 18px 20px;
	background: var(--vt-sand);
	border-radius: 18px;
	display: flex;
	flex-direction: column;
	gap: 11px;
}

.vt-reassurance li {
	display: flex;
	gap: 11px;
	align-items: center;
	font-size: 13px;
	font-weight: 700;
	margin: 0;
}

.vt-reassurance li::before {
	content: "→";
	color: var(--vt-cta);
	font-weight: 800;
}

.vt-guest-note {
	font-size: var(--vt-text-xs);
	font-weight: 800;
	color: var(--vt-muted);
	margin: 12px 0;
	text-align: center;
}

.vt-buybox .vt-payments {
	text-align: center;
}

.vt-buybox .vt-payments__list {
	justify-content: center;
}

/* ---------- Avis ---------- */
.vt-reviews {
	margin: 48px 0 0;
	max-width: var(--vt-content-narrow);
}

.vt-reviews .woocommerce-Reviews-title,
.vt-reviews h2 {
	font-size: clamp(26px, 4vw, 34px);
	margin: 0 0 20px;
}

.vt-reviews .commentlist {
	list-style: none;
	padding: 0;
	margin: 0 0 32px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.vt-reviews .comment_container {
	background: var(--vt-card);
	border-radius: 18px;
	padding: 20px;
	border: 0;
	display: flex;
	gap: 16px;
}

.vt-reviews .comment_container img.avatar {
	position: static;
	width: 48px;
	height: 48px;
	border-radius: 999px;
	border: 0;
	padding: 0;
	margin: 0;
	flex: 0 0 auto;
}

.vt-reviews .comment-text {
	border: 0;
	padding: 0;
	margin: 0;
}

.vt-reviews .woocommerce-review__author {
	font-weight: 800;
	font-size: 13px;
}

.vt-reviews .woocommerce-review__published-date {
	font-size: 12px;
	color: var(--vt-muted);
}

.vt-reviews .description {
	font-size: 15px;
	line-height: 1.6;
}

.vt-reviews #review_form_wrapper {
	background: var(--vt-card);
	border-radius: var(--vt-radius-lg);
	padding: 24px;
}

/* ---------- Barre livraison offerte ---------- */
.vt-shipbar {
	background: var(--vt-card);
	border-radius: var(--vt-radius);
	padding: 14px 16px;
	margin: 0 0 22px;
}

.vt-shipbar--dark {
	background: var(--vt-ink);
}

.vt-shipbar__text {
	font-size: 12px;
	font-weight: 800;
	margin-bottom: 8px;
}

.vt-shipbar--dark .vt-shipbar__text {
	color: var(--vt-gold);
}

.vt-shipbar__track {
	height: 7px;
	border-radius: 999px;
	background: var(--vt-sand-deep);
	overflow: hidden;
}

.vt-shipbar--dark .vt-shipbar__track {
	background: rgba(246, 241, 231, 0.2);
}

.vt-shipbar__fill {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--vt-cta);
	transition: width 0.3s ease;
}

.vt-shipbar--dark .vt-shipbar__fill {
	background: var(--vt-gold);
}

/* ---------- Panier ---------- */
.vt-cart-badge {
	display: inline-block;
	background: var(--vt-gold);
	color: var(--vt-ink);
	font-size: 10px;
	font-weight: 800;
	padding: 3px 8px;
	border-radius: 999px;
	margin-left: 8px;
	vertical-align: middle;
}

.woocommerce table.shop_table {
	background: var(--vt-card);
	border-radius: var(--vt-radius-lg);
	border: 0;
	overflow: hidden;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	border-color: var(--vt-line);
}

.woocommerce .cart_totals table.shop_table {
	border-radius: var(--vt-radius-lg);
}

.woocommerce .quantity input.qty {
	width: 72px;
	text-align: center;
	border-radius: 999px;
	padding: 10px;
}

.woocommerce .cart-collaterals .cart_totals h2 {
	font-size: 26px;
}

.woocommerce .wc-proceed-to-checkout .checkout-button {
	display: block;
	width: 100%;
	font-size: 16px;
	padding: 18px;
}

/* ---------- Upsell panier ---------- */
.vt-upsells {
	margin: 36px 0 0;
}

.vt-upsells__title {
	font-size: clamp(24px, 3vw, 30px);
	margin: 0 0 4px;
}

.vt-upsells__sub {
	font-size: 12px;
	font-weight: 700;
	color: var(--vt-muted);
	margin: 0 0 16px;
}

.vt-upsells__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.vt-upsell {
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--vt-card);
	border-radius: var(--vt-radius);
	padding: 12px;
	margin: 0;
}

.vt-upsell__thumb {
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	border-radius: 11px;
	overflow: hidden;
}

.vt-upsell__thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 6px;
	mix-blend-mode: multiply;
}

.vt-upsell__body {
	flex: 1 1 auto;
	min-width: 0;
}

.vt-upsell__name {
	display: block;
	font-size: 13px;
	font-weight: 800;
	line-height: 1.3;
	text-decoration: none;
}

.vt-upsell__price {
	display: block;
	font-size: 13px;
	font-weight: 800;
	color: var(--vt-cta);
	margin-top: 3px;
}

.vt-upsell__add {
	flex: 0 0 auto;
	padding: 11px 16px;
	font-size: 12px;
	border-radius: 11px;
}

.vt-upsell__add.is-busy {
	opacity: 0.6;
	pointer-events: none;
}

/* ---------- Barre d'achat collante (mobile) ---------- */
.vt-sticky-atc {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 150;
	display: none;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	background: rgba(246, 241, 231, 0.97);
	backdrop-filter: blur(8px);
	border-top: 1px solid var(--vt-line);
}

.vt-sticky-atc.is-visible {
	display: flex;
}

.vt-sticky-atc__info {
	flex: 1 1 auto;
	min-width: 0;
}

.vt-sticky-atc__name {
	display: block;
	font-size: var(--vt-text-xs);
	font-weight: 800;
	color: var(--vt-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.vt-sticky-atc__price {
	display: block;
	font-size: 16px;
	font-weight: 800;
}

.vt-sticky-atc__button {
	flex: 0 0 auto;
	padding: 15px 22px;
	border-radius: 14px;
}

@media (min-width: 992px) {
	.vt-sticky-atc.is-visible {
		display: none;
	}
}

/* ---------- Commande ---------- */
.woocommerce-checkout .col2-set {
	display: grid;
	grid-template-columns: 1fr;
	gap: 28px;
}

@media (min-width: 900px) {
	.woocommerce-checkout .col2-set {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 {
	width: auto;
	float: none;
}

.woocommerce-checkout #customer_details,
.woocommerce-checkout #order_review {
	background: var(--vt-card);
	border-radius: var(--vt-radius-lg);
	padding: 24px;
}

.woocommerce-checkout #order_review {
	margin-top: 24px;
}

.woocommerce-checkout h3 {
	font-size: 24px;
}

.woocommerce #payment {
	background: transparent;
	border-radius: 0;
}

.woocommerce #payment ul.payment_methods {
	border: 0;
	padding: 0;
}

.woocommerce #place_order {
	width: 100%;
	font-size: 16px;
	padding: 18px;
}

/* ---------- Messages ---------- */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	background: var(--vt-card);
	border-top: 3px solid var(--vt-cta);
	border-radius: var(--vt-radius-sm);
	font-size: 14px;
}

.woocommerce-message::before,
.woocommerce-info::before {
	color: var(--vt-cta);
}


@media (prefers-reduced-motion: reduce) {
	.woocommerce ul.products li.product a img {
		transition: none;
	}

	.woocommerce ul.products li.product:hover a img {
		transform: none;
	}
}
