/* Kartabla — Catalogue : cartes produit des catégories + page Chariots.
 * Les anciennes règles « term-chariots » de kartabla-site-ux (site.css, storefront.css) restent
 * chargées ; ce fichier passe devant grâce à la classe .kcat-chariots répétée et à !important. */

/* ==== Toutes les catégories (body.kcat-cards) : cartes uniformes ==== */
html body.kcat-cards #content #primary :is(.woocommerce-result-count) {
	display: none !important;
}
html body.kcat-cards #content #primary ul.products li.product .ast-woo-product-category {
	display: none !important;
}
/* Carte en colonne : le bouton se cale en bas, aligné d'une carte à l'autre. */
html body.kcat-cards #content #primary ul.products > li.product {
	display: flex !important;
	flex-direction: column;
}
html body.kcat-cards #content #primary ul.products li.product .astra-shop-summary-wrap {
	display: flex !important;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
}
html body.kcat-cards #content #primary ul.products li.product .astra-shop-summary-wrap > a.button {
	order: 2;
	margin-top: auto !important;
	white-space: nowrap;
}
/* Les étoiles d'avis (affichées après le bouton par le thème) passent au-dessus de lui. */
html body.kcat-cards #content #primary ul.products li.product .astra-shop-summary-wrap > .star-rating {
	order: 1;
	margin: 0 0 10px;
}
html body.kcat-cards #content #primary ul.products li.product .astra-shop-summary-wrap .price {
	margin-bottom: 10px;
}
.kcat-thumbs {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}
.kcat-thumb {
	box-sizing: border-box;
	width: 28px !important;
	height: 28px !important;
	margin: 0 !important;
	object-fit: cover;
	border: 1px solid #e2e8f0;
	border-radius: 5px;
	background: #fff;
}
.kcat-more {
	color: #64748b;
	font-size: 12px;
	font-weight: 600;
}
@media (max-width: 544px) {
	html body.kcat-cards #content #primary ul.products li.product .astra-shop-summary-wrap > a.button {
		display: block !important;
		width: 100% !important;
		padding: 12px 6px !important;
		font-size: 14px !important;
		text-align: center;
	}
	html body.kcat-cards .kcat-thumb {
		width: 24px !important;
		height: 24px !important;
	}
	html body.kcat-cards .kcat-colors {
		font-size: 12px;
	}
}

/* ---- Bandeau : résultats et tri inutiles avec deux produits ---- */
html body.kcat-chariots.kcat-chariots #content #primary :is(.woocommerce-result-count, .woocommerce-ordering) {
	display: none !important;
}

/* ---- Cartes produit ---- */
html body.kcat-chariots.kcat-chariots #content #primary ul.products {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: 20px !important;
	margin: 0 0 32px !important;
	padding: 0 !important;
}
html body.kcat-chariots.kcat-chariots #content #primary ul.products > li.product {
	display: flex !important;
	flex-direction: column !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}
html body.kcat-chariots.kcat-chariots #content #primary ul.products li.product .astra-shop-thumbnail-wrap {
	margin: 0 !important;
}
html body.kcat-chariots.kcat-chariots #content #primary ul.products li.product .astra-shop-thumbnail-wrap > a.woocommerce-LoopProduct-link {
	display: block !important;
}
html body.kcat-chariots.kcat-chariots #content #primary ul.products li.product .astra-shop-thumbnail-wrap img {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	max-height: none !important;
	aspect-ratio: 1 !important;
	object-fit: contain !important;
	margin: 0 0 12px !important;
	padding: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
}
html body.kcat-chariots.kcat-chariots #content #primary ul.products li.product :is(.ast-woo-product-category, .kux-catalog-facts) {
	display: none !important;
}
/* Résumé en colonne : le bouton se cale en bas, aligné d'une carte à l'autre. */
html body.kcat-chariots.kcat-chariots #content #primary ul.products li.product .astra-shop-summary-wrap {
	display: flex !important;
	flex: 1 1 auto !important;
	flex-direction: column !important;
	align-items: flex-start !important;
}
html body.kcat-chariots.kcat-chariots #content #primary ul.products li.product .woocommerce-loop-product__title {
	margin: 0 0 6px !important;
	color: #1e293b;
	font-size: 17px !important;
	font-weight: 600;
	line-height: 1.3 !important;
}
.kcat-usp {
	margin: 0 0 6px;
	color: #046bd2;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
}
.kcat-colors {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 8px;
	color: #64748b;
	font-size: 13px;
	line-height: 1.3;
}
.kcat-dots {
	display: inline-flex;
	gap: 5px;
}
.kcat-dot {
	width: 14px;
	height: 14px;
	border: 1px solid rgba(15, 23, 42, 0.18);
	border-radius: 50%;
}
html body.kcat-chariots.kcat-chariots #content #primary ul.products li.product .astra-shop-summary-wrap .price {
	margin: 0 0 10px !important;
	color: #1e293b;
	font-size: 16px !important;
	font-weight: 700;
	line-height: 1.3 !important;
}
html body.kcat-chariots.kcat-chariots #content #primary ul.products li.product .astra-shop-summary-wrap > a.button {
	display: inline-block !important;
	width: auto !important;
	min-height: 0 !important;
	margin: auto 0 0 !important;
	padding: 14px 26px !important;
	border-radius: 4px !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	text-align: center;
}

