/* Motor de demos — estilos base + plantilla A (carta) */
:root {
  --primario: #6e1b22;
  --acento: #d9a53a;
  --papel: #fffdf9;
  --papel-2: #f7f1ea;
  --tinta: #241a17;
  --gris: #6f625c;
  --linea: #eadfd3;
  --ok: #2f7d4f;
  --cab-alto: 56px;
  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--cab-alto) + 56px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--papel); color: var(--tinta); font: 16px/1.55 var(--sans); padding-bottom: 84px; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--acento); outline-offset: 2px; border-radius: 4px; }
.ico { display: inline-flex; width: 1.15em; height: 1.15em; }
.ico svg { width: 100%; height: 100%; }

/* franja de vista previa */
.franja-demo { display: flex; flex-wrap: wrap; justify-content: center; gap: .15rem .5rem; padding: .4rem 1rem; background: var(--tinta); color: #f3ece6; font-size: .78rem; text-align: center; }
.franja-nota { opacity: .75; }
@media (max-width: 520px) { .franja-sep { display: none; } .franja-demo { flex-direction: column; } }

/* botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .7rem 1.2rem; border-radius: 999px; font-weight: 600; font-size: 1rem; text-decoration: none; border: 2px solid var(--primario); cursor: pointer; font-family: var(--sans); }
.btn-lleno { background: var(--primario); color: #fff; }
.btn-linea { background: transparent; color: var(--primario); }
.btn:active { transform: translateY(1px); }

/* cabecera */
.cab { position: sticky; top: 0; z-index: 20; height: var(--cab-alto); display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 1rem; background: var(--papel); border-bottom: 1px solid var(--linea); }
.marca { font-family: var(--serif); font-size: 1.35rem; color: var(--primario); text-decoration: none; line-height: 1; }
.pill-estado { font-size: .8rem; font-weight: 600; padding: .3rem .7rem; border-radius: 999px; white-space: nowrap; }
.pill-estado::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; margin-right: .4rem; background: currentColor; vertical-align: .05rem; }
.pill-estado.on { color: var(--ok); background: #e8f3ec; }
.pill-estado.off { color: var(--gris); background: var(--papel-2); }

/* hero */
.hero { display: grid; }
.hero-foto { aspect-ratio: 4 / 3; background: var(--papel-2); overflow: hidden; }
.hero-foto img { width: 100%; height: 100%; object-fit: cover; }
.hero-texto { padding: 1.4rem 1.1rem 1.8rem; }
.hero-rubro { margin: 0 0 .35rem; color: var(--gris); font-size: .95rem; }
.hero h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(3rem, 15vw, 5.5rem); line-height: .95; color: var(--primario); letter-spacing: -.01em; }
.hero-bajada { margin: .8rem 0 0; font-size: 1.1rem; max-width: 32ch; }
.chip-google { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 .2rem; margin: 1rem 0 0; font-size: .9rem; color: var(--gris); }
.chip-google strong { color: var(--tinta); }
.chip-estrella { width: 1rem; height: 1rem; color: var(--acento); display: inline-flex; margin-right: .15rem; }
.chip-estrella svg { width: 100%; height: 100%; }
.chip-fecha { font-size: .8rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.3rem; }

/* galería */
.galeria { display: grid; grid-auto-flow: column; grid-auto-columns: 62%; gap: .5rem; overflow-x: auto; padding: 0 1.1rem 1.6rem; scroll-snap-type: x mandatory; scrollbar-width: none; }
.galeria::-webkit-scrollbar { display: none; }
.galeria img { aspect-ratio: 1; object-fit: cover; border-radius: 10px; scroll-snap-align: start; background: var(--papel-2); }

