/* ==========================================================================
   Category Product Carousel — carousel.css
   Transparent bg; Elementor section background shows through.
   White title · White cards · Gold + dark-red countdown
   ========================================================================== */

/* ── Wrapper ─────────────────────────────────────────────────────────────── */

.cpc-wrapper {
	width: 100%;
	background: transparent;
	padding: 32px 0 40px;
	box-sizing: border-box;
	position: relative;
}

/* ── Section title ───────────────────────────────────────────────────────── */

.cpc-title {
	color: #ffffff;
	text-align: center;
	font-size: clamp(1.35rem, 3vw, 2rem);
	font-weight: 700;
	margin: 0 0 28px;
	letter-spacing: 0.4px;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
	line-height: 1.2;
}

/* ── Swiper shell ────────────────────────────────────────────────────────── */

.cpc-swiper {
	width: 100%;
	padding: 8px 6px 52px !important; /* bottom room for pagination */
	overflow: hidden;
}

.cpc-swiper .swiper-button-prev,
.cpc-swiper .swiper-button-next {
	color: #ffffff;
	background: rgba(0, 0, 0, 0.40);
	width: 36px;
	height: 36px;
	border-radius: 50%;
	top: 38%;
	transition: background 0.2s;
}
.cpc-swiper .swiper-button-prev:hover,
.cpc-swiper .swiper-button-next:hover {
	background: rgba(0, 0, 0, 0.65);
}
.cpc-swiper .swiper-button-prev::after,
.cpc-swiper .swiper-button-next::after {
	font-size: 13px;
	font-weight: 800;
}

.cpc-swiper .swiper-pagination-bullet {
	background: rgba(255, 255, 255, 0.45);
	opacity: 1;
}
.cpc-swiper .swiper-pagination-bullet-active {
	background: #ffffff;
}

/* ── Product card ────────────────────────────────────────────────────────── */

.cpc-card {
	background: #ffffff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 6px 28px rgba(0, 0, 0, 0.22);
	display: flex;
	flex-direction: column;
	height: 100%;
	position: relative;
	transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.cpc-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.30);
}

/* ── % OFF badge ─────────────────────────────────────────────────────────── */

.cpc-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	background: #b91c1c;          /* dark red */
	color: #FFD700;               /* gold text on badge */
	font-size: 0.7rem;
	font-weight: 800;
	padding: 3px 10px;
	border-radius: 20px;
	z-index: 3;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	box-shadow: 0 2px 8px rgba(185, 28, 28, 0.5);
}

/* ── Product image ───────────────────────────────────────────────────────── */

.cpc-img-wrap {
	display: block;
	overflow: hidden;
	background: #f3f4f6;
	line-height: 0;
}
.cpc-img {
	width: 100%;
	height: 210px;
	object-fit: cover;
	display: block;
	transition: transform 0.38s ease;
}
.cpc-card:hover .cpc-img {
	transform: scale(1.06);
}
.cpc-img-placeholder {
	width: 100%;
	height: 210px;
	background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

/* ── Card body ───────────────────────────────────────────────────────────── */

.cpc-card-body {
	padding: 14px 15px 16px;
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 10px;
}

/* ── Product name ────────────────────────────────────────────────────────── */

.cpc-product-name {
	font-size: 0.9rem;
	font-weight: 600;
	margin: 0;
	line-height: 1.35;
	color: #111827;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.cpc-product-name a {
	color: inherit;
	text-decoration: none;
}
.cpc-product-name a:hover {
	color: #b91c1c;
}

/* ── Price ───────────────────────────────────────────────────────────────── */

.cpc-price {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 7px;
	min-height: 1.6rem;
}

/* WooCommerce get_price_html() output — sale price inside <ins> */
.cpc-price ins,
.cpc-price ins .woocommerce-Price-amount {
	font-size: 1.08rem;
	font-weight: 700;
	color: #b91c1c !important;
	text-decoration: none;
}

/* Regular / non-sale price */
.cpc-price .woocommerce-Price-amount {
	font-size: 1.08rem;
	font-weight: 700;
	color: #b91c1c !important;
}

/* Struck-through original price inside <del> */
.cpc-price del,
.cpc-price del .woocommerce-Price-amount {
	font-size: 0.8rem;
	font-weight: 400;
	color: #9ca3af !important;
}

/* ── Countdown timer ─────────────────────────────────────────────────────── */

.cpc-countdown {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
}

.cpc-cd-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	background: #7f1d1d;          /* dark red bg */
	border-radius: 6px;
	padding: 5px 7px;
	min-width: 40px;
	flex: 1;
}

