/* Largeur commune à tous les panneaux des onglets produit */
body.single-product .woocommerce-tabs .woocommerce-Tabs-panel {
    width: 90%;
    max-width: var(--theme-normal-container-max-width, 1290px);
    margin-inline: auto;
    box-sizing: border-box;
}

/*Charger sur les pages produits woocommerce*/ 
/*fix image width in product description to max 500px*/
img.img-in-product-description {
    max-width: min(500px, 100%);
}
/*Bouton Ajouter au pannier*/
.single_add_to_cart_button {
  display: block;
  width:90%; 
  box-sizing: border-box;
}
/* Agrandir le champ quantité */
/* Dimensions communes au champ quantité et aux boutons Blocksy */
.single-product .ct-cart-actions .quantity {
    width: 100px;
    height: 55px;
    flex: 0 0 100px;
}

.single-product .ct-cart-actions .quantity input.qty {
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    box-sizing: border-box;
    text-align: center;
}
/* Bouton champ quantité */
.woocommerce .quantity button {
  width: 45px;
  height: 45px;
  font-size: 20px;
}
/****DEBUT****woo-add-ons****/
/****woo-add-ons****/
.wc-pao-addons-container{
	border: 2px solid #6c757d!important;
	border-radius:10px!important;
	margin-top:4px!important;
	margin-bottom:4px!important;
	padding:10px!important;
}
/* image size*/
.wc-pao-addon-image-swatch img{
	width: 60px!important;
	height: 60px!important;
}
/*image selectioner*/
.wc-pao-addon-image-swatch.selected {
	outline-color: #F09833!important;
	outline-width: 2px!important;
	border-radius:10px!important;
}
/*image active*/
.wc-pao-addon-image-swatch:hover, .wc-pao-addon-image-swatch:active {
	outline: 2px solid #6c757d!important;
	border-radius:10px!important;
}
/*image hover*/
.wc-pao-addon-image-swatch:focus {
	outline: 2px solid #F09833!important;
	border-radius:10px!important;
}
/*image bordure*/
.wc-pao-addon-image-swatch {
	border-radius:10px!important;
}
/* obligatoire*/
em.required {
	color:red;
}
/*Bouton radio Woo*/
/* Conteneur parent des radios Woo Add-Ons */
/* Cible les labels des radios Add‑Ons */
.wc-pao-addon-container div:has(> input.wc-pao-addon-radio) {
  display: flex!important;
  align-items: center!important;
  gap: 10px!important;
}
.wc-pao-addon:has(> input.wc-pao-addon-radio){
  display: flex!important;
  align-items: center!important;
  gap: 10px!important; /* espace entre le bouton radio et le label */
}
/* Label de gravure uniquement : nom de police + aperçu */
.wc-pao-addon-container.wc-pao-addon
input.wc-pao-addon-radio + label:has(> .addon-extra) {
	display: grid !important;
	grid-template-columns: 140px auto !important;
	align-items: center !important;
	column-gap: 10px !important;
}

/* Autoriser le retour à la ligne dans l’aperçu */
.wc-pao-addon label .addon-extra {
	white-space: normal !important;
	word-break: break-word !important;
	overflow-wrap: anywhere !important;
	line-height: 1.2 !important;
	margin-top: 5px;
	margin-bottom: 5px;
	padding-left: 5px;
	border-left: 1px solid #6c757d;
}

.wc-pao-addon input[type="radio"]:checked + label {
	color: #F09833 !important;
}

.wc-pao-addon input[type="radio"] + label {
	padding-left: 5px;
}

.wc-pao-addon input[type="radio"]:checked + label .addon-extra {
	border-left: 1px solid #F09833;
	color: #6c757d;
}

/* --- Version mobile --- */
@media (max-width: 768px) {

	/* Gravure uniquement : nom de police au-dessus de l’aperçu */
	.wc-pao-addon-container.wc-pao-addon
	input.wc-pao-addon-radio + label:has(> .addon-extra) {
		display: flex !important;
		flex-direction: column !important;
		align-items: flex-start !important;
		gap: 2px !important;
		margin-top: 5px;
		margin-bottom: 5px;
		padding-left: 5px !important;
		border-left: 1px solid #6c757d;
		line-height: 1.2;
	}

	/* Bordure de sélection uniquement pour la gravure */
	.wc-pao-addon input[type="radio"]:checked
	+ label:has(> .addon-extra) {
		border-left: 1px solid #F09833 !important;
	}

	.wc-pao-addon label .addon-extra,
	.wc-pao-addon input[type="radio"]:checked + label .addon-extra {
		margin-top: 0;
		margin-bottom: 0;
		padding-left: 0;
		border-left: none;
	}

	/* Nom de police */
	.wc-pao-addon:has(> input.wc-pao-addon-radio)
	> label .addon-label-text {
		display: inline-flex !important;
		align-items: flex-start !important;
		gap: 6px !important;
	}

	/* Aperçu de gravure */
	.wc-pao-addon:has(> input.wc-pao-addon-radio)
	> label .addon-extra {
		width: 100% !important;
		white-space: normal !important;
		word-break: break-word !important;
		overflow-wrap: anywhere !important;
		line-height: 1.2 !important;
	}
}

