/* Skyward Commerce : styles WooCommerce (les feuilles de WooCommerce sont retirées). */

/* Messages */
.woocommerce-notices-wrapper {
	grid-column: 1 / -1;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin: 0 0 var(--alx-sp-4);
	padding: 14px var(--alx-sp-4);
	border-radius: var(--alx-radius-m);
	background: var(--alx-soft);
	list-style: none;
}

.woocommerce-message .button,
.woocommerce-info .button {
	order: 2;
	margin-left: auto;
	min-height: 36px;
	font-size: var(--alx-fs-s);
}

.woocommerce-error {
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	color: var(--alx-promo);
}

.woocommerce-error li {
	list-style: none;
}

.woocommerce-breadcrumb {
	margin-bottom: var(--alx-sp-4);
	color: var(--alx-text-soft);
	font-size: var(--alx-fs-s);
}

.woocommerce-breadcrumb a:hover {
	color: var(--alx-ink);
}

.woocommerce-products-header__title,
.product_title {
	font-size: var(--alx-fs-xl);
}

.term-description {
	max-width: 780px;
	margin-bottom: var(--alx-sp-4);
	color: var(--alx-text-soft);
}

.woocommerce-result-count {
	float: left;
	margin: 0 0 var(--alx-sp-4);
	color: var(--alx-text-soft);
	font-size: var(--alx-fs-s);
	line-height: 44px;
}

.woocommerce-ordering {
	float: right;
	margin: 0 0 var(--alx-sp-4);
}

.woocommerce-ordering select {
	width: auto;
	border-radius: var(--alx-radius-pill);
}

/* Boucle produits : 4 colonnes, 2 sur mobile */
ul.products {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 32px 20px;
	clear: both;
	margin: 0 0 var(--alx-sp-6);
	padding: 0;
	list-style: none;
}

ul.products li.product {
	position: relative;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
}

ul.products li.product a.woocommerce-LoopProduct-link {
	display: block;
}

ul.products li.product img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border-radius: var(--alx-radius-m);
	background: var(--alx-soft);
}

.woocommerce-loop-product__title,
.woocommerce-loop-category__title {
	margin: 10px 0 4px;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0;
}

.woocommerce-loop-category__title .count {
	color: var(--alx-text-soft);
	background: none;
}

ul.products li.product .star-rating {
	margin: 0 0 4px;
}

ul.products li.product .button {
	align-self: flex-start;
	margin-top: auto;
	min-height: 38px;
	padding: 0 var(--alx-sp-4);
	font-size: var(--alx-fs-s);
}

ul.products li.product .button + .added_to_cart,
a.added_to_cart {
	display: inline-block;
	margin: 6px 0 0 var(--alx-sp-2);
	font-size: var(--alx-fs-s);
	text-decoration: underline;
}

.price {
	display: block;
	margin-bottom: var(--alx-sp-2);
	font-weight: 600;
}

.price del {
	color: var(--alx-text-soft);
	font-weight: 400;
	opacity: 0.8;
}

.price ins {
	color: var(--alx-promo);
	text-decoration: none;
}

.onsale {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	padding: 0 10px;
	border-radius: var(--alx-radius-pill);
	background: var(--alx-promo);
	color: var(--alx-white);
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1;
}

.star-rating {
	position: relative;
	display: block;
	width: 5.6em;
	height: 1.1em;
	overflow: hidden;
	font-size: 14px;
	line-height: 1.1;
	white-space: nowrap;
}

.star-rating::before,
.star-rating span::before {
	content: "\2605\2605\2605\2605\2605";
	display: block;
	letter-spacing: 0.1em;
	font-size: 14px;
}

.star-rating::before {
	position: absolute;
	top: 0;
	left: 0;
	color: var(--alx-line);
}

.star-rating span {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	overflow: hidden;
	font-size: 0;
}

.star-rating span::before {
	color: var(--alx-ink);
}

.woocommerce-pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--alx-sp-2);
	margin: 0 0 var(--alx-sp-5);
	padding: 0;
	list-style: none;
}

/* Fiche produit */
.single-product div.product {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	gap: 0 48px;
	align-items: start;
}

.single-product div.product > .onsale {
	top: 12px;
	left: 12px;
}

.single-product div.product .woocommerce-tabs,
.single-product div.product .related,
.single-product div.product .upsells,
.single-product div.product .swe-recent {
	grid-column: 1 / -1;
}

.woocommerce-product-gallery {
	position: relative;
	margin-bottom: var(--alx-sp-5);
}

.woocommerce-product-gallery__wrapper {
	margin: 0;
}

