/*
Theme Name: Serya
Theme URI: https://serya.es
Description: Tema a medida para Serya — tienda gourmet premium (AOVE, miel, herbero y pericana de la Sierra de Mariola). Child theme de Twenty Twenty-Five, basado en bloques (FSE) e integrado con WooCommerce.
Author: Serya
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.0
Text Domain: serya
*/

/* Los estilos de marca se definen en theme.json. Aquí solo retoques puntuales. */

/* Botones premium: leve realce al pasar el ratón. */
.wp-block-button__link {
	transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.wp-block-button__link:hover {
	transform: translateY(-1px);
}

/* ===========================================================================
   Tarjetas de categoría — zoom de imagen + revelado del título al hover.
   =========================================================================== */
.serya-cat-card {
	overflow: hidden;
	position: relative;
	cursor: pointer;
}
.serya-cat-card .wp-block-cover__image-background,
.serya-cat-card img.wp-block-cover__image-background {
	transition: transform .6s cubic-bezier(.2,.6,.2,1);
	transform: scale(1.01);
}
.serya-cat-card:hover .wp-block-cover__image-background {
	transform: scale(1.08);
}
.serya-cat-card .wp-block-cover__background {
	transition: opacity .4s ease;
}
.serya-cat-card:hover .wp-block-cover__background {
	opacity: .72;
}
.serya-cat-card h3 a {
	color: inherit;
	text-decoration: none;
	position: relative;
	display: inline-block;
	padding-bottom: .35em;
}
.serya-cat-card h3 a::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 0;
	height: 2px;
	background: var(--wp--preset--color--dorado);
	transition: width .4s ease, left .4s ease;
}
.serya-cat-card:hover h3 a::after {
	left: 15%;
	width: 70%;
}
.serya-cat-card .wp-block-cover__inner-container {
	transition: transform .4s ease;
}
.serya-cat-card:hover .wp-block-cover__inner-container {
	transform: translateY(-6px);
}

/* Cuadrícula de productos WooCommerce: precios en color de marca. */
.woocommerce ul.products li.product .price,
.wc-block-grid__product-price {
	color: var(--wp--preset--color--oliva);
	font-weight: 600;
}

/* Aviso de producto con alcohol. */
.serya-age-notice {
	border: 1px solid var(--wp--preset--color--dorado);
	background: var(--wp--preset--color--crema);
	padding: 1rem 1.25rem;
	border-radius: 4px;
	font-size: .95rem;
}

/* ===========================================================================
   Tarjetas de producto WooCommerce — elevación y realce al hover.
   =========================================================================== */
