/* -------------------------------------------------------------------------
   Cosmetics Elementor Products — grids, two card skins, carousel, promo
   ------------------------------------------------------------------------- */

.cep-grid {
	--cep-gap: 20px;
	display: grid;
	gap: var(--cep-gap);
}

.cep-grid.columns-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cep-grid.columns-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cep-grid.columns-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* WooCommerce price markup: keep visible against aggressive theme CSS */
.cep-price {
	display: block;
	min-height: 1.25em;
}

.cep-price,
.cep-price .price,
.cep-price p.price {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	color: #0f172a !important;
	font-size: inherit !important;
	line-height: 1.3 !important;
}

.cep-price .woocommerce-Price-amount,
.cep-price bdi,
.cep-price ins .woocommerce-Price-amount {
	color: #0f172a !important;
	opacity: 1 !important;
}

.cep-price del,
.cep-price del .woocommerce-Price-amount {
	color: #64748b !important;
	opacity: 1 !important;
	text-decoration: line-through;
}

.cep-price ins {
	background: none !important;
	text-decoration: none !important;
}

/* -------------------------------------------------------------------------
   Card shell + body (all widgets)
   ------------------------------------------------------------------------- */

.cep-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
	background: #fff;
	transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.cep-card:hover {
	transform: translateY(-3px);
}

.cep-thumb {
	display: block;
	position: relative;
	overflow: hidden;
	background: #f8fafc;
	aspect-ratio: 1 / 1;
}

.cep-thumb img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.cep-grid.ratio-square .cep-thumb {
	aspect-ratio: 1 / 1;
}

.cep-grid.ratio-4-5 .cep-thumb {
	aspect-ratio: 4 / 5;
}

.cep-grid.ratio-3-4 .cep-thumb {
	aspect-ratio: 3 / 4;
}

.cep-grid.ratio-16-9 .cep-thumb {
	aspect-ratio: 16 / 9;
}

.cep-badge {
	position: absolute;
	top: 14px;
	inset-inline-start: 14px;
	z-index: 2;
	background: #22c55e;
	color: #fff;
	padding: 6px 12px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border-radius: 999px;
	box-shadow: 0 2px 8px rgba(34, 197, 94, 0.35);
}

.cep-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
}

.cep-content {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
}

.cep-footer {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-shrink: 0;
}

.cep-title {
	font-size: 1.05rem;
	line-height: 1.35;
	margin: 0 0 8px;
	font-weight: 700;
}

.cep-title a {
	color: #0f172a;
	text-decoration: none;
}

.cep-title a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.cep-rating {
	margin-bottom: 8px;
	font-size: 13px;
	color: #475569;
}

.cep-excerpt {
	margin: 0 0 12px;
	color: #64748b;
	font-size: 0.9rem;
	line-height: 1.55;
	font-weight: 400;
}

.cep-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.82rem;
	letter-spacing: 0.02em;
	transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
	flex-shrink: 0;
	border: none;
	cursor: pointer;
}

.cep-button--text {
	position: relative;
	padding: 11px 20px;
	border-radius: 999px;
}

.cep-button--icon-only {
	width: 52px;
	height: 52px;
	border-radius: 9999px !important;
	padding: 0 !important;
	line-height: 0 !important;
	overflow: hidden;
	isolation: isolate;
}

/* Theme “.button” often squares links — keep CTA pills circular */
.cep-card a.cep-button--icon-only,
.cep-card a.cep-button--text {
	border-radius: 9999px !important;
}

.cep-icon-cart {
	display: block;
}

/* Kill WooCommerce + theme pseudo-icons on our cards (loading spinner, check font, etc.) */
.cep-card a.cep-button.add_to_cart_button::before,
.cep-card a.cep-button.add_to_cart_button::after {
	content: none !important;
	display: none !important;
	animation: none !important;
}

.cep-card a.cep-button.add_to_cart_button.loading {
	animation: cep-atc-pulse 0.85s ease-in-out infinite;
}