.woocommerce-product-gallery__image img,
.woocommerce-product-gallery .flex-viewport img {
	display: block;
	width: 100%;
	border-radius: var(--alx-radius-m);
}

.woocommerce-product-gallery .flex-viewport {
	overflow: hidden;
	border-radius: var(--alx-radius-m);
}

.flex-control-thumbs {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: var(--alx-sp-2);
	margin: var(--alx-sp-2) 0 0;
	padding: 0;
	list-style: none;
}

.flex-control-thumbs img {
	opacity: 0.55;
	border-radius: var(--alx-radius-s);
	cursor: pointer;
}

.flex-control-thumbs img.flex-active,
.flex-control-thumbs img:hover {
	opacity: 1;
}

.woocommerce-product-gallery__trigger {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 9;
	width: 36px;
	height: 36px;
	overflow: hidden;
	border-radius: 50%;
	background: var(--alx-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center / 20px no-repeat;
	box-shadow: var(--alx-shadow-s);
	text-indent: -999px;
}

.single-product .summary {
	margin-bottom: var(--alx-sp-5);
}

.single-product .summary .price {
	font-size: 22px;
}

.woocommerce-product-rating {
	display: flex;
	align-items: center;
	gap: var(--alx-sp-2);
	margin-bottom: var(--alx-sp-3);
	color: var(--alx-text-soft);
	font-size: var(--alx-fs-s);
}

.woocommerce-product-details__short-description {
	margin-bottom: var(--alx-sp-4);
	color: var(--alx-text-soft);
}

form.cart {
	display: flex;
	flex-wrap: wrap;
	gap: var(--alx-sp-3);
	margin-bottom: var(--alx-sp-4);
}

form.cart .single_add_to_cart_button {
	flex: 1;
	min-width: 180px;
	min-height: 48px;
}

form.cart.variations_form,
form.cart .woocommerce-variation-add-to-cart {
	flex-direction: column;
}

form.cart .woocommerce-variation-add-to-cart {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: var(--alx-sp-3);
}

.quantity input.qty {
	width: 76px;
	min-height: 48px;
	padding: 0;
	border-radius: var(--alx-radius-pill);
	text-align: center;
}

table.variations {
	width: 100%;
	margin-bottom: var(--alx-sp-3);
	border: 0;
}

table.variations th,
table.variations td {
	display: block;
	padding: 0 0 var(--alx-sp-3);
	text-align: left;
}

table.variations th.label label {
	margin: 0;
}

a.reset_variations {
	display: inline-block;
	margin-top: var(--alx-sp-2);
	color: var(--alx-text-soft);
	font-size: var(--alx-fs-s);
	text-decoration: underline;
}

.product_meta {
	display: grid;
	gap: 4px;
	padding-top: var(--alx-sp-4);
	border-top: 1px solid var(--alx-line);
	color: var(--alx-text-soft);
	font-size: var(--alx-fs-s);
}

table.woocommerce-product-attributes {
	width: 100%;
	border-collapse: collapse;
}

table.woocommerce-product-attributes th,
table.woocommerce-product-attributes td {
	padding: 10px 0;
	border-bottom: 1px solid var(--alx-line);
	text-align: left;
}

table.woocommerce-product-attributes th {
	width: 30%;
	font-weight: 600;
}

table.woocommerce-product-attributes p {
	margin: 0;
}

.related > h2,
.upsells > h2,
.cross-sells > h2 {
	font-size: var(--alx-fs-l);
	margin-bottom: var(--alx-sp-4);
}

#reviews ol.commentlist {
	margin: 0 0 var(--alx-sp-5);
	padding: 0;
	list-style: none;
}

#reviews ol.commentlist li {
	padding: var(--alx-sp-4) 0;
	border-bottom: 1px solid var(--alx-line);
}

#reviews .comment_container {
	display: flex;
	gap: var(--alx-sp-4);
}

#reviews .avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
}

#reviews .comment-text .star-rating {
	margin-bottom: 4px;
}

#reviews .meta {
	margin: 0 0 var(--alx-sp-2);
	color: var(--alx-text-soft);
	font-size: var(--alx-fs-s);
}

#reviews .description p {
	margin: 0;
}

p.stars {
	margin: 0 0 var(--alx-sp-3);
}

p.stars span {
	display: inline-flex;
	gap: 4px;
}

p.stars a {
	position: relative;
	display: block;
	width: 24px;
	height: 24px;
	overflow: hidden;
	text-indent: -999px;
}

p.stars a::before {
	content: "\2605";
	position: absolute;
	top: 0;
	left: 0;
	color: var(--alx-line);
	font-size: 24px;
	line-height: 24px;
	text-indent: 0;
}

