/*
Theme Name:  ÇaPouss Child
Theme URI:   https://capouss.com
Description: Thème enfant de Hello Elementor — consolidation CSS et personnalisations
             du site e-commerce ÇaPouss (WooCommerce + Elementor Pro).
Author:      Agence Tâmbour
Author URI:  https://tambour.cm
Template:    hello-elementor
Version:     1.0.0
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: capouss-child
Tags:        e-commerce, woocommerce, elementor
*/

/*
 * =========================================================================
 * CSS GLOBAL — THÈME ENFANT
 * =========================================================================
 * Ce fichier est réservé aux règles que seul le thème peut atteindre :
 * réparations structurelles, surcharges de Hello Elementor, et tout ce qui
 * doit être chargé AVANT les widgets Elementor.
 *
 * Pour le design system (couleurs, typo, espacements), utiliser
 * Elementor > Réglages du site > Design global.
 * =========================================================================
 */

/* -------------------------------------------------------------------------
 * 1. Corrections structurelles Hello Elementor
 * ------------------------------------------------------------------------- */

/* Empêche le débordement horizontal indésirable sur mobile. */
body {
	overflow-x: hidden;
}

/* -------------------------------------------------------------------------
 * 2. Accessibilité
 * ------------------------------------------------------------------------- */

/* Remplace la définition du thème parent désactivée — indispensable pour WooCommerce. */
.screen-reader-text {
	border: 0;
	clip: rect( 1px, 1px, 1px, 1px );
	clip-path: inset( 50% );
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal;
}

:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 2px;
}

/* -------------------------------------------------------------------------
 * 3. Images responsives globales
 * ------------------------------------------------------------------------- */

img {
	max-width: 100%;
	height: auto;
}



/* Exclusion — widget Elementor Pro "Menu Cart" (icône panier de l'en-tête).
 * Ce widget réutilise en interne la classe .elementor-button pour hériter
 * du style global des boutons ; on lui redonne son apparence propre
 * (icône + pastille de comptage) au lieu du dégradé de marque. */
.elementor-widget-woocommerce-menu-cart .elementor-button {
	background: unset !important;
	border-color: unset !important;
	border-radius: unset !important;
	color: unset !important;
}

.elementor-widget-woocommerce-menu-cart .elementor-button:hover,
.elementor-widget-woocommerce-menu-cart .elementor-button:focus {
	opacity: 1 !important;
	color: unset !important;
}

/* =========================================================================
 * Grille produits (widget Products Elementor) — ÇaPouss
 * Carte + image pleine largeur (proportions réelles). Bouton : 100 % Elementor.
 * ========================================================================= */

/* Carte : un padding latéral commun aligne titre, prix ET bouton */
.elementor-widget-woocommerce-products ul.products li.product {
	background: #fff !important;
	border: 1px solid rgba(0,0,0,.07) !important;
	border-radius: 14px !important;
	overflow: hidden !important;
	padding: 0 1.1rem 1.25rem !important;
	box-shadow: 0 2px 8px rgba(0,0,0,.04);
	transition: transform .25s ease, box-shadow .25s ease;
}
.elementor-widget-woocommerce-products ul.products li.product:hover {
	transform: translateY(-5px);
	box-shadow: 0 16px 32px rgba(0,0,0,.12);
}

/* Image : bord à bord, hauteur auto (taille réelle, jamais rognée).
 * Les marges négatives la font sortir du padding de la carte. */
.elementor-widget-woocommerce-products ul.products li.product > a {
	display: block;
}
.elementor-widget-woocommerce-products ul.products li.product img {
	display: block !important;
	width: calc(100% + 2.2rem) !important;
	max-width: none !important;
	height: auto !important;
	margin: 0 -1.1rem 1rem !important;
	border-radius: 0 !important;
}

/* Titre & prix : couleur/police héritées d'Elementor */
.elementor-widget-woocommerce-products ul.products li.product .woocommerce-loop-product__title,
.elementor-widget-woocommerce-products ul.products li.product .price {
	color: inherit;
	font-family: inherit;
}

/* Bouton : AUCUNE règle ici. Il garde intégralement les réglages Elementor
 * et s'aligne au texte grâce au padding de la carte ci-dessus. */

