/* ==========================================================================
   La Exquisita — menú digital
   Identidad cálida y editorial, diseñada primero para celular.
   ========================================================================== */

:root {
  --vino: #f76c5e;
  --vino-profundo: #dd5149;
  --coral: #ef735f;
  --dorado: #f2b84b;
  --turquesa: #269b8d;
  --turquesa-profundo: #19776e;
  --crema: #fffaf4;
  --crema-profunda: #fff0e4;
  --blanco: #ffffff;
  --tinta: #26333a;
  --tinta-suave: #68777b;
  --borde: #f0ded3;
  --verde: #26845a;
  --whatsapp: #25d366;

  --radio: 22px;
  --radio-pequeno: 14px;
  --sombra: 0 10px 32px rgb(81 19 34 / 8%);
  --sombra-alta: 0 18px 46px rgb(46 29 27 / 18%);
  --ancho: 860px;

  --fuente: Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fuente-editorial: Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--crema);
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--fuente);
  color: var(--tinta);
  background:
    radial-gradient(circle at 100% 18%, rgb(247 108 94 / 9%), transparent 28rem),
    linear-gradient(180deg, var(--crema) 0%, #ffffff 55%, #fff6ed 100%);
  line-height: 1.5;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button, input { -webkit-tap-highlight-color: transparent; }

/* --- Cabecera ------------------------------------------------------------ */

.cabecera {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--blanco);
  background:
    linear-gradient(120deg, rgb(255 255 255 / 5%) 0 1px, transparent 1px 72px),
    linear-gradient(135deg, #f45f57 0%, #fa7967 54%, #f5a05f 100%);
  padding: calc(30px + env(safe-area-inset-top)) 18px 34px;
}

.cabecera::after {
  content: "";
  position: absolute;
  inset: auto -8% -78px 28%;
  z-index: -1;
  height: 150px;
  border-radius: 50% 50% 0 0;
  background: rgb(255 248 238 / 7%);
  transform: rotate(-5deg);
}

.cabecera__halo {
  position: absolute;
  z-index: -1;
  display: block;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 50%;
}

.cabecera__halo--uno {
  width: 230px;
  height: 230px;
  top: -145px;
  right: -50px;
}

.cabecera__halo--dos {
  width: 130px;
  height: 130px;
  right: 54px;
  bottom: -94px;
  border-color: rgb(215 164 75 / 35%);
}

.cabecera__contenido {
  max-width: var(--ancho);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.cabecera__marca {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.cabecera__icono {
  width: 62px;
  height: 62px;
  flex: none;
  display: grid;
  place-items: center;
  color: var(--vino-profundo);
  background: linear-gradient(145deg, #ffffff, #fff1cf);
  border: 1px solid rgb(255 255 255 / 55%);
  border-radius: 20px;
  box-shadow: 0 12px 28px rgb(156 61 48 / 20%);
  font-family: var(--fuente-editorial);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  transform: rotate(-3deg);
}

.cabecera__texto { min-width: 0; }

.cabecera__eyebrow,
.buscador__eyebrow,
.pie__eyebrow {
  margin: 0 0 4px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cabecera__eyebrow { color: #fff2be; }

.cabecera__nombre {
  margin: 0;
  font-family: var(--fuente-editorial);
  font-size: clamp(2rem, 8vw, 3.55rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.cabecera__eslogan {
  margin: 9px 0 0;
  color: rgb(255 255 255 / 78%);
  font-size: 0.92rem;
}

.cabecera__lateral {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
}

.cabecera__invitacion {
  margin: 0;
  color: rgb(255 255 255 / 72%);
  font-size: 0.78rem;
}

.estado {
  margin: 0;
  padding: 7px 12px;
  color: #7d3430;
  background: rgb(255 255 255 / 76%);
  border: 1px solid rgb(255 255 255 / 52%);
  border-radius: 999px;
  font-size: 0.77rem;
  font-weight: 700;
  backdrop-filter: blur(12px);
  white-space: nowrap;
}

.estado--abierto::before,
.estado--cerrado::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  vertical-align: 1px;
  box-shadow: 0 0 0 3px rgb(255 255 255 / 10%);
}

.estado--abierto::before { background: #74e2a7; }
.estado--cerrado::before { background: #ffaaa2; }

/* --- Categorías ---------------------------------------------------------- */

.categorias {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 9px;
  padding: 11px max(16px, calc((100% - var(--ancho)) / 2));
  overflow-x: auto;
  background: rgb(255 248 238 / 88%);
  border-bottom: 1px solid rgb(122 31 52 / 8%);
  box-shadow: 0 8px 22px rgb(81 19 34 / 4%);
  backdrop-filter: blur(18px);
  scrollbar-width: none;
  scroll-padding: 16px;
}

.categorias::-webkit-scrollbar { display: none; }

.categorias__btn {
  flex: none;
  min-height: 42px;
  padding: 9px 15px;
  color: var(--tinta);
  background: rgb(255 253 249 / 78%);
  border: 1px solid var(--borde);
  border-radius: 999px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease,
    border-color 160ms ease, box-shadow 160ms ease;
}

.categorias__btn:hover {
  border-color: rgb(122 31 52 / 28%);
  transform: translateY(-1px);
}

.categorias__btn[aria-pressed="true"] {
  color: var(--blanco);
  background: var(--turquesa);
  border-color: var(--turquesa);
  box-shadow: 0 7px 18px rgb(38 155 141 / 22%);
}

.categorias__btn:focus-visible,
.buscador__campo:focus-within,
.whatsapp:focus-visible,
.pie a:focus-visible {
  outline: 3px solid rgb(215 164 75 / 65%);
  outline-offset: 3px;
}

/* --- Buscador ------------------------------------------------------------ */

.buscador {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 30px 16px 4px;
}

.buscador__encabezado {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.buscador__eyebrow {
  color: var(--coral);
}

.buscador__titulo {
  margin: 0;
  font-family: var(--fuente-editorial);
  font-size: clamp(1.55rem, 6vw, 2.15rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.buscador__campo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  background: rgb(255 253 249 / 90%);
  border: 1px solid var(--borde);
  border-radius: 18px;
  box-shadow: var(--sombra);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.buscador__campo:focus-within {
  border-color: rgb(122 31 52 / 38%);
  box-shadow: 0 12px 34px rgb(81 19 34 / 12%);
}

.buscador__lupa {
  position: relative;
  width: 16px;
  height: 16px;
  flex: none;
  border: 2px solid var(--vino);
  border-radius: 50%;
  opacity: 0.7;
}

.buscador__lupa::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 2px;
  right: -5px;
  bottom: -2px;
  background: var(--vino);
  border-radius: 2px;
  transform: rotate(45deg);
  transform-origin: left center;
}

.buscador__campo input {
  width: 100%;
  padding: 14px 0;
  color: inherit;
  background: none;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 16px;
}

.buscador__campo input::placeholder { color: #9b8881; }

/* --- Menú ---------------------------------------------------------------- */

.menu {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 8px 16px 44px;
}

.cargando,
.vacio {
  padding: 52px 16px;
  color: var(--tinta-suave);
  text-align: center;
}

.vacio {
  background: rgb(255 253 249 / 64%);
  border: 1px dashed var(--borde);
  border-radius: var(--radio);
}

.seccion { scroll-margin-top: 76px; }

.seccion__titulo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 31px 0 14px;
  font-family: var(--fuente-editorial);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.seccion__titulo::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, var(--borde), transparent);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.tarjeta {
  position: relative;
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(126px, 40%) minmax(0, 1fr);
  min-height: 154px;
  background: var(--blanco);
  border: 1px solid rgb(234 219 202 / 88%);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.tarjeta:hover {
  border-color: rgb(122 31 52 / 18%);
  box-shadow: var(--sombra-alta);
  transform: translateY(-3px);
}

.tarjeta__foto {
  width: 100%;
  height: 100%;
  min-height: 154px;
  aspect-ratio: auto;
  object-fit: cover;
  background: var(--crema-profunda);
  transition: transform 320ms ease;
}

.tarjeta:hover .tarjeta__foto { transform: scale(1.025); }

.tarjeta__foto--sinfoto {
  display: grid;
  place-items: center;
  color: var(--vino);
  background:
    radial-gradient(circle at 72% 28%, rgb(255 255 255 / 70%) 0 4%, transparent 4.5%),
    linear-gradient(145deg, #f8e6d1, #f2cfc8);
  font-size: 2.55rem;
}

.tarjeta__cuerpo {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 17px 16px;
}

.tarjeta__nombre {
  margin: 0;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.27;
  letter-spacing: -0.015em;
}

.tarjeta__desc {
  flex: 1;
  margin: 0;
  color: var(--tinta-suave);
  font-size: 0.81rem;
  line-height: 1.42;
}

.tarjeta__desc:empty { display: none; }

.tarjeta__precio {
  align-self: flex-end;
  margin: auto 0 0;
  color: var(--vino);
  font-family: var(--fuente-editorial);
  font-size: 1.18rem;
  font-weight: 700;
}

.tarjeta__precio--pendiente {
  color: var(--tinta-suave);
  font-family: var(--fuente);
  font-size: 0.78rem;
  font-style: italic;
  font-weight: 650;
}

.etiqueta {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  color: var(--blanco);
  background: var(--turquesa);
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 999px;
  box-shadow: 0 5px 15px rgb(46 29 27 / 18%);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tarjeta--agotado .tarjeta__foto {
  filter: grayscale(1);
  opacity: 0.48;
}

.tarjeta--agotado .etiqueta { background: var(--tinta-suave); }

/* --- Pie ----------------------------------------------------------------- */

.pie {
  position: relative;
  overflow: hidden;
  padding: 40px 18px calc(38px + env(safe-area-inset-bottom));
  color: var(--blanco);
  background:
    radial-gradient(circle at 88% 8%, rgb(255 255 255 / 12%), transparent 18rem),
    linear-gradient(145deg, var(--turquesa-profundo), #258f83);
}

.pie::before {
  content: "LE";
  position: absolute;
  right: -16px;
  bottom: -70px;
  color: rgb(255 255 255 / 3%);
  font-family: var(--fuente-editorial);
  font-size: 12rem;
  line-height: 1;
}

.pie__encabezado,
.pie__datos,
.pie__redes,
.pie__nota {
  position: relative;
  z-index: 1;
  max-width: var(--ancho);
  margin-right: auto;
  margin-left: auto;
}

.pie__encabezado { margin-bottom: 27px; }
.pie__eyebrow { color: #e2b764; }

.pie__titulo {
  margin: 0;
  font-family: var(--fuente-editorial);
  font-size: clamp(1.55rem, 5vw, 2.15rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.pie__intro {
  margin: 7px 0 0;
  color: rgb(255 255 255 / 60%);
  font-size: 0.88rem;
}

.pie__datos {
  margin-top: 0;
  margin-bottom: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.pie__dato dt {
  margin-bottom: 6px;
  color: #e2b764;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pie__dato dd {
  margin: 0;
  color: rgb(255 255 255 / 82%);
  font-size: 0.88rem;
}

.horarios {
  margin: 0;
  padding: 0;
  list-style: none;
}

.horarios li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  max-width: 250px;
  padding: 2px 0;
}

.horarios li[data-hoy] {
  color: var(--blanco);
  font-weight: 750;
}

.pie__redes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.pie__redes a {
  padding: 8px 15px;
  background: rgb(255 255 255 / 8%);
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.pie__nota {
  margin-top: 26px;
  color: rgb(255 255 255 / 42%);
  font-size: 0.72rem;
}

/* --- Botón de WhatsApp --------------------------------------------------- */

.whatsapp {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 13px 22px;
  color: #07351d;
  background: var(--whatsapp);
  border: 1px solid rgb(255 255 255 / 45%);
  border-radius: 999px;
  box-shadow: 0 15px 34px rgb(5 67 34 / 26%);
  font-size: 0.91rem;
  font-weight: 800;
  text-decoration: none;
  transform: translateX(-50%);
  transition: transform 160ms ease, box-shadow 160ms ease;
  white-space: nowrap;
}

.whatsapp:hover {
  box-shadow: 0 18px 38px rgb(5 67 34 / 34%);
  transform: translateX(-50%) translateY(-2px);
}

.whatsapp__icono { display: grid; place-items: center; }

/* --- Adaptación ---------------------------------------------------------- */

@media (min-width: 620px) {
  .cabecera { padding-top: calc(43px + env(safe-area-inset-top)); padding-bottom: 45px; }
  .cabecera__icono { width: 76px; height: 76px; border-radius: 24px; font-size: 1.5rem; }
  .cabecera__lateral { align-items: flex-end; text-align: right; }
  .buscador { padding-top: 40px; }
  .grid { gap: 18px; }
  .tarjeta { grid-template-columns: 210px minmax(0, 1fr); min-height: 180px; }
  .tarjeta__foto { min-height: 180px; }
  .tarjeta__cuerpo { padding: 22px 24px; }
  .tarjeta__nombre { font-size: 1.08rem; }
}

@media (min-width: 960px) {
  .cabecera__nombre { font-size: 3.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
