/* ===== Toolbar (Result Count / Sorting) ===== */
.wcepg-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: nowrap;
	gap: 12px;
	margin-bottom: 16px;
}

.wcepg-result-count {
	font-size: 14px;
	color: #666;
	flex: 0 1 auto;
}

.wcepg-sorting-select {
	font-size: 14px;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	/* Kai themes global form styling me select/input par width:100% force karte hain (mobile-first
	   forms ke liye) - jiski wajah se ye dropdown desktop par bhi full-width, apni alag line par
	   chala jaata tha. !important se us theme-level reset ko yahan override karte hain. */
	width: auto !important;
	max-width: 60%;
	flex: 0 0 auto;
}

@media (max-width: 767px) {
	.wcepg-toolbar {
		flex-wrap: wrap;
	}

	.wcepg-sorting-select {
		width: 100% !important;
		max-width: 100%;
	}
}

.wcepg-toolbar-right {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 0 0 auto;
}

.wcepg-view-toggle {
	display: flex;
	align-items: center;
	gap: 2px;
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
}

.wcepg-view-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	background: #fff;
	color: #999;
	cursor: pointer;
}

.wcepg-view-btn.is-active {
	background: #f0f0f0;
	color: #222;
}

.wcepg-view-btn + .wcepg-view-btn {
	border-left: 1px solid #ddd;
}

@media (max-width: 767px) {
	.wcepg-toolbar-right {
		width: 100%;
		justify-content: space-between;
	}
}

/* ===== Grid ===== */
.wcepg-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}

/* List view (toggled by the toolbar buttons above): single column, each
   card laid out horizontally (image left, details right) instead of the
   normal vertical product-card. The Elementor "Columns" control writes its
   own grid-template-columns rule with higher selector specificity
   (.elementor-element.elementor-<id> .wcepg-grid), so !important is needed
   here to reliably win over it regardless of markup order. */
.wcepg-grid.wcepg-view-list {
	grid-template-columns: 1fr !important;
	gap: 14px;
}

.wcepg-grid.wcepg-view-list .wcepg-card {
	flex-direction: row;
	align-items: stretch;
	gap: 16px;
}

.wcepg-grid.wcepg-view-list .wcepg-card-image {
	flex: 0 0 160px;
	max-width: 160px;
}

.wcepg-grid.wcepg-view-list .wcepg-card-content {
	flex: 1;
	padding: 10px 4px;
}

@media (max-width: 480px) {
	.wcepg-grid.wcepg-view-list .wcepg-card-image {
		flex-basis: 96px;
		max-width: 96px;
	}
}

/* ===== Card ===== */
.wcepg-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.wcepg-card-image {
	position: relative;
	overflow: hidden;
}

.wcepg-card-image img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 0.3s ease;
}

.wcepg-card:hover .wcepg-card-image img {
	transform: scale(1.04);
}

/* ===== Configurable Hover Effect (CTSuite_Grid_Widget "Hover Effect"
   controls) — layered on top of, and where needed overriding, the always-on
   1.04x image zoom above. When "Apply To" is left at its default of "None"
   none of these classes are ever rendered, so the original zoom above is
   completely untouched. ===== */
.wcepg-card.wcepg-hoverfx-card-zoom,
.wcepg-card.wcepg-hoverfx-card-lift,
.wcepg-card.wcepg-hoverfx-card-zoom_lift {
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	will-change: transform;
}
.wcepg-card.wcepg-hoverfx-card-zoom:hover {
	transform: scale(var(--wcepg-hover-scale, 1.05));
	position: relative;
	z-index: 2;
}
.wcepg-card.wcepg-hoverfx-card-lift:hover {
	transform: translateY(calc(-1 * var(--wcepg-hover-lift, 8px)));
	position: relative;
	z-index: 2;
}
.wcepg-card.wcepg-hoverfx-card-zoom_lift:hover {
	transform: scale(var(--wcepg-hover-scale, 1.05)) translateY(calc(-1 * var(--wcepg-hover-lift, 8px)));
	position: relative;
	z-index: 2;
}
/* "Whole Card" is its own distinct effect — stop the built-in per-image zoom
   above from ALSO firing at the same time (would otherwise double up). */
