/**
 * Shop page layout + product grid + filter sidebar + pagination.
 *
 * Loaded only on is_shop() / is_product_taxonomy() pages via the
 * framework's page-type asset loader.
 *
 * @package Woo_Specialist
 */

/* =========================================================================
   Page wrapper + hero
   ========================================================================= */

.wsp-shop {
	/* lives inside theme's .wst-container which handles max-width + padding */
	width: 100%;
}

.wsp-shop__hero {
	padding: var(--wsp-space-lg, 20px) 0 var(--wsp-space-md, 16px);
	text-align: center;
	border-bottom: 1px solid var(--wsp-color-border-light, #e5e5e5);
	margin-bottom: var(--wsp-space-lg, 20px);
}

.wsp-shop__hero-inner {
	max-width: 720px;
	margin: 0 auto;
}

.wsp-shop__breadcrumbs {
	font-size: var(--wsp-font-size-sm, 13px);
	color: var(--wsp-color-text-muted, #6e6e73);
	margin-bottom: var(--wsp-space-md, 12px);
}

.wsp-shop__breadcrumbs a {
	color: var(--wsp-color-text-muted, #6e6e73);
	text-decoration: none;
}

.wsp-shop__breadcrumbs a:hover {
	color: var(--wsp-color-text, #1d1d1f);
}

.wsp-shop__hero-title {
	font-size: clamp(28px, 4vw, 44px);
	font-weight: 600;
	color: var(--wsp-color-text, #1d1d1f);
	margin: 0 0 var(--wsp-space-md, 12px);
	line-height: 1.15;
	letter-spacing: -0.02em;
}

.wsp-shop__hero-description {
	font-size: var(--wsp-font-size-md, 15px);
	color: var(--wsp-color-text-muted, #6e6e73);
	line-height: 1.6;
}

.wsp-shop__hero-description p {
	margin: 0;
}

/* =========================================================================
   Layout — sidebar + main column
   ========================================================================= */

.wsp-shop__layout {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: var(--wsp-space-2xl, 48px);
	align-items: start;
}

.wsp-shop__layout--no-sidebar {
	grid-template-columns: 1fr;
}

.wsp-shop__sidebar {
	position: sticky;
	top: 100px;
	max-height: calc(100vh - 120px);
	overflow-y: auto;
	padding-right: var(--wsp-space-sm, 8px);
}

.wsp-shop__sidebar-header {
	display: none; /* only shown in mobile drawer mode */
	align-items: center;
	justify-content: space-between;
	padding-bottom: var(--wsp-space-md, 12px);
	border-bottom: 1px solid var(--wsp-color-border-light, #e5e5e5);
	margin-bottom: var(--wsp-space-lg, 20px);
}

.wsp-shop__sidebar-title {
	font-size: var(--wsp-font-size-lg, 18px);
	font-weight: 600;
	color: var(--wsp-color-text, #1d1d1f);
	margin: 0;
}

.wsp-shop__sidebar-close {
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	color: var(--wsp-color-text-muted, #6e6e73);
	cursor: pointer;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 150ms ease;
}

.wsp-shop__sidebar-close:hover {
	background: var(--wsp-color-bg-muted, #f5f5f7);
	color: var(--wsp-color-text, #1d1d1f);
}

.wsp-shop__sidebar-body {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.wsp-shop__sidebar-overlay {
	display: none;
}

/* Admin hint placeholder */
.wsp-shop__sidebar-empty {
	margin-top: var(--wsp-space-lg, 20px);
	padding: var(--wsp-space-lg, 20px);
	background: var(--wsp-color-bg-muted, #f5f5f7);
	border-radius: var(--wsp-radius-md, 8px);
	font-size: var(--wsp-font-size-sm, 13px);
	color: var(--wsp-color-text-muted, #6e6e73);
	line-height: 1.5;
}

/* WC filter widgets in sidebar also need top spacing now that body gap is 0 */
.wsp-shop__sidebar-body .wsp-shop-widget {
	margin-top: var(--wsp-space-lg, 20px);
}

/*
 * Hide tag-related widgets in the shop sidebar (added 2.18.8 per user
 * request — Tags add visual noise without adding much filtering value
 * for most catalogs). Covers the standard widget classes WP and WC use:
 * - .widget_tag_cloud — WP core's Tag Cloud widget
 * - .widget_product_tag_cloud — WC's Product Tag Cloud widget
 * - .wp-block-tag-cloud — Gutenberg block-based tag cloud
 * - .woocommerce-widget-layered-nav with product_tag attribute — rare,
 *   when a layered-nav widget has been configured to filter by tags
 *
 * If a different widget type is rendering tags in your sidebar, either
 * remove it from Appearance → Widgets, or extend the selector list here.
 */
.wsp-shop__sidebar-body .widget_tag_cloud,
.wsp-shop__sidebar-body .widget_product_tag_cloud,
.wsp-shop__sidebar-body .wp-block-tag-cloud,
.wsp-shop__sidebar-body .woocommerce-widget-layered-nav[data-attribute_name="product_tag"] {
	display: none;
}

.wsp-shop__sidebar-empty p {
	margin: 0 0 var(--wsp-space-sm, 8px);
}

.wsp-shop__sidebar-empty p:last-child {
	margin-bottom: 0;
}

.wsp-shop__sidebar-empty strong {
	color: var(--wsp-color-text, #1d1d1f);
	font-weight: 600;
}

.wsp-shop__sidebar-empty-link {
	color: var(--wsp-color-accent, #0071e3);
	text-decoration: none;
	font-weight: 500;
}

.wsp-shop__sidebar-empty-link:hover {
	text-decoration: underline;
}

.wsp-shop__sidebar-empty-note {
	font-size: 11px;
	font-style: italic;
	opacity: 0.7;
}

/* =========================================================================
   Widget styling overrides (filter widgets inside sidebar)
   ========================================================================= */

.wsp-shop-widget {
	border-bottom: 1px solid var(--wsp-color-border-light, #e5e5e5);
	padding-bottom: var(--wsp-space-lg, 20px);
}

.wsp-shop-widget:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.wsp-shop-widget__title {
	font-size: var(--wsp-font-size-md, 15px);
	font-weight: 600;
	color: var(--wsp-color-text, #1d1d1f);
	margin: 0 0 var(--wsp-space-md, 12px);
	letter-spacing: -0.01em;
}

/* WC Layered Nav (filter by attribute / category) */
.wsp-shop-widget ul.woocommerce-widget-layered-nav-list,
.wsp-shop-widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.wsp-shop-widget ul li {
	font-size: var(--wsp-font-size-sm, 13px);
	color: var(--wsp-color-text, #1d1d1f);
	padding: 4px 0;
}

.wsp-shop-widget ul li a {
	color: var(--wsp-color-text, #1d1d1f);
	text-decoration: none;
	padding: 4px 0;
	display: inline-block;
	transition: color 150ms ease;
}

.wsp-shop-widget ul li a:hover {
	color: var(--wsp-color-accent, #0071e3);
}

.wsp-shop-widget ul li.chosen a {
	color: var(--wsp-color-accent, #0071e3);
	font-weight: 500;
}

.wsp-shop-widget ul li.chosen a::before {
	content: '✓ ';
}

.wsp-shop-widget .count {
	color: var(--wsp-color-text-muted, #6e6e73);
	font-size: 12px;
	margin-left: 4px;
}

/* WC Price Filter */
.wsp-shop-widget.widget_price_filter .price_slider_wrapper {
	padding: var(--wsp-space-sm, 8px) 0;
}

.wsp-shop-widget.widget_price_filter .price_slider {
	height: 3px;
	background: var(--wsp-color-border, #d2d2d7);
	border-radius: 2px;
	position: relative;
	margin-bottom: var(--wsp-space-md, 12px);
}

.wsp-shop-widget.widget_price_filter .ui-slider-range {
	background: var(--wsp-color-accent, #0071e3);
	height: 3px;
	position: absolute;
	border-radius: 2px;
}

.wsp-shop-widget.widget_price_filter .ui-slider-handle {
	width: 16px;
	height: 16px;
	background: #ffffff;
	border: 2px solid var(--wsp-color-accent, #0071e3);
	border-radius: 50%;
	cursor: grab;
	top: -7px;
	margin-left: -8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.wsp-shop-widget.widget_price_filter .ui-slider-handle:active {
	cursor: grabbing;
}

.wsp-shop-widget.widget_price_filter .price_slider_amount {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: var(--wsp-font-size-sm, 13px);
	color: var(--wsp-color-text-muted, #6e6e73);
	padding-top: var(--wsp-space-sm, 8px);
}

.wsp-shop-widget.widget_price_filter .price_label {
	color: var(--wsp-color-text, #1d1d1f);
	font-weight: 500;
}

.wsp-shop-widget.widget_price_filter .button {
	margin-top: var(--wsp-space-sm, 8px);
	padding: 8px 16px;
	font-size: 13px;
	background: var(--wsp-color-text, #1d1d1f);
	color: #ffffff;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: background 150ms ease;
}

.wsp-shop-widget.widget_price_filter .button:hover {
	background: #000000;
}

/* Active filters */
.wsp-shop-widget.woocommerce-widget-layered-nav-filters ul {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.wsp-shop-widget.woocommerce-widget-layered-nav-filters li {
	padding: 0;
}

.wsp-shop-widget.woocommerce-widget-layered-nav-filters li a {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 10px;
	background: var(--wsp-color-bg-muted, #f5f5f7);
	border-radius: 14px;
	font-size: 12px;
	color: var(--wsp-color-text, #1d1d1f);
}

.wsp-shop-widget.woocommerce-widget-layered-nav-filters li a::before {
	content: '×';
	font-size: 16px;
	line-height: 1;
	color: var(--wsp-color-text-muted, #6e6e73);
}

.wsp-shop-widget.woocommerce-widget-layered-nav-filters li a:hover {
	background: var(--wsp-color-border-light, #e5e5e5);
}

/* =========================================================================
   Main column + toolbar
   ========================================================================= */

.wsp-shop__main {
	min-width: 0; /* prevent grid blowout */
}

.wsp-shop__toolbar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding: var(--wsp-space-md, 12px) 0;
	border-bottom: 1px solid var(--wsp-color-border-light, #e5e5e5);
	margin-bottom: var(--wsp-space-xl, 32px);
	gap: var(--wsp-space-md, 12px);
}

.wsp-shop__filter-toggle {
	display: none; /* shown only on mobile */
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	background: #ffffff;
	border: 1px solid var(--wsp-color-border, #d2d2d7);
	border-radius: 20px;
	font-size: 13px;
	font-weight: 500;
	color: var(--wsp-color-text, #1d1d1f);
	cursor: pointer;
	margin-right: auto;
	transition: background 150ms ease, border-color 150ms ease;
}

.wsp-shop__filter-toggle:hover {
	background: var(--wsp-color-bg-muted, #f5f5f7);
	border-color: var(--wsp-color-text, #1d1d1f);
}

.wsp-shop__filter-toggle-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: var(--wsp-color-accent, #0071e3);
	color: #ffffff;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
}

.wsp-shop__filter-toggle-count[hidden] {
	display: none;
}

.wsp-shop__toolbar-sort form.woocommerce-ordering {
	margin: 0;
}

.wsp-shop__toolbar-sort select.orderby {
	padding: 8px 32px 8px 14px;
	background: #ffffff;
	border: 1px solid var(--wsp-color-border, #d2d2d7);
	border-radius: 20px;
	font-size: 13px;
	color: var(--wsp-color-text, #1d1d1f);
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	transition: border-color 150ms ease;
}

.wsp-shop__toolbar-sort select.orderby:hover,
.wsp-shop__toolbar-sort select.orderby:focus {
	border-color: var(--wsp-color-text, #1d1d1f);
	outline: none;
}

/* =========================================================================
   Product grid (overrides WC's ul.products)
   ========================================================================= */

.wsp-shop__main ul.products {
	display: grid;
	grid-template-columns: repeat(3, 1fr); /* default / fallback */
	gap: var(--wsp-space-xl, 32px);
	list-style: none;
	margin: 0 0 var(--wsp-space-2xl, 48px);
	padding: 0;
}

.wsp-shop__main--cols-2 ul.products {
	grid-template-columns: repeat(2, 1fr);
}

.wsp-shop__main--cols-3 ul.products {
	grid-template-columns: repeat(3, 1fr);
}

.wsp-shop__main--cols-4 ul.products {
	grid-template-columns: repeat(4, 1fr);
}

/* WC applies clearfix pseudo-elements for its float layout. In a grid
   context these become phantom cells that push the first item to col 2. */
.wsp-shop__main ul.products::before,
.wsp-shop__main ul.products::after {
	content: none !important;
	display: none !important;
}

/* Override WC's default float/width percentages on .product items so
   the grid can lay them out at 1fr. High specificity required because
   WC's core CSS uses .woocommerce ul.products li.product. */
.wsp-shop__main ul.products li.product,
.woocommerce ul.products li.wsp-product-card {
	float: none !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	clear: none !important;
}

/* =========================================================================
   Product card
   ========================================================================= */

.wsp-product-card {
	position: relative;
	display: flex;
	flex-direction: column;
	transition: transform 200ms cubic-bezier(0.25, 0.1, 0.25, 1);
	list-style: none;
}

.wsp-product-card::before,
.wsp-product-card::after {
	display: none; /* suppress any WC default pseudo-elements */
}

.wsp-product-card__link {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	border-radius: var(--wsp-radius-md, 12px);
}

.wsp-product-card__link:focus-visible {
	outline: 2px solid var(--wsp-color-accent, #0071e3);
	outline-offset: 4px;
}

.wsp-product-card__image-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	background: var(--wsp-color-bg-muted, #f5f5f7);
	border-radius: var(--wsp-radius-md, 12px);
	overflow: hidden;
	margin-bottom: var(--wsp-space-md, 12px);
	transition: transform 200ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

.wsp-product-card__image,
.wsp-product-card__image-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wsp-product-card__image--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
}

.wsp-product-card__image--placeholder::before {
	content: '';
	width: 36px;
	height: 36px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3Cpolyline points='3.27 6.96 12 12.01 20.73 6.96'/%3E%3Cline x1='12' y1='22.08' x2='12' y2='12'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	opacity: 0.4;
}

.wsp-product-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 4px 10px;
	background: var(--wsp-color-text, #1d1d1f);
	color: #ffffff;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	border-radius: 12px;
	z-index: 1;
}

.wsp-product-card__badge--sale {
	background: #d7263d;
}

.wsp-product-card__badge--oos {
	background: var(--wsp-color-text-muted, #6e6e73);
}

/* Dim OOS products slightly */
.wsp-product-card.outofstock .wsp-product-card__image-wrap {
	opacity: 0.6;
}

.wsp-product-card.outofstock .wsp-product-card__name,
.wsp-product-card.outofstock .wsp-product-card__price {
	color: var(--wsp-color-text-muted, #6e6e73);
}

.wsp-product-card__info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 0 4px;
}

.wsp-product-card__name {
	font-size: var(--wsp-font-size-md, 15px);
	font-weight: 500;
	color: var(--wsp-color-text, #1d1d1f);
	margin: 0;
	line-height: 1.35;
	letter-spacing: -0.01em;
}

.wsp-product-card__price {
	font-size: var(--wsp-font-size-sm, 13px);
	color: var(--wsp-color-text, #1d1d1f);
	font-weight: 400;
}

.wsp-product-card__price del {
	color: var(--wsp-color-text-muted, #6e6e73);
	font-weight: 400;
	margin-right: 6px;
}

.wsp-product-card__price ins {
	background: transparent;
	color: #d7263d;
	font-weight: 600;
	text-decoration: none;
}

/* =========================================================================
   Wave 1 — Star rating on card
   ========================================================================= */

.wsp-product-card__rating {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: var(--wsp-font-size-xs, 12px);
	color: var(--wsp-color-text-muted, #6e6e73);
	line-height: 1;
}

.wsp-stars {
	position: relative;
	display: inline-block;
	line-height: 1;
	font-size: 13px;
	letter-spacing: 1px;
	color: var(--wsp-color-border, #d2d2d7);
	--wsp-rating: 0%;
}

.wsp-stars__bg,
.wsp-stars__fill {
	display: inline-block;
}

.wsp-stars__fill {
	position: absolute;
	inset: 0;
	overflow: hidden;
	width: var(--wsp-rating);
	color: #f5a623;
	white-space: nowrap;
}

.wsp-product-card__rating-count {
	font-size: 11px;
}

/* =========================================================================
   Wave 1 — Sale countdown badge
   ========================================================================= */

.wsp-product-card__countdown {
	display: inline-block;
	padding: 3px 8px;
	background: rgba(215, 38, 61, 0.08);
	color: #d7263d;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.2;
	border-radius: 4px;
	letter-spacing: 0.01em;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* =========================================================================
   Wave 1 — Hover image swap (desktop only)
   ========================================================================= */

.wsp-product-card__image-wrap {
	position: relative;
}

.wsp-product-card__image--alt {
	position: absolute !important;
	inset: 0;
	opacity: 0;
	transition: opacity 300ms ease;
	z-index: 1;
	pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
	.wsp-product-card:hover .wsp-product-card__image--alt {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wsp-product-card__image--alt {
		transition: none;
	}
}

/* =========================================================================
   Wave 1 — Skeleton loader (infrastructure for Wave 5)
   ========================================================================= */

.wsp-product-card--skeleton {
	pointer-events: none;
}

.wsp-product-card--skeleton .wsp-product-card__image-wrap,
.wsp-product-card--skeleton .wsp-product-card__name,
.wsp-product-card--skeleton .wsp-product-card__price {
	background: linear-gradient(90deg,
		var(--wsp-color-bg-muted, #f5f5f7) 0%,
		var(--wsp-color-border-light, #e5e5e5) 50%,
		var(--wsp-color-bg-muted, #f5f5f7) 100%);
	background-size: 200% 100%;
	animation: wspSkeletonShimmer 1.4s ease-in-out infinite;
	color: transparent !important;
	border-radius: 6px;
}

.wsp-product-card--skeleton .wsp-product-card__name {
	height: 14px;
	width: 75%;
	margin-top: 10px;
}

.wsp-product-card--skeleton .wsp-product-card__price {
	height: 12px;
	width: 40%;
	margin-top: 6px;
}

.wsp-product-card--skeleton .wsp-product-card__image-wrap {
	aspect-ratio: 1 / 1;
}

.wsp-product-card--skeleton .wsp-product-card__image-wrap::before {
	display: none;
}

@keyframes wspSkeletonShimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
	.wsp-product-card--skeleton .wsp-product-card__image-wrap,
	.wsp-product-card--skeleton .wsp-product-card__name,
	.wsp-product-card--skeleton .wsp-product-card__price {
		animation: none;
	}
}

/* =========================================================================
   Wave 1 — Empty filter state
   ========================================================================= */

.wsp-shop__empty-state {
	grid-column: 1 / -1;
	text-align: center;
	padding: var(--wsp-space-2xl, 48px) var(--wsp-space-lg, 20px);
}

.wsp-shop__empty-state-icon {
	color: var(--wsp-color-text-muted, #6e6e73);
	margin-bottom: var(--wsp-space-md, 12px);
	opacity: 0.6;
}

.wsp-shop__empty-state-title {
	font-size: var(--wsp-font-size-xl, 20px);
	font-weight: 600;
	color: var(--wsp-color-text, #1d1d1f);
	margin: 0 0 var(--wsp-space-sm, 8px);
}

.wsp-shop__empty-state-text {
	color: var(--wsp-color-text-muted, #6e6e73);
	margin: 0 0 var(--wsp-space-lg, 20px);
	font-size: var(--wsp-font-size-sm, 13px);
}

.wsp-shop__empty-state-clear {
	display: inline-block;
	padding: 10px 20px;
	background: var(--wsp-color-text, #1d1d1f);
	color: #ffffff;
	border-radius: var(--wsp-radius-md, 8px);
	text-decoration: none;
	font-size: var(--wsp-font-size-sm, 13px);
	font-weight: 500;
	transition: background 150ms ease;
}

.wsp-shop__empty-state-clear:hover {
	background: #000000;
	color: #ffffff;
}

.wsp-shop__empty-state-fallback {
	margin-top: var(--wsp-space-2xl, 48px);
	padding-top: var(--wsp-space-xl, 32px);
	border-top: 1px solid var(--wsp-color-border-light, #e5e5e5);
}

.wsp-shop__empty-state-fallback-title {
	font-size: var(--wsp-font-size-md, 15px);
	font-weight: 600;
	color: var(--wsp-color-text, #1d1d1f);
	margin: 0 0 var(--wsp-space-lg, 20px);
}

.wsp-shop__empty-state-products {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--wsp-space-lg, 20px);
	list-style: none;
	margin: 0 auto;
	padding: 0;
	max-width: 720px;
}

.wsp-shop__empty-state-products::before,
.wsp-shop__empty-state-products::after {
	content: none !important;
	display: none !important;
}

.wsp-shop__empty-state-products li.product {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
}

@media (max-width: 640px) {
	.wsp-shop__empty-state-products {
		grid-template-columns: 1fr;
	}
}

/* =========================================================================
   Wave 2 — Category pill navigation
   ========================================================================= */

/* Sidebar category pills — vertical list with heading */
.wsp-shop__pills--sidebar {
	padding: var(--wsp-space-lg, 20px) 0;
	border-bottom: 1px solid var(--wsp-color-border-light, #e5e5e5);
}

.wsp-shop__pills-heading {
	font-size: 13px;
	font-weight: 600;
	color: var(--wsp-color-text, #1d1d1f);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin: 0 0 var(--wsp-space-sm, 10px);
}

.wsp-shop__pills-list {
	display: flex;
	flex-direction: column;
	gap: 2px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.wsp-shop__pills-item {
	flex: 0 0 auto;
}

.wsp-shop__pill {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 10px;
	background: transparent;
	border: none;
	border-radius: var(--wsp-radius-sm, 6px);
	font-size: 14px;
	font-weight: 400;
	color: var(--wsp-color-text, #1d1d1f);
	text-decoration: none;
	transition: background 150ms ease, color 150ms ease;
}

.wsp-shop__pill:hover {
	background: var(--wsp-color-bg-muted, #f5f5f7);
}

.wsp-shop__pill.is-active {
	background: var(--wsp-color-bg-muted, #f5f5f7);
	font-weight: 600;
	color: var(--wsp-color-text, #1d1d1f);
}

.wsp-shop__pill:focus-visible {
	outline: 2px solid var(--wsp-color-accent, #0071e3);
	outline-offset: 2px;
}

.wsp-shop__pill-count {
	font-size: 12px;
	color: var(--wsp-color-text-muted, #6e6e73);
	font-weight: 400;
}

.wsp-shop__pill-label {
	flex: 1 1 auto;
}

.wsp-shop__pill-swatch {
	display: inline-block;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--wsp-swatch-color, #d2d2d7);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
	flex-shrink: 0;
	margin-right: 8px;
}

/* Sidebar result count — shares the same row height as .wsp-shop__toolbar
   so the bottom borders form one continuous horizontal line. */
/* Keep the sidebar count row the same height as .wsp-shop__toolbar
   so the bottom borders form one continuous horizontal line. */
.wsp-shop__sidebar-count {
	display: flex;
	align-items: center;
	box-sizing: border-box;
	min-height: 66px;
	padding: var(--wsp-space-md, 12px) 0;
	margin-bottom: 0;
	border-bottom: 1px solid var(--wsp-color-border-light, #e5e5e5);
}

.wsp-shop__sidebar-count .woocommerce-result-count {
	margin: 0;
	padding: 0;
	font-size: 13px;
	color: var(--wsp-color-text-muted, #6e6e73);
}

/* =========================================================================
   Wave 2 — View toggle (grid / list)
   ========================================================================= */

.wsp-shop__toolbar-view {
	display: inline-flex;
	gap: 4px;
	padding: 2px;
	background: var(--wsp-color-bg-muted, #f5f5f7);
	border-radius: 20px;
}

.wsp-shop__view-btn {
	width: 30px;
	height: 28px;
	border: none;
	background: transparent;
	color: var(--wsp-color-text-muted, #6e6e73);
	border-radius: 18px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 150ms ease, color 150ms ease;
}

.wsp-shop__view-btn:hover {
	color: var(--wsp-color-text, #1d1d1f);
}

.wsp-shop__view-btn.is-active {
	background: #ffffff;
	color: var(--wsp-color-text, #1d1d1f);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.wsp-shop__view-btn:focus-visible {
	outline: 2px solid var(--wsp-color-accent, #0071e3);
	outline-offset: 2px;
}

/* =========================================================================
   Wave 2 — List view layout
   ========================================================================= */

.wsp-shop__main--list ul.products {
	display: flex !important;
	flex-direction: column;
	gap: var(--wsp-space-md, 12px);
}

.wsp-shop__main--list ul.products li.product {
	display: flex !important;
	flex-direction: row !important;
	align-items: center;
	gap: var(--wsp-space-lg, 20px);
	padding: var(--wsp-space-md, 12px);
	background: #ffffff;
	border: 1px solid var(--wsp-color-border-light, #e5e5e5);
	border-radius: var(--wsp-radius-md, 8px);
	transition: border-color 150ms ease, box-shadow 150ms ease;
}

.wsp-shop__main--list ul.products li.product:hover {
	border-color: var(--wsp-color-border, #d2d2d7);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Keep the link as a proper focusable/semantic element — spans image +
   info via flex layout instead of display:contents (which breaks
   screen reader detection of the link). */
.wsp-shop__main--list .wsp-product-card__link {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: var(--wsp-space-lg, 20px);
	flex: 1 1 auto;
	min-width: 0;
}

.wsp-shop__main--list .wsp-product-card__image-wrap {
	width: 120px;
	flex-shrink: 0;
	aspect-ratio: 1 / 1;
	margin-bottom: 0;
}

.wsp-shop__main--list .wsp-product-card__info {
	flex: 1 1 auto;
	padding: 0;
	min-width: 0;
	text-align: left;
}

.wsp-shop__main--list .wsp-product-card__name {
	font-size: var(--wsp-font-size-md, 15px);
	margin-bottom: 4px;
}

.wsp-shop__main--list .wsp-product-card__price {
	font-size: var(--wsp-font-size-sm, 13px);
	font-weight: 400;
	color: var(--wsp-color-text-muted, #6e6e73);
}

.wsp-shop__main--list .wsp-product-card__add-btn {
	position: static;
	opacity: 1;
	transform: none;
	grid-column: 3;
	align-self: center;
}

.wsp-shop__main--list .wsp-product-card__quick-view {
	position: static;
	opacity: 1;
	transform: none;
	order: -1;
	align-self: center;
	width: 28px;
	height: 28px;
	box-shadow: none;
	border: 1px solid var(--wsp-color-border-light, #e5e5e5);
}

.wsp-shop__main--list .wsp-product-card:hover .wsp-product-card__image-wrap {
	transform: none;
}

@media (max-width: 480px) {
	.wsp-shop__main--list ul.products li.product {
		gap: var(--wsp-space-md, 12px);
	}

	.wsp-shop__main--list .wsp-product-card__link {
		gap: var(--wsp-space-md, 12px);
	}

	.wsp-shop__main--list .wsp-product-card__image-wrap {
		width: 80px;
	}
}

/* =========================================================================
   Wave 2 — Sticky mobile filter FAB
   ========================================================================= */

.wsp-shop__filter-fab {
	display: none;
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--wsp-color-text, #1d1d1f);
	color: #ffffff;
	border: none;
	cursor: pointer;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
	z-index: 999;
	transition: transform 200ms ease, opacity 200ms ease;
	opacity: 0;
	transform: translateY(16px);
}

.wsp-shop__filter-fab[hidden] {
	display: none;
}

.wsp-shop__filter-fab.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.wsp-shop__filter-fab:focus-visible {
	outline: 2px solid var(--wsp-color-accent, #0071e3);
	outline-offset: 2px;
}

.wsp-shop__filter-fab-count {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 10px;
	background: var(--wsp-color-accent, #0071e3);
	color: #ffffff;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.wsp-shop__filter-fab-count[hidden] {
	display: none;
}

@media (max-width: 768px) {
	.wsp-shop__filter-fab:not([hidden]) {
		display: inline-flex;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wsp-shop__filter-fab {
		transition: opacity 0s;
	}
}

/* =========================================================================
   Wave 1 — Search results banner
   ========================================================================= */

.wsp-shop__search-banner {
	display: flex;
	align-items: center;
	gap: var(--wsp-space-sm, 8px);
	padding: var(--wsp-space-sm, 8px) var(--wsp-space-md, 12px);
	background: var(--wsp-color-bg-muted, #f5f5f7);
	border-radius: var(--wsp-radius-md, 8px);
	margin-bottom: var(--wsp-space-md, 12px);
	font-size: var(--wsp-font-size-sm, 13px);
	color: var(--wsp-color-text, #1d1d1f);
}

.wsp-shop__search-banner-label {
	color: var(--wsp-color-text-muted, #6e6e73);
}

.wsp-shop__search-banner-term {
	font-weight: 600;
	flex: 1 1 auto;
}

.wsp-shop__search-banner-clear {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	color: var(--wsp-color-text-muted, #6e6e73);
	text-decoration: none;
	transition: background 150ms ease, color 150ms ease;
}

.wsp-shop__search-banner-clear:hover {
	background: var(--wsp-color-border-light, #e5e5e5);
	color: var(--wsp-color-text, #1d1d1f);
}

.wsp-product-card__add-btn {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #ffffff;
	color: var(--wsp-color-text, #1d1d1f);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	opacity: 0;
	transform: translateY(-4px);
	transition: opacity 200ms ease, transform 200ms ease, background 150ms ease;
	z-index: 2;
	text-decoration: none;
}

.wsp-product-card__add-btn:hover {
	background: var(--wsp-color-text, #1d1d1f);
	color: #ffffff;
}

.wsp-product-card__add-btn.is-loading {
	pointer-events: none;
	opacity: 0.6 !important;
}

.wsp-product-card__add-btn.is-added {
	background: #059669;
	color: #ffffff;
}

/* Error tooltip shown under add-to-cart button on failure */
.wsp-product-card__error {
	position: absolute;
	top: 56px;
	right: 12px;
	max-width: calc(100% - 24px);
	padding: 6px 10px;
	background: #dc2626;
	color: #ffffff;
	font-size: 11px;
	line-height: 1.3;
	border-radius: 6px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
	z-index: 3;
	animation: wspCardErrorIn 200ms ease both;
}

@keyframes wspCardErrorIn {
	from { opacity: 0; transform: translateY(-4px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Desktop hover: lift image + reveal add button */
@media (hover: hover) and (pointer: fine) {
	.wsp-product-card:hover .wsp-product-card__image-wrap {
		transform: translateY(-2px);
	}

	.wsp-product-card:hover .wsp-product-card__add-btn {
		opacity: 1;
		transform: translateY(0);
	}
}

.wsp-product-card__add-btn:focus-visible {
	opacity: 1;
	transform: translateY(0);
	outline: 2px solid var(--wsp-color-accent, #0071e3);
	outline-offset: 2px;
}

.wsp-product-card__add-btn--swatch-pending[disabled] {
	cursor: not-allowed;
	opacity: 0.5;
}

.wsp-product-card__add-btn--swatch-pending[disabled]:hover {
	background: #ffffff;
	color: var(--wsp-color-text, #1d1d1f);
}

/* =========================================================================
   Wave 3 — Variant swatches on cards
   ========================================================================= */

.wsp-product-card__swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	margin: 4px var(--wsp-space-md, 16px) var(--wsp-space-md, 16px);
	min-height: 26px;
}

.wsp-swatch {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--wsp-color-border, #d2d2d7);
	background: #ffffff;
	color: var(--wsp-color-text, #1d1d1f);
	font-size: 11px;
	font-weight: 500;
	line-height: 1;
	padding: 0;
	cursor: pointer;
	border-radius: 4px;
	transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
	text-decoration: none;
}

.wsp-swatch--color {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	padding: 2px;
}

.wsp-swatch__dot {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: var(--wsp-swatch-color, #d2d2d7);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.wsp-swatch--text {
	min-width: 28px;
	height: 22px;
	padding: 0 8px;
}

.wsp-swatch--more {
	min-width: 28px;
	height: 22px;
	padding: 0 6px;
	color: var(--wsp-color-text-muted, #6e6e73);
	background: var(--wsp-color-bg-muted, #f5f5f7);
	border-color: transparent;
	font-size: 11px;
}

.wsp-swatch:hover {
	border-color: var(--wsp-color-text, #1d1d1f);
}

.wsp-swatch.is-active {
	border-color: var(--wsp-color-text, #1d1d1f);
	border-width: 2px;
	padding: 1px;
}

.wsp-swatch.is-active.wsp-swatch--text {
	padding: 0 7px;
}

.wsp-swatch--oos {
	opacity: 0.5;
	cursor: not-allowed;
	position: relative;
}

.wsp-swatch--oos::after {
	content: "";
	position: absolute;
	inset: 50% 2px auto 2px;
	height: 1px;
	background: var(--wsp-color-text, #1d1d1f);
	opacity: 0.5;
	transform: rotate(-20deg);
}

.wsp-swatch:focus-visible {
	outline: 2px solid var(--wsp-color-accent, #0071e3);
	outline-offset: 2px;
}

/* List view: align swatches to the left edge, below the price */
.wsp-shop__main--list .wsp-product-card__swatches {
	margin: 4px 0 0;
}

/* =========================================================================
   Wave 3 — Quick-view button on cards
   ========================================================================= */

.wsp-product-card__quick-view {
	position: absolute;
	top: 12px;
	left: 12px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #ffffff;
	color: var(--wsp-color-text, #1d1d1f);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	opacity: 0;
	transform: translateY(-4px);
	transition: opacity 200ms ease, transform 200ms ease, background 150ms ease;
	z-index: 2;
}

.wsp-product-card__quick-view:hover {
	background: var(--wsp-color-text, #1d1d1f);
	color: #ffffff;
}

.wsp-product-card__quick-view.is-loading {
	pointer-events: none;
	opacity: 0.6 !important;
}

@media (hover: hover) and (pointer: fine) {
	.wsp-product-card:hover .wsp-product-card__quick-view {
		opacity: 1;
		transform: translateY(0);
	}
}

.wsp-product-card__quick-view:focus-visible {
	opacity: 1;
	transform: translateY(0);
	outline: 2px solid var(--wsp-color-accent, #0071e3);
	outline-offset: 2px;
}

@media (max-width: 768px) {
	.wsp-product-card__quick-view {
		opacity: 1;
		transform: translateY(0);
	}
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* =========================================================================
   Wave 3 — Quick-view modal
   ========================================================================= */

.wsp-quick-view {
	position: fixed;
	inset: 0;
	z-index: 1200;
	display: none;
	align-items: center;
	justify-content: center;
}

.wsp-quick-view.is-open {
	display: flex;
}

.wsp-quick-view__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	opacity: 0;
	transition: opacity 250ms ease;
}

.wsp-quick-view.is-open .wsp-quick-view__overlay {
	opacity: 1;
}

.wsp-quick-view__dialog {
	position: relative;
	width: 100%;
	max-width: 920px;
	max-height: calc(100vh - 40px);
	margin: 20px;
	background: #ffffff;
	border-radius: var(--wsp-radius-lg, 12px);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	overflow: auto;
	transform: translateY(12px) scale(0.98);
	opacity: 0;
	transition: transform 250ms ease, opacity 250ms ease;
}

.wsp-quick-view.is-open .wsp-quick-view__dialog {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.wsp-quick-view__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #ffffff;
	color: var(--wsp-color-text, #1d1d1f);
	border: 1px solid var(--wsp-color-border-light, #e5e5e5);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.wsp-quick-view__close:hover {
	background: var(--wsp-color-text, #1d1d1f);
	color: #ffffff;
	border-color: var(--wsp-color-text, #1d1d1f);
}

.wsp-quick-view__close:focus-visible {
	outline: 2px solid var(--wsp-color-accent, #0071e3);
	outline-offset: 2px;
}

.wsp-quick-view__content {
	padding: var(--wsp-space-xl, 32px);
	min-height: 200px;
}

.wsp-quick-view__loading {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 200px;
}

.wsp-quick-view__spinner {
	width: 32px;
	height: 32px;
	border: 3px solid var(--wsp-color-border, #d2d2d7);
	border-top-color: var(--wsp-color-text, #1d1d1f);
	border-radius: 50%;
	animation: wspQvSpin 700ms linear infinite;
}

@keyframes wspQvSpin {
	to { transform: rotate(360deg); }
}

body.wsp-quick-view-open {
	overflow: hidden;
}

/* -------------------- Quick-view fragment (inner) -------------------- */

.wsp-qv {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--wsp-space-xl, 32px);
}

.wsp-qv__gallery {
	display: flex;
	flex-direction: column;
	gap: var(--wsp-space-md, 12px);
}

.wsp-qv__image {
	width: 100%;
	height: auto;
	border-radius: var(--wsp-radius-lg, 12px);
	display: block;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	background: var(--wsp-color-bg-muted, #f5f5f7);
}

.wsp-qv__image--placeholder {
	background: var(--wsp-color-bg-muted, #f5f5f7);
	display: flex;
	align-items: center;
	justify-content: center;
}

.wsp-qv__image--placeholder::after {
	content: "";
	width: 48px;
	height: 48px;
	background: var(--wsp-color-border, #d2d2d7);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='m21 15-5-5L5 21'/%3E%3C/svg%3E") center/contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='m21 15-5-5L5 21'/%3E%3C/svg%3E") center/contain no-repeat;
	opacity: 0.4;
}

.wsp-qv__thumbs {
	display: flex;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.wsp-qv__thumbs li {
	flex: 0 0 auto;
}

.wsp-qv__thumb {
	width: 60px;
	height: 60px;
	border-radius: 6px;
	object-fit: cover;
	border: 1px solid var(--wsp-color-border-light, #e5e5e5);
}

.wsp-qv__info {
	display: flex;
	flex-direction: column;
	gap: var(--wsp-space-md, 12px);
}

.wsp-qv__title {
	font-size: var(--wsp-font-size-xl, 24px);
	font-weight: 600;
	margin: 0;
	padding-right: 48px; /* avoid overlap with close btn */
	color: var(--wsp-color-text, #1d1d1f);
}

.wsp-qv__rating {
	display: flex;
	align-items: center;
	gap: 8px;
}

.wsp-qv__rating-count {
	font-size: 13px;
	color: var(--wsp-color-text-muted, #6e6e73);
}

.wsp-qv__price {
	font-size: var(--wsp-font-size-lg, 18px);
	font-weight: 500;
	color: var(--wsp-color-text, #1d1d1f);
	padding-bottom: var(--wsp-space-md, 12px);
	border-bottom: 1px solid var(--wsp-color-border-light, #e5e5e5);
}

.wsp-qv__price del {
	color: var(--wsp-color-text-muted, #6e6e73);
	font-weight: 400;
	margin-right: 8px;
}

.wsp-qv__price ins {
	text-decoration: none;
}

.wsp-qv__desc {
	font-size: var(--wsp-font-size-sm, 14px);
	line-height: 1.6;
	color: var(--wsp-color-text-muted, #6e6e73);
}

.wsp-qv__desc p:last-child {
	margin-bottom: 0;
}

.wsp-qv__oos {
	padding: 10px 14px;
	background: var(--wsp-color-bg-muted, #f5f5f7);
	color: var(--wsp-color-text-muted, #6e6e73);
	border-radius: 6px;
	font-size: 13px;
	margin: 0;
}

.wsp-qv__form {
	padding: var(--wsp-space-lg, 20px);
	background: var(--wsp-color-bg-muted, #f5f5f7);
	border-radius: var(--wsp-radius-md, 8px);
}

.wsp-qv__variations {
	width: 100%;
	border-collapse: collapse;
}

.wsp-qv__variations td {
	padding: 8px 0;
	vertical-align: middle;
}

.wsp-qv__variations td:first-child {
	font-size: 13px;
	font-weight: 600;
	color: var(--wsp-color-text, #1d1d1f);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding-right: 16px;
	width: 60px;
}

.wsp-qv__variations select {
	width: 100%;
	padding: 10px 36px 10px 14px;
	border: 1px solid var(--wsp-color-border, #d2d2d7);
	border-radius: 20px;
	background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") right 12px center/12px no-repeat;
	font-size: 14px;
	color: var(--wsp-color-text, #1d1d1f);
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	cursor: pointer;
	transition: border-color 150ms ease;
}

.wsp-qv__variations select:focus {
	outline: none;
	border-color: var(--wsp-color-accent, #0071e3);
}

.wsp-qv__add-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 14px 24px;
	background: var(--wsp-color-text, #1d1d1f);
	color: #ffffff;
	border: none;
	border-radius: 24px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: background 150ms ease, opacity 150ms ease, transform 100ms ease;
	min-height: 48px;
	margin-top: 4px;
}

.wsp-qv__add-btn:hover:not([disabled]) {
	background: var(--wsp-color-accent, #0071e3);
	transform: translateY(-1px);
}

.wsp-qv__add-btn[disabled] {
	background: var(--wsp-color-border, #d2d2d7);
	color: var(--wsp-color-text-muted, #6e6e73);
	cursor: not-allowed;
}

.wsp-qv__add-btn.is-loading {
	pointer-events: none;
	opacity: 0.7;
}

.wsp-qv__add-btn.is-added {
	background: #059669;
}

.wsp-qv__view-full {
	display: block;
	text-align: center;
	font-size: 13px;
	color: var(--wsp-color-accent, #0071e3);
	text-decoration: none;
	margin-top: var(--wsp-space-md, 12px);
	padding: 8px;
}

.wsp-qv__view-full:hover {
	text-decoration: underline;
}

.wsp-qv__error {
	padding: 8px 12px;
	background: #fee2e2;
	color: #991b1b;
	border-radius: 6px;
	font-size: 13px;
}

@media (max-width: 768px) {
	.wsp-quick-view__dialog {
		margin: 10px;
		max-height: calc(100vh - 20px);
	}

	.wsp-quick-view__content {
		padding: var(--wsp-space-lg, 20px);
	}

	.wsp-qv {
		grid-template-columns: 1fr;
		gap: var(--wsp-space-lg, 20px);
	}

	.wsp-qv__title {
		font-size: var(--wsp-font-size-lg, 18px);
	}
}

/* =========================================================================
   Pagination
   ========================================================================= */

.woocommerce-pagination {
	display: flex;
	justify-content: center;
	padding: var(--wsp-space-xl, 32px) 0;
}

.woocommerce-pagination ul.page-numbers {
	display: flex;
	align-items: center;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
	border: none;
}

.woocommerce-pagination ul.page-numbers li {
	margin: 0;
	border: none;
}

.woocommerce-pagination .page-numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border-radius: 8px;
	background: transparent;
	color: var(--wsp-color-text, #1d1d1f);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: background 150ms ease, color 150ms ease;
}

.woocommerce-pagination .page-numbers:hover {
	background: var(--wsp-color-bg-muted, #f5f5f7);
}

.woocommerce-pagination .page-numbers.current {
	background: var(--wsp-color-text, #1d1d1f);
	color: #ffffff;
}

.woocommerce-pagination .page-numbers.dots {
	background: transparent;
	color: var(--wsp-color-text-muted, #6e6e73);
	cursor: default;
}

.woocommerce-pagination .page-numbers.dots:hover {
	background: transparent;
}

/* =========================================================================
   Responsive
   ========================================================================= */

/* Medium tablet (1024-1199px): 4-col setting steps down to 3-col
   so the jump from desktop isn't jarring. 2-col and 3-col settings
   are unaffected at this width. */
@media (min-width: 1024px) and (max-width: 1199px) {
	.wsp-shop__main--cols-4 ul.products {
		grid-template-columns: repeat(3, 1fr);
		gap: var(--wsp-space-lg, 20px);
	}
}

/* Small tablet (769-1023px): 3-col and 4-col settings both step
   down to 2-col. 2-col stays at 2-col. */
@media (min-width: 769px) and (max-width: 1023px) {
	.wsp-shop__main ul.products,
	.wsp-shop__main--cols-3 ul.products,
	.wsp-shop__main--cols-4 ul.products {
		grid-template-columns: repeat(2, 1fr);
		gap: var(--wsp-space-lg, 20px);
	}
}

@media (max-width: 768px) {
	.wsp-shop__layout {
		display: block;
	}

	/* Sidebar becomes a left-slide drawer on mobile */
	.wsp-shop__sidebar {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		width: 320px;
		max-width: 85vw;
		max-height: 100vh;
		background: #ffffff;
		z-index: 1101;
		padding: var(--wsp-space-lg, 20px);
		transform: translateX(-100%);
		transition: transform 300ms cubic-bezier(0.25, 0.1, 0.25, 1), visibility 300ms;
		visibility: hidden;
		box-shadow: 8px 0 32px rgba(0, 0, 0, 0.15);
	}

	.wsp-shop__sidebar.is-open {
		transform: translateX(0);
		visibility: visible;
	}

	.wsp-shop__sidebar-header {
		display: flex;
	}

	.wsp-shop__sidebar-overlay {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.5);
		opacity: 0;
		visibility: hidden;
		transition: opacity 250ms ease, visibility 250ms ease;
		z-index: 1100;
	}

	.wsp-shop__sidebar-overlay.is-open {
		opacity: 1;
		visibility: visible;
	}

	body.wsp-shop-filter-open {
		overflow: hidden;
	}

	.wsp-shop-filter-open .wsp-shop__filter-fab {
		display: none !important;
	}

	.admin-bar .wsp-shop__sidebar,
	.admin-bar .wsp-shop__sidebar-overlay {
		top: 46px;
	}

	.wsp-shop__filter-toggle {
		display: inline-flex;
	}

	.wsp-shop__main ul.products {
		grid-template-columns: 1fr;
	}

	.wsp-product-card__add-btn {
		opacity: 1;
		transform: translateY(0);
	}

	/* Force list view to behave like grid on mobile — the horizontal
	   card layout is too cramped on narrow screens. */
	.wsp-shop__main--list ul.products {
		display: grid !important;
		flex-direction: unset;
	}

	.wsp-shop__main--list ul.products li.product {
		flex-direction: column !important;
	}

	.wsp-shop__main--list .wsp-product-card__link {
		flex-direction: column;
	}

	.wsp-shop__main--list .wsp-product-card__image-wrap {
		width: 100%;
		aspect-ratio: 1 / 1;
	}

	.wsp-shop__main--list .wsp-product-card__info {
		text-align: center;
	}

	.wsp-shop__main--list .wsp-product-card__add-btn {
		position: absolute;
		top: 12px;
		right: 12px;
	}

	.wsp-shop__main--list .wsp-product-card__quick-view {
		position: absolute;
		top: 12px;
		left: 12px;
	}

	.wsp-shop__main--list .wsp-product-card__compare {
		position: absolute;
		bottom: 12px;
		left: 12px;
	}

	.wsp-shop__main--list .wsp-product-card__swatches {
		margin-left: 0;
		margin-right: 0;
		justify-content: center;
	}

	/* Toolbar: wrap search to its own row */
	.wsp-shop__toolbar {
		flex-wrap: wrap;
		gap: var(--wsp-space-sm, 8px);
	}

	.wsp-shop__toolbar-search {
		order: -1;
		max-width: none;
		width: 100%;
	}

	/* Hero: tighter */
	.wsp-shop__hero {
		padding: var(--wsp-space-sm, 8px) 0 var(--wsp-space-sm, 8px);
		margin-bottom: var(--wsp-space-md, 12px);
	}

	.wsp-shop__hero-title {
		font-size: 24px;
	}
}

/* =========================================================================
   Reduced motion
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {
	.wsp-product-card,
	.wsp-product-card__image-wrap,
	.wsp-product-card__add-btn,
	.wsp-product-card__quick-view,
	.wsp-swatch,
	.wsp-shop__sidebar,
	.wsp-shop__sidebar-overlay,
	.wsp-quick-view__overlay,
	.wsp-quick-view__dialog {
		transition: visibility 0s;
	}

	.wsp-quick-view__spinner,
	.wsp-compare-modal__spinner {
		animation: none;
	}
}

/* =========================================================================
   Wave 5 — Search autocomplete in toolbar
   ========================================================================= */

.wsp-shop__toolbar-search {
	position: relative;
	flex: 1 1 auto;
	max-width: 280px;
}

.wsp-shop__search-input {
	width: 100%;
	padding: 8px 14px;
	border: 1px solid var(--wsp-color-border, #d2d2d7);
	border-radius: 20px;
	font-size: 13px;
	color: var(--wsp-color-text, #1d1d1f);
	background: #ffffff;
	outline: none;
	transition: border-color 150ms ease;
}

.wsp-shop__search-input:focus {
	border-color: var(--wsp-color-accent, #0071e3);
}

.wsp-shop__search-input::placeholder {
	color: var(--wsp-color-text-muted, #6e6e73);
}

.wsp-shop__search-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	margin-top: 4px;
	background: #ffffff;
	border: 1px solid var(--wsp-color-border, #d2d2d7);
	border-radius: var(--wsp-radius-md, 8px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	z-index: 100;
	overflow: hidden;
}

.wsp-search__suggest-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	text-decoration: none;
	color: var(--wsp-color-text, #1d1d1f);
	transition: background 100ms ease;
}

.wsp-search__suggest-item:hover,
.wsp-search__suggest-item.is-highlighted {
	background: var(--wsp-color-bg-muted, #f5f5f7);
}

.wsp-search__suggest-thumb {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 4px;
	overflow: hidden;
	background: var(--wsp-color-bg-muted, #f5f5f7);
}

.wsp-search__suggest-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wsp-search__suggest-info {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
}

.wsp-search__suggest-name {
	font-size: 13px;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.wsp-search__suggest-price {
	font-size: 12px;
	color: var(--wsp-color-text-muted, #6e6e73);
}

.wsp-search__suggest-all {
	display: block;
	padding: 10px 12px;
	font-size: 13px;
	color: var(--wsp-color-accent, #0071e3);
	text-decoration: none;
	border-top: 1px solid var(--wsp-color-border-light, #e5e5e5);
	text-align: center;
}

.wsp-search__suggest-all:hover {
	background: var(--wsp-color-bg-muted, #f5f5f7);
}

.wsp-search__no-results {
	padding: 16px 12px;
	text-align: center;
	font-size: 13px;
	color: var(--wsp-color-text-muted, #6e6e73);
}

@media (max-width: 768px) {
	.wsp-shop__toolbar-search {
		max-width: none;
		order: -1;
		width: 100%;
	}
}

/* Recently Viewed strip styles moved to shared/css/wsp-base.css in 2.18.2
   — the strip also renders on single-product pages where this file
   doesn't load. Base CSS loads everywhere, so .wsp-rv__* now works in
   both contexts. */

/* =========================================================================
   Wave 4 — Compare toggle button on cards
   ========================================================================= */

.wsp-product-card__compare {
	position: absolute;
	bottom: 12px;
	left: 12px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #ffffff;
	color: var(--wsp-color-text-muted, #6e6e73);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 200ms ease, transform 200ms ease, background 150ms ease, color 150ms ease;
	z-index: 2;
}

.wsp-product-card__compare:hover {
	color: var(--wsp-color-text, #1d1d1f);
}

.wsp-product-card__compare.is-active {
	opacity: 1;
	transform: translateY(0);
	background: var(--wsp-color-accent, #0071e3);
	color: #ffffff;
}

@media (hover: hover) and (pointer: fine) {
	.wsp-product-card:hover .wsp-product-card__compare {
		opacity: 1;
		transform: translateY(0);
	}
}

.wsp-product-card__compare:focus-visible {
	opacity: 1;
	transform: translateY(0);
	outline: 2px solid var(--wsp-color-accent, #0071e3);
	outline-offset: 2px;
}

@media (max-width: 768px) {
	.wsp-product-card__compare {
		opacity: 1;
		transform: translateY(0);
	}
}

/* List view: static position */
.wsp-shop__main--list .wsp-product-card__compare {
	position: static;
	opacity: 1;
	transform: none;
	order: -2;
	align-self: center;
	width: 28px;
	height: 28px;
	box-shadow: none;
	border: 1px solid var(--wsp-color-border-light, #e5e5e5);
}

.wsp-product-card__compare-error {
	position: absolute;
	bottom: 48px;
	left: 12px;
	padding: 4px 8px;
	background: #dc2626;
	color: #ffffff;
	font-size: 11px;
	border-radius: 4px;
	white-space: nowrap;
	z-index: 3;
	animation: wspCardErrorIn 200ms ease both;
}

/* =========================================================================
   Wave 4 — Compare sticky bar
   ========================================================================= */

.wsp-compare-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 1100;
	background: #ffffff;
	border-top: 1px solid var(--wsp-color-border, #d2d2d7);
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
	padding: 12px var(--wsp-space-lg, 20px);
}

.wsp-compare-bar__inner {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: var(--wsp-space-lg, 20px);
}

.wsp-compare-bar__items {
	display: flex;
	gap: 8px;
	flex: 1 1 auto;
	overflow-x: auto;
}

.wsp-compare-bar__thumb {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	background: var(--wsp-color-bg-muted, #f5f5f7);
	border-radius: 6px;
	font-size: 12px;
	white-space: nowrap;
}

.wsp-compare-bar__thumb-label {
	max-width: 120px;
	overflow: hidden;
	text-overflow: ellipsis;
}

.wsp-compare-bar__thumb-remove {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 14px;
	color: var(--wsp-color-text-muted, #6e6e73);
	padding: 0 2px;
	line-height: 1;
}

.wsp-compare-bar__thumb-remove:hover {
	color: #dc2626;
}

.wsp-compare-bar__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.wsp-compare-bar__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 20px;
	background: var(--wsp-color-text, #1d1d1f);
	color: #ffffff;
	border: none;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: background 150ms ease;
}

.wsp-compare-bar__btn:hover {
	background: var(--wsp-color-accent, #0071e3);
}

.wsp-compare-bar__count {
	background: rgba(255, 255, 255, 0.25);
	padding: 1px 7px;
	border-radius: 10px;
	font-size: 11px;
}

.wsp-compare-bar__clear {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 13px;
	color: var(--wsp-color-text-muted, #6e6e73);
	text-decoration: underline;
}

.wsp-compare-bar__clear:hover {
	color: #dc2626;
}

.wsp-compare-bar__clear:focus-visible {
	outline: 2px solid var(--wsp-color-accent, #0071e3);
	outline-offset: 2px;
}

/* =========================================================================
   Wave 4 — Compare modal
   ========================================================================= */

.wsp-compare-modal {
	position: fixed;
	inset: 0;
	z-index: 1250;
	display: none;
	align-items: center;
	justify-content: center;
}

.wsp-compare-modal.is-open {
	display: flex;
}

.wsp-compare-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	opacity: 0;
	transition: opacity 250ms ease;
}

.wsp-compare-modal.is-open .wsp-compare-modal__overlay {
	opacity: 1;
}

.wsp-compare-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 1100px;
	max-height: calc(100vh - 40px);
	margin: 20px;
	background: #ffffff;
	border-radius: var(--wsp-radius-lg, 12px);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transform: translateY(12px) scale(0.98);
	opacity: 0;
	transition: transform 250ms ease, opacity 250ms ease;
}

.wsp-compare-modal.is-open .wsp-compare-modal__dialog {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.wsp-compare-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--wsp-space-lg, 20px) var(--wsp-space-xl, 32px);
	border-bottom: 1px solid var(--wsp-color-border-light, #e5e5e5);
	flex-shrink: 0;
}

.wsp-compare-modal__title {
	font-size: var(--wsp-font-size-xl, 24px);
	font-weight: 600;
	margin: 0;
}

.wsp-compare-modal__close {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: transparent;
	border: 1px solid var(--wsp-color-border-light, #e5e5e5);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--wsp-color-text, #1d1d1f);
	transition: background 150ms ease;
}

.wsp-compare-modal__close:hover {
	background: var(--wsp-color-bg-muted, #f5f5f7);
}

.wsp-compare-modal__body {
	overflow: auto;
	flex: 1 1 auto;
	padding: var(--wsp-space-lg, 20px) var(--wsp-space-xl, 32px);
}

.wsp-compare-modal__loading {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 200px;
}

.wsp-compare-modal__spinner {
	width: 32px;
	height: 32px;
	border: 3px solid var(--wsp-color-border, #d2d2d7);
	border-top-color: var(--wsp-color-text, #1d1d1f);
	border-radius: 50%;
	animation: wspQvSpin 700ms linear infinite;
}

.wsp-compare-modal__error {
	text-align: center;
	color: #991b1b;
	padding: 20px;
}

body.wsp-compare-modal-open {
	overflow: hidden;
}

/* =========================================================================
   Wave 4 — Comparison table
   ========================================================================= */

.wsp-cmp-table-wrap {
	overflow-x: auto;
}

.wsp-cmp-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 500px;
}

.wsp-cmp-table th,
.wsp-cmp-table td {
	padding: 12px 16px;
	border-bottom: 1px solid var(--wsp-color-border-light, #e5e5e5);
	vertical-align: middle;
	text-align: left;
}

.wsp-cmp-table__label {
	font-size: 13px;
	font-weight: 600;
	color: var(--wsp-color-text-muted, #6e6e73);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	width: 120px;
	min-width: 100px;
}

.wsp-cmp-table__cell {
	font-size: 14px;
}

.wsp-cmp-table__cell--image {
	padding: 8px;
}

.wsp-cmp-table__cell--image img,
.wsp-cmp-table__cell--image .wsp-cmp__img {
	width: 100px;
	height: 100px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

.wsp-cmp-table__cell--image .wsp-cmp__img--placeholder {
	background: var(--wsp-color-bg-muted, #f5f5f7);
}

.wsp-cmp-table__name {
	font-weight: 500;
	color: var(--wsp-color-text, #1d1d1f);
	text-decoration: none;
}

.wsp-cmp-table__name:hover {
	text-decoration: underline;
}

.wsp-cmp-table__product-head {
	text-align: right;
}

.wsp-cmp-table__remove {
	background: none;
	border: 1px solid var(--wsp-color-border-light, #e5e5e5);
	border-radius: 50%;
	width: 24px;
	height: 24px;
	cursor: pointer;
	font-size: 14px;
	color: var(--wsp-color-text-muted, #6e6e73);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.wsp-cmp-table__remove:hover {
	background: #fee2e2;
	border-color: #dc2626;
	color: #dc2626;
}

.wsp-cmp-table__muted {
	color: var(--wsp-color-text-muted, #6e6e73);
	font-style: italic;
}

.wsp-cmp-table__stock--in {
	color: #059669;
	font-weight: 500;
}

.wsp-cmp-table__stock--out {
	color: #dc2626;
	font-weight: 500;
}

@media (max-width: 768px) {
	.wsp-compare-modal__dialog {
		margin: 0;
		max-height: 100vh;
		border-radius: 0;
	}

	.wsp-compare-bar__items {
		display: none;
	}

	.wsp-compare-modal__body {
		padding: var(--wsp-space-md, 12px);
	}
}
