/*
Theme Name: Useful Home
Theme URI: https://usefulhome.shop
Author: Useful Home
Description: Tema base ligero y rapido para el ecommerce de productos utiles del hogar. Hibrido: theme.json para los tokens de diseno y plantillas PHP para tienda. Pensado para usarse con el tema hijo usefulhome-child.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: usefulhome
Tags: e-commerce, custom-menu, custom-logo, featured-images, translation-ready, wide-blocks
*/

/* ==========================================================================
   Base minima. Los tokens (colores, tipografia, espacios) viven en theme.json
   y se exponen como variables --wp--preset--* y --wp--custom--*.
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	-webkit-font-smoothing: antialiased;
}

img,
video {
	max-width: 100%;
	height: auto;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal;
}

.screen-reader-text:focus {
	background: #fff;
	clip: auto;
	clip-path: none;
	color: #000;
	display: block;
	height: auto;
	left: 8px;
	padding: 12px 20px;
	top: 8px;
	width: auto;
	z-index: 100000;
}

.skip-link:focus {
	z-index: 100001;
}

/* Layout */
.uh-container {
	width: 100%;
	max-width: var(--wp--style--global--wide-size, 1280px);
	margin-inline: auto;
	padding-inline: var(--wp--preset--spacing--40, 1.5rem);
}

.uh-main {
	min-height: 60vh;
	padding-block: var(--wp--preset--spacing--50, 2.5rem);
}

/* Header */
.uh-header {
	border-bottom: 1px solid var(--wp--preset--color--border, #e5e5e5);
	background: var(--wp--preset--color--base, #fff);
	position: sticky;
	top: 0;
	z-index: 50;
}

.uh-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--40, 1.5rem);
	min-height: 4.5rem;
}

.uh-header__brand a {
	font-weight: 700;
	font-size: var(--wp--preset--font-size--large, 1.5rem);
	text-decoration: none;
	color: inherit;
}

.uh-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--40, 1.5rem);
	list-style: none;
	margin: 0;
	padding: 0;
}

.uh-nav a {
	text-decoration: none;
	color: inherit;
}

.uh-nav a:hover,
.uh-nav .current-menu-item > a {
	text-decoration: underline;
}

.uh-header__actions {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--30, 1rem);
}

/* Footer */
.uh-footer {
	border-top: 1px solid var(--wp--preset--color--border, #e5e5e5);
	background: var(--wp--preset--color--surface, #f6f6f4);
	padding-block: var(--wp--preset--spacing--50, 2.5rem);
	font-size: var(--wp--preset--font-size--small, 0.875rem);
}

.uh-footer__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--40, 1.5rem);
}

.uh-footer ul {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--30, 1rem);
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Contenido */
.uh-entry__title {
	margin-top: 0;
}

.uh-entry__content > * + * {
	margin-top: 1em;
}

/* Cabecera: carrito */
.uh-cart-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	text-decoration: none;
	color: inherit;
}

.uh-cart-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.4rem;
	height: 1.4rem;
	padding-inline: 0.3rem;
	border-radius: 999px;
	background: var(--wp--preset--color--primary, #111);
	color: var(--wp--preset--color--base, #fff);
	font-size: 0.75rem;
	line-height: 1;
}
