/*
Theme Name:   Hierba Buena Grow
Theme URI:    http://hierba-buena-grow.local
Description:  Child theme de Astra para el growshop Hierba Buena Grow. Contiene los
              overrides de plantilla de WooCommerce, el sistema de filtros de tienda
              y los tokens de diseño de la marca (negro + verde neón).
Author:       Hierba Buena Grow
Template:     astra
Version:      1.0.0
Text Domain:  hierba-buena-grow
*/

/* =========================================================================
   1. TOKENS DE DISEÑO
   Fuente única de verdad para color, tipografía y espaciado.
   ========================================================================= */

:root {
	/* Marca */
	--hbg-negro:        #0d0d0d;
	--hbg-neon:         #39FF14;
	--hbg-lima:         #c4e538;

	/* Superficies — escalonadas para dar profundidad sobre el negro */
	--hbg-superficie-1: #141414;  /* cards */
	--hbg-superficie-2: #1c1c1c;  /* hover de cards, inputs */
	--hbg-superficie-3: #262626;  /* bordes suaves, divisores */

	/* Texto — sobre fondo oscuro */
	--hbg-texto:        #f2f2f2;
	--hbg-texto-suave:  #b8b8b8;  /* 8.9:1 sobre #0d0d0d — AAA para texto normal */
	--hbg-texto-tenue:  #8a8a8a;  /* 5.1:1 — AA, sólo para metadatos */

	/* Semánticos */
	--hbg-borde:        #2e2e2e;
	--hbg-borde-fuerte: #3d3d3d;
	--hbg-error:        #ff5c5c;
	--hbg-exito:        var(--hbg-neon);

	/* Tipografía */
	--hbg-fuente-titulo: 'Fredoka', 'Baloo 2', system-ui, sans-serif;
	--hbg-fuente-texto:  'Baloo 2', system-ui, -apple-system, sans-serif;

	/* Espaciado — escala de 4px */
	--hbg-e1: 0.25rem;
	--hbg-e2: 0.5rem;
	--hbg-e3: 0.75rem;
	--hbg-e4: 1rem;
	--hbg-e5: 1.5rem;
	--hbg-e6: 2rem;
	--hbg-e7: 3rem;
	--hbg-e8: 4rem;

	/* Radios */
	--hbg-radio-sm: 8px;
	--hbg-radio:    14px;
	--hbg-radio-lg: 20px;
	--hbg-radio-full: 999px;

	/* Sombras y glow */
	--hbg-glow:        0 0 0 3px rgba(57, 255, 20, 0.25);
	--hbg-glow-fuerte: 0 0 24px rgba(57, 255, 20, 0.35);
	--hbg-sombra:      0 4px 20px rgba(0, 0, 0, 0.5);

	/* Movimiento */
	--hbg-transicion: 160ms cubic-bezier(0.4, 0, 0.2, 1);

	/* Layout */
	--hbg-ancho-max:   1440px;
	--hbg-sidebar:     264px;
	--hbg-header-alto: 72px;
}

/* Respetar la preferencia de movimiento reducido del sistema. */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* =========================================================================
   2. ACCESIBILIDAD — foco visible
   Astra deja el foco muy tenue sobre fondo negro. Esto lo hace inequívoco.
   ========================================================================= */

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 3px solid var(--hbg-neon);
	outline-offset: 2px;
	border-radius: var(--hbg-radio-sm);
}

/* Sólo quitamos el outline por defecto cuando el navegador soporta :focus-visible,
   para no dejar sin foco a la navegación por teclado en navegadores viejos. */
@supports selector(:focus-visible) {
	:where(a, button, input, select, textarea):focus:not(:focus-visible) {
		outline: none;
	}
}

/* Salto al contenido para lectores de pantalla y teclado. */
.hbg-saltar-contenido {
	position: absolute;
	left: -9999px;
	top: var(--hbg-e2);
	z-index: 10000;
	padding: var(--hbg-e3) var(--hbg-e5);
	background: var(--hbg-neon);
	color: var(--hbg-negro);
	font-family: var(--hbg-fuente-titulo);
	font-weight: 600;
	border-radius: var(--hbg-radio-sm);
	text-decoration: none;
}

.hbg-saltar-contenido:focus {
	left: var(--hbg-e2);
}

/* =========================================================================
   3. UTILIDADES
   ========================================================================= */

.hbg-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
