/* ===========================================================================
   Serya — WooCommerce (tienda, grid de productos y ficha). Estética premium.
   =========================================================================== */

.serya-shop {
	padding-bottom: var(--wp--preset--spacing--70, 4rem);
}
.serya-shop .woocommerce,
.serya-shop .woocommerce-notices-wrapper {
	margin-left: auto;
	margin-right: auto;
}

/* --------------------------------------------------------------------------
   Cabecera de marca de tienda / categoría
   -------------------------------------------------------------------------- */
.serya-shop-header {
	position: relative;
	border-radius: 8px;
	overflow: hidden;
	margin: 0 0 var(--wp--preset--spacing--60, 3rem);
	padding: clamp(3rem, 7vw, 5.5rem) clamp(1.5rem, 5vw, 4rem);
	background-color: var(--wp--preset--color--oliva-oscuro);
	background-size: cover;
	background-position: center;
	color: #faf6ee;
	text-align: center;
}
.serya-shop-header__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(28,26,20,.45) 0%, rgba(28,26,20,.72) 100%);
}
.serya-shop-header:not(.has-image) .serya-shop-header__overlay {
	background: var(--wp--preset--color--oliva-oscuro);
}
.serya-shop-header__inner {
	position: relative;
	max-width: 760px;
	margin: 0 auto;
}
.serya-shop-header__title {
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(2.4rem, 6vw, 4rem);
	font-weight: 500;
	line-height: 1.05;
	margin: .35em 0 .25em;
	color: #faf6ee;
}
.serya-shop-header__subtitle {
	font-size: 1.05rem;
	line-height: 1.7;
	color: #efe7d6;
	margin: 0 auto;
	max-width: 600px;
}
.serya-shop-header .serya-eyebrow { color: var(--wp--preset--color--dorado); }

/* Tira compacta de categorías bajo la cabecera de la tienda */
.serya-shop .serya-cat-strip {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: clamp(.6rem, 1.5vw, 1.1rem);
	margin: 0 0 var(--wp--preset--spacing--60, 3rem);
}
@media (max-width: 680px) {
	.serya-shop .serya-cat-strip { grid-template-columns: repeat(2, 1fr); }
}
.serya-cat-strip__item {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 140px;
	border-radius: 6px;
	overflow: hidden;
	text-decoration: none;
	background-color: var(--wp--preset--color--oliva-oscuro);
}
.serya-cat-strip__img {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	transition: transform .5s cubic-bezier(.2,.6,.2,1);
}
.serya-cat-strip__item::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(28,26,20,.46);
	transition: background .35s ease;
}
.serya-cat-strip__item:hover .serya-cat-strip__img { transform: scale(1.09); }
.serya-cat-strip__item:hover::after { background: rgba(28,26,20,.34); }
.serya-cat-strip__name {
	position: relative;
	z-index: 2;
	text-align: center;
	color: #fff;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.2rem;
	font-weight: 500;
	letter-spacing: .03em;
	padding-bottom: .35em;
	text-shadow: 0 1px 10px rgba(0,0,0,.45);
}
.serya-cat-strip__name::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 0;
	height: 1.5px;
	background: var(--wp--preset--color--dorado);
	transform: translateX(-50%);
	transition: width .35s ease;
}
.serya-cat-strip__item:hover .serya-cat-strip__name::after { width: 100%; }

