/* ==========================================================================
   AFENDI — page-level modules
   Menu · Shisha · Gallery · Visit
   ========================================================================== */

/* --- Menu: sticky toolbar ----------------------------------------------- */
.menu-bar {
  position: sticky; top: var(--header-h); z-index: 60;
  background: rgba(12, 11, 9, .92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule-dark);
}
.menu-bar-inner {
  display: flex; align-items: center; gap: 18px;
  padding-block: 12px;
}
.menu-cats {
  display: flex; gap: 6px; overflow-x: auto; flex: 1;
  scrollbar-width: none; -ms-overflow-style: none;
  scroll-snap-type: x proximity;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
}
.menu-cats::-webkit-scrollbar { display: none; }
/* Fade the scrolling category strip out rather than cutting a chip in half */
@media (min-width: 721px) {
  .menu-cats {
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 34px), transparent 100%);
            mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 34px), transparent 100%);
  }
}
.menu-cats a {
  scroll-snap-align: start;
  white-space: nowrap; padding: .62em 1.05em;
  font-size: .71rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--on-ink-dim); border: 1px solid transparent; border-radius: 100px;
  transition: color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.menu-cats a:hover { color: var(--cream); border-color: var(--rule-dark); }
.menu-cats a.is-active { color: var(--ink); background: var(--gold); border-color: var(--gold); }

.lang-switch { display: flex; gap: 1px; background: var(--rule-dark); border-radius: 100px; padding: 1px; flex-shrink: 0; }
.lang-switch button {
  padding: .45em .82em; font-size: .67rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--on-ink-dim);
  background: var(--ink); border-radius: 100px;
  transition: color .25s var(--ease), background .25s var(--ease);
}
.lang-switch button:first-child { border-radius: 100px 0 0 100px; }
.lang-switch button:last-child  { border-radius: 0 100px 100px 0; }
.lang-switch button[aria-pressed="true"] { background: var(--gold); color: var(--ink); }
@media (max-width: 720px) {
  .menu-bar-inner { flex-direction: column; align-items: stretch; gap: 10px; }
  .lang-switch { align-self: flex-start; }
}

/* --- Menu: sections ----------------------------------------------------- */
.menu-section { padding-block: clamp(52px, 7vw, 92px); border-top: 1px solid var(--rule-dark); }
.menu-section:first-of-type { border-top: 0; }
.menu-section-head {
  display: grid; gap: 14px; margin-bottom: clamp(30px, 4vw, 46px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 22ch);
  align-items: end; gap: 28px;
}
@media (max-width: 760px) { .menu-section-head { grid-template-columns: minmax(0, 1fr); } }
.menu-section-head h2 { font-size: clamp(1.3rem, 2.6vw, 1.95rem); letter-spacing: .08em; }
.menu-section-head .note { font-size: .86rem; color: var(--on-ink-dim); }

/* Multi-column rather than a 2-up grid: dishes flow down one column and
   into the next, the way a printed menu reads, with no ragged gaps where a
   row would otherwise align to its tallest item. */
.dish-grid {
  columns: 2;
  column-gap: clamp(36px, 5vw, 86px);
  column-fill: balance;
}
@media (max-width: 860px) { .dish-grid { columns: 1; } }