p.stars:hover a::before,
p.stars.selected a:not(.active)::before,
p.stars.selected a.active::before {
	color: var(--alx-ink);
}

p.stars a:hover ~ a::before,
p.stars.selected a.active ~ a::before {
	color: var(--alx-line);
}

.comment-form p {
	margin-bottom: var(--alx-sp-3);
}

/* Tableaux : panier, commande, compte */
table.shop_table {
	width: 100%;
	margin: 0 0 var(--alx-sp-5);
	border-collapse: collapse;
}

table.shop_table th,
table.shop_table td {
	padding: 14px 10px;
	border-bottom: 1px solid var(--alx-line);
	text-align: left;
	vertical-align: middle;
}

table.shop_table thead th {
	color: var(--alx-text-soft);
	font-size: var(--alx-fs-s);
	font-weight: 500;
}

table.shop_table .product-thumbnail img {
	width: 72px;
	height: auto;
	border-radius: var(--alx-radius-s);
}

table.shop_table .product-name a {
	font-weight: 500;
}

table.shop_table a.remove {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: 1px solid var(--alx-line);
	border-radius: 50%;
	color: var(--alx-text-soft);
	font-size: 18px;
	line-height: 1;
}

table.shop_table a.remove:hover {
	border-color: var(--alx-ink);
	color: var(--alx-ink);
}

table.shop_table td.actions {
	padding-right: 0;
	padding-left: 0;
}

table.shop_table td.actions .coupon {
	display: flex;
	flex-wrap: wrap;
	gap: var(--alx-sp-2);
	float: left;
}

table.shop_table td.actions .coupon input.input-text {
	width: 200px;
	border-radius: var(--alx-radius-pill);
}

table.shop_table td.actions > .button {
	float: right;
}

.woocommerce-cart .woocommerce {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 380px;
	gap: 0 var(--alx-sp-6);
	align-items: start;
}

.woocommerce-cart .cart-collaterals {
	padding: var(--alx-sp-5);
	border-radius: var(--alx-radius-l);
	background: var(--alx-soft);
}

.cart_totals h2 {
	font-size: var(--alx-fs-l);
}

.cart_totals table.shop_table {
	margin-bottom: var(--alx-sp-4);
}

.cart_totals table.shop_table th,
.cart_totals table.shop_table td {
	padding-right: 0;
	padding-left: 0;
	background: none;
}

.cart_totals table.shop_table td {
	text-align: right;
}

.wc-proceed-to-checkout a.checkout-button {
	display: flex;
	width: 100%;
	min-height: 52px;
	align-items: center;
	justify-content: center;
	border-radius: var(--alx-radius-pill);
	background: var(--alx-ink);
	color: var(--alx-white);
	font-weight: 600;
}

.woocommerce-shipping-calculator .button {
	margin-top: var(--alx-sp-2);
}

.cart-empty {
	padding: var(--alx-sp-5) 0;
	font-size: var(--alx-fs-l);
}

/* Commande */
form.woocommerce-checkout {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
	gap: 0 var(--alx-sp-6);
	align-items: start;
}

form.woocommerce-checkout #customer_details {
	grid-column: 1;
	grid-row: 1 / span 2;
}

form.woocommerce-checkout #order_review_heading {
	grid-column: 2;
	grid-row: 1;
}

form.woocommerce-checkout #order_review {
	grid-column: 2;
	grid-row: 2;
}

.woocommerce-billing-fields__field-wrapper,
.woocommerce-shipping-fields__field-wrapper,
.woocommerce-address-fields__field-wrapper {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 var(--alx-sp-4);
}

.form-row {
	margin: 0 0 var(--alx-sp-4);
}

.form-row-wide,
.form-row.notes,
.woocommerce-billing-fields__field-wrapper .form-row.validate-required:only-child {
	grid-column: 1 / -1;
}

.form-row .required {
	color: var(--alx-promo);
	text-decoration: none;
}

.woocommerce-invalid input.input-text,
.woocommerce-invalid select {
	border-color: var(--alx-promo);
}

.woocommerce-checkout h3 {
	font-size: var(--alx-fs-l);
}

#order_review {
	padding: var(--alx-sp-5);
	border-radius: var(--alx-radius-l);
	background: var(--alx-soft);
}

#order_review table.shop_table th,
#order_review table.shop_table td {
	background: none;
}

#order_review table.shop_table td:last-child {
	text-align: right;
}

#payment ul.payment_methods {
	margin: 0 0 var(--alx-sp-4);
	padding: 0;
	list-style: none;
}

#payment ul.payment_methods > li {
	padding: var(--alx-sp-3) 0;
	border-bottom: 1px solid var(--alx-line);
}

