/**
 * Archives produits PEPS — hero, encart refuge, grille WooCommerce.
 * Ciblage par classes sémantiques (toutes catégories : chien, chat, licorne, humain…).
 */

/* Hero : couper l’image animale en bas */
.peps-archive-hero {
	overflow: hidden !important;
	padding-left: 5% !important;
	padding-right: 5% !important;
	padding-bottom: clamp(48px, 5vw, 72px) !important;
}

.peps-archive-hero > .e-con:last-child {
	align-self: flex-end;
	overflow: hidden;
	max-height: clamp(280px, 32vw, 420px);
}

.peps-archive-hero > .e-con:last-child img {
	display: block;
	width: 100%;
	height: auto;
	max-height: clamp(300px, 34vw, 440px);
	object-fit: cover;
	object-position: top center;
	margin-bottom: -4px;
}

/* Licorne : texte — padding bas identique au haut (5 %) */
body.term-licorne .peps-archive-hero > .e-con:first-child {
	padding-bottom: 5% !important;
}

/* Licorne : cheval — buste visible */
body.term-licorne .peps-archive-hero > .e-con:last-child {
	max-height: clamp(360px, 42vw, 520px);
}

body.term-licorne .peps-archive-hero > .e-con:last-child img[src*="licorne-colliers-cheval"] {
	max-height: clamp(380px, 44vw, 560px);
	object-fit: contain;
	object-position: bottom center;
	margin-bottom: 0;
}

/* Humain : pas d’encart refuge — filles flush sur le bord bas */
body.term-humain .peps-archive-hero {
	padding-bottom: 0 !important;
}

body.term-humain .peps-archive-hero > .e-con:last-child {
	max-height: none;
	overflow: visible;
	align-self: stretch;
}

body.term-humain .peps-archive-hero > .e-con:last-child img[src*="filles-bracelets"],
body.term-humain .peps-archive-hero > .e-con:last-child img[src*="humain-detourees"] {
	max-height: none;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	object-position: bottom center;
	margin-bottom: -1px !important;
}

body.term-humain .peps-archive-hero > .e-con:last-child .elementor-widget-image:not(.elementor-absolute) {
	margin-bottom: 0 !important;
}

/* Bande rose #FFEFFC — alignée 5 % comme le hero */
.peps-ilovemydog-float {
	position: relative;
	z-index: 5;
	margin-top: clamp(-118px, calc(-6vw - 50px), -98px);
	margin-bottom: 0;
	padding: clamp(40px, 4.5vw, 64px) 5% clamp(16px, 2vw, 24px) 5% !important;
	background-color: #ffeffc !important;
}

.peps-ilovemydog-wrap {
	width: 100%;
	max-width: none;
	padding: 0 !important;
	background: transparent !important;
}

/* Carte blanche/rose */
.peps-ilovemydog-card {
	position: relative;
	display: grid;
	grid-template-columns: minmax(128px, 172px) minmax(0, 1fr);
	align-items: stretch;
	gap: 0;
	min-height: clamp(190px, 20vw, 230px);
	padding: clamp(28px, 3.2vw, 40px) clamp(24px, 2.8vw, 36px);
	background: linear-gradient(135deg, #fff 0%, #fff8fb 55%, #fff2f7 100%);
	border: 1px solid rgba(232, 77, 138, 0.28);
	border-radius: 32px;
	box-shadow: 0 16px 44px rgba(232, 77, 138, 0.1);
	overflow: visible;
}

.peps-ilovemydog-card::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background:
		radial-gradient(circle at 74% 30%, rgba(255, 143, 178, 0.13) 0 9px, transparent 10px),
		radial-gradient(circle at 80% 55%, rgba(255, 143, 178, 0.09) 0 8px, transparent 9px),
		radial-gradient(circle at 86% 38%, rgba(255, 143, 178, 0.11) 0 7px, transparent 8px);
	pointer-events: none;
	z-index: 0;
}

.peps-ilovemydog-card > * {
	position: relative;
	z-index: 1;
}

/* Colonne gauche */
.peps-ilovemydog-card__brand {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding-right: clamp(20px, 2.4vw, 30px);
	border-right: 1px solid rgba(232, 77, 138, 0.22);
}

