/* Grille produits catégorie — Tousalon */
.tsln-grid-wrap {
	--tsln-accent: #AC132F;
	--tsln-dark: #111111;
	--tsln-mid: #666666;
	--tsln-muted: #999999;
	--tsln-light: #f5f4f2;
	--tsln-border: #e5e5e5;
	--tsln-ease: cubic-bezier(.16,1,.3,1);
}

/* Titre */
.tsln-grid-heading {
	margin: 0 0 20px 0;
}

/* Filtres */
.tsln-filters-bar {
	background: #fff;
	border-bottom: 1px solid var(--tsln-border);
	padding: 0;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0;
	margin-bottom: 24px;
}
.tsln-filter-group {
	display: flex;
	align-items: center;
	border-right: 1px solid var(--tsln-border);
	padding: 0 20px 0 0;
	margin-right: 20px;
}
.tsln-filter-group:last-of-type { border-right: none; }
.tsln-filter-label {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--tsln-muted);
	white-space: nowrap;
	margin-right: 12px;
}
.tsln-filter-pills { display: flex; gap: 6px; padding: 14px 0; flex-wrap: wrap; }
.tsln-filter-pill {
	font-size: 12px;
	font-weight: 500;
	color: var(--tsln-mid);
	border: 1.5px solid var(--tsln-border);
	padding: 6px 14px;
	white-space: nowrap;
	cursor: pointer;
	transition: all .2s;
	background: transparent;
}
.tsln-filter-pill:hover { border-color: var(--tsln-dark); color: var(--tsln-dark); }
.tsln-filter-pill.active { background: var(--tsln-dark); color: #fff; border-color: var(--tsln-dark); }
.tsln-filter-pill--disabled { opacity: .35; cursor: not-allowed; pointer-events: none; }
.tsln-filter-pill--disabled:hover { border-color: var(--tsln-border); color: var(--tsln-mid); }
.tsln-filters-count { margin-left: auto; font-size: 12px; color: var(--tsln-muted); }

/* Proximité ("Autour de moi") */
.tsln-distance-control { display: flex; align-items: center; gap: 8px; padding: 14px 0; flex-wrap: wrap; }
.tsln-distance-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.tsln-distance-pill {
	font-size: 12px;
	font-weight: 500;
	color: var(--tsln-mid);
	border: 1.5px solid var(--tsln-border);
	padding: 6px 14px;
	white-space: nowrap;
	cursor: pointer;
	transition: all .2s;
	background: transparent;
}
.tsln-distance-pill:hover { border-color: var(--tsln-dark); color: var(--tsln-dark); }
.tsln-distance-pill.active { background: var(--tsln-dark); color: #fff; border-color: var(--tsln-dark); }
.tsln-distance-control .tsln-distance-locate {
	height: 34px !important;
	min-height: 34px !important;
	line-height: 32px !important;
	box-sizing: border-box !important;
	margin: 0 !important;
	font-family: inherit !important;
	vertical-align: middle;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 500;
	color: var(--tsln-dark);
	border: 1.5px solid var(--tsln-border);
	padding: 0 14px !important;
	background: transparent;
	cursor: pointer;
	transition: all .2s;
}
.tsln-distance-locate:hover { border-color: var(--tsln-dark); }
.tsln-distance-locate:disabled { opacity: .5; cursor: not-allowed; }
.tsln-distance-locate i { color: var(--tsln-accent); }
.tsln-distance-status { font-size: 11px; color: var(--tsln-muted); }

/* Grille */
.tsln-products-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 2px;
}
/* Séparateur "Les autres produits" (mode de filtrage "correspondants en premier") */
.tsln-others-divider {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 32px 0 16px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--tsln-muted);
}
.tsln-others-divider::before,
.tsln-others-divider::after { content: ''; flex: 1; height: 1px; background: currentColor; opacity: .3; }

/* Carte produit — conteneur non-lien (voir templates/card-product.php) : le
   lien "carte entière → fiche produit" est un calque en recouvrement
   (.tsln-pc-link, stretched-link), ce qui permet d'imbriquer un second lien
   indépendant et valide en HTML (ex. .tsln-pc-destock-link) à l'intérieur. */
