/* Category Card Widget */
.ccw-wrapper {
	font-family: 'Inter', sans-serif;
	width: 100%;
	position: relative;
}

/* Grid mode */
.ccw-wrapper .ccw-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 22px;
}

/* Minimal Swiper base (so we don't depend on swiper.css) */
.ccw-wrapper .ccw-swiper {
	position: relative;
	overflow: hidden;
	width: 100%;
}
.ccw-wrapper .swiper-wrapper {
	display: flex;
	position: relative;
	width: 100%;
	height: 100%;
	box-sizing: content-box;
	transition-property: transform;
	z-index: 1;
}
.ccw-wrapper .swiper-slide {
	flex-shrink: 0;
	width: 100%;
	height: auto;
	position: relative;
	box-sizing: border-box;
}
/* Before JS init: show 2 / 3 / 4 per row to avoid layout jump */
.ccw-wrapper .ccw-swiper:not(.swiper-initialized) .swiper-slide { width: 50%; }
@media (min-width: 768px)  { .ccw-wrapper .ccw-swiper:not(.swiper-initialized) .swiper-slide { width: 33.333%; } }
@media (min-width: 1025px) { .ccw-wrapper .ccw-swiper:not(.swiper-initialized) .swiper-slide { width: 25%; } }

/* Card */
.ccw-wrapper .ccw-card {
	position: relative;
	display: block;
	width: 100%;
	height: 300px;
	overflow: hidden;
	border-radius: 6px;
	background-color: #1a1a1a;
	color: #fff;
	text-decoration: none;
	isolation: isolate;
	transform: translateZ(0);
	box-sizing: border-box;
}
.ccw-wrapper a.ccw-card:hover,
.ccw-wrapper a.ccw-card:focus {
	text-decoration: none;
	color: #fff;
}

.ccw-wrapper .ccw-media {
	position: absolute;
	inset: 0;
	z-index: 0;
}
.ccw-wrapper .ccw-media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 600ms cubic-bezier(.2, .7, .2, 1);
	will-change: transform;
}
.ccw-wrapper .ccw-card:hover .ccw-media img {
	transform: scale(1.06);
}

.ccw-wrapper .ccw-overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 70%;
	background: linear-gradient(to top, rgba(0, 0, 0, .72) 0%, transparent 100%);
	pointer-events: none;
	z-index: 1;
	transition: opacity .4s ease;
}

.ccw-wrapper .ccw-content {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 24px;
	text-align: left;
	box-sizing: border-box;
}

.ccw-wrapper .ccw-title {
	margin: 0;
	padding: 0;
	font-family: 'Inter', sans-serif;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
	transition: color .3s ease;
}

.ccw-wrapper .ccw-shop-wrap {
	padding-top: var(--ccw-shop-gap, 10px);
}
.ccw-wrapper .ccw-shop {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: 'Inter', sans-serif;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
	color: #fff;
	transition: color .3s ease;
}
.ccw-wrapper .ccw-arrow {
	flex-shrink: 0;
	transition: transform .3s ease;
}
.ccw-wrapper .ccw-card:hover .ccw-arrow {
	transform: translateX(3px);
}

/* "Shop Now" hidden until hover — desktop with mouse only.
   Mobile (<768px) and touch devices always show it. */
@media (hover: hover) and (pointer: fine) and (min-width: 768px) {
	.ccw-wrapper.ccw-hover-reveal .ccw-shop-wrap {
		max-height: 0;
		padding-top: 0;
		opacity: 0;
		overflow: hidden;
		transform: translateY(8px);
		transition: max-height .4s ease, padding-top .4s ease, opacity .35s ease, transform .35s ease;
	}
	.ccw-wrapper.ccw-hover-reveal .ccw-card:hover .ccw-shop-wrap,
	.ccw-wrapper.ccw-hover-reveal .ccw-card:focus-visible .ccw-shop-wrap {
		max-height: 100px;
		padding-top: var(--ccw-shop-gap, 10px);
		opacity: 1;
		transform: translateY(0);
	}
}

/* Pagination */
.ccw-wrapper .ccw-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 22px;
}
.ccw-wrapper .ccw-pagination.swiper-pagination-lock {
	display: none;
}
.ccw-wrapper .ccw-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background-color: #cfcfcf;
	cursor: pointer;
	opacity: 1;
	transition: background-color .3s ease, width .3s ease;
}
.ccw-wrapper .ccw-dot.ccw-dot-active {
	background-color: #111;
}
