/**
 * WC Category Carousel – Elementor Widget
 * Frontend stylesheet
 */

.wccc-e-wrapper { position: relative; }

/*.wccc-e-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
	height: 100%;
	transition: transform .25s ease, box-shadow .25s ease;
}
.wccc-e-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,0.12); }*/

.wccc-e-card-img-link { display: block; }
.wccc-e-card-img {
	display: block;
	width: 100%;
	aspect-ratio: 1/1;
	overflow: hidden;
	background: #f2f2f2; /* shows briefly while the image loads, avoids a blank flash */
}
.wccc-e-card-img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top; /* keeps faces/tops of sarees in frame instead of cropping from center */
}

.wccc-e-card-info { padding: 12px 14px 16px; text-align: center; flex: 1; display: flex; flex-direction: column; }
.wccc-e-card-title-link { text-decoration: none; }
.wccc-e-card-title { display: block; font-weight: 700; font-size: 15px; color: #1a1a2e; }
.wccc-e-card-count { font-weight: 400; font-size: 13px; color: #999; margin-left: 4px; }
.wccc-e-card-desc { font-size: 13px; color: #777; margin: 6px 0 0; line-height: 1.5; }

.wccc-e-card-btn {
	display: inline-block;
	margin-top: 12px;
	padding: 8px 18px;
	background: #e91e63;
	color: #fff;
	text-decoration: none;
	border-radius: 30px;
	font-size: 13px;
	font-weight: 600;
	align-self: center;
}

.wccc-e-swiper { position: relative; padding-bottom: 36px; }
.wccc-e-swiper .swiper-slide { height: auto; }

/* Safety net: before Swiper JS finishes initializing, lay slides out as a
   basic wrapping grid instead of each one filling 100% width (avoids a
   giant blown-up image flash, most noticeable inside the Elementor editor). */
.wccc-e-swiper:not(.swiper-initialized) .swiper-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}
.wccc-e-swiper:not(.swiper-initialized) .swiper-slide {
	width: calc(33.333% - 8px);
}
@media (min-width: 1024px) {
	.wccc-e-swiper:not(.swiper-initialized) .swiper-slide { width: calc(16.666% - 10px); }
}

.wccc-e-nav {
	position: absolute;
	top: 40%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	background: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;

	cursor: pointer;
	z-index: 10;
}
.wccc-e-prev { left: -8px; }
.wccc-e-next { right: -8px; }
.wccc-e-nav:hover { background: #f3f3f3; }

.wccc-e-swiper .swiper-pagination-bullet { background: #ccc; opacity: 1; }
.wccc-e-swiper .swiper-pagination-bullet-active { background: #e91e63; }

/* Mobile grid mode: JS disables Swiper's loop/slide behaviour and this CSS lays cards out as a grid */
@media (max-width: 767px) {
	.wccc-e-wrapper.wccc-e-mobile-grid .swiper-wrapper {
		display: grid;
		grid-template-columns: repeat(var(--wccc-cols, 3), 1fr);
		gap: var(--wccc-gap, 10px);
		transform: none !important;
	}
	.wccc-e-wrapper.wccc-e-mobile-grid .swiper-slide { width: auto !important; }
	.wccc-e-wrapper.wccc-e-mobile-grid .wccc-e-nav,
	.wccc-e-wrapper.wccc-e-mobile-grid .swiper-pagination { display: none; }
}

/* Swiper Grid Layout Support (Swiper 8+) - Mobile: 2 rows x 3 columns */
@media (max-width: 767px) {
	.wccc-e-swiper .swiper-grid-column {
		height: auto;
		margin-bottom: 0;
	}
	.wccc-e-card-title {
        font-size: 9px;
    }

	.wccc-e-swiper .swiper-wrapper {
		height: auto;
	}
	.wccc-e-card-info {
        padding-left: 0;
        padding-right: 0;
    }
}
