/* ==========================================================================
   Daniela Astete · Matriz del Destino — Sistema de diseño
   Japandi minimalista: hueso + carbón + taupe, acento SALVIA (verde-gris),
   con lavanda-gris y blush del retrato como neutros de apoyo.
   Marcellus (serif display) + Manrope (sans).
   ========================================================================== */

:root {
  /* Fondos: hueso neutro sereno (lienzo del retrato) */
  --bg:           #F4F1EC;  /* hueso */
  --bg-warm:      #ECE6DD;  /* arena tenue (secciones) */
  --surface:      #F1ECE4;  /* panel claro */
  --surface-2:    #E6DED4;  /* panel más profundo */

  /* Tinta: carbón sereno y taupe */
  --ink:          #2E2A28;  /* texto principal */
  --muted:        #857B74;  /* texto secundario (taupe) */

  /* Acento principal: salvia (verde-gris suave, silencioso) */
  --primary:      #7E8874;  /* salvia */
  --primary-dark: #656E5B;
  --sage-tint:    rgba(126, 136, 116, 0.16); /* píldora activa / hover */

  /* Oliva de lujo para botones/CTA (combinación oliva-blanco) */
  --olive:        #6E7647;
  --olive-dark:   #5A6139;
  --olive-tint:   rgba(110, 118, 71, 0.14); /* tinte claro para botón secundario */
  --olive-tint-2: rgba(110, 118, 71, 0.24); /* hover secundario */

  /* Neutros del retrato como secundarios suaves */
  --rose:         #C9A99C;  /* blush polvoriento (detalles) */
  --blush:        #E7D2C8;  /* blush muy claro (washes) */
  --lavender:     #B9B2BE;  /* lavanda-gris (blusa) */
  --lavender-soft:#D8D2DC;

  /* Acento neutro para precios/detalles (antes ámbar cálido) */
  --gold:         #7E8874;  /* = salvia (unificado, sin cálido) */
  --gold-soft:    #C9D0C0;

  --border:       #E4DBD0;
  --border-soft:  #EEE7DD;

  /* Sombras casi planas (Japandi mate de lujo, sin elevación marcada) */
  --shadow:       0 2px 10px rgba(46, 42, 40, 0.04);
  --shadow-sm:    0 1px 5px rgba(46, 42, 40, 0.035);

  /* Una sola familia en toda la página (lujo minimalista): la jerarquía la dan
     peso y letter-spacing, no familias distintas. SVG conserva sus fuentes propias. */
  --serif: 'Montserrat', system-ui, -apple-system, sans-serif;
  --sans:  'Montserrat', system-ui, -apple-system, sans-serif;

  /* Formas de lujo: casi cuadradas, esquina apenas suavizada (nunca cápsula) */
  --radius: 4px;
  --radius-lg: 6px;
  --maxw: 1200px;

  /* Textura madera sutil para botones oliva: vetas verticales muy tenues */
  --wood: repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.035) 0px,
            rgba(255, 255, 255, 0.035) 1px,
            rgba(0, 0, 0, 0.030) 2px,
            rgba(0, 0, 0, 0.030) 3px,
            rgba(255, 255, 255, 0) 3px,
            rgba(255, 255, 255, 0) 7px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  overflow-x: hidden; /* evita arrastre lateral por elementos full-bleed */
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  /* Atmósfera Japandi: washes MUY tenues de salvia, lavanda y blush sobre hueso.
     Calma y espacio negativo; la textura se insinúa, no compite. */
  background-color: var(--bg);
  background-image:
    radial-gradient(56% 40% at 12% 6%, rgba(126, 136, 116, 0.10) 0%, rgba(126, 136, 116, 0) 60%),
    radial-gradient(52% 42% at 92% 4%, rgba(185, 178, 190, 0.16) 0%, rgba(185, 178, 190, 0) 62%),
    radial-gradient(64% 50% at 94% 92%, rgba(201, 169, 156, 0.12) 0%, rgba(201, 169, 156, 0) 60%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* Grano sutil sobre toda la página: textura de pintura, no plano digital. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, header, footer { position: relative; z-index: 2; }

/* ---- Tipografía ---- */
/* Japandi: serif ligera y aireada, mucho interlineado, sin estridencia. */
h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 300;         /* lujo minimalista: ligero, aireado */
  line-height: 1.18;
  letter-spacing: .01em;
}
h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 200; letter-spacing: .015em; margin-bottom: 1.4rem; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); margin-bottom: 1.1rem; }
h3 { font-size: 1.55rem; font-weight: 400; }
/* Acento por color, no cursiva */
h1 em, h2 em, h3 em { font-style: normal; color: var(--primary); }

