/* BLUME · carta digital */

.carta-header__back { display: flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; min-height: 44px; }
.carta-header__back:hover { color: var(--accent); }
.carta-header__back .logo { height: 30px; }
.carta-header__title { display: none; font: 500 22px/1 var(--f-display); font-variation-settings: 'SOFT' 60; }
.carta-header .pill { display: none; }
@media (min-width: 560px) { .carta-header .pill { display: inline-flex; } }
@media (min-width: 900px) {
  .carta-header__title { display: block; position: absolute; left: 50%; transform: translateX(-50%); }
  .carta-header .site-header__row { position: relative; }
  .carta-header__back .logo { height: 36px; }
}
@media (min-width: 1100px) { .carta-header .site-header__cta { display: inline-flex; } }

.carta-intro { padding-top: 26px; padding-bottom: 18px; display: flex; flex-direction: column; gap: 12px; }
.carta-intro__title {
  font: 500 clamp(40px, 10vw, 76px)/.98 var(--f-display); font-variation-settings: 'SOFT' 60, 'opsz' 144; letter-spacing: -.025em;
}
.carta-intro__title em { font-style: italic; font-weight: 400; color: var(--accent); }
.carta-intro__now { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 600; font-size: 15px; }
.carta-intro__now svg { color: var(--accent); }
@media (min-width: 900px) {
  .carta-intro { padding-top: 56px; padding-bottom: 28px; flex-direction: row; align-items: flex-end; justify-content: space-between; }
}

/* ---------- Controles ---------- */

.controls {
  position: sticky; top: var(--header-h); z-index: 20;
  background: var(--paper); border-bottom: 1px solid var(--line);
  transition: box-shadow .3s var(--ease), background-color .5s var(--ease);
}
.controls.is-stuck { box-shadow: 0 14px 24px -22px rgba(35, 23, 17, .6); }
.controls__inner { padding-top: 10px; padding-bottom: 10px; display: grid; gap: 10px; }

.turnos {
  position: relative; display: grid; grid-template-columns: auto auto auto;
  padding: 4px; border-radius: 999px; background: var(--paper-2);
}
.turnos__tab {
  position: relative; z-index: 1; min-height: 44px; border: 0; border-radius: 999px; background: transparent;
  color: var(--ink); font: 600 14px/1.1 var(--f-body); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 6px;
  transition: color .35s var(--ease);
}
.turnos__tab[aria-selected="true"] { color: var(--paper); }
.turnos__tab svg { flex: none; }
.turnos__thumb {
  position: absolute; top: 4px; bottom: 4px; left: 0; width: var(--w, 33%);
  border-radius: 999px; background: var(--ink);
  transform: translateX(var(--x, 4px)); transition: transform .5s var(--ease), width .5s var(--ease), background-color .5s var(--ease);
}
.turnos:not(.is-ready) .turnos__thumb { transition: none; }
.turnos.is-searching .turnos__tab[aria-selected="true"] { color: var(--ink); }
.turnos.is-searching .turnos__thumb { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-2); }
@media (max-width: 420px) { .turnos__tab svg { display: none; } .turnos__tab { font-size: 13.5px; padding: 0 10px; } }

.search {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 8px 0 16px;
  border-radius: 16px; background: var(--card); border: 1.5px solid var(--line-2); color: var(--ink-3);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.search input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font: 400 16px var(--f-body); color: var(--ink);
}
.search input::placeholder { color: var(--ink-3); opacity: 1; }
.search input::-webkit-search-cancel-button { display: none; }
.search__clear[hidden] { display: none; }
.search__clear {
  width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--paper-2); color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
}