.peps-ilovemydog-card__brand img {
	display: block;
	width: clamp(104px, 11vw, 132px);
	height: auto;
}

.peps-ilovemydog-card__sep {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	max-width: 118px;
	color: #e84d8a;
	font-size: 11px;
}

.peps-ilovemydog-card__sep::before,
.peps-ilovemydog-card__sep::after {
	content: "";
	flex: 1;
	height: 1px;
	background: rgba(232, 77, 138, 0.35);
}

.peps-ilovemydog-card__sep-icon {
	flex-shrink: 0;
	font-size: 11px;
	line-height: 1;
}

.peps-ilovemydog-card__badge {
	font-family: Poppins, "Trebuchet MS", Arial, sans-serif !important;
	font-size: 11px !important;
	font-weight: 600 !important;
	letter-spacing: 0.14em !important;
	text-transform: uppercase !important;
	color: #e84d8a !important;
}

/* Texte — surcharge le kit Elementor (h3 vert, liens magenta…) */
.peps-ilovemydog-float .peps-ilovemydog-card__title,
.peps-ilovemydog-card__title {
	margin: 0 !important;
	padding: 0 !important;
	font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif !important;
	font-size: clamp(1.95rem, 2.75vw, 2.45rem) !important;
	font-weight: 500 !important;
	line-height: 1.12 !important;
	letter-spacing: 0.01em !important;
	color: #3d2b32 !important;
	text-transform: none !important;
}

.peps-ilovemydog-card__title-heart {
	color: #e84d8a !important;
	font-size: 0.55em !important;
	vertical-align: super;
	margin-right: 4px;
}

.peps-ilovemydog-float .peps-ilovemydog-card__text,
.peps-ilovemydog-card__text {
	margin: 0 !important;
	font-family: Poppins, "Trebuchet MS", Arial, sans-serif !important;
	font-size: clamp(15px, 1.3vw, 17px) !important;
	font-weight: 400 !important;
	line-height: 1.6 !important;
	color: #5a4f55 !important;
	max-width: 48ch;
	text-transform: none !important;
}

.peps-ilovemydog-card__content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 14px;
	padding: clamp(4px, 1vw, 12px) clamp(22px, 3vw, 40px);
	padding-right: clamp(210px, 26vw, 320px);
}

.peps-ilovemydog-float .peps-ilovemydog-card__cta,
.peps-ilovemydog-card__cta {
	display: inline-flex !important;
	align-items: center !important;
	align-self: flex-start !important;
	gap: 6px !important;
	padding: 11px 26px !important;
	border: 1.5px solid #e84d8a !important;
	border-radius: 999px !important;
	background: #fff !important;
	color: #e84d8a !important;
	font-family: Poppins, "Trebuchet MS", Arial, sans-serif !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	text-decoration: none !important;
	text-transform: none !important;
	box-shadow: none !important;
	transition: background 0.25s ease, color 0.25s ease;
}

.peps-ilovemydog-float .peps-ilovemydog-card__cta:hover,
.peps-ilovemydog-float .peps-ilovemydog-card__cta:focus,
.peps-ilovemydog-card__cta:hover,
.peps-ilovemydog-card__cta:focus {
	background: #e84d8a !important;
	color: #fff !important;
	border-color: #e84d8a !important;
}

.peps-ilovemydog-float .peps-ilovemydog-card__social,
.peps-ilovemydog-card__social {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: Poppins, "Trebuchet MS", Arial, sans-serif !important;
	font-size: 13px !important;
	color: #5a4f55 !important;
}

.peps-ilovemydog-float .peps-ilovemydog-card__social a,
.peps-ilovemydog-card__social a {
	color: #5a4f55 !important;
	text-decoration: none !important;
	font-weight: 500 !important;
	text-transform: none !important;
}

.peps-ilovemydog-float .peps-ilovemydog-card__social a:hover,
.peps-ilovemydog-float .peps-ilovemydog-card__social a:focus,
.peps-ilovemydog-card__social a:hover,
.peps-ilovemydog-card__social a:focus {
	color: #e84d8a !important;
}