.wcepg-card-image.wcepg-hoverfx-suppress-default img {
	transform: none !important;
}
/* "Image Only" target: same built-in zoom mechanism as above, just with a
   configurable amount instead of the fixed 1.04 default. Higher selector
   specificity than the built-in rule (one extra class) so it wins cleanly
   without needing !important. */
.wcepg-card:hover .wcepg-card-image.wcepg-hoverfx-image-zoom img {
	transform: scale(var(--wcepg-hover-scale, 1.08));
}

/* Product video (as main image) — see CTSuite_Product_Video_Frontend::get_grid_video_attrs(). */
.wcepg-card-image a.ctsuite-grid-video-playing img {
	opacity: 0;
}
.ctsuite-grid-video-player {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	background: #000;
}

/* Video sits UNDER badges/wishlist (.wcepg-overlay-badges is z-index:2) — the
   anchor becomes its own stacking context once it's playing a video, so it
   needs an explicit low z-index or it paints over the badges. */
.wcepg-card-image a.ctsuite-grid-video-playing {
	position: relative;
	z-index: 0;
}

.wcepg-overlay-badges {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 5px;
}

.wcepg-sale-badge {
	display: inline-block;
	background: #e53935;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 3px;
}

.wcepg-card-content {
	padding: 14px 4px;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.wcepg-card-category {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #888;
}

.wcepg-card-category a {
	color: inherit;
	text-decoration: none;
}

.wcepg-card-title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
}

.wcepg-card-title a {
	color: #222;
	text-decoration: none;
}

.wcepg-card-rating {
	display: flex;
	align-items: center;
	gap: 6px;
}

.wcepg-stars .star-rating {
	overflow: hidden;
	position: relative;
	height: 1em;
	line-height: 1;
	font-size: 14px;
	width: 5.4em;
	font-family: star;
}

.wcepg-rating-count {
	font-size: 13px;
	color: #777;
}

.wcepg-card-attribute {
	font-size: 13px;
	color: #555;
}

.wcepg-attribute-label {
	font-weight: 600;
}

.wcepg-card-price {
	font-size: 16px;
	font-weight: 700;
}

.wcepg-card-price del {
	opacity: 0.6;
	font-weight: 400;
	margin-right: 6px;
}

.wcepg-price-discount {
	display: inline-block;
	margin-left: 6px;
	padding: 2px 6px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.4;
	color: #fff;
	background: #2e7d32;
	border-radius: 3px;
	vertical-align: middle;
}

.wcepg-card-description {
	font-size: 13px;
	color: #666;
	line-height: 1.5;
}

.wcepg-card-add-to-cart {
	/* Pushed to the bottom of the flex column (.wcepg-card-content is
	   display:flex;flex-direction:column) instead of a plain 8px gap, so the
	   button lines up on the same row across cards even when titles wrap to
	   a different number of lines or descriptions differ in length. */
	margin-top: auto;
	padding-top: 8px;
}

.wcepg-add-to-cart-btn {
	display: inline-block;
	padding: 10px 18px;
	background: #222;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	border: none;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.wcepg-add-to-cart-btn.loading {
	opacity: 0.6;
	pointer-events: none;
}

