/**
 * JT Shop By Category (Circles) widget styles.
 *
 * Ported verbatim from the original "circular category avatars" markup,
 * scoped by the widget's stable wrapper class (.jt-ccs2-wrap). Desktop/
 * tablet use a CSS grid; mobile switches to a native horizontal swipeable
 * row (no JS) exactly like the reference design.
 *
 * Defaults are never declared directly on .jt-ccs2-wrap itself - only as
 * the var(--x, fallback) argument at each usage site. A custom property
 * declared directly on an element always wins over one inherited from an
 * ancestor (regardless of source order), which would otherwise silently
 * cancel every Elementor color/size control.
 */

.jt-ccs2-wrap { max-width: 1400px; margin: 0 auto; padding: 0 20px; font-family: 'Poppins', sans-serif; }

.jt-ccs2-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin: 0 0 24px;
	flex-wrap: wrap;
}
.jt-ccs2-header-text { flex: 1; min-width: 0; }

.jt-ccs2-eyebrow {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 4px;
	text-transform: uppercase;
	color: var( --jt-ccs2-accent, #FD317E );
	margin: 0 0 9px;
}
.jt-ccs2-eyebrow::before { content: ""; width: 22px; height: 1.5px; background: var( --jt-ccs2-accent, #FD317E ); }

.jt-ccs2-title { font-size: 28px; font-weight: 700; color: var( --jt-ccs2-title-color, #1a1a1a ); margin: 0; letter-spacing: -0.5px; }
.jt-ccs2-subtitle { font-size: 13.5px; color: var( --jt-ccs2-subtitle-color, #9a9aa5 ); margin: 8px 0 0; font-weight: 400; }

.jt-ccs2-viewall {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	font-weight: 600;
	/*
	 * !important is required here: the theme's global reset in
	 * assets/css/pro-style.css - `a:not(.button):not(.btn)...{ color:
	 * var(--link-color); }` - has ~10 chained :not() class exclusions,
	 * giving it far higher specificity than this plain selector. This
	 * anchor isn't in that exclusion list, so without !important the
	 * theme-wide link color would silently win over the button's own
	 * text color control.
	 */
	color: var( --jt-ccs2-viewall-text, #ffffff ) !important;
	text-decoration: none;
	background: linear-gradient( 135deg, var( --jt-ccs2-accent, #FD317E ), var( --jt-ccs2-accent-2, #ff5c96 ) );
	padding: 11px 12px 11px 22px;
	border-radius: 28px;
	transition: all 0.3s ease;
	flex-shrink: 0;
	box-shadow: 0 8px 20px rgba(253, 49, 126, 0.3);
}
.jt-ccs2-viewall span {
	color: var( --jt-ccs2-viewall-text, #ffffff ) !important;
	width: 26px; height: 26px;
	background: rgba(255, 255, 255, 0.22);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	transition: transform 0.3s ease;
}
.jt-ccs2-viewall:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(253, 49, 126, 0.4); }
.jt-ccs2-viewall:hover span { transform: translateX(3px); }

/* Desktop/Tablet grid */
.jt-ccs2-grid {
	display: grid;
	grid-template-columns: repeat(8, 1fr);
	gap: var( --jt-ccs2-row-gap, 16px ) var( --jt-ccs2-col-gap, 16px );
	/* Reserves room for the hover lift below (translateY(-6px) + scale growth)
	   so the first row doesn't visually overlap the header above it. */
	padding-top: 10px;
}

.jt-ccs2-item {
	text-decoration: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.jt-ccs2-circle {
	width: 100%;
	aspect-ratio: 1 / 1;
	max-width: var( --jt-ccs2-circle-size, 110px );
	border-radius: 50%;
	overflow: hidden;
	background: linear-gradient( 160deg, var( --jt-ccs2-circle-bg-start, #fff5f9 ), var( --jt-ccs2-circle-bg-end, #ffeaf1 ) );
	border: 2px solid #fff;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
	position: relative;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.jt-ccs2-item:hover .jt-ccs2-circle {
	transform: translateY(-6px) scale(1.04);
	box-shadow: 0 16px 30px rgba(253, 49, 126, 0.25);
	border-color: var( --jt-ccs2-accent, #FD317E );
}
.jt-ccs2-circle img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}
.jt-ccs2-item:hover .jt-ccs2-circle img { transform: scale(1.1); }

.jt-ccs2-name {
	font-size: 13px;
	font-weight: 600;
	color: var( --jt-ccs2-name-color, #1a1a1a );
	text-align: center;
	letter-spacing: -0.1px;
	line-height: 1.3;
}
.jt-ccs2-item-subtitle {
	font-size: 11px;
	color: var( --jt-ccs2-subtitle-color, #9a9aa5 );
	text-align: center;
	line-height: 1.3;
	margin-top: -6px;
}

/* Tablet */
@media (max-width: 992px) {
	.jt-ccs2-grid { grid-template-columns: repeat(4, 1fr); }
	.jt-ccs2-title { font-size: 24px; }
}

/* Mobile - horizontal scroll */
@media (max-width: 576px) {
	.jt-ccs2-wrap { padding: 0 0 0 14px; }
	.jt-ccs2-header { padding-right: 14px; margin-bottom: 16px; }
	.jt-ccs2-eyebrow { display: none; }
	.jt-ccs2-title { font-size: 18px; }
	.jt-ccs2-viewall { font-size: 10.5px; padding: 7px 6px 7px 14px; gap: 7px; }
	.jt-ccs2-viewall span { width: 20px; height: 20px; font-size: 10px; }

	.jt-ccs2-grid {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		/* gap intentionally not hardcoded here - it would silently override
		   the Row Gap / Column Gap controls' mobile values (same selector,
		   same specificity, this rule would always win by source order).
		   The var(--jt-ccs2-row-gap/--jt-ccs2-col-gap, 16px) set on the base
		   .jt-ccs2-grid rule above already carries the same 16px default. */
		padding-right: 14px;
		padding-bottom: 4px;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}
	.jt-ccs2-grid::-webkit-scrollbar { display: none; }
	.jt-ccs2-item {
		flex: 0 0 auto;
		width: var( --jt-ccs2-circle-size, 78px );
		scroll-snap-align: start;
		gap: 8px;
	}
	.jt-ccs2-circle { max-width: var( --jt-ccs2-circle-size, 78px ); }
	.jt-ccs2-name { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
	.jt-ccs2-circle, .jt-ccs2-circle img, .jt-ccs2-viewall, .jt-ccs2-viewall span {
		transition: none !important;
	}
}