/* Migas de pan */
.serya-breadcrumb,
.serya-shop .woocommerce-breadcrumb {
	font-family: var(--wp--preset--font-family--sans);
	font-size: .78rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #d8cdb5;
	margin-bottom: 1rem;
}
.serya-breadcrumb a { color: #d8cdb5; text-decoration: none; }
.serya-breadcrumb a:hover { color: var(--wp--preset--color--dorado); }

/* --------------------------------------------------------------------------
   Barra de herramientas (recuento + ordenación)
   -------------------------------------------------------------------------- */
.serya-shop .woocommerce-result-count {
	font-size: .85rem;
	color: var(--wp--preset--color--tierra);
	letter-spacing: .04em;
	margin: 0;
	padding-top: .6rem;
}
.serya-shop .woocommerce-ordering select,
.serya-shop select.orderby {
	font-family: var(--wp--preset--font-family--sans);
	font-size: .85rem;
	padding: .6em 2.4em .6em 1em;
	border: 1px solid var(--wp--preset--color--marfil);
	border-radius: 3px;
	background-color: #fff;
	color: var(--wp--preset--color--carbon);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%236b5436' stroke-width='1.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right .9em center;
}
.serya-shop .woocommerce-ordering { margin-bottom: 2.5rem; }

/* --------------------------------------------------------------------------
   Grid de productos (loop clásico)
   -------------------------------------------------------------------------- */
.serya-shop ul.products,
.woocommerce ul.products {
	display: grid;
	gap: clamp(1.2rem, 3vw, 2.4rem);
	margin: 0 0 3rem;
	padding: 0;
	list-style: none;
}
/* Evita que el clearfix (::before/::after) ocupe la primera celda del grid. */
.serya-shop ul.products::before,
.serya-shop ul.products::after {
	content: none;
	display: none;
}
.serya-shop ul.products.columns-3 { grid-template-columns: repeat(3, 1fr); }
.serya-shop ul.products.columns-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .serya-shop ul.products[class*="columns-"] { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .serya-shop ul.products[class*="columns-"] { grid-template-columns: 1fr; } }

.woocommerce ul.products li.product,
.serya-shop ul.products li.product {
	position: relative;
	float: none;
	width: auto !important;
	margin: 0 !important;
	text-align: left;
	background: #fff;
	border: 1px solid #efe7d6;
	border-radius: 8px;
	padding: 0 0 1.4rem;
	overflow: hidden;
	transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.woocommerce ul.products li.product:hover,
.serya-shop ul.products li.product:hover {
	transform: translateY(-8px);
	box-shadow: 0 26px 50px -28px rgba(28,26,20,.5);
	border-color: var(--wp--preset--color--dorado);
}
.serya-shop ul.products li.product > a {
	display: block;
	text-decoration: none;
	color: inherit;
}
.serya-shop ul.products li.product img {
	margin: 0 0 1.1rem;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background: #fff;
	padding: .6rem;
	border-radius: 6px 6px 0 0;
	transition: transform .6s cubic-bezier(.2,.6,.2,1);
}
.serya-shop ul.products li.product:hover img { transform: scale(1.04); }

.serya-shop ul.products li.product .serya-loop-cat {
	display: block;
	padding: 0 1.2rem;
	font-family: var(--wp--preset--font-family--sans);
	font-size: .7rem;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--dorado);
	margin-bottom: .35rem;
}
.serya-shop ul.products li.product .woocommerce-loop-product__title {
	padding: 0 1.2rem;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.2rem;
	font-weight: 500;
	line-height: 1.25;
	color: var(--wp--preset--color--carbon);
	margin: 0 0 .5rem;
}
.serya-shop ul.products li.product .price {
	display: block;
	padding: 0 1.2rem;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--wp--preset--color--oliva);
}
.serya-shop ul.products li.product .price del { color: #b9b09c; font-weight: 400; margin-right: .4em; }
.serya-shop ul.products li.product .price ins { text-decoration: none; }

.serya-shop ul.products li.product .button,
.serya-shop ul.products li.product .added_to_cart {
	display: inline-block;
	margin: 1rem 1.2rem 0;
	padding: .7em 1.6em;
	font-family: var(--wp--preset--font-family--sans);
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--crema);
	background: var(--wp--preset--color--oliva-oscuro);
	border: 0;
	border-radius: 2px;
	text-decoration: none;
	transition: background-color .25s ease, color .25s ease;
}
.serya-shop ul.products li.product .button:hover,
.serya-shop ul.products li.product .added_to_cart:hover {
	background: var(--wp--preset--color--dorado);
	color: var(--wp--preset--color--carbon);
}

