/* ==========================================================================
   Tienda — tabs por categoría + grid de productos, adaptado de
   design/mocks/tienda.html pero sobre datos reales de WooCommerce
   (archive-product.php / taxonomy-product-cat.php / content-product.php).
   Filtros por atributo/precio/marca: Fase 6, todavía no están aquí.
   ========================================================================== */

#primary {
	max-width: 1280px;
	margin: 0 auto;
	padding: clamp(120px, 15vw, 150px) clamp(16px, 5vw, 56px) 90px;
}

.page-head {
	text-align: center;
	margin-bottom: clamp(28px, 4vw, 44px);
}
.page-head h1 {
	margin: 10px 0 0;
	font-weight: 600;
	font-size: clamp(1.9rem, 3.6vw, 3rem);
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--ink);
}
.page-head .eyebrow a {
	color: var(--ink-muted);
	text-decoration: none;
}
.page-head .eyebrow a:hover {
	color: var(--dorado-ink);
}
.sample-note {
	margin: 14px auto 0;
	max-width: 520px;
	font-size: 0.82rem;
	line-height: 1.6;
	color: var(--ink-muted);
}

/* ---------- Tabs ---------- */
.tabs {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-bottom: clamp(28px, 4vw, 44px);
	flex-wrap: wrap;
}
.tab {
	appearance: none;
	cursor: pointer;
	border: 1px solid rgba(255, 255, 255, 0.5);
	background: rgba(255, 255, 255, 0.2);
	color: var(--ink-muted);
	padding: 10px 22px;
	border-radius: 999px;
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	transition: all 0.25s ease;
}
.tab[aria-selected='true'] {
	color: #4a3712;
	border-color: rgba(255, 244, 214, 0.7);
	background: linear-gradient(150deg, rgba(255, 249, 227, 0.6) 0%, rgba(226, 191, 116, 0.3) 100%);
}
.category-panel {
	display: none;
}
.category-panel.is-active {
	display: block;
}
/* No-JS fallback: with JS disabled, every category shows stacked instead of
   tabbed (tabs themselves are harmless dead buttons in that case). */
.no-js .category-panel {
	display: block;
	margin-bottom: 56px;
}

/* ---------- Layout: filtros + resultados ---------- */
.catalog {
	display: grid;
	grid-template-columns: 250px 1fr;
	gap: clamp(20px, 3vw, 36px);
	align-items: start;
}
.filters {
	border-radius: 20px;
	padding: 22px 20px;
	display: flex;
	flex-direction: column;
	gap: 20px;
	position: sticky;
	top: 108px;
}
.quiz-trigger {
	width: 100%;
}
.filter-group h3 {
	margin: 0 0 10px;
	font-size: 0.66rem;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ink-muted);
}
.chip-row {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}
.chip {
	appearance: none;
	cursor: pointer;
	border: 1px solid rgba(255, 255, 255, 0.55);
	background: rgba(255, 255, 255, 0.22);
	color: var(--ink);
	padding: 7px 13px;
	border-radius: 999px;
	font-size: 0.68rem;
	letter-spacing: 0.02em;
	transition: all 0.2s ease;
}
.chip:hover {
	background: rgba(255, 255, 255, 0.36);
}
.chip[aria-pressed='true'] {
	color: #4a3712;
	border-color: rgba(255, 244, 214, 0.75);
	background: linear-gradient(150deg, rgba(255, 249, 227, 0.65) 0%, rgba(226, 191, 116, 0.34) 100%);
}

