/* Demo de ANDARA. CSS sin dependencias. Un tema por rubro en [data-rubro]. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Fallback";
  src: local("Arial"), local("Roboto"), local("Helvetica");
  size-adjust: 105%;
}

/* ---------- Temas ---------- */
:root {
  --font: "Bricolage Grotesque", "Bricolage Fallback", system-ui, sans-serif;
  --gut: clamp(16px, 4vw, 48px);
  --sec: clamp(64px, 9vw, 128px);
  --franja: 40px;
  --ancho: 1180px;
  /* restaurante (por defecto): fogón, maíz */
  --bg: #1d120c; --ink: #f7eadb; --muted: #cdb8a3; --accent: #f2a516; --on-accent: #1d120c;
  --panel: #2a1a12; --line: #4d3628;
  --wdth: 100%; --hw: 800; --caso: none; --radio: 10px; --track: -0.02em;
  color-scheme: dark;
}
[data-rubro="motos"] {
  --bg: #111315; --ink: #f2f2ee; --muted: #aeb2b7; --accent: #ff6b1a; --on-accent: #111315;
  --panel: #1b1e21; --line: #363a40;
  --wdth: 75%; --hw: 800; --caso: uppercase; --radio: 3px; --track: 0em;
}
[data-rubro="barberia"] {
  --bg: #e6ecef; --ink: #14202b; --muted: #485664; --accent: #b3122e; --on-accent: #fff;
  --panel: #fff; --line: #c3cdd4;
  --wdth: 87%; --hw: 750; --caso: none; --radio: 4px; --track: -0.02em;
  color-scheme: light;
}
[data-rubro="veterinaria"] {
  --bg: #f1f6f3; --ink: #11302a; --muted: #46605a; --accent: #0b7a62; --on-accent: #fff;
  --panel: #fff; --line: #cfdcd6;
  --wdth: 100%; --hw: 700; --caso: none; --radio: 18px; --track: -0.02em;
  color-scheme: light;
}
[data-rubro="gym"] {
  --bg: #121018; --ink: #f4f1f7; --muted: #aea7ba; --accent: #ff2e88; --on-accent: #121018;
  --panel: #1c1924; --line: #383145;
  --wdth: 75%; --hw: 800; --caso: uppercase; --radio: 2px; --track: 0em;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--franja) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--font);
  font-synthesis: none;
  overflow-x: hidden;
  padding-top: var(--franja);
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 {
  font-stretch: var(--wdth);
  font-weight: var(--hw);
  text-transform: var(--caso);
  letter-spacing: var(--track);
  text-rendering: optimizeLegibility;
  line-height: 1.02;
  margin: 0;
}
h2 { font-size: clamp(2.25rem, 6vw, 4rem); max-width: 18ch; }
h3 { font-size: 1.375rem; line-height: 1.15; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.saltar { position: absolute; left: 8px; top: -60px; z-index: 60; background: #fff; color: #000; padding: 8px 12px; }
.saltar:focus { top: 48px; }
.envoltura { max-width: var(--ancho); margin: 0 auto; padding: 0 var(--gut); }
.sec { padding: var(--sec) 0; }
.intro { color: var(--muted); max-width: 56ch; margin-top: 16px; font-size: 1.125rem; }

/* ---------- Franja de demostración (colores de ANDARA) ---------- */
.franja {
  position: fixed; inset: 0 0 auto; z-index: 50;
  min-height: var(--franja);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 6px var(--gut);
  background: #000; color: #f1eadb;
  font-size: 0.875rem; font-weight: 500; line-height: 1.35; text-align: center;
  text-decoration: none;
}
.franja:hover span:last-child { text-decoration: underline; text-underline-offset: 3px; }
.franja-marca { flex: none; width: 10px; height: 10px; background: #e8231a; border-radius: 50%; }

/* Selector de rubro, flotante abajo a la izquierda */
.selector {
  position: fixed; left: 12px; bottom: 16px; z-index: 40;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 6px 6px 14px;
  background: #000; color: #f1eadb; border: 2px solid #e8231a; border-radius: 999px;
  font-size: 0.875rem; font-weight: 600;
  box-shadow: 0 8px 20px -8px rgb(0 0 0 / 0.6);
}
.selector select {
  font: 600 0.9375rem var(--font);
  color: #000; background: #f1eadb; border: 0; border-radius: 999px;
  padding: 8px 10px; max-width: 46vw; min-height: 40px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 22px;
  border: 2px solid transparent; border-radius: var(--radio);
  font: 700 1.0625rem/1.2 var(--font);
  font-stretch: var(--wdth);
  text-transform: var(--caso);
  text-decoration: none; cursor: pointer;
}
.btn-wa { background: var(--accent); color: var(--on-accent); }
.btn-wa:hover { filter: brightness(1.08); }
.btn-wa:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
.btn-sec { border-color: #fff; color: #fff; }
.btn-sec:hover { background: rgb(255 255 255 / 0.12); }
.btn-ancho { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: max(560px, min(calc(100svh - var(--franja)), 880px));
  display: flex; flex-direction: column; justify-content: space-between;
  color: #fff;
}
.hero-foto { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
/* Degradado oscuro debajo del texto (sin text-shadow) */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to bottom, rgb(0 0 0 / 0.6), rgb(0 0 0 / 0) 22%),
    linear-gradient(to top, rgb(0 0 0 / 0.88) 0%, rgb(0 0 0 / 0.72) 45%, rgb(0 0 0 / 0.1) 80%);
}
.hero-barra {
  display: flex; align-items: center; gap: 12px;
  padding: 16px var(--gut);
}
.logo {
  font-weight: 800; font-size: 1.25rem; font-stretch: var(--wdth);
  text-transform: var(--caso); text-decoration: none; line-height: 1.1; margin: 0;
}
.hero-barra .estado { margin-left: auto; }
.menu-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 8px 12px;
  background: rgb(0 0 0 / 0.55); color: #fff; border: 1px solid rgb(255 255 255 / 0.4);
  border-radius: var(--radio); font: 600 0.9375rem var(--font); cursor: pointer;
}
.estado {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.875rem; font-weight: 600;
}
.estado::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #e0524a; flex: none; }
.estado.abierto::before { background: #39d07a; }
.hero-barra .estado { background: rgb(0 0 0 / 0.55); padding: 6px 10px; border-radius: 999px; }
.hero-texto { padding: 0 var(--gut) clamp(88px, 12vh, 120px); max-width: calc(var(--ancho) + 2 * var(--gut)); width: 100%; margin: 0 auto; }
.hero-tipo { font-size: 0.9375rem; font-weight: 600; color: #fff; opacity: 0.9; }
.hero h1 {
  font-size: clamp(2.25rem, 8vw, 4.5rem);
  max-width: 14ch; margin: 10px 0 16px;
}
[data-rubro="motos"] .hero h1, [data-rubro="gym"] .hero h1 { max-width: 16ch; }
.hero-promesa { font-size: 1.125rem; max-width: 44ch; color: #f2f2f2; }
.hero-acciones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Única animación de entrada: el texto del hero */
@media (prefers-reduced-motion: no-preference) {
  .hero-texto > * { animation: subir 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .hero-texto > :nth-child(2) { animation-delay: 0.08s; }
  .hero-texto > :nth-child(3) { animation-delay: 0.16s; }
  .hero-texto > :nth-child(4) { animation-delay: 0.24s; }
  @keyframes subir { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
}

/* ---------- Servicios: fotos ---------- */
.fotos {
  display: grid; gap: 12px; margin-top: 40px;
  grid-template-columns: repeat(2, 1fr);
}
.fotos figure { margin: 0; position: relative; }
.fotos figure:first-child { grid-column: span 2; }
.fotos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radio); }
.fotos figure:first-child img { aspect-ratio: 16 / 10; }
.fotos figcaption {
  display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  margin-top: 8px; font-weight: 600;
}
.fotos figcaption span { color: var(--muted); font-weight: 400; font-size: 0.875rem; }
@media (min-width: 820px) {
  .fotos { grid-template-columns: 2fr 1fr 1fr; align-items: end; }
  .fotos figure:first-child { grid-column: auto; }
  .fotos img, .fotos figure:first-child img { aspect-ratio: 4 / 5; }
  .fotos figure:first-child img { aspect-ratio: 4 / 3.4; }
}

/* ---------- Armador (la interacción de cada rubro) ---------- */
.arma-sec { background: var(--panel); border-block: 1px solid var(--line); }
.arma-grid { display: grid; gap: 40px; }
@media (min-width: 900px) {
  .arma-grid { grid-template-columns: 1.3fr 1fr; align-items: start; gap: 56px; }
  .panel { position: sticky; top: calc(var(--franja) + 24px); }
}
.lista { list-style: none; margin: 32px 0 0; padding: 0; }
.item {
  width: 100%; display: grid; grid-template-columns: 1fr auto auto; column-gap: 14px; align-items: center;
  padding: 16px 4px; text-align: left;
  background: none; color: inherit; border: 0; border-bottom: 1px solid var(--line);
  font: inherit; cursor: pointer;
}
.item-n { font-weight: 700; font-size: 1.125rem; grid-column: 1; }
.item-d { color: var(--muted); font-size: 0.9375rem; grid-column: 1; }
.item-p { grid-column: 2; grid-row: 1 / span 2; font-weight: 700; font-variant-numeric: tabular-nums; }
.item-marca {
  grid-column: 3; grid-row: 1 / span 2;
  width: 28px; height: 28px; border: 2px solid var(--muted); border-radius: var(--radio);
  display: grid; place-items: center;
}
.item:hover .item-n { text-decoration: underline; text-underline-offset: 3px; }
.item[aria-pressed="true"] .item-marca { background: var(--accent); border-color: var(--accent); }
.item[aria-pressed="true"] .item-marca::after {
  content: ""; width: 12px; height: 7px; margin-top: -3px;
  border: solid var(--on-accent); border-width: 0 0 3px 3px; transform: rotate(-45deg);
}
[data-rubro="gym"] .item-marca { border-radius: 50%; }

.panel {
  padding: 24px; border-radius: var(--radio);
  background: var(--bg); border: 1px solid var(--line);
}
.panel h3 { font-size: 1.5rem; }
.extra { margin: 20px 0 8px; }
.extra-t { font-size: 0.875rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 8px 14px;
  background: transparent; color: inherit; border: 1.5px solid var(--line); border-radius: 999px;
  font: 600 0.9375rem var(--font); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.panel-items { list-style: none; padding: 0; margin: 16px 0 0; }
.panel-items li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.panel-items li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.panel-vacio { color: var(--muted); margin: 16px 0; }
.panel-total { margin: 12px 0 20px; }
.panel-total div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0; }
.panel-total dt { color: var(--muted); font-size: 0.9375rem; }
.panel-total dd { margin: 0; font-weight: 800; font-size: 1.5rem; font-variant-numeric: tabular-nums; }

/* Pieles del panel: cada rubro tiene su "papel" */
[data-rubro="restaurante"] .panel { /* comanda de papel */
  background: #f6ecd9; color: #2a1a12; border: 0; border-radius: 2px;
  --line: #c9b393; --muted: #5d4632; --ink: #2a1a12; --bg: #f6ecd9;
  -webkit-mask: radial-gradient(circle 7px at 50% 100%, #0000 98%, #000) 50% 100% / 18px 100% repeat-x;
  mask: radial-gradient(circle 7px at 50% 100%, #0000 98%, #000) 50% 100% / 18px 100% repeat-x;
  padding-bottom: 36px;
}
[data-rubro="restaurante"] .panel .btn-wa { --on-accent: #1d120c; background: #2a1a12; color: #f6ecd9; }
[data-rubro="motos"] .panel { /* orden de taller con franja de seguridad */
  border-top: 12px solid transparent;
  border-image: repeating-linear-gradient(-45deg, var(--accent) 0 14px, #111315 14px 28px) 12;
}
[data-rubro="barberia"] .panel { /* tarjeta de cita con el poste de barbería */
  border-left: 10px solid transparent;
  border-image: repeating-linear-gradient(-45deg, #b3122e 0 10px, #fff 10px 20px, #1d3f8f 20px 30px, #fff 30px 40px) 10;
  box-shadow: 0 18px 40px -24px rgb(20 32 43 / 0.5);
}
[data-rubro="veterinaria"] .panel { border: 2px solid var(--accent); }
[data-rubro="gym"] .panel { border: 2px solid var(--accent); }
[data-rubro="gym"] .panel-total dd { font-size: 2.25rem; font-stretch: 75%; color: var(--accent); }

/* ---------- Por qué y reseñas ---------- */
.razones { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 28px; }
.razones li { font-size: 1.125rem; max-width: 60ch; color: var(--muted); padding-left: 20px; border-left: 4px solid var(--accent); }
.razones strong { display: block; color: var(--ink); font-size: 1.375rem; font-stretch: var(--wdth); line-height: 1.2; margin-bottom: 4px; }
@media (min-width: 820px) { .razones { grid-template-columns: repeat(3, 1fr); } }
.resenas-t { margin-top: 72px; }
.resenas { display: grid; gap: 16px; margin-top: 20px; }
@media (min-width: 820px) { .resenas { grid-template-columns: repeat(3, 1fr); } }
.resenas blockquote { margin: 0; padding: 20px; background: var(--panel); border-radius: var(--radio); border: 1px solid var(--line); }
.estrellas { color: var(--accent); letter-spacing: 2px; margin-bottom: 8px; }
.resenas footer { margin-top: 12px; font-size: 0.875rem; color: var(--muted); }

/* ---------- Horario y mapa ---------- */
.ubicacion { background: var(--panel); border-top: 1px solid var(--line); }
.ubic-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .ubic-grid { grid-template-columns: 1fr 1.2fr; align-items: center; } }
.estado-grande { margin-top: 20px; font-size: 1rem; }
.horario { border-collapse: collapse; margin-top: 16px; width: 100%; max-width: 420px; }
.horario th, .horario td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.horario td { text-align: right; font-variant-numeric: tabular-nums; }
.horario .hoy th, .horario .hoy td { font-weight: 700; color: var(--accent); }
[data-rubro="barberia"] .horario .hoy th, [data-rubro="barberia"] .horario .hoy td,
[data-rubro="veterinaria"] .horario .hoy th, [data-rubro="veterinaria"] .horario .hoy td { color: var(--ink); }
.direccion { margin-top: 20px; color: var(--muted); }
.direccion strong { color: var(--ink); }
.mapa { margin: 0; }
.mapa svg { width: 100%; height: auto; border-radius: var(--radio); border: 1px solid var(--line); }
.m-fondo { fill: var(--bg); }
.m-parque { fill: color-mix(in srgb, #3c9a5f 35%, var(--bg)); }
.m-calle { stroke: var(--line); stroke-width: 14; fill: none; }
.m-avenida { stroke: color-mix(in srgb, var(--accent) 35%, var(--line)); stroke-width: 22; fill: none; }
.m-pin { fill: var(--accent); }
.m-pin-centro { fill: var(--bg); }
.mapa figcaption { margin-top: 8px; font-size: 0.875rem; color: var(--muted); }

/* ---------- Bloque ANDARA ---------- */
.andara { background: #e8231a; color: #000; padding: var(--sec) 0; }
.andara h2 { font-stretch: 100%; text-transform: none; font-weight: 800; max-width: 16ch; }
.andara p { font-size: 1.25rem; max-width: 40ch; margin: 20px 0 32px; font-weight: 500; }
.btn-andara { background: #000; color: #f1eadb; border-radius: 999px; text-transform: none; font-stretch: 100%; }
.btn-andara:hover { background: #222; }
.andara :focus-visible { outline-color: #000; }

/* ---------- Pie ---------- */
.pie { background: #000; color: #d9d2c4; padding: 40px 0 120px; font-size: 0.9375rem; }
.pie p { max-width: 72ch; }
.pie p + p { margin-top: 12px; }
.pie strong { color: #f1eadb; }

/* ---------- WhatsApp flotante ---------- */
.fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  width: 60px; height: 60px; border-radius: 50%; border: 0;
  background: #25d366; color: #fff; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 10px 24px -8px rgb(0 0 0 / 0.55);
}

/* ---------- Diálogos ---------- */
dialog { border: 0; padding: 0; color: var(--ink); background: var(--bg); }
dialog::backdrop { background: rgb(0 0 0 / 0.6); }
.cerrar {
  position: absolute; top: 12px; right: 12px; width: 44px; height: 44px;
  background: none; border: 1px solid var(--line); border-radius: 50%; color: inherit;
  font-size: 1.5rem; line-height: 1; cursor: pointer;
}
/* Menú lateral */
.menu {
  position: fixed; inset: 0 auto 0 0; margin: 0;
  width: min(340px, 88vw); height: 100%; max-height: none;
  padding: 72px 24px 24px; display: none; flex-direction: column; gap: 24px;
}
.menu[open] { display: flex; }
.menu nav { display: flex; flex-direction: column; }
.menu nav a {
  padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none;
  font-size: 1.375rem; font-weight: 700; font-stretch: var(--wdth); text-transform: var(--caso);
}
@media (prefers-reduced-motion: no-preference) {
  .menu[open] { animation: entrar 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
  @keyframes entrar { from { transform: translateX(-100%); } to { transform: none; } }
}
/* Aviso de WhatsApp */
.wa { width: min(420px, calc(100vw - 32px)); border-radius: 16px; padding: 24px; }
.wa h2 { font-size: 1.5rem; max-width: none; }
.chat { margin: 20px 0; border-radius: 12px; overflow: hidden; background: #efe7dd; color: #111b21; }
.chat-cabeza { background: #075e54; color: #fff; padding: 10px 14px; font-weight: 700; }
.burbuja {
  margin: 14px 14px 16px auto; max-width: 88%; padding: 10px 12px;
  background: #d9fdd3; border-radius: 10px 0 10px 10px; font-size: 1rem; line-height: 1.45;
}
.wa-nota { color: var(--muted); font-size: 0.9375rem; margin-bottom: 20px; }
.btn-cerrar { background: var(--ink); color: var(--bg); }

.sinjs { position: fixed; inset: auto 0 0; background: #fff; color: #000; padding: 16px; text-align: center; }

@media (max-width: 640px) { :root { --franja: 54px; } }
@media (max-width: 480px) {
  .hero-barra { flex-wrap: wrap; }
  .hero-barra .estado { order: 3; margin-left: 0; }
  .menu-btn { margin-left: auto; }
  .menu-btn span { display: none; }
}