/* ---- Comparatif 6 roues / 2 roues ---- */
.kcat-compare {
	box-sizing: border-box;
	margin: 0 0 40px;
	padding: 28px;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	background: #f8fafc;
	color: #334155;
}
html body.kcat-chariots .kcat-compare h2 {
	margin: 0 0 6px;
	color: #1e293b;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.25;
}
.kcat-compare-lead {
	margin: 0 0 20px;
	color: #475569;
	font-size: 15px;
	line-height: 1.5;
}
.kcat-compare-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin-bottom: 18px;
}
.kcat-compare-item {
	padding: 16px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fff;
}
html body.kcat-chariots .kcat-compare-item h3 {
	margin: 0 0 6px;
	color: #1e293b;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
}
.kcat-compare-best {
	display: inline-block;
	margin: 0 0 8px;
	padding: 2px 9px;
	border-radius: 999px;
	background: #e0edfb;
	color: #035bb3;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.6;
}
.kcat-compare-item p:not(.kcat-compare-best) {
	margin: 0 0 10px;
	font-size: 15px;
	line-height: 1.5;
}
.kcat-compare-item a {
	color: #046bd2;
	font-size: 14px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.kcat-compare-common {
	margin: 0 0 14px;
	font-size: 15px;
	line-height: 1.5;
}
.kcat-reassure {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	margin: 0;
	padding: 14px 0 0;
	border-top: 1px solid #e2e8f0;
	list-style: none;
	color: #475569;
	font-size: 14px;
	line-height: 1.4;
}
.kcat-reassure li {
	margin: 0;
}
.kcat-reassure li::before {
	content: "✓ ";
	color: #16a34a;
	font-weight: 700;
}

/* ---- PC : les deux cartes à gauche, le comparatif dans la moitié droite ---- */
@media (min-width: 922px) {
	html body.kcat-chariots.kcat-chariots #content #primary .ast-woocommerce-container {
		display: grid !important;
		grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
		column-gap: 20px !important;
		align-items: start;
	}
	html body.kcat-chariots.kcat-chariots #content #primary .ast-woocommerce-container > * {
		grid-column: 1 / -1;
	}
	html body.kcat-chariots.kcat-chariots #content #primary .ast-woocommerce-container > ul.products {
		grid-column: 1 / span 2 !important;
	}
	html body.kcat-chariots.kcat-chariots #content #primary .ast-woocommerce-container > .kcat-compare {
		grid-column: 3 / span 2;
	}
}

/* ---- Mobile : deux colonnes compactes comme les autres catégories ---- */
@media (max-width: 544px) {
	html body.kcat-chariots.kcat-chariots #content #primary ul.products {
		gap: 14px !important;
		margin-bottom: 24px !important;
	}
	html body.kcat-chariots.kcat-chariots #content #primary ul.products li.product .woocommerce-loop-product__title {
		font-size: 15px !important;
	}
	.kcat-usp {
		font-size: 13px;
	}
	.kcat-colors {
		gap: 6px;
		font-size: 12px;
	}
	.kcat-dot {
		width: 12px;
		height: 12px;
	}
	html body.kcat-chariots.kcat-chariots #content #primary ul.products li.product .astra-shop-summary-wrap > a.button {
		display: block !important;
		width: 100% !important;
		padding: 12px 8px !important;
		font-size: 14px !important;
	}
	.kcat-compare {
		padding: 20px 16px;
	}
	html body.kcat-chariots .kcat-compare h2 {
		font-size: 21px;
	}
	.kcat-compare-grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.kcat-reassure {
		flex-direction: column;
	}
}