/* Imágenes nunca desbordan su contenedor (incl. imágenes subidas por CMS). */
img { max-width: 100%; height: auto; }

/* Títulos dentro de contenido editable (Quill → h1/h2/h3): tamaños acotados
   para que un título elegido en el editor no domine como los h1 globales. */
.lead h1, .lead h2, .lead h3 { margin: .4rem 0 .6rem; font-weight: 300; }
.lead h1 { font-size: 1.9rem; }
.lead h2 { font-size: 1.5rem; }
.lead h3 { font-size: 1.25rem; }

p { color: var(--ink); }
a { color: var(--primary); text-decoration: none; }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .4em;
  font-size: .62rem;
  font-weight: 400;
  color: var(--muted);
  display: block;
  margin-bottom: .9rem;
}

.lead { font-size: 1.05rem; color: var(--muted); }
.muted { color: var(--muted); }

/* ---- Header / nav ---- */
.topbar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.5rem clamp(1rem, 4vw, 3rem);
  background: var(--bg);
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(6px);
}
.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--ink);
}
.brand-icon {
  height: 28px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: .3px;
  color: var(--ink);
}
.brand-name em { font-style: italic; font-weight: 400; color: var(--primary); }
/* Nombre completo por defecto; "DAC" cuando el espacio es reducido. */
.brand-short { display: none; font-family: var(--serif); font-size: 1.35rem; letter-spacing: 2px; font-weight: 500; }
@media (max-width: 1080px) {
  .brand-full { display: none; }
  .brand-short { display: inline; }
}

.menu {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-left: auto;
  flex-wrap: nowrap;
}
.menu-btn {
  position: relative;
  font-family: var(--sans);
  font-size: .9rem; /* ≥14px: legibilidad */
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--ink);
  background: none;
  border: none;
  cursor: pointer;
  padding: .6rem .2rem; /* área táctil ampliada */
  min-height: 44px; /* tap target mínimo recomendado */
  display: inline-flex;
  align-items: center;
  transition: color .25s;
}
/* Subrayado fino salvia: crece desde el centro (hover) y queda fijo en la activa. */
.menu-btn::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
.menu-btn:hover { color: var(--primary); }
.menu-btn:hover::after { transform: scaleX(1); }
/* Página activa: subrayado presente, color tinta pleno */
.menu-btn.active { color: var(--ink); }
.menu-btn.active::after { transform: scaleX(1); }
.menu-icon { font-size: 1.1rem; }

.btn-pill {
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .08em;
  background: var(--olive);
  background-image: var(--wood);
  color: #fff;
  padding: .7rem 1.35rem;
  border-radius: var(--radius);
  transition: background .25s;
  white-space: nowrap;
}
.btn-pill:hover { background: var(--olive-dark); }

/* ---- Botones (lujo: oliva con veta de madera, forma casi cuadrada) ---- */
.btn-primary, .btn-secondary, .btn-small, .btn-danger {
  min-height: 44px; /* tap target mínimo */
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--sans);
  font-size: .9rem;
  letter-spacing: .02em;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s;
  text-decoration: none;
  font-weight: 500;
}
.btn-primary {
  background: var(--olive);
  background-image: var(--wood);
  color: #fff;
  padding: .9rem 1.9rem;
}
.btn-primary:hover { background: var(--olive-dark); }

.btn-secondary {
  background: var(--olive-tint);
  color: var(--olive-dark);
  border: 1px solid var(--olive);
  padding: .85rem 1.8rem;
}
.btn-secondary:hover { background: var(--olive-tint-2); border-color: var(--olive-dark); color: var(--olive-dark); }

.btn-small {
  background: var(--olive);
  background-image: var(--wood);
  color: #fff;
  padding: .55rem 1.1rem;
  font-size: .82rem;
}
.btn-small:hover { background: var(--olive-dark); }