/* carta */
.carta { background: #fff; border-top: 6px solid var(--primario); padding-bottom: 1rem; }
.carta-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 1.6rem 1.1rem .4rem; }
.carta-cab h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 2rem; }
.carta-nota { margin: 0; font-size: .8rem; color: var(--gris); }
.tabs { position: sticky; top: var(--cab-alto); z-index: 15; display: flex; gap: .4rem; overflow-x: auto; padding: .6rem 1.1rem; background: #fff; border-bottom: 1px solid var(--linea); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; padding: .45rem .9rem; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--gris); background: var(--papel-2); }
.tabs a.activa { background: var(--primario); color: #fff; }
.cat { padding: 1.4rem 1.1rem .2rem; }
.cat h3 { margin: 0 0 .4rem; font-family: var(--serif); font-weight: 400; font-size: 1.45rem; color: var(--primario); }
.cat h3::after { content: ""; display: block; width: 2.2rem; height: 3px; margin-top: .35rem; background: var(--acento); border-radius: 2px; }
.items { list-style: none; margin: 0; padding: 0; }
.item { padding: .85rem 0; border-bottom: 1px dashed var(--linea); }
.item:last-child { border-bottom: 0; }
.item-linea { display: flex; align-items: baseline; gap: .4rem; }
.item-nombre { font-weight: 600; font-size: 1.05rem; }
.item-puntos { flex: 1; min-width: 1rem; border-bottom: 2px dotted #cdbfb2; transform: translateY(-.3rem); }
.item-precio { font-family: var(--serif); font-size: 1.1rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.item-precio small { font-family: var(--sans); font-size: .78rem; color: var(--gris); }
.item-pie { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .3rem; min-height: 40px; }
.item-desc { color: var(--gris); font-size: .9rem; }
.stepper { flex: none; display: inline-flex; align-items: center; border: 1.5px solid var(--linea); border-radius: 999px; background: #fff; }
.paso { width: 40px; height: 40px; border: 0; background: none; font-size: 1.3rem; line-height: 1; color: var(--primario); cursor: pointer; border-radius: 50%; font-family: var(--sans); }
.paso:disabled { color: #cdbfb2; cursor: default; }
.paso-mas { background: var(--primario); color: #fff; }
.cant { min-width: 1.6rem; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.item:not(.en-pedido) .cant, .item:not(.en-pedido) .paso:not(.paso-mas) { display: none; }
.item:not(.en-pedido) .stepper { border-color: transparent; }
.item.en-pedido .item-nombre::before { content: ""; display: inline-block; width: .45rem; height: .45rem; margin-right: .45rem; border-radius: 50%; background: var(--acento); vertical-align: .15rem; }

/* visita */
.visita { display: grid; gap: 2rem; padding: 2.2rem 1.1rem; background: var(--papel-2); }
.visita h2 { margin: 0 0 .6rem; font-family: var(--serif); font-weight: 400; font-size: 1.6rem; }
.estado-linea { margin: 0 0 .7rem; font-weight: 600; }
.estado-linea.on { color: var(--ok); }
.estado-linea.off { color: var(--gris); }
.horarios { list-style: none; margin: 0; padding: 0; font-size: .95rem; }
.horarios li { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-bottom: 1px solid var(--linea); }
.horarios li span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.horarios li.es-hoy { font-weight: 700; }
.dir-grande { margin: 0; font-family: var(--serif); font-size: 1.35rem; }
.dir-loc { margin: .1rem 0 1rem; color: var(--gris); }

/* pie */
.pie { padding: 1.6rem 1.1rem; font-size: .85rem; color: var(--gris); text-align: center; }
.pie p { margin: .2rem 0; }
.pie a { color: var(--primario); font-weight: 600; }

/* barra fija de pedido */
.barra { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .7rem .8rem calc(.7rem + env(safe-area-inset-bottom)); background: var(--tinta); color: #f3ece6; box-shadow: 0 -6px 20px rgba(36, 26, 23, .18); }
.barra-txt { font-size: .85rem; line-height: 1.3; }
.barra.con-pedido { background: var(--primario); }
.barra.con-pedido .barra-txt { font-weight: 700; font-size: 1rem; color: #fff; }
.barra-btn { flex: none; display: inline-flex; align-items: center; gap: .45rem; min-height: 48px; padding: .6rem 1.1rem; border-radius: 999px; background: #25d366; color: #0d2b18; font-weight: 700; text-decoration: none; }
.barra.rebote { animation: rebote .35s ease-out; }
@keyframes rebote { 40% { transform: translateY(-4px); } }

/* escritorio */
@media (min-width: 860px) {
  body { padding-bottom: 0; }
  .cab { padding: 0 max(2rem, calc((100vw - 1120px) / 2)); }
  .hero { grid-template-columns: 1.05fr 1fr; align-items: center; max-width: 1180px; margin: 0 auto; padding: 2.5rem 2rem 2rem; gap: 3rem; }
  .hero-foto { order: 2; aspect-ratio: 5 / 4; border-radius: 18px; }
  .hero-texto { padding: 0; }
  .galeria { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); max-width: 1180px; margin: 0 auto; padding: 0 2rem 2.5rem; overflow: visible; }
  .galeria img { aspect-ratio: 4 / 3; }
  .carta { max-width: 860px; margin: 0 auto 2.5rem; border-radius: 0 0 16px 16px; box-shadow: 0 1px 0 var(--linea); }
  .carta-cab, .cat, .tabs { padding-left: 2.2rem; padding-right: 2.2rem; }
  .visita { grid-template-columns: 1fr 1fr; max-width: 1180px; margin: 0 auto; border-radius: 16px; padding: 2.5rem; }
  .barra { left: auto; right: 1.5rem; bottom: 1.5rem; width: 400px; border-radius: 999px; padding: .55rem .55rem .55rem 1.3rem; }
  .pie { padding-bottom: 6rem; }
}

/* hoja con QR (?imprimir=1) */
.modo-imprimir { background: #fff; padding: 0; }
.hoja { max-width: 560px; margin: 0 auto; padding: 3rem 1.5rem; text-align: center; }
.hoja-marca { margin: 0; font-family: var(--serif); font-size: 3.6rem; line-height: 1; color: var(--primario); }
.hoja h1 { margin: 1rem 0 1.6rem; font-size: 1.5rem; font-weight: 600; }
.hoja-qr { width: 300px; max-width: 80vw; margin: 0 auto; }
.hoja-qr svg { width: 100%; height: auto; display: block; }
.hoja-url { margin: 1rem 0 .3rem; font-weight: 600; word-break: break-all; }
.hoja-dir { margin: 0 0 2rem; color: var(--gris); }
@media print {
  .no-imprimir, .franja-demo, .barra { display: none !important; }
  .hoja { padding-top: 2cm; }
}

/* =========================================================
   PLANTILLA B — TURNOS
   ========================================================= */
.p-turnos {
  --papel: #f3f4f1;
  --papel-2: #e7e9e4;
  --tinta: #14202b;
  --gris: #5b6670;
  --linea: #d9ddd6;
  --serif: "Archivo", "Arial Narrow", Arial, sans-serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.p-turnos .marca { font-weight: 800; font-stretch: 75%; font-size: 1.5rem; letter-spacing: -.01em; color: var(--tinta); }
.t-hero { position: relative; min-height: 78svh; display: flex; align-items: flex-end; background: var(--primario); color: #fff; overflow: hidden; }
.t-hero-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.t-hero-velo { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,32,43,.15) 0%, rgba(20,32,43,.55) 45%, var(--primario) 100%); }
.t-hero-texto { position: relative; padding: 2rem 1.1rem 2.2rem; width: 100%; }
.t-hero-rubro { margin: 0 0 .5rem; font-size: .95rem; opacity: .85; }
.t-hero h1 { margin: 0; font-family: var(--serif); font-weight: 900; font-stretch: 62%; font-size: clamp(3.2rem, 15.5vw, 9rem); line-height: .86; overflow-wrap: break-word; letter-spacing: -.01em; }
.t-hero h1::after { content: ""; display: block; width: 4.5rem; height: 6px; margin-top: .9rem; background: var(--acento); }
.t-hero-bajada { margin: 1rem 0 0; font-size: 1.1rem; max-width: 34ch; }
.t-hero .chip-google, .t-hero .chip-google strong { color: #fff; }
.t-hero .chip-google { opacity: .92; }
.t-hero .btn-lleno { background: var(--acento); border-color: var(--acento); color: #fff; }
.t-hero .btn-linea { color: #fff; border-color: rgba(255,255,255,.7); }

.t-reservar { display: grid; gap: .8rem; padding: 1rem .7rem 1.5rem; }
.t-bloque { background: #fff; border-radius: 14px; padding: 1.4rem 1rem 1.2rem; }
.t-bloque h2 { margin: 0; font-family: var(--serif); font-weight: 800; font-stretch: 75%; font-size: 1.9rem; line-height: 1; }
.t-nota { margin: .4rem 0 1rem; color: var(--gris); font-size: .88rem; }
.srvs { list-style: none; margin: 0; padding: 0; }
.srv + .srv { border-top: 1px solid var(--linea); }
.srv-btn { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; padding: .85rem .2rem; background: none; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; border-radius: 8px; }
.srv-check { width: 22px; height: 22px; border: 2px solid #b9c0c6; border-radius: 6px; display: grid; place-items: center; transition: background .15s, border-color .15s; }
.srv.on .srv-check { background: var(--acento); border-color: var(--acento); }
.srv.on .srv-check::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.srv-nombre { display: block; font-weight: 600; font-size: 1.05rem; }
.srv-meta { display: block; color: var(--gris); font-size: .85rem; }
.srv-precio { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1rem; }
.chip { min-height: 42px; padding: .5rem .9rem; border-radius: 10px; border: 1.5px solid var(--linea); background: #fff; font: 600 .95rem var(--sans); color: var(--tinta); cursor: pointer; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--primario); border-color: var(--primario); color: #fff; }
.chips-horas .chip { min-width: 4.6rem; }
.chips-vacio { margin: 0; color: var(--gris); font-size: .9rem; }

.t-galeria { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem; padding: 0 .7rem 1.5rem; }
.t-galeria img { aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.p-turnos .visita h2 { font-weight: 800; font-stretch: 75%; font-size: 1.9rem; }
.p-turnos .dir-grande { font-family: var(--sans); font-weight: 600; }
.p-turnos .barra.con-pedido { background: var(--primario); }
.p-turnos .barra.con-pedido .barra-txt { font-size: .92rem; }

@media (min-width: 860px) {
  .t-hero { min-height: 72vh; }
  .t-hero-texto { max-width: 1180px; margin: 0 auto; padding: 3rem 2rem; }
  .t-reservar { grid-template-columns: 1.1fr 1fr; align-items: start; max-width: 1180px; margin: 0 auto; padding: 2.5rem 2rem; gap: 1.5rem; }
  .t-bloque { padding: 2rem; }
  .t-galeria { grid-template-columns: repeat(4, 1fr); max-width: 1180px; margin: 0 auto; padding: 0 2rem 2.5rem; }
}

/* =========================================================
   PLANTILLA C — TALLER
   ========================================================= */
.p-taller {
  --papel: #ffffff;
  --papel-2: #eef0f2;
  --tinta: #1d2125;
  --gris: #5f666d;
  --linea: #dde1e5;
  --serif: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --sans: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.p-taller .marca { font-weight: 800; font-size: 1.45rem; color: var(--tinta); }
.p-taller .btn { border-radius: 6px; }
.p-taller .btn-lleno { background: var(--acento); border-color: var(--acento); color: var(--tinta); }
.p-taller .btn-linea { color: var(--tinta); border-color: var(--tinta); }
.c-hero { position: relative; display: flex; align-items: flex-end; min-height: 72svh; background: var(--primario); color: #fff; border-bottom: 8px solid var(--acento); overflow: hidden; }
.c-hero-texto { position: relative; z-index: 2; width: 100%; padding: 2rem 1.1rem 2.2rem; }
.c-hero-rubro { margin: 0 0 .4rem; opacity: .85; }
.c-hero h1 { margin: 0; font-family: var(--serif); font-weight: 800; font-size: clamp(3.2rem, 16vw, 6.5rem); line-height: .9; text-shadow: 0 2px 18px rgba(0,0,0,.25); }
.c-hero-bajada { margin: .9rem 0 0; font-size: 1.1rem; max-width: 34ch; }
.c-hero .chip-google, .c-hero .chip-google strong { color: #fff; }
.c-hero .btn-linea { color: #fff; border-color: rgba(255,255,255,.75); }
.c-hero-foto { position: absolute; inset: 0; z-index: 1; }
.c-hero-foto img { width: 100%; height: 100%; object-fit: cover; }
.c-hero-foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--primario) 20%, transparent) 0%, color-mix(in srgb, var(--primario) 70%, transparent) 45%, var(--primario) 100%); }
.c-hero:not(:has(.c-hero-foto)) { min-height: 0; }

.c-srv, .c-pres, .c-marcas { padding: 2rem 1.1rem; }
.c-srv h2, .c-pres h2, .c-marcas h2, .p-taller .visita h2 { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 2rem; line-height: 1.05; }
.c-lista { list-style: none; margin: .4rem 0 0; padding: 0; border-top: 2px solid var(--tinta); }
.c-lista li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--linea); }
.c-srv-nombre { display: block; font-weight: 600; font-size: 1.05rem; }
.c-srv-desc { display: block; color: var(--gris); font-size: .88rem; }
.c-srv-der { display: flex; align-items: center; gap: .7rem; flex: none; }
.c-srv-precio { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.c-srv-precio small { font-family: var(--sans); font-weight: 500; font-size: .78rem; color: var(--gris); }
.c-consultar { font-size: 1rem; color: var(--gris); }
.c-srv-wa { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 6px; background: var(--papel-2); color: #1a8d4a; }
.c-srv-wa svg { width: 22px; height: 22px; }

.c-pres { background: var(--papel-2); }
.c-pres-ayuda { margin: .5rem 0 1.2rem; color: var(--gris); }
.c-pres-ayuda b { color: var(--tinta); font-family: var(--serif); font-size: 1.15rem; letter-spacing: .02em; }
.c-flanco { display: flex; align-items: flex-end; gap: .35rem; padding: 1rem .9rem 1.1rem; background: var(--primario); border-radius: 14px; color: #fff; box-shadow: inset 0 0 0 3px rgba(255,255,255,.06); }
.c-flanco label { flex: 1; display: grid; gap: .25rem; }
.c-flanco label span { font-size: .78rem; opacity: .75; }
.c-barra { font-family: var(--serif); font-weight: 700; font-size: 2rem; line-height: 52px; opacity: .6; }
.c-sel { width: 100%; height: 52px; padding: 0 .4rem; border-radius: 8px; border: 2px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font: 700 1.6rem var(--serif); text-align: center; text-align-last: center; appearance: none; -webkit-appearance: none; cursor: pointer; }
.c-sel option { color: var(--tinta); font-size: 1rem; }
.c-sel:focus-visible { border-color: var(--acento); outline: none; }
.c-campos { display: grid; gap: 1rem; margin-top: 1.3rem; }
.c-campos label { display: grid; gap: .3rem; }
.c-lbl { margin: 0 0 .35rem; font-weight: 600; font-size: .9rem; }
.c-campos label .c-lbl { margin: 0; }
.c-input { height: 46px; padding: 0 .8rem; border-radius: 8px; border: 1.5px solid var(--linea); background: #fff; font: 500 1rem var(--sans); color: var(--tinta); width: 100%; }
.c-check { display: flex !important; grid-template-columns: none; align-items: center; gap: .55rem; font-weight: 500; cursor: pointer; }
.c-check input { width: 20px; height: 20px; accent-color: var(--primario); }
.p-taller .chip { border-radius: 6px; }
.p-taller .chips { margin-bottom: 0; }

.c-marcas ul { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.c-marcas li { padding: .55rem 1rem; border: 1.5px solid var(--linea); border-radius: 6px; font-family: var(--serif); font-weight: 700; font-size: 1.2rem; }
.p-taller .visita { background: #fff; border-top: 1px solid var(--linea); }
.p-taller .dir-grande { font-family: var(--serif); font-weight: 700; font-size: 1.5rem; }
.p-taller .barra-btn { border-radius: 8px; }

@media (min-width: 860px) {
  .c-hero { min-height: 74vh; align-items: center; }
  .c-hero-texto { max-width: 1180px; margin: 0 auto; padding: 4rem 2rem; }
  .c-hero-texto > * { max-width: 620px; }
  .c-hero-foto::after { background: linear-gradient(90deg, color-mix(in srgb, var(--primario) 94%, transparent) 0%, color-mix(in srgb, var(--primario) 70%, transparent) 45%, color-mix(in srgb, var(--primario) 15%, transparent) 100%); }
  .c-srv, .c-marcas { max-width: 860px; margin: 0 auto; padding: 3rem 2rem; }
  .c-pres { padding: 3rem max(2rem, calc((100vw - 860px) / 2)); }
  .c-campos { grid-template-columns: 1fr 1fr; align-items: end; }
  .p-taller .barra { border-radius: 12px; }
}

/* =========================================================
   PLANTILLA D — CATÁLOGO
   ========================================================= */
.p-catalogo {
  --papel: #f6f6f3;
  --papel-2: #ebebe6;
  --tinta: #1f2328;
  --gris: #5c6168;
  --linea: #deded8;
  --serif: "IBM Plex Sans Condensed", "Arial Narrow", Arial, sans-serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.p-catalogo .marca { font-weight: 700; color: var(--primario); font-size: 1.45rem; }
.p-catalogo .btn { border-radius: 4px; }
.d-hero { position: relative; background: var(--primario); color: #fff; }
.d-hero-fondo { position: absolute; inset: 0; overflow: hidden; }
.d-hero-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.d-hero-fondo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--primario) 35%, transparent) 0%, color-mix(in srgb, var(--primario) 88%, #000) 62%); }
.d-hero-in { position: relative; z-index: 16; padding: 1.8rem 1.1rem 1.6rem; }
.d-hero.con-foto .d-hero-in { padding-top: 11rem; }
.d-hero-rubro { margin: 0 0 .3rem; opacity: .9; }
.d-hero h1 { margin: 0; font-family: var(--serif); font-weight: 700; font-size: clamp(3.2rem, 17vw, 6rem); line-height: .9; letter-spacing: -.02em; }
.d-hero-bajada { margin: .8rem 0 0; font-size: 1.08rem; max-width: 36ch; }
.d-hero .chip-google, .d-hero .chip-google strong { color: #fff; }
.d-hero .chip-estrella { color: #ffd43b; }
.d-buscar-wrap { position: relative; display: block; margin: 1.4rem 0 0; }
.d-lupa { position: absolute; left: .9rem; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); color: var(--gris); pointer-events: none; }
.d-lupa svg { width: 100%; height: 100%; }
.d-buscar { width: 100%; height: 56px; padding: 0 1rem 0 2.9rem; border: 0; border-radius: 4px; font: 500 1.08rem var(--sans); color: var(--tinta); background: #fff; box-shadow: 0 3px 0 rgba(0,0,0,.18); }
.d-buscar:focus-visible { outline: 3px solid #ffd43b; outline-offset: 2px; }

/* respuesta del buscador general */
.d-buscador { position: relative; }
.d-resultado { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; max-height: min(60vh, 420px); overflow-y: auto; overscroll-behavior: contain; padding: 1rem; background: #fff; color: var(--tinta); border-radius: 4px; border-left: 5px solid var(--ok); box-shadow: 0 12px 32px rgba(0,0,0,.28); }
.d-resultado[hidden] { display: none; }
.d-resultado.no { border-left-color: var(--primario); }
.d-res-tit { display: flex; align-items: center; gap: .55rem; margin: 0; font-weight: 700; font-size: 1.05rem; }
.d-res-ico { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--ok); color: #fff; font-size: .9rem; }
.d-resultado.no .d-res-ico { background: var(--primario); }
.d-resultado ul { list-style: none; margin: .6rem 0 0; padding: 0; }
.d-resultado li { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .55rem 0; border-top: 1px solid var(--linea); }
.d-resultado li b { display: block; font-weight: 600; }
.d-resultado li small { display: block; color: var(--gris); font-size: .82rem; }
.d-ir { flex: none; min-height: 38px; padding: .35rem .75rem; border: 0; border-radius: 4px; background: var(--tinta); color: #fff; font: 600 .86rem var(--sans); cursor: pointer; white-space: nowrap; }
.d-ir::after { content: " ↓"; }
.d-res-txt { margin: .4rem 0 .9rem; color: var(--gris); }
.d-res-mas { margin: .4rem 0 0; color: var(--gris); font-size: .85rem; }

.d-catalogo { padding: 1.8rem 0 1rem; }
.d-cab { padding: 0 1.1rem; }
.d-cab h2, .d-envios h2, .p-catalogo .visita h2 { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 2rem; line-height: 1.05; }
.d-cats { position: sticky; top: var(--cab-alto); z-index: 15; display: flex; gap: .4rem; overflow-x: auto; padding: .6rem 1.1rem; background: var(--papel); scrollbar-width: none; }
.d-cats::-webkit-scrollbar { display: none; }
.p-catalogo .chip { flex: none; border-radius: 4px; min-height: 40px; }
.d-cat { margin: .8rem .7rem 0; background: #fff; border: 1px solid var(--linea); border-radius: 6px; }
.d-cat[hidden] { display: none; }
.d-cat-cab { padding: .7rem .9rem .8rem; border-bottom: 2px solid var(--tinta); }
.d-cat h3 { margin: 0 0 .5rem; font-family: var(--serif); font-weight: 700; font-size: 1.2rem; }
.d-cat h3 small { font-family: var(--sans); font-weight: 500; font-size: .8rem; color: var(--gris); }
.d-cat-buscar-wrap { position: relative; display: block; }
.d-cat-buscar-wrap .d-lupa { width: 17px; height: 17px; left: .7rem; }
.d-cat-buscar { width: 100%; height: 40px; padding: 0 .7rem 0 2.2rem; border: 1.5px solid var(--linea); border-radius: 4px; background: var(--papel); font: 500 .95rem var(--sans); color: var(--tinta); }
.d-cat-buscar:focus-visible { outline: 2px solid var(--primario); outline-offset: 1px; background: #fff; }
.d-cat ul { list-style: none; margin: 0; padding: 0; }
.d-item { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .75rem .9rem; border-bottom: 1px solid var(--linea); scroll-margin-top: 130px; }
.d-item:last-child { border-bottom: 0; }
.d-item.destacado { animation: destacar 2.2s ease-out; }
@keyframes destacar { 0%, 35% { background: #fff1c2; box-shadow: inset 4px 0 0 var(--primario); } 100% { background: #fff; box-shadow: inset 4px 0 0 transparent; } }
.d-nombre { display: block; font-weight: 600; }
.d-desc { display: block; color: var(--gris); font-size: .86rem; }
.d-add { flex: none; min-height: 40px; padding: .4rem .75rem; border: 1.5px solid var(--primario); border-radius: 4px; background: #fff; color: var(--primario); font: 600 .88rem var(--sans); cursor: pointer; white-space: nowrap; }
.d-add.on { background: var(--primario); color: #fff; }
.d-add.on::before { content: "✓ "; }
.d-cat-vacio { padding: 1rem .9rem 1.1rem; }
.d-cat-vacio[hidden] { display: none; }
.d-cat-vacio p { margin: 0 0 .4rem; color: var(--gris); }
.d-cat-vacio a { color: var(--primario); font-weight: 600; }
.d-envios { display: flex; gap: 1rem; align-items: flex-start; margin: 1.2rem .7rem 2rem; padding: 1.3rem 1.1rem; background: var(--acento); color: #fff; border-radius: 6px; }
.d-envios-ico { flex: none; width: 40px; height: 40px; }
.d-envios-ico svg { width: 100%; height: 100%; }
.d-envios h2 { font-size: 1.5rem; }
.d-envios p { margin: .3rem 0 0; }
.p-catalogo .visita { background: #fff; border-top: 1px solid var(--linea); }
.p-catalogo .dir-grande { font-family: var(--serif); font-weight: 700; }
.p-catalogo .barra-btn { border-radius: 6px; }
.d-resultado .btn .ico { width: 1.2em; height: 1.2em; }

@media (min-width: 860px) {
  .d-hero-in { max-width: 980px; margin: 0 auto; padding: 3rem 2rem; }
  .d-hero.con-foto .d-hero-in { padding-top: 9rem; }
  .d-hero-fondo::after { background: linear-gradient(90deg, color-mix(in srgb, var(--primario) 92%, #000) 0%, color-mix(in srgb, var(--primario) 75%, transparent) 55%, color-mix(in srgb, var(--primario) 20%, transparent) 100%); }
  .d-buscador { max-width: 620px; }
  .d-catalogo { max-width: 980px; margin: 0 auto; padding-top: 2.5rem; }
  .d-cab, .d-cats { padding-left: 2rem; padding-right: 2rem; }
  .d-lista { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; padding: 0 1.3rem; align-items: start; }
  .d-envios { max-width: 940px; margin: 1.5rem auto 2.5rem; }
  .p-catalogo .barra { border-radius: 10px; }
}

/* =========================================================
   PLANTILLA E — PROFESIONAL / SALUD
   ========================================================= */
.p-salud {
  --papel: #f7faf8;
  --papel-2: #e9f1ed;
  --tinta: #1d2b28;
  --gris: #5a6b67;
  --linea: #d8e4df;
  --serif: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.p-salud .marca { font-weight: 600; color: var(--primario); font-size: 1.4rem; }
@media (max-width: 520px) { .cab .marca { font-size: clamp(1.05rem, 5vw, 1.4rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; } }
.p-salud .btn { border-radius: 14px; }
.e-hero { display: grid; }
.e-hero-texto { padding: 2rem 1.1rem 2rem; }
.e-hero-rubro { margin: 0 0 .4rem; color: var(--gris); }
.e-hero h1 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: clamp(2.8rem, 13vw, 5rem); line-height: .95; color: var(--primario); }
.e-hero-bajada { margin: .9rem 0 0; font-size: 1.12rem; max-width: 34ch; }
.e-hero-foto { margin: 0 1.1rem; aspect-ratio: 4 / 3; border-radius: 28px 28px 28px 6px; overflow: hidden; background: var(--papel-2); }
.e-hero-foto img { width: 100%; height: 100%; object-fit: cover; }

.e-urg { display: grid; gap: 1rem; margin: 1.6rem .7rem 0; padding: 1.3rem 1.1rem; background: #fff3ef; border: 2px solid #f1b5a5; border-radius: 18px; }
.e-urg h2 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.45rem; color: #a3321b; }
.e-urg p { margin: .3rem 0 0; }
.e-urg-btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.e-btn-urg { background: #c23b22; border-color: #c23b22; color: #fff; }
.e-btn-urg.e-sec { background: transparent; color: #a3321b; }

.e-srv, .e-turno, .e-cob { padding: 2.2rem 1.1rem 1rem; }
.e-srv h2, .e-turno h2, .e-cob h2, .p-salud .visita h2 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 2rem; color: var(--tinta); }
.e-especies { margin: .4rem 0 0; color: var(--gris); }
.e-especies b { color: var(--tinta); }
.e-grid { list-style: none; margin: 1.2rem 0 .6rem; padding: 0; display: grid; gap: .6rem; }
.e-grid li { padding: 1rem 1.1rem; background: #fff; border-radius: 16px; border: 1px solid var(--linea); }
.e-grid h3 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.2rem; color: var(--primario); }
.e-grid p { margin: .25rem 0 0; color: var(--gris); font-size: .95rem; }
.e-grid .e-precio { color: var(--tinta); font-weight: 700; }

.e-turno { margin: 1.2rem .7rem 0; padding: 1.6rem 1rem 1.4rem; background: #fff; border-radius: 22px; border: 1px solid var(--linea); }
.e-turno .c-lbl { margin: 1.1rem 0 .45rem; }
.p-salud .chip { border-radius: 12px; }
.chip:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.p-salud .chips { margin-bottom: 0; }
.e-campo { display: grid; }
.e-campo .c-lbl { margin-bottom: .45rem; }
.p-salud .c-input { border-radius: 12px; }

.e-cob ul { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.e-cob li { padding: .5rem .95rem; background: var(--papel-2); border-radius: 999px; font-weight: 600; }
.p-salud .visita { margin-top: 2rem; }
.p-salud .dir-grande { font-family: var(--serif); font-weight: 600; }
.p-salud .barra-btn { border-radius: 14px; }

@media (min-width: 860px) {
  .e-hero { grid-template-columns: 1fr 1fr; align-items: center; gap: 3rem; max-width: 1180px; margin: 0 auto; padding: 2.5rem 2rem 1rem; }
  .e-hero-texto { padding: 0; }
  .e-hero-foto { margin: 0; }
  .e-hero:not(:has(.e-hero-foto)) { grid-template-columns: 1fr; }
  .e-urg { grid-template-columns: 1fr auto; align-items: center; max-width: 1116px; margin: 2rem auto 0; padding: 1.4rem 2rem; }
  .e-srv, .e-cob { max-width: 1180px; margin: 0 auto; padding: 3rem 2rem 1rem; }
  .e-grid { grid-template-columns: repeat(3, 1fr); }
  .e-turno { max-width: 760px; margin: 2rem auto 0; padding: 2.2rem; }
  .p-salud .barra { border-radius: 16px; }
}

/* ---------- datos de ejemplo, nombre corto, urgencias demo ---------- */
.nota-ejemplo { margin: 0 0 .7rem; color: var(--gris); font-size: .85rem; font-style: italic; }
.c-otras .nota-ejemplo, .c-lbl .nota-ejemplo { margin: 0; font-weight: 400; }
.marca-corta { display: none; }
@media (max-width: 520px) {
  .marca-larga { display: none; }
  .marca-corta { display: inline; }
}
.c-marca-top { margin: 1rem 0 0; display: inline-block; padding: .6rem 1.3rem; border: 3px solid var(--acento); border-radius: 8px; font-family: var(--serif); font-weight: 800; font-size: 2rem; line-height: 1; letter-spacing: .01em; }
.c-otras { margin: 1.4rem 0 0; }
.c-marcas ul { margin-top: .5rem; }
.d-envios-ej { margin: 0 0 .25rem; font-size: .82rem; font-style: italic; opacity: .85; }
.e-urg-aviso { grid-column: 1 / -1; margin: 0; padding: .8rem .9rem; background: #fff; border-radius: 12px; border-left: 4px solid #c23b22; font-size: .95rem; }
.e-urg-aviso[hidden] { display: none; }
.e-urg-aviso:focus { outline: none; }

/* ---------- simulación de WhatsApp (demo) ---------- */
body.wa-abierto { overflow: hidden; }
.wa-sim { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; }
.wa-sim[hidden] { display: none; }
.wa-sim-fondo { position: absolute; inset: 0; background: rgba(15, 20, 18, .62); }
.wa-sim-panel { position: relative; width: min(380px, 100%); max-height: calc(100svh - 2rem); overflow-y: auto; padding: 1.1rem 1rem 1rem; background: #fff; border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.35); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #111b21; animation: wa-entrar .22s ease-out; }
@keyframes wa-entrar { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.wa-sim-tit { margin: 0 0 .8rem; font-weight: 700; font-size: 1.05rem; text-align: center; }
.wa-tel { border-radius: 16px; overflow: hidden; border: 1px solid #d1d7db; }
.wa-cab { display: flex; align-items: center; gap: .55rem; padding: .6rem .8rem; background: #008069; color: #fff; }
.wa-flecha { font-size: 1.6rem; line-height: 1; opacity: .9; }
.wa-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #dfe5e7; color: #54656f; font-weight: 700; }
.wa-quien b { display: block; font-size: .98rem; }
.wa-quien small { display: block; font-size: .75rem; opacity: .85; }
.wa-chat { padding: .8rem .7rem 1rem; min-height: 180px; background: #efeae2; }
.wa-dia { margin: 0 auto .7rem; width: max-content; padding: .2rem .6rem; border-radius: 8px; background: #fff; color: #54656f; font-size: .72rem; box-shadow: 0 1px .5px rgba(11,20,26,.13); }
.wa-burbuja { position: relative; max-width: 88%; padding: .45rem .6rem 1.2rem; background: #fff; border-radius: 0 10px 10px 10px; box-shadow: 0 1px .5px rgba(11,20,26,.13); }
.wa-txt { display: block; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .92rem; line-height: 1.38; }
.wa-hora { position: absolute; right: .55rem; bottom: .3rem; font-size: .68rem; color: #667781; }
.wa-pie { padding: .5rem .7rem; background: #f0f2f5; }
.wa-pie span { display: block; padding: .5rem .9rem; border-radius: 999px; background: #fff; color: #8696a0; font-size: .88rem; }
.wa-sim-nota { margin: .8rem 0 0; font-size: .82rem; color: #54656f; text-align: center; }
.wa-sim-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .9rem; }
.wa-sim-btns > * { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font: 600 .95rem system-ui, sans-serif; text-decoration: none; cursor: pointer; text-align: center; padding: .4rem .8rem; }
.wa-sim-cerrar { border: 0; background: #008069; color: #fff; }
.wa-sim-enviar { border: 1.5px solid #d1d7db; background: #fff; color: #111b21; }

/* ---------- aviso del local, agotado, link al panel ---------- */
.aviso-local { padding: .7rem 1rem; background: var(--acento); color: #1b1b1b; font-weight: 700; text-align: center; }
.item.agotado .item-nombre, .item.agotado .item-precio { opacity: .5; }
.item-agotado { flex: none; padding: .3rem .7rem; border-radius: 999px; background: var(--papel-2); color: var(--gris); font-size: .8rem; font-weight: 600; }
.pie-panel { margin-top: .8rem !important; }
.pie-panel a { font-weight: 600; }
.pie-volver { margin-top: .6rem !important; } .pie-volver a { font-weight: 700; }