.dish {
  display: flow-root;
  break-inside: avoid; -webkit-column-break-inside: avoid;
  padding: 1.05em 0;
  border-top: 1px solid var(--rule-dark);
}
.dish > * + * { margin-top: 5px; }
.dish-desc, .dish-opts { display: block; }
.dish-head { display: flex; align-items: baseline; gap: 14px; }
.dish-name {
  font-family: var(--display); font-size: clamp(.88rem, 1.05vw, .98rem);
  font-weight: 500; text-transform: uppercase;
  line-height: 1.35; letter-spacing: .1em;
}
.dish-dots { flex: 1; border-bottom: 1px dotted rgba(222,205,162,.22); transform: translateY(-.3em); min-width: 18px; }
.dish-price {
  font-size: .88rem; color: var(--gold-soft);
  font-variant-numeric: tabular-nums; letter-spacing: .03em; white-space: nowrap;
}
.dish-desc { font-size: .88rem; line-height: 1.55; color: var(--on-ink-dim); max-width: 44ch; }
.dish-opts { display: grid; gap: 3px; margin-top: 4px; }
.dish-opt {
  display: flex; align-items: baseline; gap: 10px;
  font-size: .85rem; color: var(--on-ink-dim);
}
.dish-opt .d { flex: 1; border-bottom: 1px dotted rgba(222,205,162,.14); transform: translateY(-.3em); }
.dish-opt .p { color: var(--gold-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Sub-headings inside a section (e.g. Vodka / Gin / Whisky under Spirits) */
.dish-group-title {
  font-family: var(--sans); font-weight: 500;
  font-size: .7rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold);
  margin: 30px 0 2px;
}
.dish-group-title:first-of-type { margin-top: 6px; }

.dish.is-hidden { display: none; }
.menu-section.is-empty { display: none; }

/* Menu search */
.menu-search { position: relative; flex-shrink: 0; }
.menu-search input {
  background: var(--ink-2); border: 1px solid var(--rule-dark);
  border-radius: 100px; padding: .55em 1em .55em 2.3em;
  font-size: .82rem; font-weight: 300; color: var(--cream);
  width: 190px; transition: border-color .3s var(--ease), width .3s var(--ease);
}
.menu-search input::placeholder { color: var(--on-ink-faint); }
.menu-search input:focus { border-color: var(--gold); outline: none; width: 230px; }
.menu-search svg {
  position: absolute; left: .85em; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; stroke: var(--on-ink-faint); fill: none; stroke-width: 1.6;
  pointer-events: none;
}
@media (max-width: 720px) {
  .menu-search input, .menu-search input:focus { width: 100%; }
  .menu-search { width: 100%; }
}

.no-results {
  display: none; padding: clamp(48px, 8vw, 90px) 0; text-align: center;
}
.no-results.show { display: block; }
.no-results p { margin-inline: auto; color: var(--on-ink-dim); }

/* --- Shisha ------------------------------------------------------------- */
.shisha-price {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px; background: var(--rule-dark);
  border: 1px solid var(--rule-dark); border-radius: var(--radius);
  overflow: hidden; max-width: 520px;
}
.shisha-price > div { background: var(--clay); padding: clamp(22px, 3vw, 32px); }
.shisha-price dt { font-size: .64rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }
.shisha-price dd {
  margin: 12px 0 0; font-family: var(--display);
  font-size: clamp(1.6rem, 3.2vw, 2.1rem); font-weight: 500;
  letter-spacing: .04em; line-height: 1;
}
@media (max-width: 460px) { .shisha-price { grid-template-columns: minmax(0, 1fr); } }

.flavour-group { margin-top: clamp(36px, 5vw, 56px); }
.flavour-group h3 {
  font-size: .72rem; font-family: var(--sans); font-weight: 500;
  letter-spacing: .28em; text-transform: uppercase; color: var(--gold);
  padding-bottom: 14px; border-bottom: 1px solid var(--rule-dark); margin-bottom: 22px;
}
.flavours { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 0; list-style: none; padding: 0; }
.flavour {
  display: flex; align-items: baseline; gap: 12px;
  padding: .72em 0;
}
.flavour .swatch {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0; transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(255,255,255,.04);
}
.flavour .f-name {
  font-size: .86rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .12em;
}
.flavour .f-note { display: block; font-size: .8rem; color: var(--on-ink-dim); margin-top: 2px; }

/* --- Gallery ------------------------------------------------------------ */
.gal-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(28px, 4vw, 44px); }
.gal-filters button {
  padding: .6em 1.15em; font-size: .71rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--on-ink-dim);
  border: 1px solid var(--rule-dark); border-radius: 100px;
  transition: all .3s var(--ease);
}
.gal-filters button:hover { color: var(--cream); border-color: var(--on-ink-faint); }
.gal-filters button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--ink); }