/* Woo textarea */
.wc-pao-addon-field.wc-pao-addon-custom-textarea {
	height: 3.5em;
	line-height: 1.5em;
	max-height: 3.5em;
	resize: none;
	padding-top: 0.5em;
	padding-bottom: 0.5em;
}

/* Champ sur trois lignes lorsque l’aperçu correspondant le demande */
.wc-pao-addon-container:has(+ .wc-pao-addon-container label .textarea-extra3L)
textarea.wc-pao-addon-field.wc-pao-addon-custom-textarea {
	height: 5em;
	line-height: 1.2em;
	max-height: 5em;
}

/* Centrer uniquement l’aperçu issu du textarea */
.addon-extra.textarea-extra {
	display: block;
	text-align: center;
	white-space: pre-line;
	width: 100%;
	border-left: 1px solid #6c757d;
	padding-left: 5px;
}

/* Mise en forme des prix Woo Add-Ons */
.product-addon-totals,
.product-addon-totals .wc-pao-subtotal-line p.price {
	font-weight: 300;
	font-size: 0.9em;
}

div.product-addon-totals {
	margin: 20px 0 10px 0;
	padding: 10px 0 0 0;
	border-top: 2px solid #6c757d;
	border-bottom: none !important;
	overflow: hidden;
}

/**** FIN Woo Add-Ons ****/

