/**
 * Quiero Zapas design system foundations.
 * Section-specific styles are intentionally deferred to later phases.
 */

:root {
	/* Brand aliases. Canonical values are registered in theme.json. */
	--qz-color-ink: var(--wp--preset--color--deep-ink-blue, #16324f);
	--qz-color-charcoal: var(--wp--preset--color--charcoal, #1f2328);
	--qz-color-ivory: var(--wp--preset--color--warm-ivory, #f6f2ec);
	--qz-color-coral: var(--wp--preset--color--coral, #ff6b4a);
	--qz-color-coral-text: #a72f19;
	--qz-color-green: var(--wp--preset--color--accent-green, #2fa66a);
	--qz-color-green-text: #17693f;
	--qz-color-gray: var(--wp--preset--color--soft-gray, #d9d6d0);
	--qz-color-white: var(--wp--preset--color--white, #fff);
	--qz-color-text-muted: #59616a;
	--qz-font-family: var(--wp--preset--font-family--satoshi, Satoshi, Inter, system-ui, sans-serif);
	--qz-font-size-label: var(--wp--preset--font-size--label, 0.8125rem);
	--qz-font-size-button: var(--wp--preset--font-size--button, 1rem);
	--qz-font-size-body: var(--wp--preset--font-size--body, 1.0625rem);
	--qz-font-size-h3: var(--wp--preset--font-size--h-3, clamp(1.5rem, 1.35rem + 0.65vw, 1.75rem));
	--qz-font-size-h2: var(--wp--preset--font-size--h-2, clamp(1.875rem, 1.5rem + 1.6vw, 2.5rem));
	--qz-font-size-h1: var(--wp--preset--font-size--h-1, clamp(2.375rem, 1.7rem + 2.8vw, 3.5rem));
	--qz-font-size-hero: var(--wp--preset--font-size--hero, clamp(2.75rem, 1.65rem + 4.7vw, 5.5rem));
	--qz-font-weight-regular: 400;
	--qz-font-weight-medium: 500;
	--qz-font-weight-strong: 700;
	--qz-space-2xs: var(--wp--preset--spacing--2-xs, 0.25rem);
	--qz-space-xs: var(--wp--preset--spacing--xs, 0.5rem);
	--qz-space-sm: var(--wp--preset--spacing--sm, 0.75rem);
	--qz-space-md: var(--wp--preset--spacing--md, 1rem);
	--qz-space-lg: var(--wp--preset--spacing--lg, 1.5rem);
	--qz-space-xl: var(--wp--preset--spacing--xl, 2rem);
	--qz-space-2xl: var(--wp--preset--spacing--2-xl, 3rem);
	--qz-space-3xl: var(--wp--preset--spacing--3-xl, 4rem);
	--qz-space-4xl: var(--wp--preset--spacing--4-xl, 6rem);
	--qz-radius-sm: 0.5rem;
	--qz-radius-md: 0.75rem;
	--qz-radius-lg: 1rem;
	--qz-radius-pill: 999px;
	--qz-shadow-soft: 0 0.5rem 1.5rem rgb(22 50 79 / 8%);
	--qz-shadow-hover: 0 0.75rem 2rem rgb(22 50 79 / 14%);
	--qz-content-width: 80rem;
	--qz-wide-width: 90rem;
	--qz-gutter: clamp(1rem, 3vw, 2.5rem);
	--qz-transition-fast: 180ms ease;
	--qz-transition-base: 220ms ease;
	--qz-focus-ring: 0 0 0 3px var(--qz-color-white), 0 0 0 6px var(--qz-color-ink);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	text-size-adjust: 100%;
}

body {
	min-width: 20rem;
	margin: 0;
	background: var(--qz-color-ivory);
	color: var(--qz-color-charcoal);
	font-family: var(--qz-font-family);
	font-size: var(--qz-font-size-body);
	font-weight: var(--qz-font-weight-regular);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img,
picture,
svg {
	display: block;
	max-width: 100%;
	height: auto;
}

button,
input,
select,
textarea {
	font: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin-block: 0 0.6em;
	color: var(--qz-color-ink);
	font-weight: var(--qz-font-weight-strong);
	line-height: 1.08;
	text-wrap: balance;
}

h1 { font-size: var(--qz-font-size-h1); }
h2 { font-size: var(--qz-font-size-h2); }
h3 { font-size: var(--qz-font-size-h3); }
p { margin-block: 0 1em; }

a {
	color: var(--qz-color-ink);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
	transition: color var(--qz-transition-fast);
}

a:hover { color: var(--qz-color-coral-text); }

a, button, input, select, textarea, summary, h1, h2, h3 { overflow-wrap: anywhere; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--qz-color-ink);
	outline-offset: 3px;
}

main#primary[tabindex="-1"]:focus { outline: 3px solid var(--qz-color-ink); outline-offset: -3px; }

.qz-container,
.qz-container-wide {
	width: min(calc(100% - (2 * var(--qz-gutter))), var(--qz-content-width));
	margin-inline: auto;
}

.qz-container-wide { max-width: var(--qz-wide-width); }

.qz-heading-hero {
	font-size: var(--qz-font-size-hero);
	letter-spacing: -0.035em;
}

.qz-label,
.qz-badge {
	font-size: var(--qz-font-size-label);
	font-weight: var(--qz-font-weight-strong);
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-transform: uppercase;
}

.qz-button,
.wp-element-button,
:where(button, input[type="button"], input[type="submit"], input[type="reset"]) {
	display: inline-flex;
	min-height: 2.75rem;
	align-items: center;
	justify-content: center;
	gap: var(--qz-space-xs);
	padding: 0.75rem 1.25rem;
	border: 2px solid transparent;
	border-radius: var(--qz-radius-sm);
	background: var(--qz-color-coral);
	color: var(--qz-color-charcoal);
	cursor: pointer;
	font-size: var(--qz-font-size-button);
	font-weight: var(--qz-font-weight-strong);
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: background-color var(--qz-transition-fast), box-shadow var(--qz-transition-fast), transform var(--qz-transition-fast);
}

.qz-button:hover,
.wp-element-button:hover,
:where(button, input[type="button"], input[type="submit"], input[type="reset"]):hover {
	background: #e85a3c;
	color: var(--qz-color-charcoal);
}

:where(button, input, select, textarea):disabled {
	cursor: not-allowed;
	opacity: 0.6;
}

:where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
	width: 100%;
	min-height: 2.75rem;
	padding: 0.7rem 0.875rem;
	border: 1px solid #aaa7a1;
	border-radius: var(--qz-radius-sm);
	background: var(--qz-color-white);
	color: var(--qz-color-charcoal);
	transition: border-color var(--qz-transition-fast), box-shadow var(--qz-transition-fast);
}

textarea {
	min-height: 8rem;
	resize: vertical;
}

::placeholder {
	color: #686d73;
	opacity: 1;
}

.qz-card {
	border: 1px solid var(--qz-color-gray);
	border-radius: var(--qz-radius-lg);
	background: var(--qz-color-white);
	box-shadow: var(--qz-shadow-soft);
	transition: box-shadow var(--qz-transition-base), transform var(--qz-transition-base);
}

.qz-badge,
.qz-chip {
	display: inline-flex;
	min-height: 2rem;
	align-items: center;
	justify-content: center;
	padding: 0.35rem 0.7rem;
	border: 1px solid currentColor;
	border-radius: var(--qz-radius-pill);
	color: var(--qz-color-ink);
}

.qz-chip {
	min-height: 2.75rem;
	padding-inline: 1rem;
	background: transparent;
	font-size: 0.9375rem;
	font-weight: var(--qz-font-weight-medium);
	line-height: 1.2;
	text-transform: none;
}

.qz-badge--coral { color: var(--qz-color-coral-text); }
.qz-badge--green { color: var(--qz-color-green-text); }

.qz-screen-reader-text,
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	border: 0;
	white-space: nowrap;
}

.qz-screen-reader-text:focus,
.screen-reader-text:focus {
	z-index: 100000;
	top: var(--qz-space-md);
	left: var(--qz-space-md);
	width: auto;
	height: auto;
	margin: 0;
	padding: var(--qz-space-sm) var(--qz-space-md);
	overflow: visible;
	clip-path: none;
	border-radius: var(--qz-radius-sm);
	background: var(--qz-color-white);
	box-shadow: var(--qz-focus-ring);
	color: var(--qz-color-ink);
	font-weight: var(--qz-font-weight-strong);
}

@media (hover: hover) and (pointer: fine) {
	.qz-card:hover {
		box-shadow: var(--qz-shadow-hover);
		transform: translateY(-2px);
	}
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}

/* Global shell ----------------------------------------------------------- */

body {
	display: flex;
	min-height: 100vh;
	flex-direction: column;
}

.qz-site-main {
	width: min(100% - (2 * var(--qz-gutter)), var(--qz-content-width));
	flex: 1 0 auto;
	padding-block: clamp(2.5rem, 6vw, 5rem);
}

/* Header ----------------------------------------------------------------- */

.qz-site-header {
	position: sticky;
	z-index: 1000;
	top: 0;
	border-bottom: 1px solid rgb(22 50 79 / 10%);
	background: rgb(246 242 236 / 96%);
	box-shadow: 0 0.25rem 1rem rgb(22 50 79 / 5%);
	backdrop-filter: blur(12px);
}

.admin-bar .qz-site-header {
	top: 32px;
}

.qz-site-header__inner {
	display: flex;
	min-height: 5.5rem;
	align-items: center;
	gap: clamp(1rem, 2.5vw, 2.5rem);
}

.qz-brand {
	display: block;
	flex: 0 0 auto;
	color: inherit;
	text-decoration: none;
}

.qz-brand picture,
.qz-brand img {
	display: block;
}

.qz-brand img {
	width: 8.75rem;
	height: auto;
}

.qz-primary-nav {
	min-width: 0;
	flex: 1 1 auto;
}

.qz-primary-nav__list,
.qz-primary-nav .menu,
.qz-footer-nav ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.qz-primary-nav__list,
.qz-primary-nav .menu {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(0.75rem, 1.8vw, 1.75rem);
}

.qz-primary-nav a {
	position: relative;
	display: flex;
	min-height: 2.75rem;
	align-items: center;
	color: var(--qz-color-ink);
	font-size: 0.9375rem;
	font-weight: var(--qz-font-weight-medium);
	text-decoration: none;
	white-space: nowrap;
}

.qz-primary-nav a::after {
	position: absolute;
	right: 0;
	bottom: 0.25rem;
	left: 0;
	height: 2px;
	background: var(--qz-color-coral);
	content: "";
	transform: scaleX(0);
	transform-origin: center;
	transition: transform var(--qz-transition-fast);
}

.qz-primary-nav a:hover::after,
.qz-primary-nav a:focus-visible::after,
.qz-primary-nav .current-menu-item > a::after {
	transform: scaleX(1);
}

.qz-header-actions {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 0.25rem;
}

.qz-icon-button,
button.qz-icon-button {
	display: inline-flex;
	width: 2.75rem;
	min-width: 2.75rem;
	height: 2.75rem;
	min-height: 2.75rem;
	flex: 0 0 2.75rem;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: var(--qz-radius-pill);
	background: transparent;
	box-shadow: none;
	color: var(--qz-color-ink);
	text-decoration: none;
	transition: color var(--qz-transition-fast), background-color var(--qz-transition-fast);
}

.qz-icon-button:hover,
button.qz-icon-button:hover {
	background: rgb(22 50 79 / 8%);
	color: var(--qz-color-coral-text);
}

.qz-header-actions > a[href*="favoritos"] { position: relative; }
.qz-favorites-count { position: absolute; top: -0.15rem; right: -0.15rem; display: grid; min-width: 1.25rem; height: 1.25rem; place-items: center; padding-inline: 0.2rem; border-radius: 999px; background: var(--qz-color-coral); color: var(--qz-color-charcoal); font-size: 0.7rem; font-weight: 700; line-height: 1; }

.qz-menu-toggle {
	display: none;
}

.qz-menu-toggle__close,
.qz-menu-toggle[aria-expanded="true"] .qz-menu-toggle__open {
	display: none;
}

.qz-menu-toggle[aria-expanded="true"] .qz-menu-toggle__close {
	display: block;
}

.qz-mobile-nav {
	border-top: 1px solid rgb(22 50 79 / 10%);
	background: var(--qz-color-ivory);
}

.qz-mobile-nav[hidden] {
	display: none;
}

.qz-mobile-nav .qz-primary-nav__list {
	display: grid;
	gap: 0;
	padding-block: var(--qz-space-sm) var(--qz-space-lg);
}

.qz-mobile-nav a {
	display: flex;
	min-height: 3rem;
	align-items: center;
	border-bottom: 1px solid rgb(22 50 79 / 10%);
	color: var(--qz-color-ink);
	font-weight: var(--qz-font-weight-medium);
	text-decoration: none;
}

.qz-mobile-nav li:last-child a {
	border-bottom: 0;
	color: #a72f19;
	font-weight: var(--qz-font-weight-strong);
}

/* Footer ----------------------------------------------------------------- */

.qz-site-footer {
	flex: 0 0 auto;
	padding-block: clamp(3rem, 6vw, 5rem) var(--qz-space-xl);
	background: var(--qz-color-ink);
	color: var(--qz-color-white);
}

.qz-site-footer__inner {
	display: grid;
	grid-template-columns: minmax(10rem, 0.8fr) minmax(0, 2.5fr);
	gap: var(--qz-space-2xl) clamp(2rem, 5vw, 5rem);
}

.qz-site-footer__brand img {
	width: min(100%, 10rem);
	height: auto;
}

.qz-site-footer__brand a {
	display: inline-block;
}

.qz-site-footer__claim {
	max-width: 14rem;
	margin-top: var(--qz-space-sm);
	color: var(--qz-color-white);
	font-size: 0.9375rem;
	font-weight: var(--qz-font-weight-medium);
}

.qz-site-footer__navigation {
	display: grid;
	grid-template-columns: repeat(4, minmax(7rem, 1fr));
	gap: var(--qz-space-xl);
}

.qz-footer-nav__heading,
.qz-affiliate-disclosure h2 {
	margin-bottom: var(--qz-space-md);
	color: var(--qz-color-white);
	font-size: var(--qz-font-size-label);
	font-weight: var(--qz-font-weight-strong);
	letter-spacing: 0.06em;
	line-height: 1.3;
	text-transform: uppercase;
}

.qz-footer-nav li + li {
	margin-top: var(--qz-space-xs);
}

.qz-site-footer a {
	color: var(--qz-color-white);
	font-size: 0.9375rem;
	text-decoration-color: transparent;
}

.qz-site-footer a:hover,
.qz-site-footer a:focus-visible {
	color: #ff9a83;
	text-decoration-color: currentColor;
}

.qz-site-footer a:focus-visible {
	outline-color: var(--qz-color-white);
}

.qz-affiliate-disclosure {
	grid-column: 1 / -1;
	padding: var(--qz-space-lg);
	border: 1px solid rgb(255 255 255 / 35%);
	border-radius: var(--qz-radius-md);
	background: rgb(255 255 255 / 5%);
}

.qz-affiliate-disclosure h2 {
	margin-bottom: var(--qz-space-xs);
}

.qz-affiliate-disclosure p {
	max-width: 70ch;
	margin: 0;
	font-size: 0.9375rem;
}

.qz-site-footer__copyright {
	grid-column: 1 / -1;
	margin: 0;
	padding-top: var(--qz-space-lg);
	border-top: 1px solid rgb(255 255 255 / 18%);
	color: rgb(255 255 255 / 78%);
	font-size: 0.8125rem;
}

@media (max-width: 63.999rem) {
	.qz-site-header__inner {
		display: grid;
		min-height: 4.5rem;
		grid-template-columns: auto minmax(0, 1fr) auto;
		gap: var(--qz-space-sm);
	}

	.qz-primary-nav {
		display: none;
	}

	.qz-brand img {
		width: 2.75rem;
	}

	.qz-brand {
		margin-right: 0;
	}

	.qz-header-actions {
		display: grid;
		grid-template-columns: repeat(3, 2.75rem);
		margin-left: auto;
	}

	.qz-header-actions > .qz-icon-button {
		display: inline-flex;
	}

	.qz-menu-toggle {
		display: inline-flex;
	}

	.qz-site-footer__inner {
		grid-template-columns: 1fr;
	}

	.qz-site-footer__navigation {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.qz-affiliate-disclosure,
	.qz-site-footer__copyright {
		grid-column: auto;
	}
}

@media (max-width: 37.5rem) {
	.qz-site-footer__navigation {
		grid-template-columns: 1fr;
		gap: var(--qz-space-lg);
	}
}

@media (max-width: 48.875rem) {
	.admin-bar .qz-site-header {
		top: 46px;
	}
}

/* Not-found template: all layout overrides stay within the 404 content. */
.qz-not-found {
	display: grid;
	width: 100%;
	min-height: clamp(34rem, 72vh, 48rem);
	align-items: center;
	padding-block: clamp(3rem, 7vw, 6rem);
	background: var(--qz-color-ivory);
	text-align: center;
}

.qz-not-found__content { max-width: 52rem; }

.qz-not-found__code {
	margin: 0 0 var(--qz-space-lg);
	color: var(--qz-color-coral-text);
	font-size: clamp(3.5rem, 7vw, 5.5rem);
	font-weight: var(--qz-font-weight-strong);
	line-height: 1;
	letter-spacing: -0.04em;
}

.qz-not-found h1 { margin-bottom: var(--qz-space-lg); }

.qz-not-found__lead {
	margin-bottom: var(--qz-space-xs);
	color: var(--qz-color-ink);
	font-size: clamp(1.125rem, 2vw, 1.375rem);
	text-wrap: balance;
}

.qz-not-found__hint {
	margin-bottom: 0;
	color: var(--qz-color-text-muted);
	text-wrap: balance;
}

.qz-not-found__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--qz-space-md);
	margin-top: var(--qz-space-xl);
}

.qz-not-found__actions .qz-button { min-height: 3.25rem; }

.qz-not-found__home {
	border-color: var(--qz-color-ink);
	background: transparent;
	color: var(--qz-color-ink);
}

.qz-not-found__actions .qz-button:hover {
	background: var(--qz-color-ink);
	color: var(--qz-color-white);
}

.qz-not-found__navigation {
	margin-top: var(--qz-space-2xl);
	padding-top: var(--qz-space-xl);
	border-top: 1px solid var(--qz-color-gray);
}

.qz-not-found__navigation h2 {
	margin-bottom: var(--qz-space-sm);
	font-size: var(--qz-font-size-body);
	line-height: 1.5;
}

.qz-not-found__navigation ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--qz-space-xs) var(--qz-space-lg);
	margin: 0;
	padding: 0;
	list-style: none;
}

.qz-not-found__navigation a {
	display: inline-flex;
	min-height: 2.75rem;
	align-items: center;
}

@media (max-width: 37.5rem) {
	.qz-not-found { min-height: 0; }
	.qz-not-found__actions { flex-direction: column; }
	.qz-not-found__actions .qz-button { width: 100%; }
}