.gal-grid { columns: 3; column-gap: clamp(10px, 1.2vw, 18px); }
@media (max-width: 980px) { .gal-grid { columns: 2; } }
@media (max-width: 560px) { .gal-grid { columns: 1; } }
.gal-item {
  break-inside: avoid; margin-bottom: clamp(10px, 1.2vw, 18px);
  display: block; width: 100%; position: relative;
  overflow: hidden; border-radius: var(--radius);
  opacity: 1; transition: opacity .4s var(--ease);
  cursor: zoom-in;
}
.gal-item img { width: 100%; transition: transform 1s var(--ease), filter .5s var(--ease); }
.gal-item:hover img { transform: scale(1.04); }
.gal-item::after {
  content: attr(data-caption);
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 44px 18px 16px;
  font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--cream);
  background: linear-gradient(to top, rgba(8,7,5,.85), transparent);
  opacity: 0; transition: opacity .4s var(--ease);
}
.gal-item:hover::after { opacity: 1; }
.gal-item.is-hidden { display: none; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(6,5,4,.95);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 4vw, 54px);
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 100%; max-height: 86svh; object-fit: contain; border-radius: var(--radius); }
.lightbox-cap {
  position: absolute; left: 0; right: 0; bottom: clamp(16px, 3vw, 28px);
  text-align: center; font-size: .7rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--on-ink-dim);
}
.lb-btn {
  position: absolute; width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  color: var(--on-ink-dim); font-size: 1.6rem; line-height: 1;
  transition: color .25s var(--ease);
}
.lb-btn:hover { color: var(--gold); }
.lb-close { top: clamp(10px, 2vw, 22px); right: clamp(10px, 2vw, 22px); }
.lb-prev { left: clamp(4px, 1.5vw, 20px); top: 50%; transform: translateY(-50%); }
.lb-next { right: clamp(4px, 1.5vw, 20px); top: 50%; transform: translateY(-50%); }

/* --- Visit -------------------------------------------------------------- */
.visit-grid {
  display: grid; gap: clamp(32px, 4vw, 68px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: start;
}
@media (max-width: 940px) { .visit-grid { grid-template-columns: minmax(0, 1fr); } }

.info-list { list-style: none; padding: 0; display: grid; }
.info-list li { padding: clamp(20px, 2.6vw, 28px) 0; border-top: 1px solid var(--rule-light); }
.info-list li:last-child { border-bottom: 1px solid var(--rule-light); }
.info-list dt, .info-list .k {
  font-size: .64rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold-ink); margin-bottom: 10px; display: block;
}
.info-list .v {
  font-family: var(--display); font-size: clamp(.95rem, 1.2vw, 1.08rem);
  font-weight: 500; text-transform: uppercase;
  letter-spacing: .1em; line-height: 1.6;
}
.info-list .v a:hover { color: var(--gold-ink); }
.info-list .sub { font-size: .88rem; color: var(--on-cream-dim); margin-top: 8px; }

.map-frame {
  position: relative; width: 100%; aspect-ratio: 4 / 3;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--rule-light);
  background: var(--cream-2);
}
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; filter: grayscale(.35) contrast(1.02); }
@media (max-width: 940px) { .map-frame { aspect-ratio: 4 / 3; } }

/* --- About / timeline-free facts panel ---------------------------------- */
.panel {
  border: 1px solid var(--rule-dark); border-radius: var(--radius);
  padding: clamp(26px, 3.4vw, 42px);
  background: var(--ink-2);
}
.on-cream .panel { border-color: var(--rule-light); background: rgba(255,255,255,.5); }

/* --- Quote (venue-neutral pull quote, not a fabricated review) ----------- */
.pull {
  font-family: var(--display); font-size: clamp(1.25rem, 2.4vw, 1.9rem);
  font-weight: 300; text-transform: uppercase;
  line-height: 1.38; letter-spacing: .07em; max-width: 24ch;
}

/* Live opening state, set by site.js against Europe/Madrid */
.open-state {
  display: inline-flex; align-items: center; gap: .5em;
  font-weight: 500; letter-spacing: .04em;
  color: var(--gold-ink);
}
.open-state::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold-ink);
}
.open-state[data-state="closed"] { color: var(--on-cream-dim); }
.open-state[data-state="closed"]::before { background: var(--on-cream-dim); }
