/* ==========================================================================
   Tienda (archivo de productos + tarjetas)
   Accesible y responsivo. Requiere las variables :root del tema.
   ========================================================================== */

:root {
	--shop-radius: 18px;
	--shop-radius-sm: 12px;
	--shop-shadow: 0 10px 30px rgba(72, 0, 25, 0.07);
	--shop-shadow-hover: 0 16px 40px rgba(72, 0, 25, 0.14);
	--shop-focus: #480019;
	--shop-gap: clamp(14px, 2vw, 24px);
}

/* ── Utilidades de accesibilidad ─────────────────────────────────────────── */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	border: 0;
	white-space: nowrap;
}

.shop-page a:focus-visible,
.shop-page button:focus-visible,
.shop-page select:focus-visible,
.shop-page input:focus-visible,
.sp a:focus-visible,
.sp button:focus-visible,
.sp select:focus-visible,
.sp input:focus-visible,
.sp textarea:focus-visible {
	outline: 3px solid var(--shop-focus);
	outline-offset: 2px;
	border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
	.shop-page *,
	.sp * {
		animation-duration: 0.001ms !important;
		transition-duration: 0.001ms !important;
	}
}

/* ── Cabecera del archivo ────────────────────────────────────────────────── */
.shop-hero {
	background: linear-gradient(180deg, var(--color-surface2, #fff1f7) 0%, var(--color-bg, #fff8fc) 100%);
	padding: clamp(24px, 5vw, 56px) 0 clamp(18px, 3vw, 28px);
	border-bottom: 1px solid var(--color-border, #ffd3e3);
}

.shop-hero__inner {
	max-width: 760px;
}

.shop-breadcrumb,
.shop-breadcrumb a {
	font-size: 0.85rem;
	color: var(--color-muted, #7c4b63);
}

.shop-breadcrumb {
	margin-bottom: 14px;
}

.shop-breadcrumb a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.shop-breadcrumb__sep {
	margin: 0 6px;
	color: var(--color-border, #ffd3e3);
}

.shop-hero__eyebrow {
	margin: 0 0 6px;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--color-primary, #f469a2);
}

.shop-hero__title {
	margin: 0 0 10px;
	font-size: clamp(1.7rem, 4.4vw, 2.6rem);
	line-height: 1.15;
	color: var(--color-primary-dark, #480019);
}

.shop-hero__desc {
	color: var(--color-muted, #7c4b63);
	font-size: 1rem;
	line-height: 1.6;
}

.shop-hero__desc p:last-child {
	margin-bottom: 0;
}

/* ── Chips de categorias ─────────────────────────────────────────────────── */
.shop-cats {
	position: sticky;
	top: 0;
	z-index: 20;
	background: rgba(255, 255, 255, 0.94);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--color-border, #ffd3e3);
}

.shop-cats__list {
	display: flex;
	gap: 10px;
	margin: 0;
	padding: 12px 0;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
	scroll-snap-type: x proximity;
}

.shop-cats__list::-webkit-scrollbar {
	height: 6px;
}

.shop-cats__list::-webkit-scrollbar-thumb {
	background: var(--color-border, #ffd3e3);
	border-radius: 999px;
}

.shop-cats__chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 8px 16px;
	border: 1.5px solid var(--color-border, #ffd3e3);
	border-radius: 999px;
	background: #fff;
	color: var(--color-primary-dark, #480019);
	font-size: 0.94rem;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	scroll-snap-align: start;
	transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.shop-cats__chip:hover {
	border-color: var(--color-primary, #f469a2);
	transform: translateY(-1px);
}

.shop-cats__chip.is-current {
	background: var(--color-primary-dark, #480019);
	border-color: var(--color-primary-dark, #480019);
	color: #fff;
}

.shop-cats__thumb {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	object-fit: cover;
	flex: 0 0 auto;
}

.shop-cats__count {
	display: inline-block;
	min-width: 22px;
	padding: 1px 6px;
	border-radius: 999px;
	background: var(--color-surface2, #fff1f7);
	color: var(--color-muted, #7c4b63);
	font-size: 0.75rem;
	font-weight: 800;
	text-align: center;
}

.shop-cats__chip.is-current .shop-cats__count {
	background: rgba(255, 255, 255, 0.22);
	color: #fff;
}

/* ── Barra de herramientas ───────────────────────────────────────────────── */
.shop-body {
	padding: clamp(20px, 4vw, 40px) 0 clamp(40px, 6vw, 72px);
}

.shop-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: clamp(16px, 3vw, 28px);
}

.shop-toolbar__count,
.shop-toolbar .woocommerce-result-count {
	margin: 0;
	color: var(--color-muted, #7c4b63);
	font-size: 0.92rem;
}

.shop-toolbar__sort form,
.shop-toolbar .woocommerce-ordering {
	margin: 0;
}

.shop-toolbar select,
.shop-toolbar .orderby {
	min-height: 44px;
	padding: 8px 40px 8px 14px;
	border: 1.5px solid var(--color-border, #ffd3e3);
	border-radius: 999px;
	background-color: #fff;
	background-image: linear-gradient(45deg, transparent 50%, var(--color-primary-dark, #480019) 50%), linear-gradient(135deg, var(--color-primary-dark, #480019) 50%, transparent 50%);
	background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
	color: var(--color-primary-dark, #480019);
	font: inherit;
	font-weight: 700;
	font-size: 0.92rem;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

/* ── Rejilla de productos ────────────────────────────────────────────────── */
.shop-grid,
.woocommerce ul.products.shop-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: var(--shop-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.woocommerce ul.products.shop-grid::before,
.woocommerce ul.products.shop-grid::after {
	content: none;
	display: none;
}

.woocommerce ul.products.shop-grid li.product {
	width: auto;
	margin: 0;
	float: none;
	clear: none;
}

@media (max-width: 640px) {
	.shop-grid,
	.woocommerce ul.products.shop-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}
}

@media (max-width: 380px) {
	.shop-grid,
	.woocommerce ul.products.shop-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ── Tarjeta de producto ─────────────────────────────────────────────────── */
.product-card__inner {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border: 1px solid var(--color-border, #ffd3e3);
	border-radius: var(--shop-radius);
	box-shadow: var(--shop-shadow);
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card__inner:hover,
.product-card__inner:focus-within {
	transform: translateY(-3px);
	box-shadow: var(--shop-shadow-hover);
}

.product-card__media {
	position: relative;
	background: var(--color-surface2, #fff1f7);
}

.product-card__media-link {
	display: block;
	aspect-ratio: 1 / 1;
}

.product-card__media img,
.product-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.product-card__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 5px 12px;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.product-card__badge--sale {
	background: var(--color-primary, #f469a2);
	color: #fff;
}

.product-card__badge--out {
	background: #480019;
	color: #fff;
}

.product-card__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1 1 auto;
	padding: 14px 16px 16px;
}

.product-card__cat {
	margin: 0;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--color-primary, #f469a2);
}

.woocommerce ul.products li.product .product-card__title,
.product-card__title {
	margin: 0;
	padding: 0;
	font-size: 1.05rem;
	line-height: 1.3;
	font-weight: 800;
}

.product-card__title a {
	color: var(--color-primary-dark, #480019);
	text-decoration: none;
}

.product-card__title a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.product-card__rating {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 0.85rem;
	color: var(--color-muted, #7c4b63);
}

.product-card__stars {
	color: #f0a500;
}

.woocommerce ul.products li.product .product-card__price,
.product-card__price {
	margin: 2px 0 0;
	color: var(--color-primary-dark, #480019);
	font-size: 1.05rem;
	font-weight: 800;
}

.product-card__price del {
	color: var(--color-muted, #7c4b63);
	font-weight: 600;
	opacity: 0.75;
	margin-right: 6px;
}

.product-card__price ins {
	text-decoration: none;
}

.product-card__actions {
	margin-top: auto;
	padding-top: 12px;
}

.woocommerce ul.products li.product .product-card__cta,
.product-card__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 46px;
	padding: 11px 16px;
	border: none;
	border-radius: 999px;
	background: var(--color-primary, #f469a2);
	color: #fff;
	font-size: 0.95rem;
	font-weight: 800;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.18s ease;
}

.woocommerce ul.products li.product .product-card__cta:hover,
.product-card__cta:hover {
	background: #480019;
	color: #fff;
}

.woocommerce ul.products li.product a.added_to_cart {
	display: block;
	margin-top: 8px;
	text-align: center;
	font-weight: 700;
	font-size: 0.88rem;
	color: var(--color-primary-dark, #480019);
}

/* ── Estado vacio ────────────────────────────────────────────────────────── */
.shop-empty {
	max-width: 520px;
	margin: 0 auto;
	padding: clamp(28px, 6vw, 56px) 24px;
	text-align: center;
	background: #fff;
	border: 1px solid var(--color-border, #ffd3e3);
	border-radius: var(--shop-radius);
}

.shop-empty__title {
	margin: 0 0 10px;
	color: var(--color-primary-dark, #480019);
}

.shop-empty__text {
	margin: 0 0 20px;
	color: var(--color-muted, #7c4b63);
}

.shop-empty .btn,
.shop-page .btn--primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 12px 24px;
	border-radius: 999px;
	background: var(--color-primary, #f469a2);
	color: #fff;
	font-weight: 800;
	text-decoration: none;
}

/* ── Paginacion ──────────────────────────────────────────────────────────── */
.woocommerce nav.woocommerce-pagination {
	margin-top: clamp(24px, 4vw, 40px);
}

.woocommerce nav.woocommerce-pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	border: none;
}

.woocommerce nav.woocommerce-pagination ul li {
	border: none;
	margin: 0;
	overflow: visible;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 12px;
	border: 1.5px solid var(--color-border, #ffd3e3);
	border-radius: 999px;
	background: #fff;
	color: var(--color-primary-dark, #480019);
	font-weight: 700;
}

.woocommerce nav.woocommerce-pagination ul li span.current {
	background: var(--color-primary-dark, #480019);
	border-color: var(--color-primary-dark, #480019);
	color: #fff;
}