/* -------------------------------------------------------------------------
 * Sélecteur de quantité (stepper − / +) — fiche produit & panier
 * HTML généré par woocommerce/global/quantity-input.php.
 * ------------------------------------------------------------------------- */

.woocommerce div.product form.cart .quantity.capouss-qty,
.woocommerce-cart .quantity.capouss-qty {
	float: none !important;
	width: auto !important;
	max-width: none !important;
	display: inline-flex !important;
	align-items: center !important;
	background: #F5EEE3 !important;
	border-radius: 999px !important;
	overflow: visible !important;
	padding: 4px !important;
	margin: 0 0.75rem 0 0 !important;
	vertical-align: middle;
}

.capouss-qty__btn {
	width: 32px !important;
	height: 32px !important;
	background: transparent !important;
	border: none !important;
	border-radius: 50% !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	font-family: inherit !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	color: #6B5B44 !important;
	cursor: pointer !important;
	padding: 0 !important;
	flex-shrink: 0 !important;
	transition: background 0.15s ease !important;
	user-select: none !important;
}

.capouss-qty__btn:hover {
	background: rgba( 0, 0, 0, 0.06 ) !important;
}

.woocommerce div.product .capouss-qty input.qty,
.woocommerce-cart .capouss-qty input.qty {
	width: 32px !important;
	height: 32px !important;
	border: none !important;
	background: transparent !important;
	text-align: center !important;
	font-family: inherit !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	color: #2b2b2b !important;
	padding: 0 !important;
	box-shadow: none !important;
	-moz-appearance: textfield !important;
	appearance: textfield !important;
}

.woocommerce div.product .capouss-qty input.qty::-webkit-inner-spin-button,
.woocommerce div.product .capouss-qty input.qty::-webkit-outer-spin-button,
.woocommerce-cart .capouss-qty input.qty::-webkit-inner-spin-button,
.woocommerce-cart .capouss-qty input.qty::-webkit-outer-spin-button {
	-webkit-appearance: none !important;
	margin: 0 !important;
}

.woocommerce div.product .capouss-qty input.qty:focus,
.woocommerce-cart .capouss-qty input.qty:focus {
	outline: none !important;
}

