/* =====================================================================================================================
 * MotorCasión · LA NAVEGACIÓN NUEVA (inc/navegacion.php, MC_NAV). Encargo 13-B (03/10/2026), especificación «Conductor» del iMac.
 * Todo cuelga de body.mc-nav (solo existe con MC_NAV abierto en esta visita). Tokens --mc-* (de noche, los mismos con los oscuros).
 * Sin !important (salvo reduced-motion, la excepción de accesibilidad) y sin @layer: se gana con un selector más (CLAUDE.md §3).
 * Contrastes de la especificación: texto #111214 18,74 · secundario #5A5F6A 6,40 · activo #A85300 5,38 (noche #F5F4F1 · #9AA0AA 7,12 · #FFB04A).
 * ===================================================================================================================== */

/* ---------- 0 · «Saltar al contenido» (§7.2): escondido hasta recibir el foco ---------- */
html body.mc-nav .mc-saltar { position: fixed; top: 8px; left: 8px; z-index: 100000; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--mc-r-m); background: var(--mc-carbon); color: #FFF; font-family: var(--mc-letra-titulos); font-weight: 700; font-size: 16px; text-decoration: none; transform: translateY(-200%); }
html body.mc-nav .mc-saltar:focus { transform: none; outline: none; box-shadow: 0 0 0 3px #FFF, 0 0 0 6px var(--mc-carbon); }

/* ---------- 1 · El botón ☾ pintado en PHP (nombre fijo «Modo oscuro», el icono siempre la luna; solo cambia aria-pressed, §7.3).
 *     Sin JavaScript no se ve (sería un botón muerto). Pulsado: fondo suave y borde, como un interruptor. ---------- */
html:not(.mc-cab-js) body.mc-nav [data-mc-tema] { display: none; }
html body.mc-nav [data-mc-tema][aria-pressed="true"] { background: var(--mc-acento-suave); box-shadow: inset 0 0 0 1px var(--mc-borde-fuerte); }
/* El contorno de foco que Woodmart pone con !important (M-14), del color de la casa de día y de noche */
html body.mc-nav { --wd-otl-color: var(--mc-foco); }
/* Ningún foco queda cortado por el borde de abajo de la ventana (C-5) */
:root:has(> body.mc-nav) { scroll-padding-bottom: 8px; }
html body.mc-nav .mc-tema-boton--icono { width: 44px; height: 44px; min-width: 44px; padding: 0; color: var(--mc-texto); }

/* ---------- 2 · ORDENADOR (≥ 1200): una fila de 76 px, el menú pegado al logo, utilidades a la derecha ---------- */
@media (min-width: 1200px) {
	/* 13b (revisión del 13, BAJO): 77 px (76 + la raya de abajo) y, con sesión, los 32 px de la barra de WordPress también en :root (Woodmart
	   solo los pone en el <body>; scroll-padding-top se calcula en <html>), como cabecera-iconos.css de 1025 a 1199. */
	:root:has(> body.mc-nav) { --wd-header-general-sticky-h: 76px; scroll-padding-top: calc(var(--wd-admin-bar-h, 0px) + 77px); }
	:root:has(> body.admin-bar.mc-nav) { --wd-admin-bar-h: 32px; }
	/* 13b (MEDIO 1): lo que se queda quieto al bajar (índice del artículo, cabecera y lateral de servicios, mapa y lateral de la ficha,
	   lateral del coche, «Mi área»…) se pega JUSTO DEBAJO de la cabecera fija, no a 24-32 px del borde (quedaba tapado). */
	html body.mc-nav .mc-pagina :is(.mc-articulo__indice, .mc-dir__mapa, .mc-ficha__lateral, .mc-serv__lado, .mc-serv__hero .mc-serv__cabecera, .mc-coche__lateral),
	html body.mc-nav :is(.mc-alta__intro, .mc-venta-hero__texto, .mc-area__pestanas) { top: calc(var(--wd-admin-bar-h, 0px) + 77px + var(--mc-e-4)); }
	html body.mc-nav .whb-general-header { background-color: var(--mc-fondo); border-bottom: 1px solid var(--mc-borde); }
	/* Fija al bajar también en el ordenador (§2.1), con el mismo «sticky» del navegador que la cabecera del móvil (cabecera-iconos.css):
	   medido antes, a 1440 la cabecera se iba con la página (position: static). Mide lo mismo pegada que suelta (76 px). */
	html body.mc-nav { overflow-x: clip; }
	html body.mc-nav .whb-header { position: sticky; top: var(--wd-admin-bar-h, 0px); z-index: 390; }
	html body.mc-nav .whb-header.whb-sticky-prepared { padding-top: 0; }
	html body.mc-nav .whb-header.whb-sticky-prepared .whb-main-header,
	html body.mc-nav .whb-header.whb-sticked .whb-main-header,
	html body.mc-nav .whb-header.whb-scroll-stick.whb-scroll-down .whb-main-header { position: relative; top: auto; transform: none; }
	/* Las columnas de Woodmart llevan 15 px de relleno a cada lado: se quitan entre el logo y el menú para que el hueco sea el de la
	   especificación (32 px; 40 desde 1440), medido de la punta del logo al primer apartado. */
	html body.mc-nav .whb-general-header .whb-col-left { flex: 0 0 auto; max-width: none; padding-inline-end: 0; }
	html body.mc-nav .whb-general-header .whb-col-center { flex: 1 1 auto; justify-content: flex-start; min-width: 0; padding-inline-start: 0; margin-inline-start: 8px; } /* medido: la caja del logo deja 24 px más; 8 + 24 = 32 */
	html body.mc-nav .whb-general-header .whb-col-right { flex: 0 0 auto; margin-inline-start: auto; }
	html body.mc-nav .whb-general-header .whb-col-center > .mc-nav { height: 100%; }

	html body.mc-nav .mc-nav { display: flex; align-self: stretch; }
	html body.mc-nav .mc-nav__lista { display: flex; align-items: stretch; gap: 24px; margin: 0; padding: 0; list-style: none; height: var(--wd-header-general-h, 76px); }
	html body.mc-nav .mc-nav__item { position: relative; display: flex; align-items: center; margin: 0; }
	html body.mc-nav .mc-nav__a, html body.mc-nav .mc-nav__boton {
		display: inline-flex; align-items: center; gap: 6px; min-height: 48px; min-width: 44px; padding: 0 2px; margin: 0;
		background: none; border: 0; border-radius: var(--mc-r-s); box-shadow: none; cursor: pointer;
		font-family: var(--mc-letra-titulos); font-size: 15px; font-weight: 600; line-height: 1.2; letter-spacing: 0; text-transform: none; white-space: nowrap;
		color: var(--mc-texto); text-decoration: none; text-underline-offset: 8px;
	}
	html body.mc-nav .mc-nav__a:hover, html body.mc-nav .mc-nav__boton:hover .mc-nav__texto { text-decoration: underline 2px currentColor; text-underline-offset: 8px; }
	html body.mc-nav .mc-nav__a:focus-visible, html body.mc-nav .mc-nav__boton:focus-visible { outline: none; box-shadow: var(--mc-foco-anillo); }
	html body.mc-nav .mc-nav__item--actual > .mc-nav__a, html body.mc-nav .mc-nav__item--actual > .mc-nav__boton { font-weight: 700; }
	html body.mc-nav .mc-nav__item--actual > .mc-nav__a, html body.mc-nav .mc-nav__item--actual > .mc-nav__boton .mc-nav__texto { text-decoration: underline 3px var(--mc-texto-marca); text-underline-offset: 8px; }
	html body.mc-nav .mc-nav__flecha { width: 14px; height: 14px; color: currentColor; transition: transform var(--mc-mov-rapido); }
	html body.mc-nav .mc-nav__boton[aria-expanded="true"] .mc-nav__flecha { transform: rotate(180deg); }

	/* Los paneles (§2.5): blancos, borde fino, esquinas de 14 px y sombra; de noche, la superficie oscura. Cerrados por defecto. */
	html body.mc-nav .mc-nav__panel {
		display: none; position: absolute; top: 100%; left: 0; z-index: 400; width: 340px; padding: 12px;
		max-height: calc(100dvh - var(--wd-admin-bar-h, 0px) - 96px); overflow: auto;
		background: var(--mc-fondo); color: var(--mc-texto); border: 1px solid var(--mc-borde); border-radius: var(--mc-r-l); box-shadow: var(--mc-sombra-3);
		text-align: left; font-family: var(--mc-letra-texto); text-transform: none; letter-spacing: 0;
	}
	:root[data-tema="oscuro"] body.mc-nav .mc-nav__panel { background: var(--mc-superficie); }
	html body.mc-nav .mc-nav__item--derecha .mc-nav__panel { left: auto; right: 0; }
	html body.mc-nav .mc-nav__panel--mega { width: min(760px, calc(100vw - 48px)); padding: 24px; }
	html body.mc-nav .mc-nav__boton[aria-expanded="true"] + .mc-nav__panel { display: block; animation: mc-nav-aparece var(--mc-mov-rapido) var(--mc-curva); }
	html:not(.mc-cab-js) body.mc-nav .mc-nav__item:is(:hover, :focus-within) .mc-nav__panel { display: block; } /* sin JavaScript: ratón y foco */
	@keyframes mc-nav-aparece { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

	html body.mc-nav .mc-nav__panel ul { list-style: none; margin: 0; padding: 0; }
	html body.mc-nav .mc-nav__panel-cabeza { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0 0 12px; padding: 0 0 8px; border-bottom: 1px solid var(--mc-borde); }
	html body.mc-nav .mc-nav__panel .mc-nav__ver-todo { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; border-radius: var(--mc-r-m); color: var(--mc-texto); font-family: var(--mc-letra-titulos); font-size: 16px; font-weight: 700; text-decoration: none; }
	html body.mc-nav .mc-nav__ver-todo .mc-icono { width: 18px; height: 18px; color: var(--mc-texto-marca); }
	html body.mc-nav .mc-nav__grupos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
	html body.mc-nav .mc-nav__grupo-t { margin: 0 0 6px; padding: 0 12px; font-family: var(--mc-letra-titulos); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mc-texto-2); }
	html body.mc-nav .mc-nav__panel .mc-nav__enlace { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; min-height: 48px; padding: 8px 12px; border-radius: var(--mc-r-m); color: var(--mc-texto); text-decoration: none; }
	html body.mc-nav .mc-nav__icono { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--mc-r-m); background: var(--mc-acento-suave); color: var(--mc-texto-marca); }
	html body.mc-nav .mc-nav__icono .mc-icono { width: 22px; height: 22px; }
	html body.mc-nav .mc-nav__nombre { display: block; font-family: var(--mc-letra-titulos); font-size: 16px; font-weight: 600; line-height: 1.25; color: var(--mc-texto); }
	html body.mc-nav .mc-nav__desc { display: block; margin-top: 2px; font-family: var(--mc-letra-texto); font-size: 14px; line-height: 1.35; color: var(--mc-texto-2); }
	html body.mc-nav .mc-nav__panel :is(.mc-nav__enlace, .mc-nav__ver-todo):hover { background: var(--mc-fondo-2); }
	:root[data-tema="oscuro"] body.mc-nav .mc-nav__panel :is(.mc-nav__enlace, .mc-nav__ver-todo):hover { background: var(--mc-superficie-2); }
	html body.mc-nav .mc-nav__panel :is(.mc-nav__enlace, .mc-nav__ver-todo):focus-visible { outline: none; background: var(--mc-fondo-2); box-shadow: var(--mc-foco-anillo); }
	html body.mc-nav .mc-nav__panel :is(.mc-nav__enlace, .mc-nav__ver-todo):is([aria-current="page"], [aria-current="true"]) { background: var(--mc-fondo-2); box-shadow: inset 4px 0 0 var(--mc-texto-marca); }
	html body.mc-nav .mc-nav__panel .mc-nav__enlace:is([aria-current="page"], [aria-current="true"]) .mc-nav__nombre { font-weight: 700; }

	/* Las utilidades (§2.1): ☾ · Entrar · Ver planes, 12 px entre sí. «¿Tienes un taller?» dentro de «Ver planes» desde 1440. */
	html body.mc-nav .whb-general-header .mc-utiles { display: flex; align-items: center; gap: 12px; }
	html body.mc-nav .mc-utiles__cuenta { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 8px; border-radius: var(--mc-r-m); color: var(--mc-texto); font-family: var(--mc-letra-titulos); font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; }
	html body.mc-nav .mc-utiles__cuenta .mc-icono { width: 20px; height: 20px; color: var(--mc-texto-marca); }
	html body.mc-nav .mc-utiles__cuenta:hover span { text-decoration: underline 2px currentColor; text-underline-offset: 6px; }
	html body.mc-nav .mc-utiles__cuenta:focus-visible { outline: none; box-shadow: var(--mc-foco-anillo); }
}
@media (min-width: 1440px) {
	html body.mc-nav .whb-general-header .whb-col-center { margin-inline-start: 16px; } /* 16 + 24 = 40 */
	html body.mc-nav .mc-nav__lista { gap: 32px; }
	html body.mc-nav .mc-nav__a, html body.mc-nav .mc-nav__boton { font-size: 16px; }
}
/* «¿Tienes un taller?» dentro de «Ver planes»: la especificación pedía desde 1440, pero medido a 1440 (fila de 1324 px: logo 262 + 40 +
   menú 640 + utilidades 418) se montaba 36 px sobre «Para profesionales». Como la letra nunca se baja (A-6), sale desde 1600 (sobran 116 px). */