/* ===== Wishlist (CT Wishlist module button, positioned as overlay on the card image) ===== */
.wcepg-card-image .ct-wishlist-btn {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* ===== Carousel ===== */
.wcepg-carousel {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
}

.wcepg-carousel-viewport {
	overflow: hidden;
	flex: 1;
}

/* Edge Peek (CTSuite_Grid_Widget "Edge Peek" control) — padding sits INSIDE
   the viewport's own overflow:hidden edge, so the next/prev card's sliver
   shows through that reserved space instead of being clipped, without
   changing the track/step math the JS carousel already relies on. */
.wcepg-carousel-viewport.wcepg-peek-left   { padding-left: var(--wcepg-peek, 40px); }
.wcepg-carousel-viewport.wcepg-peek-right  { padding-right: var(--wcepg-peek, 40px); }
.wcepg-carousel-viewport.wcepg-peek-both   { padding-left: var(--wcepg-peek, 40px); padding-right: var(--wcepg-peek, 40px); }
/* Reserves vertical room so the "Whole Card" hover effect (zoom/lift) isn't
   clipped by this viewport's own overflow:hidden (needed for the
   horizontal slide) — see CTSuite_Grid_Widget "Hover Effect" controls. */
.wcepg-carousel-viewport.wcepg-hoverfx-viewport { padding-top: 28px; padding-bottom: 28px; margin-top: -28px; margin-bottom: -28px; }

.wcepg-carousel-track {
	display: flex;
	gap: 20px;
	transition: transform 0.35s ease;
}

/* Slide width is derived from --wcepg-cols and the real gap (--wcepg-gap,
   kept in sync with the "Gap Between Items" control) instead of the old
   fixed-per-count rules below, which hardcoded a 20px gap into the formula.
   That mismatch is what caused slides to visibly get cut off whenever the
   gap was changed away from 20px - the JS scroll step and this width no
   longer agreed. */
.wcepg-carousel-slide {
	--wcepg-cols: 4;
	flex: 0 0 auto;
	flex-basis: calc((100% - (var(--wcepg-cols) - 1) * var(--wcepg-gap, 20px)) / var(--wcepg-cols));
	box-sizing: border-box;
	min-width: 0;
}

.wcepg-layout-carousel[data-slides-desktop="1"] .wcepg-carousel-slide { --wcepg-cols: 1; }
.wcepg-layout-carousel[data-slides-desktop="2"] .wcepg-carousel-slide { --wcepg-cols: 2; }
.wcepg-layout-carousel[data-slides-desktop="3"] .wcepg-carousel-slide { --wcepg-cols: 3; }
.wcepg-layout-carousel[data-slides-desktop="4"] .wcepg-carousel-slide { --wcepg-cols: 4; }
.wcepg-layout-carousel[data-slides-desktop="5"] .wcepg-carousel-slide { --wcepg-cols: 5; }
.wcepg-layout-carousel[data-slides-desktop="6"] .wcepg-carousel-slide { --wcepg-cols: 6; }

.wcepg-carousel-arrow {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid #ddd;
	background: #fff;
	cursor: pointer;
	font-size: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	transition: background 0.15s ease, color 0.15s ease;
}

.wcepg-carousel-arrow:hover {
	background: #f5f5f5;
}

/* Overlay mode: arrows float on top of the carousel edges instead of sitting beside it */
.wcepg-arrows-overlay .wcepg-carousel {
	display: block;
}
.wcepg-arrows-overlay .wcepg-carousel-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
}
.wcepg-arrows-overlay .wcepg-carousel-prev {
	left: 10px;
}
.wcepg-arrows-overlay .wcepg-carousel-next {
	right: 10px;
}

/* Custom mode: Prev/Next positioned fully independently (own edge + offset
   each), e.g. both arrows sitting together above the carousel instead of on
   the image edges. See the matching Elementor controls in
   register_style_carousel_nav_controls() (arrow_position_type = "custom"). */
.wcepg-arrows-custom .wcepg-carousel-arrow {
	position: absolute;
	top: auto;
	right: auto;
	bottom: auto;
	left: auto;
	z-index: 3;
}
.wcepg-prev-h-left .wcepg-carousel-prev   { left: var( --wcepg-prev-h-offset, 10px ); }
.wcepg-prev-h-right .wcepg-carousel-prev  { right: var( --wcepg-prev-h-offset, 10px ); }
.wcepg-prev-v-top .wcepg-carousel-prev    { top: var( --wcepg-prev-v-offset, -50px ); }
.wcepg-prev-v-bottom .wcepg-carousel-prev { bottom: var( --wcepg-prev-v-offset, -50px ); }
.wcepg-next-h-left .wcepg-carousel-next   { left: var( --wcepg-next-h-offset, 10px ); }
.wcepg-next-h-right .wcepg-carousel-next  { right: var( --wcepg-next-h-offset, 10px ); }
.wcepg-next-v-top .wcepg-carousel-next    { top: var( --wcepg-next-v-offset, -50px ); }
.wcepg-next-v-bottom .wcepg-carousel-next { bottom: var( --wcepg-next-v-offset, -50px ); }

.wcepg-carousel-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 14px;
}

.wcepg-carousel-dots .wcepg-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #ccc;
	cursor: pointer;
	border: none;
	padding: 0;
}