.cpc-count {
	display: block;
	font-size: 1rem;
	font-weight: 800;
	color: #FFD700;               /* gold digits */
	line-height: 1.15;
	font-variant-numeric: tabular-nums;
	letter-spacing: 1px;
}

.cpc-cd-label {
	font-size: 0.55rem;
	color: rgba(255, 215, 0, 0.75); /* faded gold label */
	text-transform: uppercase;
	letter-spacing: 0.4px;
	margin-top: 1px;
}

.cpc-cd-sep {
	color: #FFD700;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1;
	align-self: flex-start;
	margin-top: 5px;
}

/* ── Action buttons ──────────────────────────────────────────────────────── */

.cpc-actions {
	display: flex;
	flex-direction: column;
	gap: 7px;
	margin-top: auto;
}

/* Add to Cart */
.cpc-add-to-cart {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 7px !important;
	background-color: #fd6806 !important;
	color: #ffffff !important;
	border: 2px solid #fd6806 !important;
	border-radius: 7px !important;
	padding: 10px 14px !important;
	font-size: 0.83rem !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	cursor: pointer !important;
	width: 100% !important;
	transition: all 0.3s ease !important;
	letter-spacing: 0.3px !important;
	position: relative !important;
}
.cpc-add-to-cart:hover:not(:disabled) {
	background-color: transparent !important;
	border-color: #fd6806 !important;
	color: #fd6806 !important;
	transform: translateY(-1px);
}
.cpc-add-to-cart.cpc-loading {
	opacity: 0.75 !important;
	cursor: wait !important;
	pointer-events: none !important;
}
.cpc-add-to-cart.cpc-added {
	background-color: #15803d !important;
	border-color: #15803d !important;
}
.cpc-cart-icon {
	flex-shrink: 0;
}

/* Spinner — inherits button text color so it works on both solid and transparent states */
.cpc-spinner {
	display: none;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(253, 104, 6, 0.35);
	border-top-color: currentColor;
	border-radius: 50%;
	animation: cpc-spin 0.65s linear infinite;
	flex-shrink: 0;
}
.cpc-loading .cpc-spinner {
	display: inline-block;
}
.cpc-loading .cpc-cart-icon {
	display: none;
}

@keyframes cpc-spin {
	to { transform: rotate(360deg); }
}

/* WhatsApp button */
.cpc-wa-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	background: #16a34a;
	color: #ffffff;
	border-radius: 7px;
	padding: 10px 14px;
	font-size: 0.8rem;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.2s ease, transform 0.15s ease;
	letter-spacing: 0.3px;
}
.cpc-wa-btn:hover {
	background: #15803d;
	color: #ffffff;
	transform: translateY(-1px);
	text-decoration: none;
}
.cpc-wa-btn svg {
	flex-shrink: 0;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
	.cpc-img,
	.cpc-img-placeholder {
		height: 175px;
	}
	.cpc-count {
		font-size: 0.88rem;
	}
	.cpc-cd-item {
		min-width: 34px;
		padding: 4px 5px;
	}
	.cpc-cd-label {
		font-size: 0.5rem;
	}
}

@media (max-width: 360px) {
	.cpc-img,
	.cpc-img-placeholder {
		height: 155px;
	}
	.cpc-badge {
		font-size: 0.62rem;
		padding: 2px 8px;
	}
}