.tsln-pc {
	position: relative;
	background: #fff;
	display: flex;
	flex-direction: column;
	min-width: 0;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
	transition: box-shadow .3s;
}
.tsln-pc:hover { box-shadow: 0 16px 56px rgba(0,0,0,.12); z-index: 1; }
.tsln-pc-link { position: absolute; inset: 0; z-index: 1; }
.tsln-pc-images { position: relative; overflow: hidden; background: #fff; aspect-ratio: 4/3; }
.tsln-pc-img {
	position: absolute; inset: 0;
	display: block;
	background-position: center;
	background-repeat: no-repeat;
	transition: opacity .55s var(--tsln-ease);
}
.tsln-pc-img--cover { background-size: cover; }
.tsln-pc-img--contain { background-size: contain; background-color: #fff; }
.tsln-pc-img--ambiance { background-size: cover; opacity: 0; }
.tsln-pc:hover .tsln-pc-images.has-ambiance .tsln-pc-img--main { opacity: 0; }
.tsln-pc:hover .tsln-pc-images.has-ambiance .tsln-pc-img--ambiance { opacity: 1; }
.tsln-pc-hover-hint {
	position: absolute; bottom: 12px; right: 12px; z-index: 2;
	display: flex; align-items: center; gap: 6px;
	font-size: 9px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
	background: rgba(0,0,0,.6); color: rgba(255,255,255,.85);
	padding: 4px 10px; border-radius: 4px; opacity: 0; transition: opacity .2s;
}
.tsln-pc:hover .tsln-pc-hover-hint { opacity: 1; }
.tsln-pc-badge {
	position: absolute; top: 14px; left: 14px; z-index: 2;
	font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
	padding: 5px 12px; color: #fff;
}
.tsln-pc-badge--dark { background: var(--tsln-dark); }
.tsln-pc-badge--red { background: var(--tsln-accent); }
.tsln-pc-badge--promo { background: #f5a623; }
.tsln-pc-wishlist {
	position: absolute; top: 14px; right: 14px; z-index: 2;
	width: 34px; height: 34px; background: rgba(255,255,255,.92);
	display: flex; align-items: center; justify-content: center;
	opacity: 0; transition: opacity .2s;
}
.tsln-pc:hover .tsln-pc-wishlist { opacity: 1; }
.tsln-pc-wishlist i { font-size: 14px; color: var(--tsln-mid); }
.tsln-pc-wishlist:hover i { color: var(--tsln-accent); }
.tsln-pc-body { padding: 20px 20px 24px; flex: 1; display: flex; flex-direction: column; }
.tsln-pc-name { font-size: 1.2rem; font-weight: 500; margin-bottom: 6px; }
.tsln-pc-store {
	display: flex; align-items: center; gap: 6px;
	font-size: 11px; color: var(--tsln-mid);
	margin-bottom: 10px;
}
.tsln-pc-store i { font-size: 10px; color: var(--tsln-accent); }
.tsln-pc-store strong { font-weight: 600; color: var(--tsln-dark); }
.tsln-pc-destock-link {
	position: relative; z-index: 2; /* au-dessus de .tsln-pc-link pour rester cliquable */
	display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
	font-size: 12.5px; font-weight: 600;
	color: var(--tsln-accent);
	background: transparent;
	border: 1.5px solid var(--tsln-accent);
	border-radius: 4px;
	padding: 6px 12px;
	margin-bottom: 10px;
	transition: background-color .2s, color .2s, border-color .2s;
}
.tsln-pc-destock-link:hover { background: var(--tsln-accent); color: #fff; }
.tsln-pc-destock-link i { font-size: 10px; }
.tsln-pc-desc { font-size: 12.5px; color: var(--tsln-mid); line-height: 1.6; flex: 1; margin-bottom: 16px; }
.tsln-pc-perso { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; align-items: center; }
.tsln-pc-perso-label { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tsln-muted); margin-right: 2px; white-space: nowrap; }
.tsln-pc-perso-tag {
	display: inline-flex; align-items: center; gap: 4px;
	font-size: 10px; font-weight: 500; color: var(--tsln-mid);
	background: var(--tsln-light); border: 1px solid var(--tsln-border);
	padding: 3px 8px;
}
.tsln-pc-perso-tag i, .tsln-pc-perso-tag .tsln-label-icon-img { font-size: 9px; color: var(--tsln-accent); width: 10px; height: 10px; }
.tsln-pc-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--tsln-border); gap: 12px; }
.tsln-pc-price { font-size: 13px; color: var(--tsln-mid); }
.tsln-pc-cta {
	font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	color: var(--tsln-accent); display: flex; align-items: center; gap: 6px;
	transition: gap .2s; white-space: nowrap;
}
.tsln-pc:hover .tsln-pc-cta { gap: 10px; }

/* Carte article/CPT — photo pleine carte, dégradé, texte blanc */
.tsln-pc-post-photo {
	position: relative;
	overflow: hidden;
	flex: 1;
	min-height: 260px; /* évite l'effondrement si la carte se retrouve seule dans sa ligne */
	background: var(--tsln-dark);
}
.tsln-pc-post-bg {
	position: absolute; inset: 0;
	background-color: var(--tsln-dark);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}
.tsln-pc-post-overlay {
	position: absolute; inset: 0;
	background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.5) 40%, rgba(0,0,0,0) 75%);
}
.tsln-pc-post-badge {
	position: absolute; top: 14px; left: 14px; z-index: 2;
	font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
	background: var(--tsln-dark); color: #fff; padding: 5px 12px;
}
.tsln-pc-post-content {
	position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
	padding: 24px 20px;
}
.tsln-pc-post-meta {
	font-size: 11px; color: rgba(255,255,255,.75); margin-bottom: 10px;
	display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.tsln-pc-post-meta span { display: flex; align-items: center; gap: 5px; }
.tsln-pc-post-title { font-size: 1.15rem; font-weight: 500; line-height: 1.3; color: #fff; margin: 0 0 12px; }
.tsln-pc-post-link {
	font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	color: #fff; display: inline-flex; align-items: center; gap: 6px;
	border-bottom: 2px solid var(--tsln-accent); padding-bottom: 3px;
}
.tsln-pc--post:hover .tsln-pc-post-link { color: var(--tsln-accent); border-color: #fff; }

/* Carte "opération commerciale" intercalée (plugin operations) — même largeur
   de cellule qu'une carte produit, mais sans corps de texte séparé : le
   visuel occupe donc toute la hauteur de la carte (pas de ratio 4:3 imposé),
   jamais recadré (tsln-pc-img--contain), texte affiché au survol. */
.tsln-pc--operation .tsln-pc-images {
	aspect-ratio: auto;
	flex: 1;
	min-height: 320px;
}
.tsln-pc-operation-overlay {
	position: absolute; inset: 0;
	background: rgba(17,17,17,.88);
	display: flex; align-items: center; justify-content: center;
	text-align: center;
	padding: 24px;
	opacity: 0;
	transition: opacity .25s ease;
}
.tsln-pc--operation:hover .tsln-pc-operation-overlay { opacity: 1; }
.tsln-pc-operation-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.7); margin-bottom: 8px; }
.tsln-pc-operation-title { font-size: 1.25rem; font-weight: 600; line-height: 1.25; margin: 0 0 8px; color: #fff; }
.tsln-pc-operation-desc { font-size: 12.5px; line-height: 1.6; color: rgba(255,255,255,.85); margin-bottom: 14px; }
.tsln-pc-operation-desc p:last-child { margin-bottom: 0; }
.tsln-pc-operation-cta {
	display: inline-flex; align-items: center; gap: 8px;
	font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	color: #fff; border: 1.5px solid #fff; padding: 9px 18px;
	transition: background .2s, border-color .2s;
}
.tsln-pc--operation:hover .tsln-pc-operation-cta:hover { background: var(--tsln-accent); border-color: var(--tsln-accent); }

/* Intercalé bannière */
.tsln-intercale-banner {
	grid-column: 1 / -1;
	margin: 16px 0;
	background: var(--tsln-banner-bg, var(--tsln-accent));
	display: flex; align-items: center; overflow: hidden;
	min-height: 160px;
}
.tsln-intercale-banner-img { width: 300px; flex-shrink: 0; align-self: stretch; overflow: hidden; }
.tsln-intercale-banner-img img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.7) saturate(.8); }
.tsln-intercale-banner-body { flex: 1; padding: 32px 40px; }
.tsln-intercale-banner-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.6); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.tsln-intercale-banner-body h2 { font-size: 1.8rem; color: #fff; font-weight: 500; line-height: 1.2; margin-bottom: 10px; }
.tsln-intercale-banner-body p { font-size: 13.5px; color: rgba(255,255,255,.75); line-height: 1.65; max-width: 480px; margin-bottom: 20px; }
.tsln-intercale-banner-cta {
	display: inline-flex; align-items: center; gap: 10px;
	background: #fff; color: var(--tsln-banner-bg, var(--tsln-accent));
	font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	padding: 11px 22px; text-decoration: none;
}

@media (max-width: 768px) {
	.tsln-filter-label { display: none; }
	.tsln-filters-count { display: none; }
	.tsln-pc-images { aspect-ratio: 1/1; }
	.tsln-pc--operation .tsln-pc-images { aspect-ratio: auto; min-height: 260px; }
	.tsln-pc-body { padding: 12px 12px 14px; }
	.tsln-pc-name { font-size: .95rem; margin-bottom: 4px; }
	.tsln-pc-desc { display: none; }
	.tsln-pc-footer { padding-top: 8px; flex-direction: column; align-items: flex-start; gap: 4px; border-top: none; }
	.tsln-pc-wishlist { display: none; }
	.tsln-intercale-banner { flex-direction: column; min-height: auto; }
	.tsln-intercale-banner-img { width: 100%; height: 140px; }
	.tsln-intercale-banner-body { padding: 24px 20px; }
}