.wcepg-carousel-dots .wcepg-dot.wcepg-active {
	background: #222;
}

/* Per-device Arrows/Dots (responsive "Show Arrows" / "Show Dots" controls
   on CTSuite_Grid_Widget) — e.g. arrows on Desktop, Dots only on Mobile, so
   arrows never eat into mobile side-space. Same breakpoints ct-carousel.js
   itself uses for columns (≤767 mobile, 768–1024 tablet, ≥1025 desktop). */
@media (min-width: 1025px) {
	.wcepg-arrows-d-no .wcepg-carousel-arrow { display: none !important; }
	.wcepg-dots-d-no .wcepg-carousel-dots { display: none !important; }
}
@media (max-width: 1024px) and (min-width: 768px) {
	.wcepg-arrows-t-no .wcepg-carousel-arrow { display: none !important; }
	.wcepg-dots-t-no .wcepg-carousel-dots { display: none !important; }
}
@media (max-width: 767px) {
	.wcepg-arrows-m-no .wcepg-carousel-arrow { display: none !important; }
	.wcepg-dots-m-no .wcepg-carousel-dots { display: none !important; }
}

/* ===== Pagination ===== */
.wcepg-pagination {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 24px;
}

.wcepg-pagination a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 8px;
	border-radius: 4px;
	background: #f2f2f2;
	color: #333;
	text-decoration: none;
	font-size: 14px;
}

.wcepg-pagination a.wcepg-current {
	background: #222;
	color: #fff;
}

.wcepg-load-more-wrap {
	text-align: center;
	margin-top: 24px;
}

.wcepg-load-more-btn {
	padding: 12px 28px;
	background: #222;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
}

.wcepg-load-more-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

.wcepg-infinite-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	text-align: center;
	padding: 20px;
	color: #777;
	font-size: 14px;
}

.wcepg-spinner {
	width: 20px;
	height: 20px;
	border: 2px solid #dcdcdc;
	border-top-color: #222;
	border-radius: 50%;
	display: inline-block;
	animation: wcepg-spin 0.7s linear infinite;
}

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

.wcepg-infinite-end {
	text-align: center;
	padding: 18px;
	color: #999;
	font-size: 13px;
	font-style: italic;
}

.wcepg-no-products {
	text-align: center;
	padding: 40px 0;
	color: #777;
}

.wcepg-hidden {
	display: none !important;
}

/* ===== Responsive ===== */
/* Same breakpoints as grid.js / ct-carousel.js / the nav rules above:
   mobile ≤767, tablet 768–1024. (Mobile used to switch at 600px and tablet
   only covered 1–4 slides, so phones between 601–767px and "5/6 slides" on
   tablet / "3–6 slides" on mobile silently fell back to the wrong column count.) */
@media (max-width: 1024px) {
	.wcepg-layout-carousel[data-slides-tablet="1"] .wcepg-carousel-slide { --wcepg-cols: 1; }
	.wcepg-layout-carousel[data-slides-tablet="2"] .wcepg-carousel-slide { --wcepg-cols: 2; }
	.wcepg-layout-carousel[data-slides-tablet="3"] .wcepg-carousel-slide { --wcepg-cols: 3; }
	.wcepg-layout-carousel[data-slides-tablet="4"] .wcepg-carousel-slide { --wcepg-cols: 4; }
	.wcepg-layout-carousel[data-slides-tablet="5"] .wcepg-carousel-slide { --wcepg-cols: 5; }
	.wcepg-layout-carousel[data-slides-tablet="6"] .wcepg-carousel-slide { --wcepg-cols: 6; }
}

@media (max-width: 767px) {
	.wcepg-layout-carousel[data-slides-mobile="1"] .wcepg-carousel-slide { --wcepg-cols: 1; }
	.wcepg-layout-carousel[data-slides-mobile="2"] .wcepg-carousel-slide { --wcepg-cols: 2; }
	.wcepg-layout-carousel[data-slides-mobile="3"] .wcepg-carousel-slide { --wcepg-cols: 3; }
	.wcepg-layout-carousel[data-slides-mobile="4"] .wcepg-carousel-slide { --wcepg-cols: 4; }
	.wcepg-layout-carousel[data-slides-mobile="5"] .wcepg-carousel-slide { --wcepg-cols: 5; }
	.wcepg-layout-carousel[data-slides-mobile="6"] .wcepg-carousel-slide { --wcepg-cols: 6; }
}

