/*
Theme Name: La Yesería
Description: Tema de bloques propio para La Yesería (WooCommerce + Webpay).
Version: 0.1.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: layeseria
*/

/* Estilos que theme.json no cubre. Mantener corto: cada regla aquí se carga en todas las páginas. */

:where(.wp-site-blocks) > * { margin-block-start: 0; }

.lys-header {
	position: sticky;
	top: 0;
	z-index: 50;
	backdrop-filter: saturate(1.4) blur(10px);
	background: color-mix(in srgb, var(--wp--preset--color--base) 88%, transparent);
	border-bottom: 1px solid var(--wp--preset--color--border);
}
.admin-bar .lys-header { top: var(--wp-admin--admin-bar--height, 0); }

/* Tarjetas de producto */
.lys-products .wc-block-product {
	background: #fff;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 18px;
	padding: 0.75rem 0.75rem 1rem;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.lys-products .wc-block-product:hover {
	transform: translateY(-3px);
	box-shadow: var(--wp--preset--shadow--soft);
}
.lys-products .wc-block-components-product-image img { border-radius: 12px; }
.lys-products .wp-block-post-title { margin-block: 0.75rem 0.25rem; }

/* Precios en oferta */
.wc-block-components-product-price del { color: var(--wp--preset--color--muted); font-weight: 400; }
.wc-block-components-product-price ins { text-decoration: none; color: var(--wp--preset--color--primary); }
.wc-block-components-product-sale-badge {
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	text-transform: none;
	font-weight: 600;
}

/* Botón secundario (estilo de bloque "Contorno") */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 2px solid currentColor;
	background: transparent;
	color: var(--wp--preset--color--contrast);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

/* Tarjetas de categoría */
.lys-cat-card { border-radius: 20px; overflow: hidden; transition: transform 0.2s ease; }
.lys-cat-card:hover { transform: translateY(-3px); }
.lys-cat-card a { color: inherit; text-decoration: none; }
.lys-cat-card a::after { content: ""; position: absolute; inset: 0; }
.lys-cat-card { position: relative; }

@media (prefers-reduced-motion: reduce) {
	.lys-products .wc-block-product,
	.lys-cat-card { transition: none; }
	.lys-products .wc-block-product:hover,
	.lys-cat-card:hover { transform: none; }
}

/* Búsqueda del encabezado: icono discreto, no botón principal */
.lys-header .wp-block-search__button {
	background: transparent;
	color: var(--wp--preset--color--contrast);
	padding: 0.5rem;
	border-radius: 999px;
}
.lys-header .wp-block-search__button:hover { background: var(--wp--preset--color--surface); }
.lys-header .wp-block-search__input { border-radius: 999px; border-color: var(--wp--preset--color--border); }

.lys-header .wp-block-site-title { white-space: nowrap; }

@media (max-width: 600px) {
	.lys-hero-media { min-height: 240px !important; }
	.lys-products .wc-block-product { padding: 0.5rem 0.5rem 0.75rem; }
	.lys-products .wp-block-button__link,
	.lys-products .wc-block-components-product-button__button {
		padding: 0.55rem 0.8rem;
		font-size: 0.8125rem;
		white-space: nowrap;
	}
}
