:root {
  --fondo: #fbf8f3;
  --superficie: #ffffff;
  --tinta: #2a211c;
  --tinta-suave: #6f625a;
  --borde: #eadfd3;
  --acento: #c2502e;
  --acento-oscuro: #9c3b1f;
  --abierto: #2f7d4f;
  --cerrado: #b3261e;
  --pronto: #b7791f;
  --radio: 16px;
  --sombra: 0 1px 2px rgba(42, 33, 28, .06), 0 6px 20px rgba(42, 33, 28, .06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font: 16px/1.5 "Inter", system-ui, sans-serif;
}

.contenedor { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.aviso {
  background: #fff4d6;
  color: #6b4e00;
  text-align: center;
  font-size: 14px;
  padding: 8px 16px;
}

/* Encabezado */
.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(194, 80, 46, .12), transparent 45%),
    var(--superficie);
  border-bottom: 1px solid var(--borde);
  padding: 28px 0 36px;
}
.logo {
  font-family: "Fraunces", serif;
  font-weight: 800;
  font-size: 28px;
  color: var(--tinta);
  text-decoration: none;
  letter-spacing: -.5px;
}
.logo em { color: var(--acento); font-style: normal; }
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-marca { width: 38px; height: 38px; }
.hero h1 {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.1;
  margin: 28px 0 8px;
  max-width: 14ch;
}
.subtitulo { color: var(--tinta-suave); margin: 0 0 24px; max-width: 52ch; }

.buscador {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--fondo);
  border: 1px solid var(--borde);
  border-radius: 999px;
  padding: 0 18px;
  max-width: 560px;
}
.buscador:focus-within { border-color: var(--acento); box-shadow: 0 0 0 3px rgba(194, 80, 46, .15); }
.buscador svg { width: 20px; height: 20px; fill: none; stroke: var(--tinta-suave); stroke-width: 2; flex: none; }
.buscador input {
  border: 0; background: transparent; outline: 0;
  font: inherit; font-size: 17px; padding: 14px 0; width: 100%; color: var(--tinta);
}

/* Categorías */
.categorias {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 20px 0 8px;
  scrollbar-width: none;
}
.categorias::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  border: 1px solid var(--borde);
  background: var(--superficie);
  color: var(--tinta);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover { border-color: var(--cat); }
.chip[aria-pressed="true"] { background: var(--cat-fondo); border-color: var(--cat); color: var(--cat); font-weight: 600; }

/* Filtros */
.filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px 0 16px;
}
.filtros select, .boton-cerca {
  font: inherit;
  font-size: 14px;
  border: 1px solid var(--borde);
  background: var(--superficie);
  color: var(--tinta);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}