@media (min-width: 1600px) {
	html body.mc-nav .whb-general-header .mc-utiles .mc-cab-pro__texto { display: grid; }
	html body.mc-nav .whb-general-header .mc-utiles .mc-cab-pro { padding: 6px 6px 6px 14px; border-color: var(--mc-texto); }
}
html body.mc-nav .mc-cab-pro__texto strong { white-space: nowrap; }
@media (max-width: 1199px) { html body.mc-nav .mc-nav { display: none; } }

/* ---------- 3 · MÓVIL Y TABLETA (< 1200): la fila del MENÚ (MENÚ a la izquierda; «Ver planes» y ☾ a la derecha) ---------- */
@media (max-width: 1199px) {
	/* La fila «¿Tienes un taller?» de abajo sobra: «Ver planes» ya viene en PHP en la fila del MENÚ (sin copiarlo con JavaScript). */
	:root:has(> body.mc-nav) { --wd-header-bottom-sm-h: 0.00001px; }
	html body.mc-nav .whb-header .whb-header-bottom { display: none; }
	html body.mc-nav .whb-general-header .whb-mobile-left { flex: 1 1 auto; max-width: none; }
	html body.mc-nav .whb-general-header :is(.whb-mobile-center, .whb-mobile-right) { display: none; }
	html body.mc-nav .mc-menu-fila { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
	html body.mc-nav .mc-menu { display: flex; }
	html body.mc-nav :is(.mc-menu__boton, .mc-menu__sin-js) {
		display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 8px 0 0; margin: 0;
		background: none; border: 0; border-radius: var(--mc-r-pildora); box-shadow: none; cursor: pointer; color: var(--mc-texto); text-decoration: none;
		font-family: var(--mc-letra-titulos); font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em;
	}
	html body.mc-nav :is(.mc-menu__boton, .mc-menu__sin-js):focus-visible { outline: none; box-shadow: var(--mc-foco-anillo); }
	html body.mc-nav .mc-menu__circulo { display: grid; place-items: center; width: 44px; height: 44px; border: 1.5px solid var(--mc-borde-fuerte); border-radius: 50%; }
	html body.mc-nav .mc-menu__circulo .mc-icono { width: 22px; height: 22px; }
	html:not(.mc-cab-js) body.mc-nav .mc-menu__boton { display: none; }
	html.mc-cab-js body.mc-nav .mc-menu__sin-js { display: none; }
	html body.mc-nav .mc-menu__der { display: flex; align-items: center; gap: 8px; }
	html body.mc-nav .whb-general-header .mc-cab-pro--movil { padding: 4px; border-color: transparent; background: transparent; box-shadow: none; gap: 10px; }
	html body.mc-nav .whb-general-header .mc-cab-pro--movil .mc-cab-pro__texto { display: none; }
	/* 13b (MEDIO 3): «Ver planes» del móvil, igual que hoy (15 px; 14 a menos de 360), no los 12,5 px de la pieza del ordenador */
	html body.mc-nav .whb-general-header .mc-cab-pro--movil .mc-cab-pro__boton { font-size: 0.9375rem; padding-inline: 0.75rem; }
	/* 13b (BAJO): sin <dialog>, navegacion.js pone «hidden» al botón; la regla de arriba (display: inline-flex) le ganaba y salían dos «MENÚ» */
	html body.mc-nav .mc-menu__boton[hidden] { display: none; }
}
@media (min-width: 600px) and (max-width: 1199px) {
	html body.mc-nav .whb-general-header .mc-cab-pro--movil .mc-cab-pro__texto { display: block; }
	html body.mc-nav .whb-general-header .mc-cab-pro--movil .mc-cab-pro__texto strong { font-size: 15px; font-weight: 600; color: var(--mc-texto); }
}
@media (min-width: 1200px) { html body.mc-nav .mc-menu-fila { display: none; } }
/* D2 (encargo 18): el coche pequeño de la fila del MENÚ. Solo sale cuando la fila del logo se ha ido (clase mc-cab-pegada, la pone
   navegacion.js); por debajo de 600 px deja sitio quitando «Buscar profesional / Ver planes» (sigue en el cajón y en la barra de abajo). */
html body.mc-nav .mc-menu__coche { display: none; }
@media (max-width: 1199px) {
	html.mc-cab-pegada body.mc-nav .mc-menu__coche { display: inline-grid; place-items: center; min-width: 48px; min-height: 48px; color: var(--mc-texto); border-radius: var(--mc-r-pildora); }
	html.mc-cab-pegada body.mc-nav .mc-menu__coche:focus-visible { outline: none; box-shadow: var(--mc-foco-anillo); }
	html body.mc-nav .mc-menu__coche svg { width: auto; height: 32px; max-width: 64px; }
	html body.mc-nav .mc-menu__coche .mc-logo__t { animation: none; stroke-dashoffset: 0; } /* entero: el dibujo ya lo hizo el logo de arriba */
	html body.mc-nav .mc-menu { align-items: center; gap: 4px; }
}
@media (max-width: 599px) {
	html.mc-cab-pegada body.mc-nav .whb-general-header .mc-menu__der .mc-cab-pro--movil { display: none; }
}

/* ---------- 4 · La fila de iconos (§4.3): el orden del menú, 5 o 6, sin cortes; «estás aquí» en el naranja que se lee ---------- */
@media (max-width: 1199px) {
	html body.mc-nav .mc-cab-iconos { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(48px, 1fr); }
	html body.mc-nav .mc-cab-iconos .mc-cab-iconos__a { min-width: 48px; font-size: 12px; }
	html body.mc-nav .mc-cab-iconos .mc-cab-iconos__t { overflow: visible; text-overflow: clip; }
	html body.mc-nav .mc-cab-iconos .mc-cab-iconos__a:is([aria-current="page"], [aria-current="true"]) { color: var(--mc-texto); font-weight: 700; }
	html body.mc-nav .mc-cab-iconos .mc-cab-iconos__a:is([aria-current="page"], [aria-current="true"])::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 0; height: 3px; background: var(--mc-texto-marca); transform: none; }
}
@media (min-width: 768px) and (max-width: 1199px) {
	html body.mc-nav .mc-cab-iconos { max-width: 720px; margin-inline: auto; padding-inline: 0; }
	html body.mc-nav .mc-cab-iconos .mc-cab-iconos__a { font-size: 13px; }
}
@media (max-width: 359px) {
	html body.mc-nav .whb-general-header .mc-cab-pro--movil .mc-cab-pro__boton { font-size: 0.875rem; padding-inline: 0.6rem; }
	html body.mc-nav .mc-cab-iconos .mc-cab-iconos__a { font-size: 12px; }
	html body.mc-nav .mc-cab-iconos .mc-cab-iconos__a--inicio { display: none; }
}