#payment ul.payment_methods label {
	margin: 0;
}

#payment .payment_box {
	margin-top: var(--alx-sp-2);
	padding: var(--alx-sp-3);
	border-radius: var(--alx-radius-s);
	background: var(--alx-white);
	color: var(--alx-text-soft);
	font-size: var(--alx-fs-s);
}

#payment .payment_box p:last-child {
	margin: 0;
}

#place_order {
	width: 100%;
	min-height: 52px;
}

.woocommerce-terms-and-conditions-wrapper {
	margin-bottom: var(--alx-sp-4);
	font-size: var(--alx-fs-s);
}

.woocommerce-form-coupon-toggle {
	grid-column: 1 / -1;
}

form.checkout_coupon,
form.woocommerce-form-login,
form.woocommerce-form-register,
.lost_reset_password {
	margin: 0 0 var(--alx-sp-5);
	padding: var(--alx-sp-5);
	border: 1px solid var(--alx-line);
	border-radius: var(--alx-radius-l);
}

.woocommerce-order ul.order_details {
	display: flex;
	flex-wrap: wrap;
	gap: var(--alx-sp-4);
	margin: 0 0 var(--alx-sp-5);
	padding: 0;
	list-style: none;
}

.woocommerce-order ul.order_details li {
	padding: var(--alx-sp-3) var(--alx-sp-4);
	border-radius: var(--alx-radius-m);
	background: var(--alx-soft);
	color: var(--alx-text-soft);
	font-size: var(--alx-fs-s);
}

.woocommerce-order ul.order_details li strong {
	display: block;
	color: var(--alx-ink);
	font-size: var(--alx-fs-m);
}

/* Mon compte */
.logged-in.woocommerce-account .woocommerce {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	gap: var(--alx-sp-6);
	align-items: start;
}

.u-columns,
.woocommerce-Addresses {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--alx-sp-6);
}

.woocommerce-Address-title h3 {
	font-size: var(--alx-fs-l);
}

.woocommerce-address-fields .button,
.woocommerce-EditAccountForm .button {
	margin-top: var(--alx-sp-2);
}

/* Sélecteurs de pays (select2) */
.select2-container--default .select2-selection--single {
	height: 44px;
	border: 1px solid var(--alx-line);
	border-radius: var(--alx-radius-s);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
	padding: 0 var(--alx-sp-4);
	line-height: 42px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 42px;
}

/* Blocs WooCommerce (panier / commande en blocs) */
.wc-block-components-button:not(.is-link) {
	border-radius: var(--alx-radius-pill);
	background: var(--alx-ink);
	color: var(--alx-white);
}

@media (max-width: 767px) {
	.woocommerce-result-count {
		line-height: 1.5;
	}

	.woocommerce-ordering {
		float: none;
	}

	ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px 10px;
	}

	.single-product div.product,
	.woocommerce-cart .woocommerce,
	form.woocommerce-checkout,
	.logged-in.woocommerce-account .woocommerce,
	.u-columns,
	.woocommerce-Addresses {
		grid-template-columns: minmax(0, 1fr);
	}

	form.woocommerce-checkout #customer_details,
	form.woocommerce-checkout #order_review_heading,
	form.woocommerce-checkout #order_review {
		grid-column: 1;
		grid-row: auto;
	}

	.woocommerce-billing-fields__field-wrapper,
	.woocommerce-shipping-fields__field-wrapper,
	.woocommerce-address-fields__field-wrapper {
		grid-template-columns: minmax(0, 1fr);
	}

	table.shop_table_responsive thead {
		display: none;
	}

	table.shop_table_responsive tr {
		display: block;
		border-bottom: 1px solid var(--alx-line);
	}

	table.shop_table_responsive td {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: var(--alx-sp-4);
		border-bottom: 0;
		text-align: right;
	}

	table.shop_table_responsive td::before {
		content: attr(data-title);
		color: var(--alx-text-soft);
		font-weight: 500;
		text-align: left;
	}

	table.shop_table_responsive td.product-remove::before,
	table.shop_table_responsive td.product-thumbnail::before,
	table.shop_table_responsive td.actions::before {
		content: none;
	}

	table.shop_table td.actions .coupon,
	table.shop_table td.actions > .button {
		float: none;
	}

	table.shop_table td.actions {
		display: block;
		text-align: left;
	}

	table.shop_table td.actions .coupon input.input-text {
		width: 100%;
	}

	table.shop_table td.actions > .button {
		width: 100%;
		margin-top: var(--alx-sp-2);
	}

	.woocommerce-cart .cart-collaterals {
		margin-top: var(--alx-sp-4);
	}
}
