/* ============================================================
   WC Shop Redesign — tokens de diseño
   ============================================================ */
.wsr-cat-grid-wrap,
.wsr-filter-bar,
.wsr-section-title {
	--wsr-bg: #ffffff;
	--wsr-bg-soft: #f6f7f8;
	--wsr-ink: #14181f;
	--wsr-muted: #6b7280;
	--wsr-border: #e4e6ea;
	--wsr-accent: #2c5f6f;
	--wsr-accent-soft: #eaf2f3;
	--wsr-display-font: "Fraunces", "Iowan Old Style", serif;
	--wsr-body-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ============================================================
   Encabezados de sección
   ============================================================ */
.wsr-section-title {
	font-family: var(--wsr-display-font);
	font-weight: 480;
	font-size: 28px;
	letter-spacing: -0.01em;
	color: var(--wsr-ink);
	margin: 0 0 28px;
	padding-top: 4px;
}

.wsr-section-title--spaced {
	margin-top: 72px;
}

/* ============================================================
   Cuadrícula de categorías
   ============================================================ */
.wsr-cat-grid-wrap {
	margin: 16px 0 8px;
}

.wsr-cat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 28px 24px;
}

.wsr-cat-card {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	border-radius: 4px;
	overflow: hidden;
	background: var(--wsr-bg);
}

.wsr-cat-card-image {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	background-size: cover;
	background-position: center;
	background-color: var(--wsr-bg-soft);
	filter: grayscale(35%);
	transition: filter 0.35s ease, transform 0.35s ease;
	border-radius: 4px;
}

.wsr-cat-card:hover .wsr-cat-card-image {
	filter: grayscale(0%);
	transform: scale(1.015);
}

.wsr-cat-card-body {
	padding: 14px 2px 0;
	position: relative;
}

.wsr-cat-card-name {
	display: inline-block;
	font-family: var(--wsr-display-font);
	font-weight: 480;
	font-size: 17px;
	color: var(--wsr-ink);
	position: relative;
	padding-bottom: 6px;
}

/* Elemento distintivo: subrayado que se expande al pasar el cursor. */
.wsr-cat-card-name::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	height: 1.5px;
	width: 18px;
	background: var(--wsr-accent);
	transition: width 0.3s ease;
}

.wsr-cat-card:hover .wsr-cat-card-name::after {
	width: 100%;
}

.wsr-cat-card-count {
	display: block;
	font-family: var(--wsr-body-font);
	font-size: 13px;
	color: var(--wsr-muted);
	font-variant-numeric: tabular-nums;
	margin-top: 4px;
}

@media (prefers-reduced-motion: reduce) {
	.wsr-cat-card-image,
	.wsr-cat-card-name::after {
		transition: none;
	}
}

/* ============================================================
   Barra de filtros (páginas de categoría)
   ============================================================ */
.wsr-filter-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 24px;
	padding: 20px 0 24px;
	margin-bottom: 32px;
	border-bottom: 1px solid var(--wsr-border);
	font-family: var(--wsr-body-font);
}

.wsr-filter-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.wsr-filter-field label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--wsr-muted);
}

.wsr-filter-field select,
.wsr-filter-field input[type="number"] {
	font-family: var(--wsr-body-font);
	font-size: 14px;
	color: var(--wsr-ink);
	background: transparent;
	border: none;
	border-bottom: 1px solid var(--wsr-border);
	padding: 4px 2px 6px;
	min-width: 140px;
	outline: none;
	transition: border-color 0.2s ease;
}

.wsr-filter-field select:focus,
.wsr-filter-field input[type="number"]:focus {
	border-bottom-color: var(--wsr-accent);
}

.wsr-filter-price-inputs {
	display: flex;
	align-items: center;
	gap: 6px;
}

.wsr-filter-price-inputs input {
	width: 72px;
	min-width: 0;
}

.wsr-filter-price-sep {
	color: var(--wsr-muted);
}

.wsr-filter-actions {
	flex-direction: row;
	align-items: center;
	gap: 14px;
}

.wsr-btn-apply {
	font-family: var(--wsr-body-font);
	font-size: 14px;
	font-weight: 500;
	color: #fff;
	background: var(--wsr-accent);
	border: none;
	border-radius: 3px;
	padding: 10px 20px;
	cursor: pointer;
	transition: background 0.2s ease;
}

.wsr-btn-apply:hover {
	background: #234a56;
}

.wsr-btn-clear {
	font-size: 13px;
	color: var(--wsr-muted);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.wsr-btn-clear:hover {
	color: var(--wsr-ink);
}

@media (max-width: 640px) {
	.wsr-filter-bar {
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
	}
	.wsr-filter-field select,
	.wsr-filter-field input[type="number"] {
		min-width: 0;
		width: 100%;
	}
}

/* ============================================================
   Banner de tendencias (Populares / Tendencia / Destacados)
   ============================================================ */
.wsr-trending-banner {
	--wsr-bg: #ffffff;
	--wsr-bg-soft: #f6f7f8;
	--wsr-ink: #14181f;
	--wsr-muted: #6b7280;
	--wsr-border: #e4e6ea;
	--wsr-accent: #2c5f6f;
	--wsr-display-font: "Fraunces", "Iowan Old Style", serif;
	--wsr-body-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	max-width: 1180px;
	margin: 64px auto;
	padding: 0 24px;
	font-family: var(--wsr-body-font);
}

.wsr-trending-tabs {
	position: relative;
	display: flex;
	gap: 32px;
	border-bottom: 1px solid var(--wsr-border);
	margin-bottom: 32px;
}

.wsr-trending-tab {
	background: none;
	border: none;
	cursor: pointer;
	font-family: var(--wsr-display-font);
	font-size: 20px;
	font-weight: 480;
	color: var(--wsr-muted);
	padding: 8px 0 16px;
	position: relative;
	transition: color 0.2s ease;
}

.wsr-trending-tab.is-active {
	color: var(--wsr-ink);
}

.wsr-trending-tab::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 2px;
	background: var(--wsr-accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.3s ease;
}

.wsr-trending-tab.is-active::after {
	transform: scaleX(1);
}

.wsr-trending-panel[hidden] {
	display: none;
}

/* Tarjetas de producto reales (usadas dentro del banner) */
.wsr-product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 32px 24px;
}

.wsr-product-card {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
}

.wsr-product-image {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 4px;
	background-size: cover;
	background-position: center;
	background-color: var(--wsr-bg-soft);
	margin-bottom: 12px;
	transition: transform 0.3s ease;
}

.wsr-product-card:hover .wsr-product-image {
	transform: scale(1.02);
}

.wsr-product-vendor {
	font-size: 12px;
	color: var(--wsr-accent);
	text-transform: uppercase;
	letter-spacing: 0.03em;
	margin-bottom: 4px;
}

.wsr-product-name {
	font-size: 14.5px;
	color: var(--wsr-ink);
	line-height: 1.35;
	margin-bottom: 6px;
}

.wsr-product-price {
	font-family: var(--wsr-body-font);
	font-weight: 600;
	font-size: 15px;
	color: var(--wsr-ink);
	font-variant-numeric: tabular-nums;
}

.wsr-product-price del {
	color: var(--wsr-muted);
	font-weight: 400;
	margin-right: 6px;
}

.wsr-product-price ins {
	text-decoration: none;
}

@media (max-width: 640px) {
	.wsr-trending-tabs {
		gap: 20px;
	}
	.wsr-trending-tab {
		font-size: 17px;
	}
}