@keyframes cep-atc-pulse {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.55;
	}
}

/* Hide “View cart” Woo inserts after the button */
.cep-card .cep-footer > a.added_to_cart.wc-forward {
	display: none !important;
}

/* Icon FAB: one grid cell, cart + check stacked — perfect center, no absolute drift */
.cep-atc-inner {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
}

.cep-atc-inner .cep-icon-cart,
.cep-atc-inner .cep-icon-check {
	grid-area: 1 / 1;
	display: block;
}

.cep-atc-inner .cep-icon-check {
	display: none;
}

.cep-button--icon-only.added .cep-atc-inner .cep-icon-cart {
	display: none;
}

.cep-button--icon-only.added .cep-atc-inner .cep-icon-check {
	display: block;
}

.cep-button--text .cep-btn-check {
	display: none;
	width: 100%;
	align-items: center;
	justify-content: center;
}

.cep-button--text.added .cep-btn-label {
	display: none;
}

.cep-button--text.added .cep-btn-check {
	display: flex;
}

/* ========== Skin: Elevated (split footer, soft premium) ========== */

.cep-skin--elevated.cep-card {
	border: none;
	border-radius: 28px;
	box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
	padding: 14px 14px 0;
	overflow: hidden;
}

.cep-skin--elevated .cep-thumb {
	border-radius: 22px;
	background: #f1f5f9;
}

.cep-skin--elevated .cep-body {
	padding: 18px 8px 20px;
}

.cep-skin--elevated .cep-footer {
	margin-top: 4px;
	padding-top: 4px;
	align-items: flex-end;
}