.catalog-head-actions {
	display: flex;
	align-items: center;
	gap: 16px;
}
.results-clear {
	appearance: none;
	background: none;
	border: none;
	cursor: pointer;
	color: var(--ink-muted);
	font-size: 0.68rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.product-grid[aria-busy='true'] {
	opacity: 0.5;
	pointer-events: none;
}

/* ---------- Cuestionario (perfumes) ---------- */
.quiz-overlay {
	position: fixed;
	inset: 0;
	z-index: 100;
	background: rgba(53, 48, 42, 0.32);
	backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.quiz-overlay[hidden] {
	display: none;
}
.quiz-card {
	width: 100%;
	max-width: 440px;
	border-radius: 22px;
	padding: 30px 28px;
}
.quiz-step-label {
	font-size: 0.64rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--dorado-ink);
}
.quiz-question {
	margin: 8px 0 20px;
	font-size: 1.15rem;
	font-weight: 500;
	color: var(--ink);
}
.quiz-options {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.quiz-option {
	appearance: none;
	cursor: pointer;
	text-align: left;
	border: 1px solid rgba(53, 48, 42, 0.18);
	background: rgba(255, 255, 255, 0.4);
	color: var(--ink);
	padding: 13px 16px;
	border-radius: 14px;
	font-size: 0.85rem;
	transition: background 0.2s ease, border-color 0.2s ease;
}
.quiz-option:hover {
	background: rgba(255, 255, 255, 0.7);
	border-color: rgba(201, 161, 91, 0.5);
}
.quiz-foot {
	margin-top: 22px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.quiz-close {
	appearance: none;
	background: none;
	border: none;
	cursor: pointer;
	color: var(--ink-muted);
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.catalog-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}
.catalog-count {
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	color: var(--ink-muted);
}
.catalog-see-all {
	font-size: 0.7rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--dorado-ink);
}
.catalog-see-all:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- Grid de productos ---------- */
.product-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
}
.product-card {
	border-radius: 18px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.product-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 24px 44px -20px rgba(53, 48, 42, 0.4);
}
.product-media {
	position: relative;
	aspect-ratio: 1 / 1;
	background: radial-gradient(ellipse 90% 90% at 50% 35%, rgba(201, 161, 91, 0.2), rgba(255, 255, 255, 0.08) 72%);
	border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}
.product-media a {
	display: block;
	width: 100%;
	height: 100%;
}
.product-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.product-media .stock {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	margin: 0;
	font-size: 0.56rem;
	letter-spacing: 0.06em;
	padding: 5px 10px;
	border-radius: 999px;
}
.product-media .stock.in-stock {
	display: none; /* only show the badge for the states worth flagging */
}
.product-media .stock.available-on-backorder {
	background: linear-gradient(150deg, rgba(255, 249, 227, 0.85) 0%, rgba(226, 191, 116, 0.55) 100%);
	color: var(--dorado-ink);
}
.product-media .stock.out-of-stock {
	background: rgba(53, 48, 42, 0.78);
	color: var(--stone);
}

.product-body {
	padding: 14px 16px 18px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}
.product-brand {
	font-size: 0.6rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-muted);
}
.product-name {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 500;
}
.product-name a {
	color: var(--ink);
	text-decoration: none;
}
.product-name a:hover {
	color: var(--dorado-ink);
}
.product-body .price {
	font-size: 0.88rem;
	color: var(--ink);
	font-weight: 500;
}
.product-body del .woocommerce-Price-amount {
	color: var(--ink-muted);
	opacity: 0.7;
}
.product-body ins {
	text-decoration: none;
}
.product-foot {
	margin-top: auto;
	padding-top: 6px;
}
.product-foot .glass {
	width: 100%;
}

.empty-state {
	grid-column: 1 / -1;
	text-align: center;
	padding: 60px 20px;
	color: var(--ink-muted);
	font-size: 0.85rem;
}

/* ---------- Ordering/result-count (native, on category "Ver Todos" pages) ---------- */
.woocommerce-result-count,
.woocommerce-ordering {
	font-size: 0.72rem;
	color: var(--ink-muted);
	margin: 0 0 16px;
}
.woocommerce-ordering select {
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.5);
	background: rgba(255, 255, 255, 0.3);
	padding: 6px 14px;
	font-family: inherit;
}
.woocommerce-pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 32px;
}
.woocommerce-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border-radius: 999px;
	text-decoration: none;
	font-size: 0.78rem;
	color: var(--ink-muted);
	background: rgba(255, 255, 255, 0.2);
}
.woocommerce-pagination .page-numbers.current {
	color: #4a3712;
	background: linear-gradient(150deg, rgba(255, 249, 227, 0.7) 0%, rgba(226, 191, 116, 0.35) 100%);
}

@media (max-width: 900px) {
	.product-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.catalog {
		grid-template-columns: 1fr;
	}
	.filters {
		position: static;
		flex-direction: row;
		flex-wrap: wrap;
	}
	.filter-group {
		flex: 1 1 200px;
	}
}
@media (max-width: 640px) {
	.product-grid {
		grid-template-columns: 1fr;
	}
	.filters {
		flex-direction: column;
	}
	.catalog-head {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}
}