.filters { margin: 0 calc(var(--gutter) * -1); overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters__track { display: flex; align-items: center; gap: 8px; padding: 0 var(--gutter); width: max-content; }
.filters__sep { width: 1px; height: 26px; background: var(--line-2); margin: 0 4px; }
.chip--filter svg { color: var(--leaf); }
.chip--filter[aria-pressed="true"] svg { color: currentColor; }
.chip--cat[hidden] { display: none; }

@media (min-width: 900px) {
  .controls__inner { grid-template-columns: 430px 1fr; align-items: center; gap: 12px 16px; padding-top: 14px; padding-bottom: 14px; }
  .turnos__tab { font-size: 14.5px; }
  .filters { grid-column: 1 / -1; margin: 0; }
  .filters__track { padding: 0; }
  .chip--cat, .filters__sep { display: none; }
}

/* ---------- Lista ---------- */

.carta-main { padding-top: 8px; padding-bottom: 72px; display: grid; gap: 40px; }
.carta-side { display: none; }
.carta-count { font: 500 11.5px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 14px 0 0; min-height: 26px; }

@media (min-width: 900px) {
  .carta-main { grid-template-columns: 250px minmax(0, 1fr); padding-top: 28px; align-items: start; }
  .carta-side {
    display: flex; flex-direction: column; gap: 4px; position: sticky; top: calc(var(--header-h) + 140px);
    padding: 12px; border-radius: 20px; background: var(--card); border: 1px solid var(--line);
    max-height: calc(100vh - var(--header-h) - 170px); overflow-y: auto;
  }
  .carta-side__group[hidden] { display: none; }
  .carta-side__turno {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px 6px;
    font-weight: 700; font-size: 14px; color: var(--accent);
  }
  .carta-side__turno span { width: 100%; font: 500 10.5px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
  .carta-side a {
    display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px;
    border-radius: 12px; color: var(--ink); text-decoration: none; font-size: 15px;
    transition: background-color .25s var(--ease), color .25s var(--ease);
  }
  .carta-side a:hover { background: var(--paper-2); color: var(--ink); }
  .carta-side a[aria-current="true"] { background: var(--ink); color: var(--paper); }
  .carta-side a[aria-current="true"] .carta-side__n { color: inherit; }
  .carta-side a.is-empty { opacity: .45; }
  .carta-side__n { font: 500 11px/1 var(--f-mono); color: var(--ink-3); }
  .carta-side__note { margin: 10px 12px 6px; font-size: 13px; line-height: 1.45; color: var(--ink-3); }
}

.cat { padding-top: 22px; scroll-margin-top: calc(var(--header-h) + 190px); }
.cat[hidden] { display: none; }
.cat__head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 10px; border-bottom: 1.5px solid var(--ink); }
.cat__title { font: 500 27px/1.05 var(--f-display); font-variation-settings: 'SOFT' 60; letter-spacing: -.01em; }
.cat__n { font: 500 11.5px/1 var(--f-mono); color: var(--ink-3); }
@media (min-width: 900px) {
  .cat { scroll-margin-top: calc(var(--header-h) + 150px); padding-top: 30px; }
  .cat:first-of-type { padding-top: 8px; }
  .cat__title { font-size: 34px; }
  .cat__items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 44px; }
}

/* Platillo */
.item { border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 200px); }
.item[hidden] { display: none; }
.item__btn {
  width: 100%; display: flex; gap: 14px; align-items: flex-start; padding: 16px 0;
  border: 0; background: transparent; text-align: left; cursor: pointer; color: var(--ink);
}
.item__btn:focus-visible { outline-offset: -2px; border-radius: 14px; }
.item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.item__flags { display: flex; flex-wrap: wrap; gap: 6px; }
.item__flags:empty { display: none; }
.item__row { display: flex; align-items: baseline; }
.item__name { font-weight: 700; font-size: 16.5px; line-height: 1.25; transition: color .25s var(--ease); }
.item__btn:hover .item__name { color: var(--accent); }
.item__lead { flex: 1; min-width: 14px; border-bottom: 1.5px dotted var(--line-2); margin: 0 8px 5px; }
.item__price { font: 500 15px/1 var(--f-mono); color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.item__desc { font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.item__tags { display: flex; gap: 6px; color: var(--leaf); }
.item__tag { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--leaf-soft); }

.item__photo {
  flex: none; order: 2; width: 96px; height: 96px; border-radius: 16px; overflow: hidden; background: var(--paper-2);
}
.item__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.item__btn:hover .item__photo img { transform: scale(1.06); }
.item--photo .item__lead { display: none; }
.item--photo .item__row { flex-direction: column; align-items: flex-start; gap: 8px; }

/* Destacado: el platillo de la casa con foto ocupa todo el ancho */
.item--feature { grid-column: 1 / -1; }
.item--feature .item__btn { flex-direction: column; gap: 14px; padding: 18px 0 20px; }
.item--feature .item__photo { order: 0; width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 20px; }
.item--feature .item__row { flex-direction: row; align-items: baseline; justify-content: space-between; }
.item--feature .item__name { font: 500 26px/1.1 var(--f-display); font-variation-settings: 'SOFT' 60; }
.item--feature .item__price { font-size: 17px; }
.item--feature .item__desc { font-size: 15.5px; max-width: 60ch; }
@media (min-width: 900px) {
  .item--feature .item__btn { flex-direction: row; align-items: center; gap: 28px; }
  .item--feature .item__photo { width: 52%; aspect-ratio: 4 / 3; }
  .item--feature .item__name { font-size: 32px; }
  .item--feature .item__row { flex-direction: column; gap: 10px; }
  .item__photo { width: 112px; height: 112px; }
}

.item--out .item__name, .item--out .item__price { opacity: .55; }
.item--out .item__photo img { filter: grayscale(.8); opacity: .6; }

.flag { padding: 4px 8px; border-radius: 7px; font: 700 11.5px/1.1 var(--f-body); }
.flag--casa { background: var(--leaf-soft); color: var(--leaf); }
.flag--nuevo { background: var(--paper-2); color: var(--ink); }
.flag--promo { background: var(--accent); color: var(--accent-ink); }
.flag--out { background: #F6E1DA; color: #8A3B2B; }
[data-ritmo="noche"] .flag--out { background: rgba(224, 154, 114, .16); color: #F0B48F; }

mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }

.empty {
  margin-top: 24px; padding: 36px 20px; border-radius: 24px; border: 1.5px dashed var(--line-2);
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--ink-2);
}
.empty[hidden] { display: none; }
.empty__title { font: 500 24px/1.15 var(--f-display); color: var(--ink); }
.empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }

.allergens {
  margin-top: 40px; padding: 20px 22px; border-radius: 20px; background: var(--paper-2);
  display: grid; gap: 12px; font-size: 14.5px; color: var(--ink-2);
}
.allergens strong { color: var(--ink); }
.allergens__legend { display: flex; flex-wrap: wrap; gap: 16px; }
.allergens__legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--leaf); font-weight: 600; }

/* ---------- Detalle (hoja inferior en celular, ventana en computadora) ---------- */

.sheet {
  padding: 0; border: 0; margin: auto auto 0; width: 100%; max-width: 560px; max-height: 92dvh;
  background: transparent; color: var(--ink); overflow: visible;
}
.sheet::backdrop { background: rgba(28, 18, 13, .58); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sheet__panel {
  position: relative; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); border-radius: 28px 28px 0 0; display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet[open] .sheet__panel { animation: sheet-up .55s var(--ease); }
.sheet[open]::backdrop { animation: fade .4s var(--ease); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
.sheet__media:empty { display: none; }
.sheet__media { flex: none; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); }
.sheet__media img { width: 100%; height: 100%; object-fit: cover; }
.sheet__close {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(251, 244, 230, .95); color: #38241B; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .5);
}
.sheet__body { padding: 24px 22px 8px; display: flex; flex-direction: column; gap: 12px; }
.sheet__media:empty + .sheet__close + .sheet__body { padding-top: 64px; }
.sheet__where { font: 500 11px/1.2 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--leaf); }
.sheet__head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.sheet__title { font: 500 30px/1.05 var(--f-display); font-variation-settings: 'SOFT' 60; letter-spacing: -.01em; }
.sheet__price { font: 500 20px/1 var(--f-mono); color: var(--accent); white-space: nowrap; }
.sheet__flags { display: flex; flex-wrap: wrap; gap: 6px; }
.sheet__flags:empty, .sheet__tags:empty { display: none; }
.sheet__desc { font-size: 16.5px; line-height: 1.55; color: var(--ink-2); }
.sheet__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet__tags span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--leaf-soft); color: var(--leaf); font-weight: 600; font-size: 13.5px; }
.sheet__note { font-size: 14px; color: var(--ink-3); }
.sheet__actions {
  position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px;
  padding: 14px 16px 18px; background: var(--card); border-top: 1px solid var(--line);
}
@media (min-width: 720px) {
  .sheet { margin: auto; }
  .sheet__panel { border-radius: 28px; max-height: 88vh; }
  .sheet[open] .sheet__panel { animation-name: sheet-in; }
  @keyframes sheet-in { from { transform: translateY(16px) scale(.98); opacity: 0; } }
}

.toast {
  position: fixed; left: 50%; bottom: 104px; z-index: 60; transform: translate(-50%, 20px); opacity: 0;
  padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 14.5px;
  transition: transform .4s var(--ease), opacity .4s var(--ease); pointer-events: none;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