/* ===== Equal Card Height (Elementor "Equal Card Height" switcher) =====
   Carousel: the track is a flex row so slides already stretch to the tallest
   one; the slide just has to pass that height down to the card.
   Grid: grid cells already stretch, the card only has to fill its cell.
   .wcepg-card-content is flex:1 and the add-to-cart button uses
   margin-top:auto, so price/buttons stay pinned to the bottom of each card. */
.wcepg-equal-h-yes .wcepg-carousel-track { align-items: stretch; }
.wcepg-equal-h-yes .wcepg-carousel-slide { display: flex; }
.wcepg-equal-h-yes .wcepg-carousel-slide > .wcepg-card { flex: 1 1 auto; width: 100%; min-width: 0; }
.wcepg-equal-h-yes .wcepg-grid:not(.wcepg-view-list) > .wcepg-card { height: 100%; }

/* ===== Click-to-expand video lightbox (shared with Card Grid / Product
   Carousel — see ctsuite-video-core.js CTSuiteVideo.openLightbox()). Kept
   here too since the CT Product Grid shortcode can load this stylesheet
   without ct-widgets.css also being present. ===== */
.ctsuite-video-lightbox { position: fixed; inset: 0; z-index: 100000; display: none; align-items: center; justify-content: center; padding: 16px; }
.ctsuite-video-lightbox.is-open { display: flex; }
.ctsuite-video-lightbox__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.85); }
.ctsuite-video-lightbox__box { position: relative; background: #000; z-index: 1; width: min(900px, 96vw); max-width: 96vw; aspect-ratio: 16/9; max-height: 92vh; }
.ctsuite-video-lightbox__body, .ctsuite-video-lightbox__body video, .ctsuite-video-lightbox__body iframe { width: 100%; height: 100%; border: 0; display: block; }
.ctsuite-video-lightbox__close { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; z-index: 2; display: flex; align-items: center; justify-content: center; }
.ctsuite-video-lightbox__close:hover { background: rgba(0,0,0,.85); }
body.ctsuite-video-lightbox-open { overflow: hidden; }

/* ===== Buttons-style sorting ("Sort & Filter" bar) + Shop by Style tiles =====
   Everything below only renders when the widget's "Sorting Style" is set to Buttons and/or
   "Show Shop by Style" is on - the classic dropdown toolbar above is untouched.
   Colours/sizes are CSS variables so the Elementor Style tab can override them. */
.wcepg-wrapper {
	--wcepg-sort-text: #b45309;
	--wcepg-sort-bg: #fffbeb;
	--wcepg-sort-border: #f4cf6b;
	--wcepg-sort-radius: 12px;
	--wcepg-style-accent: #7c3aed;
	--wcepg-style-bg: #f3e8ff;
	--wcepg-style-panel: #f8fafc;
	--wcepg-thumb: 56px;
}

.wcepg-wrapper.wcepg-is-loading .wcepg-grid {
	opacity: .45;
	transition: opacity .15s ease;
	pointer-events: none;
}

.wcepg-sortbar {
	margin-bottom: 16px;
}

.wcepg-sortbar-head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
}

.wcepg-sortbar-title {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #4b5563;
	white-space: nowrap;
}

.wcepg-sortbar-line {
	flex: 1 1 auto;
	height: 1px;
	background: #eceef2;
}

.wcepg-sortbar-head .wcepg-result-count {
	white-space: nowrap;
}

.wcepg-sortbar-head .wcepg-count-num {
	font-weight: 700;
	color: #1f4f8f;
}