.btn-danger {
  background: transparent;
  color: var(--olive);
  border: 1px solid var(--border);
  padding: .45rem .9rem;
  font-size: .8rem;
}
.btn-danger:hover { background: var(--olive); color: #fff; border-color: var(--olive); }

/* ---- Layout ---- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1rem, 1vw, 2rem) clamp(1rem, 4vw, 2rem);
  min-height: 60vh;
}
main.container { flex: 1; }

.section { margin: clamp(0.5rem, 3.5vw, 0.5rem) 0; }

/* Separador de sección: línea fina de ancho completo del contenedor. */
.rule {
  border: 0;
  height: 1px;
  background: var(--border);
  width: 100%;
  margin: clamp(1.5rem, 2vw, 2.5rem) 0;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem);
  box-shadow: 0 6px 18px rgba(46, 42, 40, 0.06);
}
.panel-feature {
  display: grid;
  grid-template-columns: 1.4fr .9fr;
  gap: 2.5rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem);
  box-shadow: 0 6px 18px rgba(46, 42, 40, 0.06);
  margin: clamp(3.5rem, 7.5vw, 6.5rem) 0;
}
@media (max-width: 820px) { .panel-feature { grid-template-columns: 1fr; gap: 2rem; } }
.product-highlight {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.product-highlight h3 { margin: .5rem 0 .8rem; }
.product-highlight .precio { margin-top: 1rem; }

/* ---- Hero ---- */
.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 3rem;
}
.hero h1 { margin: .4rem 0 1.2rem; }
.hero .lead { font-size: 1.08rem; line-height: 1.7; }
.hero .hero-aside { padding-top: 3.8rem; color: var(--muted); font-size: 1.05rem; line-height: 1.72; }
.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero .hero-aside { padding-top: 0; }
}

/* Hero centrado de una sola columna (elegante, sin aside). */
.hero-centered {
  display: block;
  text-align: center;
  margin: clamp(1rem, 2vw, 2rem) 0 clamp(1.5rem, 2vw, 2rem);
}
.hero-centered .hero-inner { max-width: 760px; margin: 0 auto; }
.hero-centered .lead { margin: 0 auto; max-width: 640px; }
.hero-centered .hero-buttons { justify-content: center; }
/* Imagen de fondo opcional del hero (CMS Fase 2). Se activa con --hero-bg
   (url) y --hero-op (opacidad 0–1 de la imagen) inline desde la plantilla.
   Tamaño recomendado: 1920×1080 px (16:9), JPG optimizado < 400 KB. */
.hero-bg {
  position: relative;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: var(--hero-pos, center);
  border-radius: var(--radius-lg);
  padding: clamp(3rem, 7vw, 6rem) clamp(1.5rem, 5vw, 4rem);
  overflow: hidden;
}
/* Velo blanco = 1 − opacidad: baja la intensidad de la imagen sin tocar el texto. */
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, calc(1 - var(--hero-op, 1)));
  pointer-events: none;
}
.hero-bg .hero-inner { position: relative; z-index: 1; }
.hero-bg .lead, .hero-bg .eyebrow { color: var(--ink); }

/* Bloque de imagen (CMS dinámico). */
.bloque-img { margin: clamp(1.5rem, 4vw, 3rem) auto; text-align: center; }
.bloque-img img { width: 100%; height: auto; display: block; border-radius: var(--radius-lg); }
.bloque-img.medio { max-width: 50%; }
.bloque-img figcaption { margin-top: .6rem; font-size: .85rem; }
@media (max-width: 780px) { .bloque-img.medio { max-width: 100%; } }

/* ---- Cards / grid ---- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2rem; }
@media (max-width: 820px) { .grid-3 { grid-template-columns: 1fr; gap: 1.5rem; } }

.card, .producto-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  box-shadow: 0 4px 12px rgba(46, 42, 40, 0.05);
}
.card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow);
}

/* ---- Fichas de producto/sesión (2 por fila, horizontales, sin redondeo) ---- */
.fichas-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
}
@media (max-width: 780px) { .fichas-grid { grid-template-columns: 1fr; } }

.producto-card {
  padding: 0;
  overflow: hidden;
  border-radius: 0;                 /* lujo: sin redondeo */
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "title  title"
    "detail media"
    "foot   foot";
  transition: box-shadow .25s, border-color .25s;
}
.producto-card:hover { box-shadow: var(--shadow); border-color: var(--border); }
@media (max-width: 640px) {
  .producto-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "media"
      "detail"
      "foot";
  }
}