/* ---------- 5 · La cabecera fija según el ancho y el ALTO (§4.4) ---------- */
@media (max-width: 1199px) {
	:root:has(> body.mc-nav) { scroll-padding-top: calc(var(--wd-admin-bar-h, 0px) + var(--wd-top-bar-sm-h) + var(--wd-header-general-sm-h)); }
}
@media (max-width: 600px) {
	html body.mc-nav.mc-cab-nueva .whb-header { top: 0; } /* con sesión, la barra de WordPress no es fija por debajo de 601 */
	:root:has(> body.mc-nav) { scroll-padding-top: calc(var(--wd-top-bar-sm-h) + var(--wd-header-general-sm-h)); }
}
/* Encargo 18 (D2, 04/10/2026): en el móvil lo fijo ocupaba 181 de 812 px (cabecera 116 + barra de abajo 65). Ahora, en TODAS las alturas
   desde 500 px (antes solo de 500 a 620), al bajar se va la fila del logo y solo queda pegada la del MENÚ (52 px a 375). Sin JavaScript:
   «sticky» con «top» negativo. navegacion.js pone un coche pequeño en esa fila cuando el logo ya no se ve. */
@media (max-width: 1199px) and (min-height: 500px) {
	html body.mc-nav.mc-cab-nueva .whb-header { top: calc(var(--wd-admin-bar-h, 0px) - var(--wd-top-bar-sm-h)); }
	:root:has(> body.mc-nav) { scroll-padding-top: calc(var(--wd-admin-bar-h, 0px) + var(--wd-header-general-sm-h)); }
}
@media (max-width: 600px) and (min-height: 500px) {
	html body.mc-nav.mc-cab-nueva .whb-header { top: calc(0px - var(--wd-top-bar-sm-h)); }
	:root:has(> body.mc-nav) { scroll-padding-top: var(--wd-header-general-sm-h); }
}
@media (max-height: 499px) { /* zoom al 400 % o pantallas muy bajas: nada fijo (WCAG 1.4.10) */
	html body.mc-nav.mc-cab-nueva .whb-header { position: relative; top: auto; }
	:root:has(> body.mc-nav) { scroll-padding-top: 0; }
}
@media (max-width: 849px) {
	html:has(body.mc-nav.mc-con-barra) { scroll-padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); } /* la barra de abajo (WCAG 2.4.11) */
}