.peps-ilovemydog-card__social svg {
	width: 18px;
	height: 18px;
	fill: #e84d8a;
	flex-shrink: 0;
}

/* Visuel flottant — tête + foulard, pattes masquées */
.peps-ilovemydog-card__visual {
	position: absolute;
	top: clamp(-58px, -5.2vw, -44px);
	right: clamp(10px, 1.8vw, 22px);
	bottom: 0;
	width: clamp(230px, 27vw, 330px);
	overflow: hidden;
	pointer-events: none;
	z-index: 2;
}

.peps-ilovemydog-card__visual img {
	position: absolute;
	right: -4%;
	bottom: -48%;
	display: block;
	width: 108%;
	height: auto;
	max-width: none;
	object-fit: cover;
	object-position: center 6%;
	filter: drop-shadow(0 8px 18px rgba(61, 43, 50, 0.1));
}

.peps-ilovemydog-card__beads {
	position: absolute;
	right: 4px;
	top: 12%;
	display: flex;
	flex-direction: column;
	gap: 9px;
	pointer-events: none;
	z-index: 3;
}

.peps-ilovemydog-card__beads span {
	width: 17px;
	height: 17px;
	border-radius: 50%;
	box-shadow: inset -2px -3px 5px rgba(0, 0, 0, 0.1), 0 2px 5px rgba(0, 0, 0, 0.07);
}