.pc-title-wrap { grid-area: title; padding: 1.6rem 1.8rem .4rem; }
.pc-title { color: var(--ink); font-size: 1.35rem; font-weight: 500; margin-top: .15rem; }

.pc-detail { grid-area: detail; padding: .4rem 1.4rem 1.4rem 1.8rem; font-size: .92rem; }
.pc-dur { font-size: .85rem; margin-top: .4rem; }

/* Mitad derecha: imagen de fondo con opacidad parametrizable por producto.
   Proporción recomendada 1:1 (~600×600) o 4:3 (600×450), JPG < 250 KB. */
.pc-media { 
  grid-area: media; 
  position: relative; 
  min-height: 120px; 
/*  background: var(--surface-2); */
  overflow: hidden; 
}
.pc-media-img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
}
.pc-media-empty { 
/*  background: var(--surface-2); */
}

.pc-foot { grid-area: foot; display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; border-top: 1px solid var(--border-soft); }
.pc-foot-solo { grid-template-columns: 1fr; }
.pc-precio {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--surface-2);
  font-family: var(--sans); font-weight: 700; font-size: 1.05rem;
  color: var(--ink); letter-spacing: .02em;
  padding: .85rem 1rem;
  line-height: 1.3;
}
.precio-divisa {
  font-weight: 500; font-size: .7rem; letter-spacing: .03em;
  color: var(--muted); text-transform: none;
}
.pc-btn {
  display: flex; align-items: center; justify-content: center;
  padding: .85rem 1.2rem;
  background: var(--olive);
  background-image: var(--wood);
  color: #fff;
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  text-align: center; border: none; cursor: pointer; text-decoration: none;
  transition: background .2s; letter-spacing: .04em;
}
.pc-btn:hover { background: var(--olive-dark); color: #fff; }
.card .precio, .precio {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
}

/* feature trio (propósitos) */
.feature {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  transition: transform .25s, box-shadow .25s;
}
.feature:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(46, 42, 40, 0.08); }
.feature .ic { font-size: 2.4rem; color: var(--gold); margin-bottom: .8rem; display: block; }
.feature h3 { color: var(--ink); font-size: 1.45rem; margin: 0 0 .5rem; font-weight: 500; }

/* ---- Formularios ---- */
.field, .form-group { margin-bottom: 1.1rem; }
.field label, .form-group label {
  display: block;
  font-family: var(--sans);
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--muted);
  margin-bottom: .4rem;
}
input, select, textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: .98rem;
  color: var(--ink);
  background: #fff;
  padding: .75rem .9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(207, 169, 157, .2);
}
/* Checkboxes/radios: tamaño natural, no estirados por la regla global de inputs. */
input[type=checkbox], input[type=radio] {
  width: auto;
  flex: 0 0 auto;
  padding: 0;
  margin: 0;
}
/* Fila de consentimiento (login, contacto, etc.): checkbox alineado con la 1ª línea. */
.field-consent label {
  display: flex;
  gap: .5rem;
  align-items: flex-start;
  font-weight: 400;
}
.field-consent input[type=checkbox] { margin-top: .2rem; }
.info { font-size: .85rem; color: var(--muted); }

/* ---- Login ---- */
.login-container {
  max-width: 420px;
  margin: 2rem auto;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}
.login-container h1 { font-size: 2.4rem; margin-bottom: 1.5rem; text-align: center; }