.wcepg-sort-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.wcepg-wrapper .wcepg-sort-btn {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 10px 16px;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	color: #6b7280;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: var(--wcepg-sort-radius);
	box-shadow: none;
	cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.wcepg-wrapper .wcepg-sort-btn:hover,
.wcepg-wrapper .wcepg-sort-btn:focus {
	color: #374151;
	background: #fff;
	border-color: #d1d5db;
	box-shadow: none;
}

.wcepg-wrapper .wcepg-sort-btn:focus-visible {
	outline: 2px solid var(--wcepg-sort-border);
	outline-offset: 2px;
}

.wcepg-wrapper .wcepg-sort-btn.is-active,
.wcepg-wrapper .wcepg-sort-btn.is-active:hover,
.wcepg-wrapper .wcepg-sort-btn.is-active:focus {
	color: var(--wcepg-sort-text);
	background: var(--wcepg-sort-bg);
	border-color: var(--wcepg-sort-border);
}

.wcepg-wrapper .wcepg-sort-btn.is-active::after {
	content: "";
	width: 6px;
	height: 6px;
	margin-left: 2px;
	border-radius: 50%;
	background: var(--wcepg-sort-text);
}

.wcepg-sort-ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	line-height: 1;
}

.wcepg-sort-ico svg,
.wcepg-sort-ico i {
	width: 16px;
	height: 16px;
	font-size: 16px;
}

.wcepg-sort-ico img {
	display: block;
	width: 20px;
	height: 20px;
	object-fit: contain;
}

/* Shop by Style strip */
.wcepg-styles {
	margin-bottom: 20px;
	padding: 14px 16px 12px;
	background: var(--wcepg-style-panel);
	border: 1px solid #e8ebf0;
	border-radius: 14px;
}

.wcepg-styles-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
	font-size: 14px;
	font-weight: 600;
	color: #111827;
}

.wcepg-styles-title svg {
	color: #6b7280;
}

.wcepg-styles-list {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 2px 2px 6px;
	scrollbar-width: thin;
}

.wcepg-wrapper .wcepg-style-tile {
	-webkit-appearance: none;
	appearance: none;
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	min-width: calc(var(--wcepg-thumb) + 16px);
	margin: 0;
	padding: 6px;
	font: inherit;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	color: #374151;
	background: transparent;
	border: 0;
	border-radius: 14px;
	box-shadow: none;
	cursor: pointer;
	transition: background-color .15s ease;
}

.wcepg-wrapper .wcepg-style-tile:hover,
.wcepg-wrapper .wcepg-style-tile:focus {
	color: #374151;
	background: rgba(0, 0, 0, .04);
	box-shadow: none;
}

.wcepg-wrapper .wcepg-style-tile:focus-visible {
	outline: 2px solid var(--wcepg-style-accent);
	outline-offset: 1px;
}

.wcepg-wrapper .wcepg-style-tile.is-active,
.wcepg-wrapper .wcepg-style-tile.is-active:hover,
.wcepg-wrapper .wcepg-style-tile.is-active:focus {
	background: var(--wcepg-style-bg);
	color: var(--wcepg-style-accent);
}

.wcepg-style-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--wcepg-thumb);
	height: var(--wcepg-thumb);
	overflow: hidden;
	background: #e5e7eb;
	border-radius: 12px;
	box-sizing: border-box;
	border: 2px solid transparent;
}

.wcepg-style-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wcepg-style-thumb-all {
	background: #fff;
	color: #6b7280;
	border-color: #e5e7eb;
}

.wcepg-style-initial {
	font-size: calc(var(--wcepg-thumb) * .4);
	font-weight: 600;
	color: #6b7280;
}

.wcepg-style-tile.is-active .wcepg-style-thumb {
	border-color: var(--wcepg-style-accent);
}

.wcepg-style-tile.is-active .wcepg-style-thumb-all {
	color: var(--wcepg-style-accent);
}

.wcepg-style-name {
	font-size: 12px;
	font-weight: 500;
	max-width: calc(var(--wcepg-thumb) + 28px);
	text-align: center;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

@media (max-width: 767px) {
	.wcepg-sort-buttons {
		flex-wrap: nowrap;
		overflow-x: auto;
		padding-bottom: 4px;
		scrollbar-width: none;
	}

	.wcepg-sort-buttons::-webkit-scrollbar {
		display: none;
	}

	.wcepg-wrapper .wcepg-sort-btn {
		flex: 0 0 auto;
		white-space: nowrap;
		padding: 9px 14px;
	}

	.wcepg-wrapper {
		--wcepg-thumb: 48px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wcepg-wrapper .wcepg-sort-btn,
	.wcepg-wrapper .wcepg-style-tile,
	.wcepg-wrapper.wcepg-is-loading .wcepg-grid {
		transition: none;
	}
}