/* ---------- 6 · EL CAJÓN (§4.5): <dialog> nativo, desde la izquierda; nunca «color-scheme-light» ---------- */
html body.mc-nav .mc-cajon {
	position: fixed; inset: 0 auto 0 0; width: min(340px, calc(100vw - 48px)); max-width: none; height: 100dvh; max-height: none; margin: 0;
	padding: 0; border: 0; border-radius: 0; overflow: hidden;
	background: var(--mc-fondo); color: var(--mc-texto); font-family: var(--mc-letra-texto); text-align: left;
}
/* La caja interior es la que se desplaza (versión final §4.5): la cabeza fija nunca tapa el foco (scroll-padding-top) */
html body.mc-nav .mc-cajon__in { height: 100%; overflow-y: auto; overscroll-behavior: contain; scroll-padding-top: 56px; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
html body.mc-nav .mc-cajon::backdrop { background: rgba(17, 18, 20, 0.55); }
/* 13b (BAJO): de noche el cajón (#111214) y el velo eran casi del mismo negro (1,05:1): un borde (3,77:1) y sombra marcan dónde acaba */
:root[data-tema="oscuro"] body.mc-nav .mc-cajon { border-inline-end: 1px solid var(--mc-borde-fuerte); box-shadow: 8px 0 24px rgba(0, 0, 0, 0.5); }
:root[data-tema="oscuro"] body.mc-nav .mc-cajon::backdrop { background: rgba(0, 0, 0, 0.7); }
html body.mc-nav .mc-cajon[open] { transform: none; transition: transform var(--mc-mov) var(--mc-curva); }
@starting-style { html body.mc-nav .mc-cajon[open] { transform: translateX(-100%); } }
@media (min-width: 768px) { html body.mc-nav .mc-cajon { width: 380px; } }
html:has(#mc-cajon[open]) { overflow: hidden; }
html body.mc-nav .mc-cajon ul { list-style: none; margin: 0; padding: 0; }
html body.mc-nav .mc-cajon__cabeza { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 8px 0 20px; background: var(--mc-fondo); border-bottom: 1px solid var(--mc-borde); }
html body.mc-nav .mc-cajon__titulo { margin: 0; font-family: var(--mc-letra-titulos); font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--mc-texto-2); }
html body.mc-nav .mc-cajon__cerrar { display: inline-flex; align-items: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 12px; margin: 0; background: none; border: 0; border-radius: var(--mc-r-m); box-shadow: none; cursor: pointer; color: var(--mc-texto); font-family: var(--mc-letra-titulos); font-size: 16px; font-weight: 600; text-transform: none; letter-spacing: 0; }
html body.mc-nav .mc-cajon__cerrar .mc-icono { width: 20px; height: 20px; }
html body.mc-nav .mc-cajon__lista > li { border-bottom: 1px solid var(--mc-borde); }
html body.mc-nav .mc-cajon__a {
	display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 52px; padding: 0 0 0 20px; margin: 0;
	background: none; border: 0; border-radius: 0; box-shadow: none; cursor: pointer; text-align: left;
	font-family: var(--mc-letra-titulos); font-size: 17px; font-weight: 600; line-height: 1.25; letter-spacing: 0; text-transform: none; color: var(--mc-texto); text-decoration: none;
}
html body.mc-nav .mc-cajon__flecha { display: grid; place-items: center; align-self: stretch; width: 48px; min-height: 52px; border-left: 1px solid var(--mc-borde); }
html body.mc-nav .mc-cajon__flecha .mc-icono { width: 20px; height: 20px; color: var(--mc-texto); transition: transform var(--mc-mov-rapido); }
html body.mc-nav .mc-cajon__abre[aria-expanded="true"] .mc-cajon__flecha .mc-icono { transform: rotate(90deg); }
html body.mc-nav .mc-cajon__sub { padding: 4px 0 12px; background: var(--mc-fondo-2); }
html body.mc-nav .mc-cajon__sub[hidden] { display: none; }
html body.mc-nav .mc-cajon__sub .mc-cajon__ver-todo { display: flex; align-items: center; min-height: 48px; padding: 0 20px 0 32px; font-family: var(--mc-letra-titulos); font-size: 16px; font-weight: 700; color: var(--mc-texto); text-decoration: none; }
html body.mc-nav .mc-cajon__sub-t { margin: 12px 0 0; padding: 0 20px 0 32px; font-family: var(--mc-letra-titulos); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mc-texto-2); }
html body.mc-nav .mc-cajon__sub li a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 20px 0 32px; font-family: var(--mc-letra-titulos); font-size: 16px; font-weight: 500; color: var(--mc-texto); text-decoration: none; }
html body.mc-nav .mc-cajon__sub li a .mc-icono { flex: 0 0 20px; width: 20px; height: 20px; color: var(--mc-texto-2); }
html body.mc-nav .mc-cajon :is(a, button):focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--mc-foco); }
html body.mc-nav .mc-cajon a:is([aria-current="page"], [aria-current="true"]) { background: var(--mc-acento-suave); box-shadow: inset 4px 0 0 var(--mc-texto-marca); font-weight: 700; }
html body.mc-nav .mc-cajon__accion { padding: 16px; }
html body.mc-nav .mc-cajon__accion .mc-boton { display: flex; width: 100%; min-height: 48px; justify-content: center; background: var(--mc-boton); color: var(--mc-sobre-boton); }
html body.mc-nav .mc-cajon__secundaria { border-top: 1px solid var(--mc-borde); }
html body.mc-nav .mc-cajon__secundaria a, html body.mc-nav .mc-cajon__cuenta { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 20px; font-family: var(--mc-letra-titulos); font-size: 16px; font-weight: 500; color: var(--mc-texto); text-decoration: none; }
html body.mc-nav .mc-cajon__pie { margin-top: 8px; border-top: 1px solid var(--mc-borde); }
html body.mc-nav .mc-cajon__cuenta .mc-icono { width: 20px; height: 20px; color: var(--mc-texto-marca); }
html body.mc-nav .mc-cajon__pie .mc-tema-boton--menu { display: flex; width: 100%; justify-content: flex-start; gap: 12px; min-height: 48px; padding: 0 20px; border-radius: 0; color: var(--mc-texto); font-family: var(--mc-letra-titulos); font-size: 16px; font-weight: 500; text-transform: none; letter-spacing: 0; }
html body.mc-nav .mc-cajon__pie .mc-tema-boton--menu .mc-icono { width: 20px; height: 20px; }