/* ---- Mensajes / toasts ---- */
.message { padding: .85rem 1rem; border-radius: 10px; font-size: .92rem; margin-top: 1rem; }
.message.success { background: #E7EFE3; color: #3C5A36; border: 1px solid #CBDCC2; }
.message.error   { background: #F4E2E2; color: #7A2330; border: 1px solid #E3C2C5; }

/* ---- Tablas ---- */
table.carrito-table, table.citas-table, table.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}
.carrito-table th, .citas-table th, .data-table th,
.carrito-table td, .citas-table td, .data-table td {
  padding: .9rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
}
.carrito-table th, .citas-table th, .data-table th {
  font-family: var(--sans);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  background: var(--surface-2);
}

/* ---- Modal ---- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(46, 42, 40, .55);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal.open { display: flex; }
.modal-content {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.modal-content .close { float: right; font-size: 1.6rem; color: var(--muted); cursor: pointer; line-height: 1; background: none; border: 0; padding: .2rem .4rem; min-height: 44px; min-width: 44px; }

/* ---- Footer ---- */
.site-footer {
  background: var(--bg-warm);
  border-top: 1px solid var(--border);
  padding: 0.5rem clamp(1rem, 2vw, 1.5rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.footer-brand { display: flex; align-items: center; gap: .5rem; color: var(--primary); font-family: var(--serif); font-size: 1.2rem; }
.footer-brand em { font-style: italic; }
.footer-social { display: flex; align-items: center; gap: .8rem; margin-left: auto; }
.footer-social a { color: var(--muted); display: flex; }
.footer-social a:hover { color: var(--primary); }
.footer-links { display: flex; gap: 1.2rem; }
.footer-links a { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.footer-links a:hover { color: var(--primary); }
.footer-copy { width: 100%; text-align: center; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--border); padding-top: 1.2rem; }

/* ---- Toast (app.js) ---- */
.toast-container { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: .5rem; }
.toast { background: var(--ink); color: #fff; padding: .8rem 1.2rem; border-radius: 999px; box-shadow: var(--shadow); font-size: .9rem; opacity: 1; transition: opacity .3s; }
.toast.success { background: #3C5A36; }
.toast.error { background: var(--primary); }
.toast.removing { opacity: 0; }

/* ==========================================================================
   Calculadora (matriz del destino)
   ========================================================================== */
.calc-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  margin: 2rem 0;
}
.calc-form select { width: auto; min-width: 90px; }
.calc-sex { display: flex; gap: .4rem; }
.calc-sex .seg {
  padding: .6rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  font-family: var(--sans);
  color: var(--muted);
}
.calc-sex .seg.active { background: var(--olive); color: #fff; border-color: var(--olive); }
.calc-edad { text-align: center; color: var(--muted); font-size: .9rem; margin-top: .5rem; }

.calc-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: start; }
@media (max-width: 1024px) { .calc-layout { grid-template-columns: 1fr; } }

.calc-svg { width: 100%; }
.calc-svg svg { width: 100%; height: auto; }

.calc-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); }
.calc-tab {
  font-family: var(--sans);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: .6rem .8rem;
  cursor: pointer;
}
.calc-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.calc-panel { display: none; }
.calc-panel.active { display: block; }
.calc-desc {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.5rem;
  min-height: 160px;
}
.calc-desc h3 { color: var(--ink); }

/* ---- Error pages ---- */
.error-container { text-align: center; padding: clamp(2rem, 8vw, 6rem) 1rem; }
.error-container h1 { margin-bottom: 1rem; }
.error-container p { color: var(--muted); margin-bottom: 1.5rem; }

/* placeholder pendiente (Tabla de Salud / Cielo-Tierra) */
.pendiente {
  border: 1px dashed var(--rose);
  border-radius: var(--radius);
  padding: 1.2rem;
  color: var(--muted);
  font-size: .9rem;
  background: var(--bg-warm);
}

/* ---- Menú hamburguesa + responsive ---- */
.menu-toggle {
  display: none;
  margin-left: auto;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: .55rem .4rem;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Botón "Mi Cuenta" con contorno suave */
.menu-account {
  border: 1px solid var(--primary);
  border-radius: 999px;
  color: var(--primary) !important;
  padding: .45rem 1rem !important;
}
.menu-account:hover { background: var(--primary); color: #fff !important; }

/* Imagen resultante de la matriz (calculadora pública) */
.matriz-img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

@media (max-width: 1080px) {
  .menu-toggle { display: flex; }
  .menu {
    display: none;
    position: absolute;
    top: 100%;
    right: clamp(1rem, 4vw, 3rem);
    flex-direction: column;
    align-items: stretch;
    gap: .15rem;
    background: var(--bg);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: .6rem;
    box-shadow: var(--shadow);
    min-width: 210px;
    margin-left: 0;
  }
  .menu.open { display: flex; }
  .menu .menu-btn { width: 100%; text-align: left; }
  .menu-account { text-align: center !important; }
}

/* ---- Tabla de Salud (calculadora) ---- */
.tabla-salud-wrap h2 { margin-bottom: 1.2rem; }
.tabla-salud-scroll { overflow-x: auto; }
.tabla-salud {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.tabla-salud thead th {
  background: var(--bg-warm);
  color: var(--muted);
  font-family: var(--sans);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .72rem;
  text-align: center;
  padding: .5rem .2rem;
}
.tabla-salud thead th.ts-chakra { text-align: left; padding-left: 1.4rem; }
.tabla-salud tbody td {
  padding: .3rem .3rem;
  text-align: center;
  font-size: 1.05rem;
  color: var(--ink);
  border-top: 1px solid var(--border-soft);
}
.tabla-salud td.ts-chakra {
  text-align: left;
  padding-left: 1rem;
  display: flex;
  align-items: center;
  gap: .8rem;
  min-width: 220px;
}
.ts-num {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 8px;
  color: #fff;
  font-family: var(--sans);
  font-weight: 600;
  font-size: .95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ts-name { font-family: var(--sans); line-height: 1.25; }
.ts-name strong { font-weight: 600; font-size: .98rem; color: var(--ink); }
.ts-sub { font-size: .78rem; color: var(--muted); }
.tabla-salud tfoot .ts-total td {
  padding: 1rem .8rem;
  text-align: center;
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--primary);
  background: var(--bg-warm);
  border-top: 2px solid var(--border);
}
.tabla-salud tfoot .ts-total td.ts-chakra {
  text-align: left;
  padding-left: 1.4rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-family: var(--sans);
  font-size: .8rem;
  color: var(--muted);
}

/* ---- Matriz: Salud + Propósitos lado a lado ---- */
.matriz-tablas {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.6rem;
  align-items: start;
}
@media (max-width: 1024px) { .matriz-tablas { grid-template-columns: 1fr; } }
.propositos-wrap h2 { margin-bottom: 1.2rem; }

.pr-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.4rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  /* Izquierda: definición del término · Derecha: gráfico de valores */
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.2rem;
}
.pr-graf { justify-self: end; }
.pr-icon { font-size: 1.5rem; color: var(--primary); line-height: 1; }
.pr-head { display: flex; flex-direction: column; margin: .35rem 0 0; }
.pr-head strong { font-family: var(--sans); font-weight: 600; font-size: 1rem; color: var(--ink); }
.pr-sub { color: var(--muted); font-size: .8rem; }

.pr-par { display: flex; align-items: center; gap: .5rem; }
.pr-filas { display: flex; flex-direction: column; gap: .45rem; }
.pr-fila { display: flex; align-items: center; gap: .8rem; }
.pr-lbl { color: var(--muted); min-width: 64px; font-size: .92rem; }
.pr-val {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 .4rem;
  border: 1.5px solid var(--rose); border-radius: 999px;
  font-family: var(--serif); font-size: 1.05rem; color: var(--ink); background: #fff;
}
.pr-brace { width: 12px; align-self: stretch; border: 2px solid var(--border); border-left: 0; border-radius: 0 10px 10px 0; margin: .25rem 0; }
.pr-total .pr-val { border-color: var(--primary); color: var(--primary); }
.pr-unico { margin-top: .1rem; }

/* Banner de cookies (consentimiento) */
.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 60;
  max-width: 720px; margin: 0 auto;
  background: var(--ink, #2b2b2b); color: #fff;
  padding: 1rem 1.2rem; border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
  display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem;
}
.cookie-text { flex: 1; min-width: 220px; margin: 0; font-size: .88rem; line-height: 1.5; }
.cookie-text a { color: #fff; text-decoration: underline; }
.cookie-actions { display: flex; gap: .5rem; }
.cookie-banner .menu-btn { border: 1px solid rgba(255,255,255,.4); color: #fff; padding: .5rem .9rem; border-radius: 6px; cursor: pointer; background: transparent; }
.cookie-banner .cookie-accept { background: var(--olive, #7a7f5c); border-color: transparent; }
@media (max-width: 560px) { .cookie-actions { width: 100%; } .cookie-actions .menu-btn { flex: 1; } }

/* Skip link: oculto hasta recibir foco (accesibilidad teclado) */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink, #222); color: #fff; padding: .7rem 1.2rem;
  border-radius: 0 0 6px 0; text-decoration: none;
}
.skip-link:focus { left: 0; }