.cep-skin--elevated .cep-price {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.cep-skin--elevated .cep-button--text {
	background: #f1f5f9 !important;
	color: #0f172a !important;
	border: 1px solid #e2e8f0;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	text-transform: none;
}

.cep-skin--elevated .cep-button--text:hover {
	background: #e2e8f0 !important;
	color: #0f172a !important;
}

/* ========== Skin: Notch (inset image + floating cart pill) ========== */

.cep-skin--notch.cep-card {
	border: none;
	border-radius: 32px;
	box-shadow: 0 16px 48px rgba(15, 23, 42, 0.1);
	padding: 16px 16px 0;
	overflow: visible;
}

.cep-skin--notch .cep-thumb {
	border-radius: 24px;
	background: #f8fafc;
}

.cep-skin--notch .cep-body {
	padding: 20px 6px 22px;
}

/* Price left, floating cart right — classic premium product row */
.cep-skin--notch .cep-footer {
	position: relative;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 52px;
	padding: 4px 2px 0;
}

.cep-skin--notch .cep-price {
	margin: 0;
	flex: 1;
	min-width: 0;
	text-align: start;
	font-size: 1.15rem;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.cep-skin--notch .cep-button--icon-only {
	position: relative;
	inset: auto;
	flex-shrink: 0;
	width: 52px;
	height: 52px;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	border-radius: 50% !important;
	padding: 0 !important;
	border: none;
	background: linear-gradient(160deg, #14b8a6 0%, #0d9488 45%, #0f766e 100%);
	color: #ffffff;
	box-shadow:
		0 6px 18px rgba(13, 148, 136, 0.35),
		0 1px 0 rgba(255, 255, 255, 0.22) inset;
}

.cep-skin--notch .cep-button--icon-only:hover {
	background: linear-gradient(160deg, #2dd4bf 0%, #14b8a6 50%, #0d9488 100%);
	color: #ffffff;
	transform: translateY(-1px);
	box-shadow:
		0 10px 26px rgba(13, 148, 136, 0.42),
		0 1px 0 rgba(255, 255, 255, 0.25) inset;
}

.cep-skin--notch .cep-button--icon-only:active {
	transform: translateY(0);
}

.cep-skin--notch .cep-button--icon-only .cep-icon-cart path,
.cep-skin--notch .cep-button--icon-only .cep-icon-check path {
	stroke: currentColor;
}

@media (max-width: 420px) {
	.cep-skin--elevated .cep-footer {
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
	}

	.cep-skin--elevated .cep-button--text {
		width: 100%;
		justify-content: center;
	}
}

@media (max-width: 1024px) {
	.cep-grid.columns-4 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.cep-grid.columns-2,
	.cep-grid.columns-3,
	.cep-grid.columns-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 540px) {
	.cep-grid.columns-2,
	.cep-grid.columns-3,
	.cep-grid.columns-4 {
		grid-template-columns: 1fr;
	}
}

/* --- Promo product --- */
.cep-promo-single-wrap {
	width: 100%;
}

.cep-promo-single {
	width: 100%;
	margin: 0;
}

.cep-card--promo .cep-badges {
	position: absolute;
	top: 14px;
	inset-inline-start: 14px;
	z-index: 4;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
}

.cep-card--promo .cep-badge {
	position: static;
	border-radius: 8px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	padding: 5px 10px;
	line-height: 1.2;
}

.cep-badge--offre {
	background: linear-gradient(135deg, #fb7185, #f43f5e);
	color: #fff;
	box-shadow: 0 2px 8px rgba(244, 63, 94, 0.35);
}

.cep-badge-plus {
	font-weight: 800;
	margin-inline-end: 2px;
}

.cep-badge--bestseller {
	background: #1e293b;
	color: #fff;
}

.cep-badge-trophy {
	margin-inline-end: 4px;
}

.cep-card--promo .cep-thumb {
	overflow: hidden;
	position: relative;
}

.cep-card--promo.ratio-square .cep-thumb {
	aspect-ratio: 1 / 1;
}

.cep-card--promo.ratio-4-5 .cep-thumb {
	aspect-ratio: 4 / 5;
}

.cep-card--promo.ratio-3-4 .cep-thumb {
	aspect-ratio: 3 / 4;
}

.cep-card--promo .cep-thumb img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cep-promo-strip {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 8px 10px;
	background: #16a34a;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.25;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.12);
}

.cep-promo-strip--blink {
	animation-name: cep-promo-blink;
	animation-timing-function: ease-in-out;
	animation-iteration-count: infinite;
}

@keyframes cep-promo-blink {
	0%,
	100% {
		opacity: 1;
		filter: brightness(1);
		box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.12);
	}
	50% {
		opacity: 0.92;
		filter: brightness(1.12);
		box-shadow: 0 -6px 22px rgba(22, 163, 74, 0.45);
	}
}

.cep-promo-gift {
	font-size: 1.15em;
	line-height: 1;
}

.cep-promo-strip__text {
	flex: 1;
	min-width: 0;
}

.cep-promo-title a {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
	-webkit-line-clamp: var(--cep-lines, 3);
}

/* Promo + skins: strip sits on image; footer uses same layout */
.cep-card--promo.cep-skin--elevated,
.cep-card--promo.cep-skin--notch {
	overflow: hidden;
}

/* --- Carousel --- */
.cep-carousel {
	position: relative;
	width: 100%;
	--cep-gap: 16px;
}

.cep-carousel__header {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-bottom: 10px;
}

.cep-carousel__btn {
	width: 40px;
	height: 40px;
	border-radius: 999px;
	border: 1px solid #e5e7eb;
	background: #fff;
	color: #111827;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
	box-shadow: 0 2px 8px rgba(17, 24, 39, 0.08);
}

.cep-carousel__btn:hover {
	background: #f9fafb;
	border-color: #d1d5db;
}

.cep-carousel__btn:active {
	transform: scale(0.96);
}

.cep-carousel__viewport {
	width: 100%;
	overflow: hidden;
}

.cep-carousel__track {
	display: flex;
	align-items: stretch;
	gap: var(--cep-gap, 16px);
	transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
	will-change: transform;
}

.cep-carousel__slide {
	flex-shrink: 0;
	min-width: 0;
}

.cep-card--carousel {
	height: 100%;
}

.cep-card--carousel .cep-thumb {
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
}

.cep-card--carousel .cep-thumb img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