.woocommerce ul.products li.product {
	transition: transform .35s ease, box-shadow .35s ease;
	padding: .5rem .5rem 1.25rem;
	border-radius: 6px;
	overflow: hidden;
}
.woocommerce ul.products li.product:hover {
	transform: translateY(-8px);
	box-shadow: 0 26px 50px -28px rgba(0, 0, 0, .6);
	background: #1e1a13;
	outline: 1px solid #2e2a22;
}
.woocommerce ul.products li.product a img {
	transition: transform .5s cubic-bezier(.2,.6,.2,1);
	border-radius: 4px;
}
.woocommerce ul.products li.product:hover a img {
	transform: scale(1.04);
}
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .added_to_cart {
	transition: opacity .3s ease, transform .3s ease;
}
@media (min-width: 782px) {
	.woocommerce ul.products li.product .button,
	.woocommerce ul.products li.product .added_to_cart {
		opacity: 0;
		transform: translateY(8px);
	}
	.woocommerce ul.products li.product:hover .button,
	.woocommerce ul.products li.product:hover .added_to_cart {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ===========================================================================
   Barra de valores (iconos de confianza).
   =========================================================================== */
.serya-values {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: clamp(1.5rem, 5vw, 4.5rem);
}
.serya-value {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: .6rem;
	min-width: 130px;
	max-width: 200px;
}
.serya-value svg {
	width: 38px;
	height: 38px;
	stroke: var(--wp--preset--color--oliva);
	fill: none;
	stroke-width: 1.4;
	transition: transform .4s ease, stroke .4s ease;
}
.serya-value:hover svg {
	transform: translateY(-4px) scale(1.06);
	stroke: var(--wp--preset--color--dorado);
}
.serya-value strong {
	font-family: var(--wp--preset--font-family--sans);
	font-size: .8rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--carbon);
}
.serya-value span {
	font-size: .82rem;
	color: var(--wp--preset--color--tierra);
}

/* ===========================================================================
   Reveal al hacer scroll (degradación elegante: si no hay JS, visible).
   =========================================================================== */
/* Sin JS el contenido es visible; la clase .serya-js (añadida por JS) activa la animación. */
.serya-js .serya-reveal {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity .8s ease, transform .8s cubic-bezier(.2,.6,.2,1);
	will-change: opacity, transform;
}
.serya-js .serya-reveal.is-visible {
	opacity: 1;
	transform: none;
}
@media (prefers-reduced-motion: reduce) {
	.serya-js .serya-reveal { opacity: 1; transform: none; transition: none; }
}

/* Pequeño “eyebrow” de sección reutilizable. */
.serya-eyebrow {
	font-family: var(--wp--preset--font-family--sans);
	text-transform: uppercase;
	letter-spacing: .3em;
	font-size: .8rem;
	color: var(--wp--preset--color--dorado);
}

/* ===========================================================================
   HERO — zoom lento (Ken Burns), entrada escalonada, divisor y scroll cue.
   =========================================================================== */
.serya-hero { margin-top: 0; position: relative; overflow: hidden; }

/* El hero va pegado a la cabecera (elimina el gap del layout raíz sobre el main). */
.serya-home-main { margin-block-start: 0; }

/* El contenedor interno ocupa todo el alto y centra el texto, para que el
   indicador de scroll quede anclado al fondo real del hero (no junto al texto). */
.serya-hero.wp-block-cover { align-items: stretch; }
.serya-hero > .wp-block-cover__inner-container {
	display: flex;
	flex-direction: column;
	justify-content: center;
	width: 100%;
	padding-bottom: 4.5rem;
}

/* Zoom lento de la imagen de fondo. */
.serya-hero .wp-block-cover__image-background {
	animation: serya-kenburns 22s ease-in-out infinite alternate;
	transform-origin: 60% 40%;
}
@keyframes serya-kenburns {
	from { transform: scale(1.02); }
	to   { transform: scale(1.12); }
}

/* Contenido del hero centrado. */
.serya-hero-content { text-align: center; }
.serya-hero-content .wp-block-buttons { justify-content: center; }

/* Divisor dorado bajo el eyebrow del hero (centrado). */
.serya-eyebrow--divider::after {
	content: "";
	display: block;
	width: 52px;
	height: 1px;
	background: var(--wp--preset--color--dorado);
	margin: .9rem auto 0;
}

/* Entrada escalonada del contenido del hero. */
.serya-js .serya-hero-content > * {
	opacity: 0;
	transform: translateY(22px);
	animation: serya-hero-in .9s cubic-bezier(.2,.6,.2,1) forwards;
}
.serya-js .serya-hero-content > *:nth-child(1) { animation-delay: .15s; }
.serya-js .serya-hero-content > *:nth-child(2) { animation-delay: .30s; }
.serya-js .serya-hero-content > *:nth-child(3) { animation-delay: .45s; }
.serya-js .serya-hero-content > *:nth-child(4) { animation-delay: .60s; }
@keyframes serya-hero-in {
	to { opacity: 1; transform: none; }
}

/* Indicador de scroll. */
.serya-scrollcue {
	position: absolute;
	left: 50%;
	bottom: 1.6rem;
	transform: translateX(-50%);
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: .35rem;
	color: #efe7d6;
	text-decoration: none;
	font-family: var(--wp--preset--font-family--sans);
	font-size: .7rem;
	letter-spacing: .22em;
	text-transform: uppercase;
	opacity: .85;
	transition: opacity .3s ease, color .3s ease;
	z-index: 3;
}
.serya-scrollcue:hover { opacity: 1; color: var(--wp--preset--color--dorado); }
.serya-scrollcue svg { width: 22px; height: 22px; animation: serya-bounce 1.8s ease-in-out infinite; }
@keyframes serya-bounce {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
	.serya-hero .wp-block-cover__image-background,
	.serya-js .serya-hero-content > *,
	.serya-scrollcue svg { animation: none; }
	.serya-js .serya-hero-content > * { opacity: 1; transform: none; }
}

/* ===========================================================================
   TEMA OSCURO (negro + dorado)
   =========================================================================== */

/* Titulares un punto más claros que el texto base. */
h1, h2, h3, h4, h5, h6,
.wp-block-heading { color: #f4eee1; }

/* Secciones que eran claras → superficies oscuras. */
.has-crema-background-color { background-color: #141310 !important; }
.has-marfil-background-color { background-color: #1e1a13 !important; }

/* Bordes claros (cabecera, barra de valores) → borde oscuro. */
header.wp-block-group[style*="border-bottom"],
#serya-valores { border-color: #2e2a22 !important; }

/* Barra de valores: iconos y textos legibles en oscuro. */
.serya-value svg { stroke: var(--wp--preset--color--dorado); }
.serya-value strong { color: #f4eee1; }
.serya-value span { color: #a89a85; }

/* Precios del grid de la home (sección oscura) → dorado. */
.woocommerce ul.products li.product .price,
.wc-block-grid__product-price { color: var(--wp--preset--color--dorado); }

/* Tarjetas de producto de la home: leve realce sobre el fondo oscuro. */
.serya-home-main ul.products li.product,
.serya-home-main .wc-block-grid__product { color: #ece3d2; }
.serya-home-main ul.products li.product .woocommerce-loop-product__title,
.serya-home-main ul.products li.product h2,
.serya-home-main ul.products li.product h3 { color: #f4eee1; }

/* Eyebrow / textos atenuados. */
.serya-eyebrow { color: var(--wp--preset--color--dorado); }

/* Aviso de producto con alcohol en oscuro. */
.serya-age-notice { background: #1e1a13; color: #ece3d2; }

/* Separación sutil del pie respecto al cuerpo (ambos negros). */
footer.has-oliva-oscuro-background-color { border-top: 1px solid rgba(201,168,92,.35); }

/* Grid de destacados de la home: foto completa sobre teja clara (no recortar). */
.serya-home-main ul.products li.product img {
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background: #fff;
	padding: .6rem;
	border-radius: 6px;
}