/* Distintivos sobre la imagen */
.serya-loop-badges,
.serya-shop ul.products li.product .onsale {
	position: absolute;
	top: .9rem;
	z-index: 2;
}
.serya-loop-badges { left: .9rem; display: flex; flex-direction: column; gap: .4rem; }
.serya-shop ul.products li.product .onsale { right: .9rem; left: auto; margin: 0; }
.serya-badge {
	display: inline-block;
	font-family: var(--wp--preset--font-family--sans);
	font-size: .68rem;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	padding: .35em .7em;
	border-radius: 2px;
	line-height: 1;
}
.serya-badge--limited { background: var(--wp--preset--color--tierra); color: #fff; }
.serya-badge--age     { background: #8a2b2b; color: #fff; }
.serya-badge--sale    { background: var(--wp--preset--color--dorado); color: var(--wp--preset--color--carbon); }

/* Paginación */
.serya-shop .woocommerce-pagination ul {
	display: inline-flex;
	gap: .35rem;
	border: 0;
	margin-top: 1rem;
}
.serya-shop .woocommerce-pagination ul li { border: 0; margin: 0; }
.serya-shop .woocommerce-pagination ul li a,
.serya-shop .woocommerce-pagination ul li span {
	min-width: 42px;
	padding: .6em .8em;
	border: 1px solid var(--wp--preset--color--marfil);
	border-radius: 3px;
	color: var(--wp--preset--color--carbon);
}
.serya-shop .woocommerce-pagination ul li span.current {
	background: var(--wp--preset--color--oliva-oscuro);
	color: #fff;
	border-color: var(--wp--preset--color--oliva-oscuro);
}

/* --------------------------------------------------------------------------
   Ficha de producto
   -------------------------------------------------------------------------- */
.serya-shop.single-product div.product {
	display: grid;
	grid-template-columns: 1.05fr 1fr;
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: start;
}
@media (max-width: 860px) {
	.serya-shop.single-product div.product { grid-template-columns: 1fr; }
}
.serya-shop.single-product div.product .woocommerce-product-gallery { margin: 0; }
.serya-shop.single-product div.product .woocommerce-product-gallery img { border-radius: 8px; }
.serya-shop.single-product div.product .onsale {
	left: 1rem; top: 1rem; right: auto;
}

.serya-shop.single-product .product_title {
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(2rem, 4vw, 2.8rem);
	font-weight: 500;
	line-height: 1.1;
	margin: .2em 0 .3em;
}
.serya-shop.single-product .single-product__cat,
.serya-shop.single-product .serya-eyebrow { margin-bottom: .2rem; }
.serya-shop.single-product .price {
	color: var(--wp--preset--color--oliva);
	font-size: 1.6rem;
	font-weight: 600;
	font-family: var(--wp--preset--font-family--sans);
}
.serya-shop.single-product .woocommerce-product-details__short-description {
	font-size: 1.05rem;
	line-height: 1.75;
	color: var(--wp--preset--color--tierra);
	margin: 1.2rem 0;
}
.serya-shop.single-product .serya-single-badges { margin: .5rem 0 1rem; display: flex; gap: .5rem; }

/* Botón añadir + cantidad */
.serya-shop.single-product .single_add_to_cart_button {
	background: var(--wp--preset--color--oliva-oscuro) !important;
	color: var(--wp--preset--color--crema) !important;
	border: 0 !important;
	border-radius: 2px !important;
	padding: 1em 2.4em !important;
	font-family: var(--wp--preset--font-family--sans) !important;
	font-size: .85rem !important;
	font-weight: 600 !important;
	letter-spacing: .08em !important;
	text-transform: uppercase !important;
	transition: background-color .25s ease, color .25s ease !important;
}
.serya-shop.single-product .single_add_to_cart_button:hover {
	background: var(--wp--preset--color--dorado) !important;
	color: var(--wp--preset--color--carbon) !important;
}
.serya-shop.single-product .quantity input.qty {
	width: 4.5em;
	padding: .9em .6em;
	border: 1px solid var(--wp--preset--color--marfil);
	border-radius: 2px;
	text-align: center;
}
.serya-shop.single-product table.variations { margin-bottom: 1.2rem; }
.serya-shop.single-product table.variations td,
.serya-shop.single-product table.variations th { padding: .4rem .6rem .4rem 0; vertical-align: middle; }
.serya-shop.single-product table.variations select {
	padding: .7em 2.4em .7em 1em;
	border: 1px solid var(--wp--preset--color--marfil);
	border-radius: 3px;
	background: #fff;
}
.serya-shop.single-product .product_meta {
	margin-top: 1.5rem;
	font-size: .82rem;
	color: var(--wp--preset--color--tierra);
	border-top: 1px solid var(--wp--preset--color--marfil);
	padding-top: 1.2rem;
}

/* Pestañas de información */
.serya-shop .woocommerce-tabs {
	grid-column: 1 / -1;
	margin-top: clamp(2.5rem, 6vw, 4.5rem);
}
.serya-shop .woocommerce-tabs ul.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 1.8rem;
	padding: 0 0 .6rem;
	margin: 0 0 2rem;
	border-bottom: 1px solid var(--wp--preset--color--marfil);
	list-style: none;
}
.serya-shop .woocommerce-tabs ul.tabs::before { display: none; }
.serya-shop .woocommerce-tabs ul.tabs li {
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
}
.serya-shop .woocommerce-tabs ul.tabs li a {
	font-family: var(--wp--preset--font-family--sans);
	font-size: .8rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--tierra);
	text-decoration: none;
	padding-bottom: .6rem;
}
.serya-shop .woocommerce-tabs ul.tabs li.active a { color: var(--wp--preset--color--carbon); border-bottom: 2px solid var(--wp--preset--color--dorado); }
.serya-shop .woocommerce-tabs .panel h2 { font-family: var(--wp--preset--font-family--serif); }

/* Productos relacionados */
.serya-shop .related.products,
.serya-shop .upsells.products {
	grid-column: 1 / -1;
	margin-top: clamp(2.5rem, 6vw, 4.5rem);
	border-top: 1px solid var(--wp--preset--color--marfil);
	padding-top: 3rem;
}
.serya-shop .related.products > h2,
.serya-shop .upsells.products > h2 {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.8rem;
	text-align: center;
	margin-bottom: 2.5rem;
}