/* ==== Filtre par classe (puces au-dessus des produits) ==== */
.kcat-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	width: 100%;
	margin: 0 0 24px;
}
.kcat-filter-label {
	margin-right: 4px;
	color: #1e293b;
	font-size: 15px;
	font-weight: 600;
}
html body .kcat-filter a.kcat-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	padding: 8px 16px;
	border: 1px solid #cbd5e1;
	border-radius: 999px;
	background: #fff;
	color: #1e293b;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
}
html body .kcat-filter a.kcat-chip:hover {
	border-color: #046bd2;
	color: #046bd2;
}
html body .kcat-filter a.kcat-chip.is-active {
	border-color: #046bd2;
	background: #046bd2;
	color: #fff;
}
.kcat-chip-count {
	min-width: 20px;
	padding: 1px 6px;
	border-radius: 999px;
	background: #f1f5f9;
	color: #475569;
	font-size: 12px;
	font-weight: 600;
	text-align: center;
}
.kcat-chip.is-active .kcat-chip-count {
	background: rgba(255, 255, 255, 0.22);
	color: #fff;
}
@media (max-width: 544px) {
	.kcat-filter {
		gap: 6px;
		margin-bottom: 18px;
	}
	.kcat-filter-label {
		width: 100%;
	}
	html body .kcat-filter a.kcat-chip {
		padding: 8px 12px;
		font-size: 13px;
	}
}

/* ==== Accueil « À découvrir chez Kartabla » : photo carrée sans cadre bleu, texte non souligné ==== */
html body.kcat-home .kux-selection a.kux-product {
	text-decoration: none !important;
	color: #1e293b;
}
html body.kcat-home .kux-selection a.kux-product > img,
html body.kcat-home .kux-home .kux-selection .kux-product > img.kux-home-photo-portrait {
	box-sizing: border-box;
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 1 !important;
	margin: 0 0 12px;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: #fff !important;
	object-fit: contain !important;
}
html body.kcat-home .kux-selection a.kux-product h3 {
	color: #1e293b;
	text-decoration: none;
}
html body.kcat-home .kux-selection a.kux-product:hover h3 {
	color: #045cb4;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}
html body.kcat-home .kux-selection a.kux-product .kux-product-price {
	color: #1e293b;
	text-decoration: none;
}
html body.kcat-home .kux-selection a.kux-product .kux-text-link {
	color: #046bd2;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ==== Accueil « À chaque journée, son sac » : tuiles sans cadre bleu, titres non soulignés ==== */
html body.kcat-home-collections .kux-collections a.kux-collection {
	text-decoration: none !important;
	color: #1e293b;
}
html body.kcat-home-collections .kux-home .kux-collections .kux-collection > img,
html body.kcat-home-collections .kux-home .kux-collections .kux-collection > img.kux-home-photo-portrait {
	box-sizing: border-box;
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 1 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: #fff !important;
	object-fit: contain !important;
}
html body.kcat-home-collections .kux-collections a.kux-collection h3 {
	color: #1e293b;
	text-decoration: none;
}
html body.kcat-home-collections .kux-collections a.kux-collection:hover h3 {
	color: #045cb4;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}
html body.kcat-home-collections .kux-collections a.kux-collection p {
	color: #526274;
	text-decoration: none;
}

/* ==== Accueil « Nos coups de cœur » : 4 cartes tirées au hasard (voir HOME_PICKS) ==== */
html body.kcat-cards #content #primary .kcat-picks ul.products > li.product.kcat-pick:not(.kcat-pick-on) {
	display: none !important;
}
html body.kcat-cards .kux-home .kcat-picks ul.products {
	margin-top: 28px;
}
html body.kcat-cards .kux-home .kcat-picks ul.products li.product .woocommerce-loop-product__title {
	margin: 0 0 6px;
	color: #1e293b;
	font-size: 16px;
	line-height: 1.35;
	letter-spacing: normal;
}
html body.kcat-cards .kux-home .kcat-picks ul.products li.product a {
	text-decoration: none;
}

/* ==== Accueil : bannière photo pleine largeur (PC ≥ 1280 px), texte du site dans un cadre clair ==== */
html body.kcat-home-banner .kux-home .kux-hero-copy > .kux-text-link { display: none; }
@media (min-width: 1280px) {
	html body.kcat-home-banner .kux-home .kux-home-hero {
		position: relative; display: flex; align-items: center; aspect-ratio: 1942 / 809; min-height: 0;
		margin-top: 24px; padding: 0 0 0 clamp(28px, 2.6vw, 48px); border-radius: 24px; overflow: hidden;
		background: #cfe9f1 var(--kcat-banner) center / cover no-repeat;
	}
	html body.kcat-home-banner .kux-home .kux-hero-copy {
		width: clamp(320px, 25.5vw, 430px); padding: clamp(24px, 2vw, 36px); border-radius: 20px;
		background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
		box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
	}
	html body.kcat-home-banner .kux-home .kux-hero-copy h1 { font-size: clamp(34px, 2.9vw, 50px); max-width: 13ch; margin-bottom: 14px; }
	html body.kcat-home-banner .kux-home .kux-hero-copy > p { font-size: 16px; line-height: 1.55; margin-bottom: 20px; }
	html body.kcat-home-banner .kux-home a.kux-hero-product { display: none; }
}