/* Cible tactile élargie sur mobile (min. 44×44px recommandé WCAG/Apple/Google). */
@media ( max-width: 480px ) {
	.capouss-qty__btn {
		width: 44px !important;
		height: 44px !important;
		font-size: 18px !important;
	}

	.woocommerce div.product .capouss-qty input.qty,
	.woocommerce-cart .capouss-qty input.qty {
		width: 36px !important;
		height: 44px !important;
		font-size: 16px !important;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.capouss-qty__btn {
		transition: none !important;
	}
}

/* -------------------------------------------------------------------------
 * Toast panier — ajout au panier AJAX
 * ------------------------------------------------------------------------- */

.capouss-toast {
	position: fixed;
	bottom: 1.5rem;
	right: 1.5rem;
	z-index: 99999;
	background: #fff;
	border-radius: 0.5rem;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
	padding: 1rem 1.25rem;
	max-width: 320px;
	width: calc(100vw - 3rem);
	opacity: 0;
	transform: translateY(0.75rem);
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: none;
}

.capouss-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.capouss-toast__msg {
	margin: 0 0 0.75rem;
	font-size: 0.9rem;
	color: #333;
}

.capouss-toast__actions {
	display: flex;
	gap: 0.75rem;
	align-items: center;
}

.capouss-toast__link {
	font-size: 0.85rem;
	color: #555;
	text-decoration: underline;
}

.capouss-toast__link:hover {
	color: #333;
}

.capouss-toast__cta {
	display: inline-block;
	padding: 0.4rem 0.9rem;
	background: var(--capouss-btn-gradient);
	color: #fff;
	border-radius: var(--capouss-btn-radius);
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
}

.capouss-toast__cta:hover {
	opacity: 0.9;
	color: #fff;
}

@media (prefers-reduced-motion: reduce) {
	.capouss-toast {
		transition: none;
	}
}

/* -------------------------------------------------------------------------
 * Page Panier — barre de progression livraison gratuite
 * ------------------------------------------------------------------------- */

.capouss-shipping-progress {
	margin-bottom: 1.25rem;
	padding: 1rem 1.25rem;
	background: #f9f9f9;
	border-radius: 0.5rem;
}

.capouss-shipping-progress.is-reached {
	background: #f0faf0;
}

.capouss-shipping-progress__msg {
	margin: 0 0 0.6rem;
	font-size: 0.9rem;
}

.capouss-shipping-progress__track {
	height: 6px;
	background: #e5e5e5;
	border-radius: 3px;
	overflow: hidden;
}

.capouss-shipping-progress__fill {
	height: 100%;
	background: var(--capouss-brand, #E0912E);
	border-radius: 3px;
	transition: width 0.4s ease;
}

.capouss-shipping-progress.is-reached .capouss-shipping-progress__fill {
	background: #4caf50;
}

/* -------------------------------------------------------------------------
 * Page Panier — badges de réassurance
 * ------------------------------------------------------------------------- */

.capouss-trust-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
}

.capouss-trust-badge {
	font-size: 0.8rem;
	color: #666;
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.capouss-trust-badge::before {
	content: '';
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--capouss-brand, #E0912E);
	flex-shrink: 0;
}

/* -------------------------------------------------------------------------
 * Page Panier — CTA panier vide
 * ------------------------------------------------------------------------- */

.capouss-empty-cart-cta {
	text-align: center;
	margin-top: 1.5rem;
}

/* -------------------------------------------------------------------------
 * Page Panier — tableau des articles (table.cart native WooCommerce)
 * ------------------------------------------------------------------------- */

.woocommerce-cart table.cart {
	border: none !important;
	border-collapse: collapse !important;
	width: 100%;
	margin: 0 0 2rem !important;
}

.woocommerce-cart table.cart thead th {
	border: none !important;
	padding: 0 0.75rem 0.75rem !important;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #999;
	font-weight: 600;
	text-align: left;
}

.woocommerce-cart table.cart tbody tr.cart_item {
	border-bottom: 1px solid rgba( 0, 0, 0, 0.07 );
}

.woocommerce-cart table.cart td {
	border: none !important;
	padding: 1rem 0.75rem !important;
	vertical-align: middle;
}

.woocommerce-cart table.cart td.product-thumbnail img {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 10px;
}

.woocommerce-cart table.cart td.product-name a {
	font-weight: 600;
	color: inherit;
	text-decoration: none;
}

.woocommerce-cart table.cart td.product-name a:hover {
	color: var( --capouss-brand, #E0912E );
}

.woocommerce-cart table.cart td.product-price,
.woocommerce-cart table.cart td.product-subtotal {
	font-weight: 600;
	white-space: nowrap;
}

.woocommerce-cart table.cart td.product-subtotal {
	color: var( --capouss-brand, #E0912E );
}

.woocommerce-cart table.cart td.product-remove a.remove {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #f5f5f5 !important;
	color: #999 !important;
	font-size: 1rem;
	line-height: 1;
	text-decoration: none !important;
	transition: background 0.15s ease, color 0.15s ease;
}

.woocommerce-cart table.cart td.product-remove a.remove:hover {
	background: #fde8e8 !important;
	color: #e53935 !important;
}

.woocommerce-cart table.cart td.actions {
	padding-top: 1.25rem !important;
}

.woocommerce-cart .coupon {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	flex-wrap: wrap;
}

.woocommerce-cart .coupon input#coupon_code {
	padding: 0.6rem 0.9rem;
	border: 1px solid rgba( 0, 0, 0, 0.15 );
	border-radius: 0.375rem;
	font-size: 0.85rem;
	min-width: 180px;
}

.woocommerce-cart .coupon input#coupon_code:focus {
	outline: none;
	border-color: var( --capouss-brand, #E0912E );
}

/* -------------------------------------------------------------------------
 * Page Panier — bloc total (cart_totals)
 * ------------------------------------------------------------------------- */

.woocommerce-cart .cart_totals {
	background: #fff;
	border: 1px solid rgba( 0, 0, 0, 0.07 );
	border-radius: 14px;
	padding: 1.5rem;
	box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.04 );
}

.woocommerce-cart .cart_totals h2 {
	font-size: 1.1rem;
	margin: 0 0 1rem;
}

.woocommerce-cart .cart_totals table.shop_table td,
.woocommerce-cart .cart_totals table.shop_table th {
	border: none !important;
	padding: 0.6rem 0 !important;
}

.woocommerce-cart .cart_totals table.shop_table tr:not( :last-child ) {
	border-bottom: 1px solid rgba( 0, 0, 0, 0.06 );
}

.woocommerce-cart .cart_totals .order-total .amount {
	color: var( --capouss-brand, #E0912E );
	font-size: 1.15rem;
	font-weight: 700;
}

/* -------------------------------------------------------------------------
 * Page Panier — tableau empilé sous 768px
 * Réutilise les data-title déjà présents sur les <td> du template WooCommerce.
 * ------------------------------------------------------------------------- */

@media ( max-width: 768px ) {
	.woocommerce-cart table.cart thead {
		display: none;
	}

	.woocommerce-cart table.cart tbody tr.cart_item {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 0.5rem 0.75rem;
		padding: 1rem 0;
	}

	.woocommerce-cart table.cart td {
		display: block;
		border: none !important;
		padding: 0 !important;
	}

	.woocommerce-cart table.cart td.product-thumbnail {
		flex: 0 0 72px;
	}

	.woocommerce-cart table.cart td.product-remove {
		order: -1;
		flex: 0 0 auto;
		margin-left: auto;
	}

	.woocommerce-cart table.cart td.product-name {
		flex: 1 1 calc( 100% - 72px - 2rem );
	}

	.woocommerce-cart table.cart td.product-price,
	.woocommerce-cart table.cart td.product-quantity,
	.woocommerce-cart table.cart td.product-subtotal {
		flex: 1 1 auto;
	}

	.woocommerce-cart table.cart td.product-price::before,
	.woocommerce-cart table.cart td.product-subtotal::before {
		content: attr( data-title ) ' : ';
		font-size: 0.7rem;
		color: #999;
		font-weight: 600;
		text-transform: uppercase;
		margin-right: 0.3rem;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.woocommerce-cart table.cart td.product-remove a.remove {
		transition: none;
	}
}

/* -------------------------------------------------------------------------
 * Page confirmation — message de remerciement
 * ------------------------------------------------------------------------- */

.capouss-thankyou {
	margin-bottom: 1.5rem;
	padding: 1.25rem 1.5rem;
	background: #fff8f2;
	border-left: 4px solid var(--capouss-brand, #E0912E);
	border-radius: 0 0.5rem 0.5rem 0;
}

.capouss-thankyou__text {
	margin: 0;
	font-size: 1rem;
}

/* -------------------------------------------------------------------------
 * Page confirmation — produits suggérés post-achat
 * ------------------------------------------------------------------------- */

.capouss-upsell {
	margin-top: 2.5rem;
}

.capouss-upsell__title {
	font-size: 1.1rem;
	margin-bottom: 1.25rem;
}

.capouss-upsell__list {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

@media (max-width: 600px) {
	.capouss-upsell__list {
		grid-template-columns: 1fr;
	}
}

.capouss-upsell__link {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	text-decoration: none;
	color: inherit;
	border: 1px solid rgba(0, 0, 0, 0.07);
	border-radius: 0.5rem;
	overflow: hidden;
	transition: box-shadow 0.2s ease;
}

.capouss-upsell__link:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.capouss-upsell__link img {
	width: 100%;
	height: auto;
	display: block;
}

.capouss-upsell__name,
.capouss-upsell__price {
	padding: 0 0.75rem;
	font-size: 0.85rem;
}

.capouss-upsell__name {
	font-weight: 600;
}

.capouss-upsell__price {
	padding-bottom: 0.75rem;
	color: var(--capouss-brand, #E0912E);
}

/* -------------------------------------------------------------------------
 * Mon Compte — message de bienvenue
 * ------------------------------------------------------------------------- */

.capouss-account-greeting {
	margin-bottom: 1.25rem;
	padding: 1rem 1.25rem;
	background: #fff8f2;
	border-radius: 0.5rem;
}

.capouss-account-greeting__text {
	margin: 0;
	font-size: 0.95rem;
}

/* -------------------------------------------------------------------------
 * Mon Compte — raccourcis rapides
 * ------------------------------------------------------------------------- */

.capouss-account-shortcuts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-bottom: 2rem;
}

.capouss-account-shortcut {
	display: inline-block;
	padding: 0.5rem 1rem;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: var(--capouss-btn-radius);
	font-size: 0.85rem;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.2s ease;
}

.capouss-account-shortcut:hover {
	border-color: var(--capouss-brand, #E0912E);
	color: var(--capouss-brand, #E0912E);
}

.capouss-account-shortcut--cta {
	background: var(--capouss-btn-gradient);
	border-color: transparent;
	color: #fff;
	font-weight: 600;
}

.capouss-account-shortcut--cta:hover {
	opacity: 0.9;
	color: #fff;
}

@media (prefers-reduced-motion: reduce) {
	.capouss-shipping-progress__fill,
	.capouss-upsell__link,
	.capouss-account-shortcut {
		transition: none;
	}
}

/* -------------------------------------------------------------------------
 * Tunnel de commande — barre de progression des étapes
 * ------------------------------------------------------------------------- */

.capouss-checkout-steps {
	margin: 0 0 2rem;
}

.capouss-checkout-steps__list {
	display: flex;
	justify-content: center;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 0;
}

.capouss-checkout-steps__item {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.8rem;
	color: #aaa;
}

/* Connecteur entre les étapes */
.capouss-checkout-steps__item:not( :last-child )::after {
	content: '';
	display: block;
	width: 36px;
	height: 1px;
	background: #ddd;
	margin: 0 0.6rem;
}

.capouss-checkout-steps__item.is-done {
	color: #4caf50;
}

.capouss-checkout-steps__item.is-done .capouss-checkout-steps__num {
	background: #4caf50;
}

.capouss-checkout-steps__item.is-active {
	color: var(--capouss-brand, #E0912E);
	font-weight: 600;
}

.capouss-checkout-steps__item.is-active .capouss-checkout-steps__num {
	background: var(--capouss-brand, #E0912E);
}

.capouss-checkout-steps__num {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #ddd;
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	flex-shrink: 0;
}

/* Sous 480px : les libellés ("Confirmation", etc.) + connecteurs dépassaient
 * la largeur de l'écran. On masque les libellés sauf celui de l'étape active
 * et on réduit les connecteurs, pour que la barre tienne sur une ligne. */
@media ( max-width: 480px ) {
	.capouss-checkout-steps__list {
		padding: 0 0.5rem;
	}

	.capouss-checkout-steps__item:not( :last-child )::after {
		width: 16px;
		margin: 0 0.3rem;
	}

	.capouss-checkout-steps__label {
		display: none;
	}

	.capouss-checkout-steps__item.is-active .capouss-checkout-steps__label {
		display: inline;
		font-size: 0.7rem;
	}
}

/* -------------------------------------------------------------------------
 * Checkout — order bump
 * ------------------------------------------------------------------------- */

.capouss-order-bump {
	margin: 1.5rem 0;
	padding: 1rem;
	background: #fff8f2;
	border: 2px dashed var(--capouss-brand, #E0912E);
	border-radius: 0.5rem;
}

.capouss-order-bump__inner {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	cursor: pointer;
}

.capouss-order-bump__checkbox {
	margin-top: 4px;
	flex-shrink: 0;
	accent-color: var(--capouss-brand, #E0912E);
}

.capouss-order-bump__content {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.capouss-order-bump__content img {
	width: 60px;
	height: 60px;
	object-fit: cover;
	border-radius: 4px;
	flex-shrink: 0;
}

.capouss-order-bump__name {
	display: block;
	font-size: 0.9rem;
	font-weight: 600;
}

.capouss-order-bump__price {
	display: block;
	font-size: 0.85rem;
	color: var(--capouss-brand, #E0912E);
}

.capouss-order-bump__desc {
	margin: 0.25rem 0 0;
	font-size: 0.8rem;
	color: #666;
}

/* -------------------------------------------------------------------------
 * Fiche produit — badge stock faible
 * ------------------------------------------------------------------------- */

.capouss-stock-badge {
	display: inline-block;
	margin: 0.5rem 0;
	padding: 0.3rem 0.75rem;
	background: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: 0.25rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: #856404;
}

/* -------------------------------------------------------------------------
 * Fiche produit — bouton "Ajouter au panier" sticky (mobile uniquement)
 * ------------------------------------------------------------------------- */

.capouss-sticky-cart {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: #fff;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
	padding: 0.75rem 1rem;
	z-index: 9998;
	transform: translateY(100%);
	transition: transform 0.3s ease;
}

.capouss-sticky-cart.is-visible {
	transform: translateY(0);
}

.capouss-sticky-cart__inner {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	max-width: 480px;
	margin: 0 auto;
}

.capouss-sticky-cart__name {
	flex: 1;
	font-size: 0.85rem;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.capouss-sticky-cart__price {
	font-size: 0.85rem;
	white-space: nowrap;
}

.capouss-sticky-cart__btn.button {
	flex-shrink: 0;
	padding: 0.5rem 1rem !important;
	font-size: 0.85rem !important;
	background: var(--capouss-btn-gradient) !important;
	border-color: transparent !important;
	border-radius: var(--capouss-btn-radius) !important;
	color: #fff !important;
	white-space: nowrap;
}

@media (min-width: 768px) {
	.capouss-sticky-cart {
		display: none;
	}
}

/* -------------------------------------------------------------------------
 * Fiche produit — récemment consultés
 * ------------------------------------------------------------------------- */

.capouss-recently-viewed {
	margin: 3rem 0;
}

.capouss-recently-viewed__title {
	font-size: 1.1rem;
	margin-bottom: 1.25rem;
}

.capouss-recently-viewed__list {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

@media (max-width: 600px) {
	.capouss-recently-viewed__list {
		grid-template-columns: repeat(2, 1fr);
	}
}

.capouss-recently-viewed__link {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	text-decoration: none;
	color: inherit;
	border: 1px solid rgba(0, 0, 0, 0.07);
	border-radius: 0.5rem;
	overflow: hidden;
	transition: box-shadow 0.2s ease;
}

.capouss-recently-viewed__link:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.capouss-recently-viewed__link img {
	width: 100%;
	height: auto;
	display: block;
}

.capouss-recently-viewed__name,
.capouss-recently-viewed__price {
	padding: 0 0.75rem;
	font-size: 0.8rem;
}

.capouss-recently-viewed__name {
	font-weight: 600;
}

.capouss-recently-viewed__price {
	padding-bottom: 0.75rem;
	color: var(--capouss-brand, #E0912E);
}

@media (prefers-reduced-motion: reduce) {
	.capouss-sticky-cart,
	.capouss-recently-viewed__link {
		transition: none;
	}
}

/* =========================================================================
 * Page boutique & archives — boucle WooCommerce native
 * =========================================================================
 * Cible ul.products (rendu par WooCommerce sans Elementor).
 * Ne remplace pas les réglages visuels du widget Products Elementor.
 * ========================================================================= */

/* -------------------------------------------------------------------------
 * Grille responsive
 * ------------------------------------------------------------------------- */

.woocommerce ul.products,
.woocommerce-page ul.products {
	display: grid !important;
	grid-template-columns: repeat( 3, 1fr );
	gap: 1.5rem;
	list-style: none;
	margin: 0 0 2rem !important;
	padding: 0 !important;
	float: none !important;
}

@media ( max-width: 900px ) {
	.woocommerce ul.products,
	.woocommerce-page ul.products {
		grid-template-columns: repeat( 2, 1fr );
	}
}

@media ( max-width: 480px ) {
	.woocommerce ul.products,
	.woocommerce-page ul.products {
		grid-template-columns: 1fr;
	}
}

/* -------------------------------------------------------------------------
 * Carte produit
 * ------------------------------------------------------------------------- */

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	background: #fff !important;
	border: 1px solid rgba( 0, 0, 0, 0.07 ) !important;
	border-radius: 14px !important;
	overflow: hidden !important;
	padding: 0 0 1.25rem !important;
	margin: 0 !important;
	width: auto !important;
	float: none !important;
	display: flex !important;
	flex-direction: column;
	box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.04 );
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	position: relative;
}

.woocommerce ul.products li.product:hover,
.woocommerce-page ul.products li.product:hover {
	transform: translateY( -4px );
	box-shadow: 0 12px 28px rgba( 0, 0, 0, 0.1 );
}

/* -------------------------------------------------------------------------
 * Image produit — ratio carre, non rognee
 * ------------------------------------------------------------------------- */

/* Cadre carre avec fond neutre : l'image s'adapte sans recadrage. */
.woocommerce ul.products li.product > a:first-child,
.woocommerce-page ul.products li.product > a:first-child {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #f7f7f7;
	flex-shrink: 0;
}

.woocommerce ul.products li.product a img,
.woocommerce-page ul.products li.product a img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
	border-radius: 0;
	margin: 0;
}

/* -------------------------------------------------------------------------
 * Contenu textuel
 * ------------------------------------------------------------------------- */

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce-page ul.products li.product .woocommerce-loop-product__title {
	padding: 0 1rem 0.25rem !important;
	font-size: 0.95rem !important;
	font-weight: 600;
	color: inherit;
}

.woocommerce ul.products li.product .price,
.woocommerce-page ul.products li.product .price {
	padding: 0 1rem 0.5rem !important;
	color: var( --capouss-brand, #E0912E );
	font-weight: 600;
}

/* -------------------------------------------------------------------------
 * Catégorie produit (injectée par inc/shop.php)
 * ------------------------------------------------------------------------- */

.capouss-loop-cat {
	display: block;
	padding: 0 1rem 0.25rem;
	font-size: 0.75rem;
	color: #999;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.capouss-loop-cat:hover {
	color: var( --capouss-brand, #E0912E );
}

/* -------------------------------------------------------------------------
 * Bouton "Ajouter au panier"
 * ------------------------------------------------------------------------- */

.woocommerce ul.products li.product .button,
.woocommerce-page ul.products li.product .button {
	display: block !important;
	margin: auto 1rem 0 !important;
	width: calc( 100% - 2rem ) !important;
	text-align: center;
	background: var( --capouss-btn-gradient ) !important;
	color: #fff !important;
	border-color: transparent !important;
	border-radius: var( --capouss-btn-radius ) !important;
	font-size: 0.85rem !important;
	padding: 0.6rem 1rem !important;
	transition: opacity 0.2s ease;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce-page ul.products li.product .button:hover {
	opacity: 0.88;
	color: #fff !important;
}

/* -------------------------------------------------------------------------
 * Badges — Soldes & Nouveau
 * ------------------------------------------------------------------------- */

.capouss-badge {
	position: absolute;
	top: 0.6rem;
	z-index: 1;
	padding: 0.25rem 0.6rem;
	border-radius: 0.25rem;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1;
	pointer-events: none;
}

/* Badge Soldes (remplace .onsale de WooCommerce) */
.capouss-badge--sale {
	left: 0.6rem;
	background: #e53935;
	color: #fff;
}

/* Badge Nouveau */
.capouss-badge--new {
	right: 0.6rem;
	background: var( --capouss-brand, #E0912E );
	color: #fff;
}

/* Badge Epuise */
.capouss-badge--oos {
	left: 0.6rem;
	background: #757575;
	color: #fff;
}

/* Masquer le badge .onsale natif WooCommerce — remplace par capouss-badge--sale */
.woocommerce ul.products li.product span.onsale,
.woocommerce-page ul.products li.product span.onsale {
	display: none !important;
}

/* -------------------------------------------------------------------------
 * Notes etoiles dans la boucle produits
 * ------------------------------------------------------------------------- */

.woocommerce ul.products li.product .star-rating,
.woocommerce-page ul.products li.product .star-rating {
	font-size: 0.8em;
	margin: 0 1rem 0.5rem;
}

.woocommerce ul.products li.product .star-rating span::before,
.woocommerce-page ul.products li.product .star-rating span::before {
	color: var( --capouss-brand, #E0912E );
}

/* -------------------------------------------------------------------------
 * Titre "Shop" — traduction en français via CSS (solution rapide)
 * Pour une vraie traduction : Loco Translate ou WPML.
 * ------------------------------------------------------------------------- */

/* Si le titre h1 "Shop" est rendu par WooCommerce sans traduction active,
 * le masquer et le remplacer via Elementor Theme Builder (header archive). */

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