/* ==========================================================================
   Bohemian & Chic — Base styles
   ==========================================================================
   Reset moderno, tipografía base, layout primitives y utilidades transversales.
   No reglas de componentes aquí — esas viven en assets/css/components/.
   ========================================================================== */

/* ── Reset (modern minimal) ─────────────────────────────── */
*,
*::before,
*::after {
	box-sizing: border-box;
}

* {
	margin: 0;
}

html {
	-webkit-text-size-adjust: 100%;
	-moz-text-size-adjust: 100%;
	text-size-adjust: 100%;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	scroll-behavior: smooth;
	tab-size: 4;
	hanging-punctuation: first last;
}

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

body {
	min-height: 100vh;
	min-height: 100dvh;
	font-family: var(--bc-font-sans);
	font-size: var(--bc-fs-base);
	font-weight: var(--bc-fw-regular);
	line-height: var(--bc-lh-loose);
	color: var(--bc-text);
	background: var(--bc-off-white);
	text-rendering: optimizeLegibility;
}

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

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

button {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
	overflow-wrap: break-word;
	text-wrap: pretty;
}

#root,
#__next {
	isolation: isolate;
}

a {
	color: var(--bc-accent);
	text-decoration: none;
	transition: color var(--bc-transition-fast);
}

a:hover {
	color: var(--bc-accent-deep);
}

ul,
ol {
	padding: 0;
	list-style: none;
}

/* ── Tipografía base ────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
	color: var(--bc-text);
	text-wrap: balance;
}

h1 {
	font-family: var(--bc-font-serif);
	font-size: var(--bc-fs-3xl);
	font-weight: var(--bc-fw-light);
	line-height: var(--bc-lh-tight);
	letter-spacing: var(--bc-ls-tight);
}

h1.bc-display {
	font-family: var(--bc-font-display);
	font-style: italic;
	font-weight: var(--bc-fw-light);
}

h2 {
	font-family: var(--bc-font-serif);
	font-size: var(--bc-fs-2xl);
	font-weight: var(--bc-fw-light);
	line-height: var(--bc-lh-snug);
	letter-spacing: var(--bc-ls-tight);
}

h3 {
	font-family: var(--bc-font-serif);
	font-size: var(--bc-fs-xl);
	font-weight: var(--bc-fw-regular);
	line-height: var(--bc-lh-snug);
}

h4 {
	font-family: var(--bc-font-sans);
	font-size: var(--bc-fs-lg);
	font-weight: var(--bc-fw-medium);
	line-height: var(--bc-lh-normal);
}

h5 {
	font-family: var(--bc-font-sans);
	font-size: var(--bc-fs-md);
	font-weight: var(--bc-fw-medium);
	line-height: var(--bc-lh-normal);
}

h6 {
	font-family: var(--bc-font-sans);
	font-size: var(--bc-fs-sm);
	font-weight: var(--bc-fw-semi);
	letter-spacing: var(--bc-ls-wide);
	text-transform: uppercase;
}

p {
	max-width: 65ch;
}

p + p {
	margin-top: 1em;
}

strong,
b {
	font-weight: var(--bc-fw-semi);
}

em,
i {
	font-style: italic;
}

small {
	font-size: var(--bc-fs-xs);
}

/* ── Microelementos tipográficos ────────────────────────── */
/* Reunión 2026-11-19: kicker/overline ilegible en móvil — el beige `--bc-accent`
   sobre crema daba ~1.6:1 de contraste (fallaba WCAG AA incluso para texto no
   pequeño). Pasamos a `--bc-text-muted` (contraste >6:1 sobre crema) y
   escalamos ligeramente en móvil. Los sobre-imagen siguen con su override
   blanco por componente (cat-card, banner-revela, hero). */
.bc-overline {
	display: inline-block;
	font-family: var(--bc-font-sans);
	font-size: 0.75rem;
	font-weight: var(--bc-fw-medium);
	letter-spacing: var(--bc-ls-overline);
	text-transform: uppercase;
	color: var(--bc-text-muted);
}

@media (max-width: 767px) {
	.bc-overline {
		font-size: 0.8125rem;
		letter-spacing: 0.22em;
	}
}

.bc-label-sm {
	display: inline-block;
	font-family: var(--bc-font-sans);
	font-size: 0.625rem;
	font-weight: var(--bc-fw-semi);
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--bc-text-muted);
}

.bc-script {
	font-family: var(--bc-font-script);
	font-size: 1.5em;
	color: var(--bc-accent-deep);
}

/* ── Container ──────────────────────────────────────────── */
.bc-container {
	width: 100%;
	max-width: var(--bc-container);
	margin-inline: auto;
	padding-inline: var(--bc-container-px);
}

.bc-container--md {
	max-width: var(--bc-container-md);
}

.bc-container--sm {
	max-width: var(--bc-container-sm);
}

.bc-container--xs {
	max-width: var(--bc-container-xs);
}

/* ── Section ────────────────────────────────────────────── */
.bc-section {
	padding-block: var(--bc-space-xl);
}

.bc-section--sm {
	padding-block: var(--bc-space-lg);
}