/* ---------- 7 · EL PIE (§5): marca + 4 columnas dentro de <nav aria-label="Pie de página"> ---------- */
@media (min-width: 850px) {
	html body.mc-nav .mc-pie__rejilla--nav { grid-template-columns: 1.4fr 4fr; }
	html body.mc-nav .mc-pie__nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--mc-e-8); }
}

/* ---------- 8 · Sin movimiento si el visitante lo pide (excepción de accesibilidad de CLAUDE.md §6.11) ---------- */
@media (prefers-reduced-motion: reduce) {
	html body.mc-nav :is(.mc-nav__flecha, .mc-cajon__flecha .mc-icono, .mc-cajon, .mc-nav__panel) { transition: none !important; animation: none !important; }
}

/* ---------- 9 · /calculadoras/ (plantillas/calculadoras.php): 3 tarjetas; el título es el enlace ---------- */
html body .mc-calcs { list-style: none; display: grid; gap: var(--mc-e-4); margin: var(--mc-e-6) 0 var(--mc-e-10); padding: 0; }
@media (min-width: 850px) { html body .mc-calcs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
html body .mc-calcs__item { display: grid; align-content: start; gap: var(--mc-e-2); padding: var(--mc-e-6); }
html body .mc-calcs__icono { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--mc-r-m); background: var(--mc-acento-suave); color: var(--mc-texto-marca); }
html body .mc-calcs__icono .mc-icono { width: 26px; height: 26px; }
html body .mc-calcs__t { margin: var(--mc-e-2) 0 0; }
html body .mc-calcs__a { color: var(--mc-texto); text-decoration: underline 2px var(--mc-texto-marca); text-underline-offset: 5px; }
html body .mc-calcs__a:hover { color: var(--mc-texto-marca); }
html body .mc-calcs__x { margin: 0; font-weight: 600; color: var(--mc-texto); }
html body .mc-calcs__frase { margin: 0; color: var(--mc-texto-2); }

/* ---------- 10 · Aire entre la cabecera (o la fila de iconos) y las migas: ≤ 24 px (B-11). Medido: 64 px = 40 del <main> de Woodmart
 *      + 24 de .mc-pagina. En las pantallas que pinta el tema se quitan los 40 de Woodmart; quedan los 24 de la casa. ---------- */
html body.mc-nav .wd-content-layout:has(> .mc-pagina) { padding-top: 0; }