/***DEBUT***Variations****/
/*variation woocommerce*/
.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item).selected,
.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item).selected:hover {
	box-shadow: var(--wvs-selected-item-box-shadow, 0 0 0 2px #F09833)!important;
}
.woo-variation-swatches .variable-items-wrapper .variable-item.image-variable-item {
	padding:2px!important;
	margin:3px!important;
}
.variations td{
	margin-bottom:4px!important;
}
.variations th:first-child,
.variations td:first-child{
	border-top-left-radius: 10px!important;
	border-top-right-radius: 10px!important;
	border-top:2px solid #6c757d!important;
	border-left:2px solid #6c757d!important;
	border-right:2px solid #6c757d!important;
}
.variations td:last-child{
	border-bottom-left-radius: 10px!important;
	border-bottom-right-radius: 10px!important;
	border-bottom:2px solid #6c757d!important;
	border-left:2px solid #6c757d!important;
	border-right:2px solid #6c757d!important;
}
/* Transformer la table des variations en pile verticale */
.variations tr {
    display: block !important;
    margin-bottom: 6px!important;
}
.variations th,
.variations td {
    display: block !important;
    width: 100% !important;
    text-align: left;
    padding:2px 2px !important;
}
/*variation price color*/
.woocommerce div.product p.price,
.woocommerce div.product span.price {
	color:#f09833;
}
/*variation rivet et mousquetons*/
.woo-variation-swatches .variable-items-wrapper .variable-item.image-variable-item[data-attribute_name="attribute_pa_rivet"],
.woo-variation-swatches .variable-items-wrapper .variable-item.image-variable-item[data-attribute_name="attribute_pa_mousqueton"]{
    width: 80px !important;
    height: auto !important;
    min-width: 60px !important;
}
/***FIN***Variations****/
/**** DEBUT WooCommerce native product gallery thumbnails ****/

/* Desktop */
.woocommerce-product-gallery .flex-control-thumbs {
	display: flex !important;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px !important;
	cursor: grab;
	user-select: none;
}

.woocommerce-product-gallery .flex-control-thumbs li {
	float: none !important;
	clear: none !important;
	width: 80px !important;
	min-width: 80px !important;
	flex: 0 0 80px !important;
	margin: 0 !important;
}

.woocommerce-product-gallery .flex-control-thumbs img {
	display: block;
	width: 80px !important;
	height: 80px !important;
	object-fit: cover;

	border: 2px solid #6c757d;
	border-radius: 5px;

	-webkit-user-drag: none;
	user-select: none;

	transition:
		border-color 0.3s ease,
		box-shadow 0.3s ease;
}

/* Vignette réellement active */
.woocommerce-product-gallery .flex-control-thumbs img.flex-active {
	border-color: #F09833 !important;
	box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
}

/* Hover seulement avec une vraie souris */
@media (hover: hover) and (pointer: fine) {

	.woocommerce-product-gallery .flex-control-thumbs img:hover {
		border-color: #F09833 !important;
		box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
	}
}


/* Mobile */
@media (max-width: 768px) {

	.woocommerce-product-gallery .flex-control-thumbs {
		display: flex !important;
		flex-wrap: nowrap !important;

		width: 100% !important;
		max-width: 100% !important;

		overflow-x: auto !important;
		overflow-y: hidden !important;

		gap: 6px;

		-webkit-overflow-scrolling: touch;
		touch-action: pan-x;

		scrollbar-width: none;
	}

	.woocommerce-product-gallery .flex-control-thumbs::-webkit-scrollbar {
		display: none;
	}

	.woocommerce-product-gallery .flex-control-thumbs li {
		float: none !important;
		clear: none !important;

		width: 60px !important;
		min-width: 60px !important;
		max-width: 60px !important;

		flex: 0 0 60px !important;
		margin: 0 !important;
	}

	.woocommerce-product-gallery .flex-control-thumbs img {
		width: 60px !important;
		height: 60px !important;
	}
}

/**** FIN WooCommerce native product gallery thumbnails ****/

/*tire H2 dans descrition produit*/
.woocommerce-product-details__short-description h3,
.woocommerce-Tabs-panel h3{
	font-size:1.2em;	
}
/*woocommerce tab*/
.woocommerce div.product.elementor ul.tabs {
	text-align: center;
	margin:0px!important;
	padding:0px!important;
}
.woocommerce div.product.elementor ul.tabs li:first-of-type {
	margin:0 10px 0 0;
}
.woocommerce div.product.elementor ul.tabs li a{
	padding-left:5px;
	padding-right:5px;
}
.woocommerce .woocommerce-tabs ul.wc-tabs li {
	border-radius: 10px 10px 0 0 !important;
}
.woocommerce table.shop_attributes tr:nth-child(even) td,
.woocommerce table.shop_attributes tr:nth-child(even) th {
	background:none;
}
/* Products IN STOCK */
.woocommerce div.product p.stock {
	color: green;
	font-weight: bold;
}
/* Products ON BACKORDER */
.woocommerce div.product p.stock.available-on-backorder
{
	color: orange;
}
/* Products OUT OF STOCK */
.woocommerce div.product p.stock.out-of-stock {
	color: red;
}
/*low stock*/
.woocommerce div.product .low-stock{
	text-decoration: underline!important;
}


/*change table additonnal info on single product page*/
.woocommerce table {
	table-layout: auto;
}
.woocommerce table.shop_attributes{
	width:100%;
	table-layout: fixed;
	word-break:break-all;
}
.woocommerce table.shop_attributes td {
	padding-left:5px ;
}
.woocommerce table.shop_attributes th {
	text-align: left;
	padding-right:0px;
	padding-left:5px;
	font-size:0.8em;
}
.woocommerce table.shop_attributes,
.woocommerce table.shop_attributes th,
.woocommerce table.shop_attributes td {
	border: 0px!important;
}
.woocommerce table.shop_attributes td{
	overflow: hidden!important;
	text-overflow: ellipsis!important;
}
.woocommerce table.shop_attributes th {
	overflow: hidden!important;
	text-overflow: ellipsis!important;
	width:33%!important;
}
.woocommerce div.product.elementor .woocommerce-tabs .panel {
	padding: 1px!important;
}

/* Stabiliser la galerie WooCommerce classique sur toutes les fiches produit.
 * Mobile uniquement. Cadre carré : adapté aux photos produit carrées.
 * Retour arrière : retirer ce bloc.
 */
@media (max-width: 767px) {
    body.single-product .woocommerce-product-gallery
    > .woocommerce-product-gallery__wrapper,
    body.single-product .woocommerce-product-gallery
    > .flex-viewport {
        aspect-ratio: 1 / 1;
        height: auto !important;
        overflow: hidden;
    }

    /* Avant initialisation : éviter l’empilement des photos. */
    body.single-product .woocommerce-product-gallery
    > .woocommerce-product-gallery__wrapper {
        display: flex;
    }

    body.single-product .woocommerce-product-gallery
    > .woocommerce-product-gallery__wrapper
    > .woocommerce-product-gallery__image {
        flex: 0 0 100%;
        min-width: 0;
    }
}
/* Afficher immédiatement les galeries produit sur mobile */
@media (max-width: 767px) {
    body.single-product .woocommerce-product-gallery {
        opacity: 1 !important;
        transition: none !important;
    }
}