/* =========================================================================
   AWESTRUCK — MENU SECTION (Food / Drinks / Seasonal — Images OR PDF)
   Used inside: #ep-panel-menu (popup) and #details-panel-menu (details page)
   Namespaced with "ep-menu-" so it never collides with existing popup/detail CSS.
   ========================================================================= */

.ep-menu-wrap { margin-top: 4px !important; }
/* Hide the floating Contact tab + Ask Awwee button while the image
   lightbox is open (both are position:fixed and sit above it otherwise) -
   toggled by openLightbox()/its close handler in awestruck-menu-render.js. */
body.ep-lb-open #awwee-edge-tab-root,
body.ep-lb-open .awc { display: none !important; }
/* The details page's own main-tab instance (not the popup, which is fine
   at 4px) sits under extra ambient space from the page's own tab-bar
   styling, so it needs a bit more pull-up to land at the same visual gap. */
.tab-panel.menu .ep-menu-wrap { margin-top: -8px !important; }

/* ---- Category sub-tabs (Food / Bar / Beverage) ---- */
.ep-menu-cats {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.ep-menu-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #141414;
  border: 1.5px solid #2e2e2e;
  border-radius: 999px;
  color: #9a9a9a;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all .2s;
}
.ep-menu-cat.on { color: #ffce3a; border-color: #ffce3a; background: rgba(255,206,58,.08); }
.ep-menu-cat .em { font-size: 17px; line-height: 1; width: 17px; height: 17px; object-fit: contain; border-radius: 3px; }
html[data-bs-theme="light"] .ep-menu-cat { color: #111; background: #f2f2f2; border-color: #e0e0e0; }
html[data-bs-theme="light"] .ep-menu-cat.on { color: #8a6400; border-color: #ffce3a; background: rgba(255,206,58,.15); }

/* ---- Empty state (vendor uploaded nothing) ---- */
.ep-menu-empty {
  text-align: center; padding: 30px 22px;
  border: 1.5px dashed #2e2e2e; border-radius: 14px;
}
.ep-menu-empty .em { font-size: 30px; }
.ep-menu-empty .t { font-size: 17px; font-weight: 800; margin-top: 8px; }
.ep-menu-empty .s { font-size: 13px; line-height: 1.6; color: #9a9a9a; margin-top: 6px; }

/* ---- Gallery mode (images) ---- */
.ep-menu-ghead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ep-menu-ghead .t { font-size: 16px; font-weight: 800; }
.ep-menu-ghead .c {
  font-size: 12px; font-weight: 700; color: #fff;
  background: none !important; padding: 0 !important; margin: 0 !important;
  border: none !important; border-radius: 0 !important; box-shadow: none !important;
}
html[data-bs-theme="light"] .ep-menu-ghead .c { color: #111; }

.ep-menu-gridwrap { position: relative; }
.ep-menu-grid {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;
}
.ep-menu-grid::-webkit-scrollbar { display: none; }
.ep-menu-tile {
  position: relative; flex: 0 0 calc((100% - 24px) / 4); aspect-ratio: 1/1; border-radius: 11px; overflow: hidden;
  background: linear-gradient(135deg, #2a211a, #191512); cursor: pointer;
}
.ep-menu-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ep-menu-gnav {
  display: none; position: absolute; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%; background: #0f0f0f;
  border: 1.5px solid #2e2e2e; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1; cursor: pointer; color: #f0f0f0; z-index: 2;
}
.ep-menu-gnav.l { left: -6px; } .ep-menu-gnav.r { right: -6px; }
.ep-menu-gnav.off { opacity: .3; pointer-events: none; }

/* ---- PDF mode ---- */
.ep-menu-pdfwrap { display: none; }
.ep-menu-pdfbox {
  position: relative; width: 130px; height: 130px; border-radius: 12px; overflow: hidden;
  background: #161616 center/cover no-repeat; border: 1.5px solid #2e2e2e; cursor: pointer;
}
.ep-menu-pdfbox.no-thumb::after {
  content: "\1F4C4"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; font-size: 34px;
}
.ep-menu-pdfbadge {
  position: absolute; top: 5px; left: 5px;
  font-size: 7.5px; font-weight: 800; letter-spacing: .03em; color: #fff;
  background: #c0392b; border-radius: 3px; padding: 1px 4px; line-height: 1.4;
}

/* ---- PDF fullscreen viewer (click-to-open, same-page overlay) ---- */
.ep-menu-pdflb {
  position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 1300;
  display: none; flex-direction: column;
}
.ep-menu-pdflb.open { display: flex; }
.ep-menu-pdflb .top { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; }
.ep-menu-pdflb .top .ct2 { font-size: 14px; font-weight: 600; color: #eee; }
.ep-menu-pdflb .top .x {
  width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; cursor: pointer;
}
.ep-menu-pdflb .stage { flex: 1; padding: 0 22px 22px; }

/* ---- Image lightbox (shared for all gallery categories) ---- */
.ep-menu-lb {
  position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 1300;
  display: none; flex-direction: column;
  /* Without this, mobile's native pinch/double-tap zoom scales the whole
     fixed overlay (thumbnail strip included) instead of just the image -
     this keeps that native gesture off the popup so only the tap-to-zoom
     above (which correctly leaves the strip alone) is available here. */
  touch-action: manipulation;
}
.ep-menu-lb.open { display: flex; }
.ep-menu-lbtop { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; }
.ep-menu-lbtop .ct2 { font-size: 14px; font-weight: 600; color: #eee; }
.ep-menu-lbtop .x {
  width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; cursor: pointer;
}
/* Normal flex siblings of .bigimg inside .big (not absolutely positioned)
   so they always land right next to the image's actual rendered edge,
   whatever width that image happens to be - a fixed screen-edge offset
   left them stranded far away from narrow/portrait images. */
.ep-menu-lb .arw {
  flex: 0 0 auto;
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center; font-size: 20px; color: #fff; cursor: pointer;
}
.ep-menu-lb .arw.off { opacity: .25; pointer-events: none; }
.ep-menu-lb .big { flex: 1; margin: 0 24px; position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; }
.ep-menu-lb .bigimg {
  max-width: 82vw; max-height: 74vh; border-radius: 14px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; cursor: zoom-in;
}
.ep-menu-lb .bigimg img {
  max-width: 82vw; max-height: 74vh; object-fit: contain; border-radius: 14px; display: block;
  transform: scale(1); transition: transform .2s ease;
}
/* transform-origin is set inline (JS) to the exact point clicked, so
   scaling up pins that point in place instead of the image jumping. */
.ep-menu-lb .bigimg.zoomed { cursor: zoom-out; }
.ep-menu-lb .bigimg.zoomed img { transform: scale(2.2); }
.ep-menu-lb .strip {
  display: flex; gap: 8px; padding: 14px 22px 20px; overflow-x: auto; scrollbar-width: none;
  justify-content: center;
}
.ep-menu-lb .strip::-webkit-scrollbar { display: none; }
.ep-menu-lb .strip .th {
  width: 54px; height: 54px; flex: 0 0 auto; border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; cursor: pointer; transition: border-color .2s;
  opacity: 1 !important; box-shadow: none !important; filter: none !important;
}
.ep-menu-lb .strip .th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ep-menu-lb .strip .th.on { border-color: #ffce3a; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .ep-menu-tile { flex-basis: calc((100% - 16px) / 3); }
  .ep-menu-pdfbox { width: 110px; height: 110px; }
  .ep-menu-lb .big { margin: 0 16px; gap: 8px; }
  .ep-menu-lb .arw { width: 32px; height: 32px; font-size: 16px; }

  /* All 3 category pills on one line - shrink them to fit instead of
     wrapping to a second row; overflow-x is just a safety net for very
     narrow phones, nothing gets cut off either way. */
  .ep-menu-cats { flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; }
  .ep-menu-cats::-webkit-scrollbar { display: none; }
  .ep-menu-cat { flex: 0 0 auto; padding: 6px 10px; font-size: 11px; gap: 4px; }
  .ep-menu-cat .em { font-size: 13px; width: 13px; height: 13px; }

  /* Pull the scroll arrows fully inside the row on mobile - the desktop
     -6px overhang gets clipped by the page's overflow-x:hidden here. */
  .ep-menu-gnav { width: 22px; height: 22px; font-size: 12px; }
  .ep-menu-gnav.l { left: 4px; } .ep-menu-gnav.r { right: 4px; }
}

/* Tablet only (768-1024px) - the popup's narrower column at this width
   wrapped "Beverage Menu" to a second row. Same shrink-to-fit approach as
   mobile above, just slightly less aggressive since there's a bit more
   room here; mobile's own block and the desktop default are untouched. */
@media (min-width: 768px) and (max-width: 1024px) {
  .ep-menu-cats { flex-wrap: nowrap; gap: 5px; overflow-x: auto; scrollbar-width: none; }
  .ep-menu-cats::-webkit-scrollbar { display: none; }
  .ep-menu-cat { flex: 0 0 auto; padding: 6px 9px; font-size: 10.5px; gap: 4px; }
  .ep-menu-cat .em { font-size: 13px; width: 13px; height: 13px; }
}