/* --------------------------------------------------------------------------
   Avisos / mensajes
   -------------------------------------------------------------------------- */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border-top: 3px solid var(--wp--preset--color--dorado);
	background: var(--wp--preset--color--crema);
	border-radius: 4px;
	padding: 1rem 1.25rem;
}
.woocommerce-message .button,
.woocommerce-info .button {
	background: var(--wp--preset--color--oliva-oscuro);
	color: var(--wp--preset--color--crema);
	border-radius: 2px;
}

.serya-age-notice { margin: 1rem 0 0; }

/* ===========================================================================
   TEMA OSCURO — WooCommerce
   =========================================================================== */

/* Tarjetas de producto */
.woocommerce ul.products li.product,
.serya-shop ul.products li.product {
	background: #1e1a13;
	border-color: #2e2a22;
}
.serya-shop ul.products li.product:hover { background: #241f16; }
.serya-shop ul.products li.product .woocommerce-loop-product__title { color: #f4eee1; }
.serya-shop ul.products li.product .price { color: var(--wp--preset--color--dorado); }
.serya-shop ul.products li.product .button,
.serya-shop ul.products li.product .added_to_cart {
	background: var(--wp--preset--color--dorado);
	color: var(--wp--preset--color--carbon);
}
.serya-shop ul.products li.product .button:hover,
.serya-shop ul.products li.product .added_to_cart:hover { background: #d9c07f; }

/* Toolbar / textos */
.serya-shop .woocommerce-result-count { color: #a89a85; }
.serya-shop .woocommerce-ordering select,
.serya-shop select.orderby {
	background-color: #1e1a13;
	color: #ece3d2;
	border-color: #2e2a22;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23c9a85c' stroke-width='1.5'/%3E%3C/svg%3E");
}

/* Paginación */
.serya-shop .woocommerce-pagination ul li a,
.serya-shop .woocommerce-pagination ul li span { border-color: #2e2a22; color: #ece3d2; }
.serya-shop .woocommerce-pagination ul li span.current {
	background: var(--wp--preset--color--dorado);
	color: var(--wp--preset--color--carbon);
	border-color: var(--wp--preset--color--dorado);
}

/* Ficha de producto */
.serya-shop.single-product .product_title { color: #f4eee1; }
.serya-shop.single-product .price { color: var(--wp--preset--color--dorado); }
.serya-shop.single-product .woocommerce-product-details__short-description { color: #cfc3ad; }
.serya-shop.single-product .single_add_to_cart_button {
	background: var(--wp--preset--color--dorado) !important;
	color: var(--wp--preset--color--carbon) !important;
}
.serya-shop.single-product .single_add_to_cart_button:hover { background: #d9c07f !important; }
.serya-shop.single-product .quantity input.qty,
.serya-shop.single-product table.variations select {
	background: #1e1a13;
	color: #ece3d2;
	border-color: #2e2a22;
}
.serya-shop.single-product .product_meta { color: #a89a85; border-top-color: #2e2a22; }
.serya-shop .woocommerce-tabs ul.tabs { border-bottom-color: #2e2a22; }
.serya-shop .woocommerce-tabs ul.tabs li a { color: #a89a85; }
.serya-shop .woocommerce-tabs ul.tabs li.active a { color: #f4eee1; }
.serya-shop .related.products,
.serya-shop .upsells.products { border-top-color: #2e2a22; }

/* Avisos / mensajes */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	background: #1e1a13;
	color: #ece3d2;
	border-top-color: var(--wp--preset--color--dorado);
}

/* Migas de pan de la cabecera (ya sobre banner oscuro) */
.serya-breadcrumb, .serya-breadcrumb a { color: #d8cdb5; }

/* -------- Carrito / Checkout / Mi cuenta: panel CLARO (compra segura) -------- */
body.woocommerce-cart .serya-shop,
body.woocommerce-checkout .serya-shop,
body.woocommerce-account .serya-shop,
.woocommerce-cart .wp-block-woocommerce-cart,
.woocommerce-checkout .wp-block-woocommerce-checkout,
.woocommerce-account .woocommerce {
	background: #faf6ee;
	color: #1c1a14;
	border-radius: 8px;
}
.woocommerce-cart .wp-block-woocommerce-cart,
.woocommerce-checkout .wp-block-woocommerce-checkout,
.woocommerce-account .woocommerce {
	padding: clamp(1.2rem, 3vw, 2.5rem);
	margin-top: 1.5rem;
}
.woocommerce-cart .wp-block-woocommerce-cart :where(h1,h2,h3,h4,label,td,th,p,a,span),
.woocommerce-checkout .wp-block-woocommerce-checkout :where(h1,h2,h3,h4,label,td,th,p,span),
.woocommerce-account .woocommerce :where(h1,h2,h3,h4,label,td,th,p) { color: #1c1a14; }