.boton-cerca { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.boton-cerca .icono-chip { width: 17px; height: 17px; color: var(--acento); }
.boton-cerca[aria-pressed="true"] { background: var(--acento); color: #fff; border-color: var(--acento); }
.boton-cerca[aria-pressed="true"] .icono-chip { color: #fff; }
.distancia { display: inline-flex; align-items: center; gap: 4px; }

/* Pines del mapa */
.marcador {
  width: 38px;
  height: 38px;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  background: var(--cat);
  border: 3px solid #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .3);
  display: grid;
  place-items: center;
}
.marcador .icono-marcador { width: 22px; height: 22px; color: #fff; transform: rotate(45deg); stroke-width: 3; }
.marcador .icono-marcador .r { fill-opacity: .25; }
.marcador-cerrado { filter: grayscale(.85); opacity: .75; }
.interruptor {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500;
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}
.interruptor input { accent-color: var(--abierto); width: 16px; height: 16px; margin: 0; }

.barra-resultados { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
#conteo { margin: 0; color: var(--tinta-suave); font-size: 14px; }
.vistas { display: flex; background: var(--superficie); border: 1px solid var(--borde); border-radius: 10px; padding: 3px; }
.vistas button {
  border: 0; background: transparent; font: inherit; font-size: 14px;
  padding: 6px 14px; border-radius: 7px; cursor: pointer; color: var(--tinta-suave);
}
.vistas button.activa { background: var(--tinta); color: #fff; }

/* Tarjetas */
.grilla {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding-bottom: 48px;
}
.tarjeta {
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease;
}
.tarjeta:hover { transform: translateY(-2px); }
.tarjeta:focus-visible { outline: 3px solid var(--acento); outline-offset: 2px; }
/* Íconos propios (js/iconos.js) */
svg[class^="icono"], svg[class^="portada"] {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
svg .r { fill: currentColor; fill-opacity: .14; stroke: none; }
.icono-chip { width: 20px; height: 20px; color: var(--cat, currentColor); }
.icono-mini { width: 15px; height: 15px; stroke-width: 3; }

/* Portada ilustrada de cada lugar */
.portada {
  position: relative;
  height: 120px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--cat);
  background:
    radial-gradient(circle, color-mix(in srgb, var(--cat) 16%, transparent) 1.4px, transparent 1.6px) 0 0 / 16px 16px,
    var(--cat-fondo);
}
.portada-fondo {
  position: absolute;
  width: 170px;
  height: 170px;
  right: -36px;
  bottom: -52px;
  opacity: .16;
  stroke-width: 1.6;
  transform: rotate(-14deg);
}
.portada-sello {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--cat) 22%, transparent);
}
.portada-icono { width: 46px; height: 46px; }
.tarjeta:hover .portada-sello { transform: rotate(-6deg) scale(1.05); }
.portada-sello { transition: transform .2s ease; }
.tarjeta-cuerpo { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tarjeta h2 { font-family: "Fraunces", serif; font-size: 20px; font-weight: 600; margin: 0; line-height: 1.2; }
.destacado { color: var(--tinta-suave); font-size: 14px; margin: 0; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: var(--tinta-suave); margin-top: auto; padding-top: 6px; }
.precio { font-weight: 600; color: var(--tinta); }

.estado { font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.estado::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.estado.abierto { color: var(--abierto); }
.estado.cerrado { color: var(--cerrado); }
.estado.pronto { color: var(--pronto); }

.mapa { height: 560px; border-radius: var(--radio); border: 1px solid var(--borde); margin-bottom: 48px; z-index: 0; }
.vacio { text-align: center; color: var(--tinta-suave); padding: 48px 0; }

/* Detalle */
.detalle {
  border: 0;
  border-radius: 20px;
  padding: 0;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
  color: var(--tinta);
}
.detalle::backdrop { background: rgba(42, 33, 28, .5); }
.detalle .portada { height: 150px; }
.detalle .portada-sello { width: 92px; height: 92px; }
.detalle .portada-icono { width: 56px; height: 56px; }
.cerrar {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .9); font-size: 20px; cursor: pointer;
}
.detalle-cuerpo { padding: 20px 24px 24px; }
.detalle h2 { font-family: "Fraunces", serif; font-size: 26px; margin: 0 0 4px; line-height: 1.15; }
.detalle p { margin: 6px 0; }
.etiquetas { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.etiqueta {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--cat-fondo); color: var(--cat);
  border-radius: 999px; padding: 4px 12px 4px 8px; font-size: 13px; font-weight: 500;
}
.etiqueta .icono-chip { width: 17px; height: 17px; }
.horario { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.horario td { padding: 5px 0; border-bottom: 1px solid var(--borde); }
.horario td:last-child { text-align: right; color: var(--tinta-suave); }
.horario tr.hoy td { font-weight: 600; color: var(--tinta); }
.acciones { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.accion {
  flex: 1 1 160px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  border-radius: 12px;
  padding: 12px 16px;
  border: 1px solid var(--borde);
  color: var(--tinta);
}
.accion.principal { background: var(--acento); border-color: var(--acento); color: #fff; }
.accion.principal:hover { background: var(--acento-oscuro); }
.nota-lugar { font-size: 13px; color: var(--tinta-suave); margin: 12px 0 0; }
.nota-lugar.alerta { background: #fff4d6; color: #6b4e00; border-radius: 10px; padding: 8px 12px; }

.pie { border-top: 1px solid var(--borde); background: var(--superficie); padding: 28px 0; color: var(--tinta-suave); }
.pie p { margin: 4px 0; }
.logo-pie { font-size: 22px; }
.logo-pie .logo-marca { width: 30px; height: 30px; }
.pequeno { font-size: 13px; }

@media (max-width: 600px) {
  .filtros select, .boton-cerca, .interruptor { flex: 1 1 calc(50% - 4px); }
  .mapa { height: 70vh; }
}