.peps-ilovemydog-card__beads span:nth-child(1) { background: #f4a0b8; }
.peps-ilovemydog-card__beads span:nth-child(2) { background: #c9a0dc; margin-left: 5px; }
.peps-ilovemydog-card__beads span:nth-child(3) { background: #f5d76e; }
.peps-ilovemydog-card__beads span:nth-child(4) { background: #fff; margin-left: 4px; }

/* Grille produits — archives catégorie + boutique */
body.tax-product_cat .elementor-wc-products,
body.woocommerce-shop .elementor-wc-products {
	padding-top: 0;
}

body.tax-product_cat .elementor-wc-products ul.products li.product,
body.woocommerce-shop .elementor-wc-products ul.products li.product {
	background-color: #fff !important;
}

body.tax-product_cat .elementor-wc-products ul.products li.product .button,
body.tax-product_cat .elementor-wc-products ul.products li.product a.button,
body.woocommerce-shop .elementor-wc-products ul.products li.product .button,
body.woocommerce-shop .elementor-wc-products ul.products li.product a.button {
	background-color: #fffebf !important;
	border-color: #e84d8a !important;
	color: #e84d8a !important;
}

body.tax-product_cat .elementor-wc-products ul.products li.product .button:hover,
body.tax-product_cat .elementor-wc-products ul.products li.product .button:focus,
body.tax-product_cat .elementor-wc-products ul.products li.product a.button:hover,
body.tax-product_cat .elementor-wc-products ul.products li.product a.button:focus,
body.woocommerce-shop .elementor-wc-products ul.products li.product .button:hover,
body.woocommerce-shop .elementor-wc-products ul.products li.product .button:focus,
body.woocommerce-shop .elementor-wc-products ul.products li.product a.button:hover,
body.woocommerce-shop .elementor-wc-products ul.products li.product a.button:focus {
	background-color: #e84d8a !important;
	border-color: #e84d8a !important;
	color: #fffebf !important;
}

@media (max-width: 1024px) {
	.peps-archive-hero {
		overflow: hidden !important;
		padding-bottom: clamp(36px, 5vw, 52px) !important;
	}

	.peps-archive-hero > .e-con:last-child {
		overflow: hidden;
		max-height: clamp(280px, 46vw, 400px);
	}

	.peps-archive-hero > .e-con:last-child img {
		max-height: clamp(300px, 48vw, 420px);
		object-position: center 18%;
		margin-bottom: -6px;
	}

	.peps-ilovemydog-float {
		margin-top: clamp(-88px, calc(-8vw - 32px), -64px);
		padding-left: 30px !important;
		padding-right: 30px !important;
	}

	.peps-ilovemydog-card__content {
		padding-right: clamp(180px, 24vw, 250px);
	}

	body.term-licorne .peps-archive-hero > .e-con:first-child {
		padding-bottom: 5% !important;
	}

	body.term-licorne .peps-archive-hero > .e-con:last-child {
		max-height: clamp(320px, 50vw, 460px);
	}

	body.term-licorne .peps-archive-hero > .e-con:last-child img[src*="licorne-colliers-cheval"] {
		max-height: clamp(340px, 52vw, 500px);
	}

	body.term-humain .peps-archive-hero {
		padding-bottom: 0 !important;
		--padding-bottom: 0px;
	}
}

@media (max-width: 767px) {
	.peps-archive-hero {
		overflow: hidden !important;
		padding-bottom: clamp(28px, 7vw, 40px) !important;
	}

	.peps-archive-hero > .e-con:last-child {
		max-height: clamp(260px, 68vw, 360px);
	}

	.peps-archive-hero > .e-con:last-child img {
		max-height: clamp(280px, 72vw, 400px);
		object-position: center 22%;
		margin-bottom: -8px;
	}

	.peps-ilovemydog-float {
		margin-top: clamp(-72px, calc(-14vw - 24px), -48px);
		padding: 32px 20px 16px 20px !important;
	}

	body.term-licorne .peps-archive-hero > .e-con:first-child {
		padding-bottom: 5% !important;
	}

	body.term-licorne .peps-archive-hero > .e-con:last-child {
		max-height: clamp(280px, 70vw, 420px);
	}

	body.term-licorne .peps-archive-hero > .e-con:last-child img[src*="licorne-colliers-cheval"] {
		max-height: clamp(300px, 74vw, 440px);
	}

	body.term-humain .peps-archive-hero {
		padding-bottom: 0 !important;
		--padding-bottom: 0px;
	}

	body.term-humain .peps-archive-hero > .e-con:last-child img[src*="filles-bracelets"],
	body.term-humain .peps-archive-hero > .e-con:last-child img[src*="humain-detourees"] {
		margin-bottom: -1px !important;
	}

	.peps-ilovemydog-card {
		grid-template-columns: 1fr;
		padding: 24px 20px 0;
		text-align: center;
	}

	.peps-ilovemydog-card__brand {
		border-right: 0;
		border-bottom: 1px solid rgba(232, 77, 138, 0.22);
		padding-right: 0;
		padding-bottom: 18px;
	}

	.peps-ilovemydog-card__content {
		width: 100%;
		padding: 18px 0 0;
		align-items: center;
		padding-right: 0;
	}

	.peps-ilovemydog-card__text {
		max-width: none;
	}

	.peps-ilovemydog-card__cta {
		align-self: center !important;
		margin-left: auto !important;
		margin-right: auto !important;
	}

	.peps-ilovemydog-card__social {
		justify-content: center;
	}

	.peps-ilovemydog-card__visual {
		position: relative;
		top: auto;
		right: auto;
		width: 100%;
		height: clamp(200px, 54vw, 260px);
		margin-top: 8px;
		overflow: hidden;
		display: flex;
		align-items: flex-start;
		justify-content: center;
	}

	.peps-ilovemydog-card__visual img {
		position: static;
		right: auto;
		bottom: auto;
		left: auto;
		transform: none;
		width: min(300px, 84vw);
		height: auto;
		margin: 0 auto;
		object-fit: contain;
		object-position: top center;
	}

	.peps-ilovemydog-card__beads {
		right: 14%;
		top: auto;
		bottom: 28%;
		flex-direction: row;
	}

	/* Grille produits : 1 colonne sur mobile */
	body.tax-product_cat .elementor-wc-products ul.products,
	body.woocommerce-shop .elementor-wc-products ul.products {
		grid-template-columns: minmax(0, 1fr) !important;
	}

	body.tax-product_cat .elementor-wc-products ul.products li.product,
	body.woocommerce-shop .elementor-wc-products ul.products li.product {
		width: 100% !important;
		max-width: 100% !important;
	}

	body.tax-product_cat .elementor-wc-products .elementor-widget-container,
	body.woocommerce-shop .elementor-wc-products .elementor-widget-container {
		max-width: 100%;
		overflow-x: hidden;
	}
}