.bc-section--xs {
	padding-block: var(--bc-space-md);
}

.bc-section--dark {
	background: var(--bc-black);
	color: var(--bc-white);
}

.bc-section--off {
	background: var(--bc-off-white);
}

.bc-section--white {
	background: var(--bc-white);
}

@media (max-width: 768px) {
	.bc-section {
		padding-block: var(--bc-space-lg);
	}
}

/* ── Stack (vertical rhythm) ────────────────────────────── */
.bc-stack > * + * {
	margin-top: var(--bc-stack-space, 1rem);
}

.bc-stack--xs { --bc-stack-space: var(--bc-space-xs); }
.bc-stack--sm { --bc-stack-space: var(--bc-space-sm); }
.bc-stack--md { --bc-stack-space: var(--bc-space-md); }
.bc-stack--lg { --bc-stack-space: var(--bc-space-lg); }

/* ── Grid utilities ─────────────────────────────────────── */
.bc-grid {
	display: grid;
	gap: var(--bc-grid-gap, var(--bc-space-md));
}

.bc-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bc-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bc-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1024px) {
	.bc-grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
	.bc-grid--3,
	.bc-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.bc-grid--2 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
	.bc-grid--2,
	.bc-grid--3,
	.bc-grid--4 { grid-template-columns: minmax(0, 1fr); }
}

/* ── Flex utilities ─────────────────────────────────────── */
.bc-flex {
	display: flex;
	gap: var(--bc-flex-gap, var(--bc-space-sm));
}

.bc-flex--center      { align-items: center; justify-content: center; }
.bc-flex--between     { align-items: center; justify-content: space-between; }
.bc-flex--column      { flex-direction: column; }
.bc-flex--wrap        { flex-wrap: wrap; }

/* ── Visually hidden (a11y) ─────────────────────────────── */
.bc-sr-only,
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ── Skip link ──────────────────────────────────────────── */
.bc-skip-link {
	position: absolute;
	top: -100px;
	left: var(--bc-space-sm);
	z-index: var(--bc-z-loader);
	padding: var(--bc-space-xs) var(--bc-space-sm);
	background: var(--bc-black);
	color: var(--bc-white);
	font-size: var(--bc-fs-xs);
	font-weight: var(--bc-fw-semi);
	letter-spacing: var(--bc-ls-wide);
	text-transform: uppercase;
	transition: top var(--bc-transition-fast);
}

.bc-skip-link:focus {
	top: var(--bc-space-sm);
	color: var(--bc-white);
}

/* ── Focus visible global ───────────────────────────────── */
:focus-visible {
	outline: 2px solid var(--bc-accent);
	outline-offset: 3px;
}

/* ── Selection ──────────────────────────────────────────── */
::selection {
	background: var(--bc-accent);
	color: var(--bc-white);
}

/* ── Scrollbar minimal cálida (webkit) ──────────────────── */
::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

::-webkit-scrollbar-track {
	background: var(--bc-off-white);
}

::-webkit-scrollbar-thumb {
	background: var(--bc-mid-gray);
}

::-webkit-scrollbar-thumb:hover {
	background: var(--bc-dark-gray);
}

/* ── Page enter transition ──────────────────────────────
   Fade-in suave del contenido en cada navegación. En la
   primera carga del sitio conviven con el splash sin conflicto
   (el splash tapa hasta que se retira). En cargas posteriores
   la clase .bc-splash-seen ya está presente, así que el efecto
   se percibe como una transición ligera entre páginas.
   ────────────────────────────────────────────────────── */
.bc-main {
	animation: bc-page-in 0.35s ease-out both;
}

@keyframes bc-page-in {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	.bc-main {
		animation: none;
	}
}

/* ── Salvaguarda contra texto vertical en móvil ─────────────
   Blindaje defensivo: cualquier bloque de WooCommerce, plugin
   o estilo heredado podría inyectar `writing-mode: vertical-*`
   o `word-break: break-all` que colapsa el texto letra a letra
   en columnas estrechas. Forzamos modo horizontal y normalización
   de wrap sobre contenido textual, sin pisar SVG ni elementos que
   legítimamente roten (ninguno hoy en el tema). */
html,
body {
	writing-mode: horizontal-tb;
}

body p,
body li,
body h1, body h2, body h3, body h4, body h5, body h6,
body span,
body a,
body button,
body label,
body input,
body textarea,
body select,
body option,
body dt, body dd,
body td, body th,
body figcaption,
body blockquote,
body time,
body small,
body strong,
body em,
body [class*="bc-"],
body [class*="wc-"],
body [class*="wp-block-"] {
	writing-mode: horizontal-tb;
	word-break: normal;
	overflow-wrap: break-word;
}

/* Evitar scroll horizontal accidental en móvil (overflow-x clip
   permite que los menús off-canvas con `position: fixed` sigan
   deslizándose sin generar barra de scroll global). */
html,
body {
	overflow-x: clip;
}

/* ── Print baseline ─────────────────────────────────────── */
@media print {
	body {
		background: white;
		color: black;
	}

	.bc-no-print {
		display: none !important;
	}
}
