/* =========================================================
   LUCKY TASTES — PUBLIC MENU
   Customer-facing adaptation of Menu View
   ========================================================= */

/* -----------------------------------------
   Variables
   ----------------------------------------- */

:root {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-dark: #131315;

  --text: #131315;
  --text-soft: #575a5e;

  --primary: #e5242a;
  --primary-dark: #ba2d0b;

  --border: #e0e0e2;
  --border-strong: #c9c9cc;

  --radius-small: 9px;
  --radius-medium: 13px;
  --radius-large: 17px;

  --shadow-xs: 0 3px 10px rgba(19, 19, 21, 0.06);

  --shadow-sm: 0 6px 18px rgba(19, 19, 21, 0.07);

  --shadow-md: 0 12px 30px rgba(19, 19, 21, 0.1);
}

/* -----------------------------------------
   Base
   ----------------------------------------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  min-height: 100vh;

  background: var(--bg);
  color: var(--text);

  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
}

/* -----------------------------------------
   Utility
   ----------------------------------------- */

.hidden {
  display: none !important;
}

/* =========================================================
   RESTAURANT HEADER
   ========================================================= */

.menu-header {
  position: relative;

  padding: 30px 20px 22px;

  background: var(--surface-dark);

  color: #ffffff;

  text-align: center;
}

.menu-header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;

  width: 100%;

  margin: 0 auto;
}

.menu-logo {
  width: 70px;
  height: 70px;

  margin: 0 auto 12px;

  overflow: hidden;

  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.08);
}

.menu-logo img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
}

.menu-branding {
  display: flex;
  flex-direction: column;
  align-items: center;

  min-width: 0;

  text-align: center;
}

.menu-branding h1 {
  margin: 0;

  color: #ffffff;

  font-size: 1.45rem;
  font-weight: 820;

  line-height: 1.2;

  letter-spacing: -0.035em;
}

.menu-branding p {
  max-width: 290px;

  margin: 8px auto 0;

  color: rgba(255, 255, 255, 0.65);

  font-size: 0.73rem;
  line-height: 1.5;
}

/* =========================================================
   MAIN MENU CONTAINER
   ========================================================= */

.menu-container {
  width: 100%;
  max-width: none;

  min-height: 100vh;

  margin: 0;

  background: var(--bg);
}

.menu-container > section {
  width: 100%;
}

/* -----------------------------------------
   Section Heading
   ----------------------------------------- */

.section-heading {
  margin-bottom: 18px;

  padding: 0 18px;
}

.section-heading h2 {
  margin: 0;

  color: var(--text);

  font-size: 1.25rem;
  font-weight: 800;

  letter-spacing: -0.025em;
}

.section-heading p {
  margin: 6px 0 0;

  color: var(--text-soft);

  font-size: 0.84rem;
}

/* =========================================================
   CATEGORY VIEW
   ========================================================= */

#category-view {
  padding: 18px;
}

#categories {
  width: 100%;
}

/* -----------------------------------------
   Category Picture Grid
   ----------------------------------------- */

.category-card {
  position: relative;

  width: 100%;
  height: 125px;
  min-height: 125px;

  min-width: 0;

  overflow: hidden;

  padding: 0;

  border: 0;
  border-radius: 17px;

  background: transparent;

  cursor: pointer;

  text-align: left;

  box-shadow: 0 7px 20px rgba(19, 19, 21, 0.1);

  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.category-card:hover {
  transform: translateY(-2px);

  box-shadow: 0 10px 26px rgba(19, 19, 21, 0.14);
}

.category-card:active {
  transform: translateY(0);
}

.category-card img {
  width: 100%;
  height: 125px;

  display: block;

  object-fit: cover;
}

.category-card::after {
  content: "";

  position: absolute;
  inset: 0;

  background: linear-gradient(
    to top,
    rgba(19, 19, 21, 0.8),
    rgba(19, 19, 21, 0.02) 70%
  );

  pointer-events: none;
}

.category-card > span {
  position: absolute;

  right: 12px;
  bottom: 12px;
  left: 12px;

  z-index: 1;

  color: #ffffff;

  font-size: 0.88rem;
  font-weight: 800;

  line-height: 1.25;

  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* #categories is only a full-width wrapper.
   Each category layout controls its own grid/flex structure. */
#categories {
  width: 100%;
}

/* -----------------------------------------
   Wide Category Cards
   ----------------------------------------- */

#categories:has(.category-card-wide) {
  display: flex;
  flex-direction: column;

  gap: 11px;
}

.category-card-wide {
  height: 82px;
  min-height: 82px;
}

.category-card-wide img {
  width: 100%;
  height: 82px;

  min-height: 82px;

  object-fit: cover;
}

.category-card-wide::after {
  background: linear-gradient(
    90deg,
    rgba(19, 19, 21, 0.68),
    rgba(19, 19, 21, 0.2)
  );
}

.category-card-wide-content {
  position: absolute;

  inset: 0;

  z-index: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0 15px;

  color: #ffffff;

  text-align: center;
}

.category-card-wide-content > span:first-child {
  font-size: 1.15rem;
  font-weight: 800;
}

/* -----------------------------------------
   Minimal Category List
   ----------------------------------------- */

.category-minimal-list {
  display: flex;
  flex-direction: column;

  overflow: hidden;

  border: 1px solid var(--border);
  border-radius: 16px;

  background: var(--surface);
}

.category-list-item {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 15px;

  min-height: 52px;

  padding: 16px 15px;

  border: 0;

  border-bottom: 1px solid var(--border);

  background: transparent;
  color: var(--text);

  text-align: left;

  font-size: 0.86rem;
  font-weight: 730;

  cursor: pointer;

  transition:
    background 160ms ease,
    padding 160ms ease;
}

.category-list-item:last-child {
  border-bottom: 0;
}

.category-list-item:hover {
  padding-left: 18px;

  background: rgba(229, 36, 42, 0.045);
}

.category-list-arrow {
  color: var(--primary);

  font-size: 1rem;
}

/* =========================================================
   ALL MENU
   ========================================================= */

.public-menu-category-navigation {
  position: sticky;

  top: 0;

  z-index: 20;

  width: 100%;

  border-bottom: 1px solid var(--border);

  background: rgba(255, 255, 255, 0.94);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.public-menu-category-navigation-item {
  flex: 0 0 auto;

  padding: 4px 0;

  border: 0;
  border-radius: 0;

  background: transparent;

  color: var(--text-soft);

  font-size: 0.72rem;
  font-weight: 700;

  white-space: nowrap;

  cursor: pointer;

  transition:
    color 180ms ease,
    opacity 180ms ease;
}

.public-menu-category-navigation-item:hover {
  color: var(--primary);
}

.public-menu-category-navigation {
  display: flex;

  width: 100%;

  min-width: 0;

  flex-wrap: wrap;

  justify-content: center;
  align-items: center;

  gap: 4px 18px;

  padding: 10px 14px;
}

.public-all-menu-category {
  position: relative;

  margin-bottom: 30px;

  scroll-margin-top: 58px;
}

.public-all-menu-category-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;

  gap: 8px;

  margin-bottom: 13px;
}

.public-all-menu-category-heading h2 {
  flex: 0 1 auto;

  min-width: 0;

  margin: 0;

  color: var(--text);

  font-size: 1.12rem;
  font-weight: 820;
}

#menu-items {
  padding: 18px;
}

/* =========================================================
   ALL MENU HEADER
   ========================================================= */

/* All Menu is already the complete menu, so the normal
   category back button/header is unnecessary. */
#item-view:has(.public-menu-category-navigation) .item-view-header {
  display: none;
}

/* =========================================================
   CATEGORY LAYOUT WRAPPERS
   ========================================================= */

.public-category-picture-grid,
.public-category-wide-cards,
.category-minimal-list {
  width: 100%;
}

.public-category-picture-grid {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 11px;
}

/* =========================================================
   LABEL FILTER
   ========================================================= */

.public-menu-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.public-menu-filter-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: auto;
}

.public-menu-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 38px;
  height: 38px;

  padding: 0;

  border: 1px solid var(--border);
  border-radius: 10px;

  background: var(--surface);
  color: var(--text);

  cursor: pointer;

  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.public-menu-filter-button:hover {
  background: rgba(229, 36, 42, 0.045);
  border-color: rgba(229, 36, 42, 0.25);
}

.public-menu-filter-button:active {
  transform: translateY(1px);
}

.public-menu-filter-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 18px;
  height: 18px;

  color: currentColor;
}

.public-menu-filter-button svg {
  display: block;
  width: 18px;
  height: 18px;
  stroke: #ffffff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#public-menu-filter-count {
  display: none;
  align-items: center;
  justify-content: center;

  min-width: 18px;
  height: 18px;
  padding: 0 5px;

  border-radius: 999px;

  background: var(--primary);
  color: #ffffff;

  font-size: 0.68rem;
  font-weight: 820;
}

/* Show the count only when it contains a value */
#public-menu-filter-count:not(:empty) {
  display: inline-flex;
}

.public-menu-filter-panel {
  position: fixed;

  top: 70px;
  right: 15px;

  z-index: 1000;

  width: min(310px, calc(100vw - 30px));
  z-index: 100;

  width: min(310px, calc(100vw - 30px));

  padding: 15px;

  border: 1px solid var(--border);
  border-radius: 16px;

  background: var(--surface);

  box-shadow:
    0 18px 45px rgba(19, 19, 21, 0.16),
    0 4px 12px rgba(19, 19, 21, 0.08);
}

.public-menu-filter-panel.hidden {
  display: none;
}

.public-menu-filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  margin-bottom: 12px;
  color: var(--text);
}

.public-menu-filter-panel-header h3 {
  margin: 0;

  color: var(--text);

  font-size: 0.95rem;
  font-weight: 820;
}

.public-menu-filter-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 30px;
  height: 30px;

  padding: 0;

  border: 0;
  border-radius: 9px;

  background: transparent;
  color: var(--text-soft);

  font: inherit;
  font-size: 1.15rem;

  cursor: pointer;
}

.public-menu-filter-close:hover {
  background: rgba(19, 19, 21, 0.06);
  color: var(--text);
}

.public-menu-filter-options {
  display: flex;
  flex-direction: column;
  gap: 7px;

  max-height: 280px;
  overflow-y: auto;
}

.public-menu-filter-option {
  display: flex;
  align-items: center;
  gap: 9px;

  padding: 9px 10px;

  border: 1px solid var(--border);
  border-radius: 10px;

  background: var(--surface);
  color: var(--text);

  font-size: 0.78rem;
  font-weight: 650;

  cursor: pointer;
}

.public-menu-filter-option:hover {
  background: rgba(229, 36, 42, 0.04);
  border-color: rgba(229, 36, 42, 0.2);
}

.public-menu-filter-option input {
  width: 16px;
  height: 16px;

  margin: 0;

  accent-color: var(--primary);
}

.public-menu-filter-empty,
.public-label-filter-empty {
  padding: 12px;

  color: var(--text-soft);

  font-size: 0.76rem;
  line-height: 1.5;
  text-align: center;
}

.public-label-filter-heading {
  margin: 0 0 10px;

  color: var(--text);

  font-size: 0.82rem;
  font-weight: 800;
}

.public-menu-filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;

  margin-top: 13px;
  padding-top: 12px;

  border-top: 1px solid var(--border);
}

.public-menu-filter-reset,
.public-menu-filter-apply {
  height: 36px;
  padding: 0 13px;

  border-radius: 10px;

  font: inherit;
  font-size: 0.76rem;
  font-weight: 760;

  cursor: pointer;
}

.public-menu-filter-reset {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.public-menu-filter-reset:hover {
  background: rgba(19, 19, 21, 0.045);
}

.public-menu-filter-apply {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.public-menu-filter-apply:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* =========================================================
   LABEL POPUPS
   ========================================================= */

.admin-menu-preview-item-label-clickable {
  cursor: pointer;

  transition:
    transform 120ms ease,
    filter 120ms ease;
}

.admin-menu-preview-item-label-clickable:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.admin-menu-preview-item-label-clickable:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.admin-menu-label-popup-overlay {
  position: fixed;

  inset: 0;

  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background: rgba(0, 0, 0, 0.55);

  opacity: 0;
  visibility: hidden;

  transition:
    opacity 160ms ease,
    visibility 160ms ease;
}

.admin-menu-label-popup-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.admin-menu-label-popup {
  position: relative;

  width: min(420px, 100%);

  max-height: min(620px, calc(100vh - 40px));

  overflow-y: auto;

  padding: 28px;

  border: 1px solid var(--border);
  border-radius: 20px;

  background: var(--surface);
  color: var(--text);

  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);

  transform: translateY(10px) scale(0.98);

  transition: transform 160ms ease;
}

.admin-menu-label-popup-overlay.is-open .admin-menu-label-popup {
  transform: translateY(0) scale(1);
}

.admin-menu-label-popup-close {
  position: absolute;

  top: 12px;
  right: 12px;

  width: 34px;
  height: 34px;

  border: 0;
  border-radius: 50%;

  background: transparent;
  color: var(--text-soft);

  font-size: 24px;
  line-height: 1;

  cursor: pointer;
}

.admin-menu-label-popup-close:hover {
  background: rgba(0, 0, 0, 0.06);
}

.admin-menu-label-popup-label {
  display: inline-flex;
  align-items: center;

  min-height: 30px;

  margin-bottom: 14px;

  padding: 6px 11px;

  border-radius: 999px;

  color: #ffffff;

  font-size: 12px;
  font-weight: 700;

  letter-spacing: 0.02em;
}

.admin-menu-label-popup h3 {
  margin: 0 40px 10px 0;

  color: var(--text);

  font-size: 24px;
  line-height: 1.2;
}

.admin-menu-label-popup p {
  margin: 0;

  color: var(--text-soft);

  font-size: 15px;
  line-height: 1.65;

  white-space: pre-wrap;
}

.admin-menu-label-popup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 16px;

  margin-top: 24px;
  padding-top: 18px;

  border-top: 1px solid var(--border);
}

.admin-menu-label-popup-footer small {
  color: var(--text-soft);

  line-height: 1.4;
}

.admin-menu-label-popup-done {
  flex: 0 0 auto;

  border: 0;
  border-radius: 10px;

  padding: 10px 16px;

  background: var(--primary);
  color: #ffffff;

  font: inherit;
  font-weight: 700;

  cursor: pointer;
}

.admin-menu-label-popup-done:hover {
  background: var(--primary-dark);
}

/* =========================================================
   ITEM VIEW HEADER
   ========================================================= */

.item-view-header,
.item-detail-header {
  display: flex;
  align-items: center;

  gap: 10px;

  padding: 14px 18px;

  border-bottom: 1px solid var(--border);

  background: var(--surface);
}

.item-view-header h2,
.item-detail-header h2 {
  margin: 0;

  min-width: 0;

  overflow: hidden;

  color: var(--text);

  font-size: 1rem;
  font-weight: 800;

  line-height: 1.3;

  text-overflow: ellipsis;
  white-space: nowrap;
}

#back-button,
#detail-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;

  flex: 0 0 34px;

  padding: 0;

  border: 1px solid rgba(19, 19, 21, 0.1);
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.78);
  color: var(--text);

  font-size: 22px;
  font-weight: 500;

  line-height: 1;

  cursor: pointer;

  box-shadow: 0 3px 10px rgba(19, 19, 21, 0.08);

  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

#back-button:hover,
#detail-back-button:hover {
  transform: translateX(-2px);

  background: #ffffff;
  color: var(--primary);

  box-shadow: 0 5px 14px rgba(19, 19, 21, 0.12);
}

/* =========================================================
   ITEM PICTURE GRID
   ========================================================= */

.public-menu-item-picture-grid {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 11px;
}

.menu-item-card {
  position: relative;

  overflow: hidden;

  border: 1px solid var(--border);
  border-radius: 16px;

  background: var(--surface);

  box-shadow: 0 6px 18px rgba(19, 19, 21, 0.07);

  cursor: pointer;

  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.menu-item-card:hover {
  transform: translateY(-2px);

  box-shadow: 0 9px 23px rgba(19, 19, 21, 0.11);
}

.menu-item-card:active {
  transform: translateY(0);
}

.menu-item-card > img {
  width: 100%;
  height: 125px;

  display: block;

  object-fit: cover;
}

.menu-item-content {
  display: flex;
  flex-direction: column;

  gap: 5px;

  padding: 11px;
}

.menu-item-content h3 {
  margin: 0;

  color: var(--text);

  font-size: 0.79rem;
  font-weight: 790;

  line-height: 1.3;
}

.menu-item-content p {
  margin: 0;

  display: -webkit-box;

  overflow: hidden;

  color: var(--text-soft);

  font-size: 0.67rem;
  line-height: 1.4;

  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.menu-item-price {
  color: var(--primary);

  font-size: 0.78rem;
  font-weight: 820;

  line-height: 1.3;
}

.menu-item-no-image {
  width: 100%;
  height: 125px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #d8d8da;

  color: var(--text-soft);

  font-size: 0.68rem;
  font-weight: 700;
}

/* =========================================================
   TEXT LIST
   ========================================================= */

.public-menu-item-text-list {
  display: flex;
  flex-direction: column;

  overflow: hidden;

  border: 1px solid var(--border);
  border-radius: 15px;

  background: var(--surface);
}

.menu-item-text-list {
  position: relative;

  border-bottom: 1px solid var(--border);

  cursor: pointer;

  transition: background 160ms ease;
}

.menu-item-text-list:last-child {
  border-bottom: 0;
}

.menu-item-text-list:hover {
  background: rgba(229, 36, 42, 0.025);
}

.menu-item-text-list-content {
  padding: 14px;
}

/* =========================================================
   COMPACT IMAGE LEFT / RIGHT
   ========================================================= */

.public-menu-item-compact-list {
  display: flex;
  flex-direction: column;

  gap: 9px;
}

.menu-item-compact-image {
  position: relative;

  display: grid;

  grid-template-columns: 92px minmax(0, 1fr);

  width: 100%;
  height: 92px;
  min-height: 92px;

  overflow: hidden;

  border: 1px solid var(--border);
  border-radius: 15px;

  background: var(--surface);

  cursor: pointer;

  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.menu-item-compact-image:hover {
  transform: translateY(-1px);

  box-shadow: 0 7px 18px rgba(19, 19, 21, 0.08);
}

.menu-item-compact-image-right {
  grid-template-columns: minmax(0, 1fr) 92px;
}

.menu-item-image-wrapper {
  width: 92px;
  height: 92px;

  min-width: 92px;
  min-height: 92px;

  overflow: hidden;
}

.menu-item-compact-image-left .menu-item-image-wrapper {
  border-radius: 14px 0 0 14px;
}

.menu-item-compact-image-right .menu-item-image-wrapper {
  border-radius: 0 14px 14px 0;
}

.menu-item-image-wrapper .menu-item-image {
  width: 92px;
  height: 92px;

  display: block;

  object-fit: cover;
}

.menu-item-image-wrapper .menu-item-no-image {
  width: 92px;
  height: 92px;

  min-height: 92px;
}

.menu-item-compact-image .menu-item-content {
  justify-content: center;

  min-width: 0;

  padding: 10px;
}

/* =========================================================
   ALTERNATING EDITORIAL
   ========================================================= */

.public-menu-item-editorial-list {
  display: flex;
  flex-direction: column;

  gap: 15px;
}

.menu-item-editorial {
  position: relative;

  display: grid;

  grid-template-columns: 1fr 1fr;

  width: 100%;
  height: 175px;
  min-height: 175px;

  overflow: hidden;

  border-radius: 17px;

  background: var(--surface);

  box-shadow: 0 7px 20px rgba(19, 19, 21, 0.08);

  cursor: pointer;

  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.menu-item-editorial:hover {
  transform: translateY(-2px);

  box-shadow: 0 10px 25px rgba(19, 19, 21, 0.11);
}

.menu-item-editorial-reversed {
  direction: rtl;
}

.menu-item-editorial-reversed .menu-item-editorial-content {
  direction: ltr;
}

.menu-item-editorial-image {
  width: 100%;
  height: 175px;

  min-height: 175px;

  overflow: hidden;

  border-radius: 17px 0 0 17px;
}

.menu-item-editorial-reversed .menu-item-editorial-image {
  border-radius: 0 17px 17px 0;
}

.menu-item-editorial-image .menu-item-image {
  width: 100%;
  height: 175px;

  min-height: 175px;

  display: block;

  object-fit: cover;
}

.menu-item-editorial-image .menu-item-no-image {
  width: 100%;
  height: 175px;

  min-height: 175px;
}

.menu-item-editorial-content {
  display: flex;
  align-items: center;

  min-width: 0;

  padding: 15px;
}

/* =========================================================
   LABELS
   ========================================================= */

.menu-item-labels {
  display: flex;
  flex-wrap: wrap;

  gap: 4px;

  margin-top: 3px;
}

.menu-item-label {
  display: inline-flex;
  align-items: center;

  padding: 3px 7px;

  color: #ffffff;

  font-size: 0.56rem;
  font-weight: 800;

  line-height: 1.2;
}

.menu-item-label-badge {
  border-radius: 5px;
}

.menu-item-label-pill {
  border-radius: 999px;
}

.menu-item-label-ribbon {
  border-radius: 3px 8px 8px 3px;
}

/* =========================================================
   AVAILABILITY
   ========================================================= */

.menu-item-sold-out {
  position: relative;

  filter: grayscale(0.75);
}

.menu-item-sold-out::after {
  content: "SOLD OUT";

  position: absolute;

  inset: 0;

  z-index: 5;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(19, 19, 21, 0.58);

  color: #ffffff;

  font-size: 1.35rem;
  font-weight: 900;

  letter-spacing: 0.08em;

  line-height: 1;

  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);

  pointer-events: none;
}

.menu-item-disabled {
  display: none !important;
}

.menu-item-sold-out-message {
  display: inline-flex;
  align-items: center;

  width: fit-content;

  margin-top: 7px;
  padding: 5px 9px;

  border-radius: 6px;

  background: rgba(19, 19, 21, 0.08);

  color: var(--text-soft);

  font-size: 0.68rem;
  font-weight: 800;

  letter-spacing: 0.04em;
}

/* =========================================================
   ITEM DETAIL
   ========================================================= */

#item-detail-view {
  background: var(--bg);
}

#item-detail {
  padding: 18px;
}

.item-detail-card {
  position: relative;

  overflow: hidden;

  border: 1px solid var(--border);
  border-radius: 17px;

  background: var(--surface);

  box-shadow: 0 7px 20px rgba(19, 19, 21, 0.08);
}

.item-detail-card > img {
  width: 100%;
  height: 260px;

  display: block;

  object-fit: cover;
}

.item-detail-content {
  display: flex;
  flex-direction: column;

  gap: 9px;

  padding: 18px;
}

.item-detail-content h1 {
  margin: 0;

  color: var(--text);

  font-size: 1.35rem;
  font-weight: 820;

  line-height: 1.2;

  letter-spacing: -0.025em;
}

.item-detail-content p {
  margin: 0;

  color: var(--text-soft);

  font-size: 0.82rem;

  line-height: 1.55;
}

.item-detail-content > strong {
  color: var(--primary);

  font-size: 1rem;
  font-weight: 820;
}

/* =========================================================
   PORTIONS
   ========================================================= */

.item-portions {
  display: flex;
  flex-direction: column;

  margin-top: 6px;

  overflow: hidden;

  border: 1px solid var(--border);
  border-radius: 13px;

  background: var(--surface);
}

.item-portion {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 15px;

  min-height: 48px;

  padding: 11px 13px;

  border-bottom: 1px solid var(--border);
}

.item-portion:last-child {
  border-bottom: 0;
}

.item-portion span {
  color: var(--text);

  font-size: 0.78rem;
  font-weight: 650;
}

.item-portion strong {
  color: var(--primary);

  font-size: 0.78rem;
  font-weight: 820;
}

/* =========================================================
   LOADING / EMPTY STATES
   ========================================================= */

#categories > p,
#menu-items > p,
#item-detail > p,
.public-all-menu-category > p {
  margin: 0;

  padding: 28px 15px;

  color: var(--text-soft);

  font-size: 0.78rem;

  text-align: center;
}

.public-all-menu-category > p {
  padding: 22px 10px;

  border: 1px dashed var(--border);
  border-radius: 12px;
}

/* =========================================================
   ALL MENU SPACING
   ========================================================= */

#item-view:has(.public-menu-category-navigation) #menu-items {
  padding-top: 0;
}

#item-view:has(.public-menu-category-navigation)
  .public-menu-category-navigation
  + .public-all-menu-category {
  padding-top: 18px;
}

/* =========================================================
   FOCUS / ACCESSIBILITY
   ========================================================= */

.category-card:focus-visible,
.category-list-item:focus-visible,
.public-menu-category-navigation-item:focus-visible,
.menu-item-card:focus-visible,
.menu-item-text-list:focus-visible,
.menu-item-compact-image:focus-visible,
.menu-item-editorial:focus-visible,
#back-button:focus-visible,
#detail-back-button:focus-visible {
  outline: 2px solid var(--primary);

  outline-offset: 3px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 600px) {
  .public-menu-filter-panel {
    right: 50%;

    width: min(360px, calc(100vw - 28px));

    transform: translateX(50%);
  }

  .public-menu-filter-options {
    max-height: 45vh;
  }

  .admin-menu-preview-filter-panel {
    width: calc(100% - 28px);

    margin-right: 14px;
    margin-left: 14px;

    padding: 16px;
  }

  .admin-menu-preview-filter-options {
    max-height: 45vh;
  }

  .admin-menu-label-popup-overlay {
    align-items: flex-end;

    padding: 12px;
  }

  .admin-menu-label-popup {
    width: 100%;

    max-height: calc(100vh - 24px);

    padding: 24px 20px 20px;

    border-radius: 18px;
  }

  .admin-menu-label-popup-footer {
    align-items: stretch;

    flex-direction: column;
  }

  .admin-menu-label-popup-done {
    width: 100%;
  }

  .menu-header {
    padding: 30px 20px 22px;
  }

  #category-view {
    padding: 18px;
  }

  #menu-items,
  #item-detail {
    padding: 18px;
  }

  .public-menu-category-navigation {
    gap: 4px 14px;

    padding: 10px 12px;
  }

  .public-menu-category-navigation-item {
    font-size: 0.7rem;
  }

  .item-detail-card > img {
    height: 230px;
  }
}

@media (max-width: 420px) {
  .menu-header {
    padding: 26px 16px 20px;
  }

  .menu-branding h1 {
    font-size: 1.35rem;
  }

  #category-view {
    padding: 14px;
  }

  #menu-items,
  #item-detail {
    padding: 14px;
  }

  .section-heading {
    padding: 0;
  }

  .public-menu-item-picture-grid {
    gap: 8px;
  }

  .menu-item-content {
    padding: 9px;
  }

  .public-menu-category-navigation {
    gap: 3px 11px;

    padding: 9px 10px;
  }

  .public-menu-category-navigation-item {
    font-size: 0.68rem;
  }

  .menu-item-editorial {
    height: 160px;
    min-height: 160px;
  }

  .menu-item-editorial-image {
    height: 160px;
    min-height: 160px;
  }

  .menu-item-editorial-image .menu-item-image {
    height: 160px;
    min-height: 160px;
  }

  .menu-item-editorial-image .menu-item-no-image {
    height: 160px;
    min-height: 160px;
  }

  .menu-item-editorial-content {
    padding: 11px;
  }
}

@media (max-width: 380px) {
  .public-menu-item-picture-grid {
    gap: 7px;
  }

  .menu-item-card > img {
    height: 115px;
  }

  .menu-item-no-image {
    height: 115px;
  }

  .menu-item-content {
    padding: 8px;
  }

  .menu-item-content h3 {
    font-size: 0.75rem;
  }

  .menu-item-content p {
    font-size: 0.64rem;
  }

  .menu-item-price {
    font-size: 0.74rem;
  }
}

.public-category-wide-cards {
  display: flex;
  flex-direction: column;

  gap: 11px;
}

.public-all-menu-content {
  padding: 18px;
}

/* -----------------------------------------
   Tiny screens
   ----------------------------------------- */

@media (max-width: 380px) {
  .admin-menu-preview-filter-panel {
    width: calc(100% - 20px);

    margin-right: 10px;
    margin-left: 10px;

    padding: 14px;
  }

  .admin-menu-preview-filter-actions {
    gap: 8px;
  }

  .admin-menu-preview-filter-reset,
  .admin-menu-preview-filter-apply {
    flex: 1;
  }
}

/* =========================================================
   PUBLIC LABEL POPUPS
   ========================================================= */

.menu-label-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background: rgba(19, 19, 21, 0.55);

  opacity: 0;
  visibility: hidden;

  transition:
    opacity 160ms ease,
    visibility 160ms ease;
}

.menu-label-popup-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.menu-label-popup {
  position: relative;

  width: min(420px, 100%);
  max-height: min(620px, calc(100vh - 40px));

  overflow-y: auto;

  padding: 28px;

  border: 1px solid var(--border);
  border-radius: 20px;

  background: var(--surface);
  color: var(--text);

  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);

  transform: translateY(10px) scale(0.98);

  transition: transform 160ms ease;
}

.menu-label-popup-overlay.is-open .menu-label-popup {
  transform: translateY(0) scale(1);
}

.menu-label-popup-close {
  position: absolute;

  top: 12px;
  right: 12px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;

  padding: 0;

  border: 0;
  border-radius: 50%;

  background: transparent;
  color: var(--text-soft);

  font: inherit;
  font-size: 24px;
  line-height: 1;

  cursor: pointer;
}

.menu-label-popup-close:hover {
  background: rgba(19, 19, 21, 0.06);
  color: var(--text);
}

.menu-label-popup-label {
  display: inline-flex;
  align-items: center;

  min-height: 30px;

  margin-bottom: 14px;
  padding: 6px 11px;

  border-radius: 999px;

  color: #ffffff;

  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.menu-label-popup h3 {
  margin: 0 40px 10px 0;

  color: var(--text);

  font-size: 24px;
  line-height: 1.2;
}

.menu-label-popup p {
  margin: 0;

  color: var(--text-soft);

  font-size: 15px;
  line-height: 1.65;

  white-space: pre-wrap;
}

.menu-label-popup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 16px;

  margin-top: 24px;
  padding-top: 18px;

  border-top: 1px solid var(--border);
}

.menu-label-popup-footer small {
  color: var(--text-soft);

  font-size: 0.75rem;
  line-height: 1.4;
}

.menu-label-popup-done {
  flex: 0 0 auto;

  border: 0;
  border-radius: 10px;

  padding: 10px 16px;

  background: var(--primary);
  color: #ffffff;

  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;

  cursor: pointer;

  transition: background 160ms ease;
}

.menu-label-popup-done:hover {
  background: var(--primary-dark);
}

/* Clickable popup-enabled labels */

.menu-item-label-clickable {
  cursor: pointer;

  transition:
    transform 120ms ease,
    filter 120ms ease;
}

.menu-item-label-clickable:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.menu-item-label-clickable:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Mobile */

@media (max-width: 600px) {
  .menu-label-popup-overlay {
    align-items: flex-end;

    padding: 12px;
  }

  .menu-label-popup {
    width: 100%;
    max-height: calc(100vh - 24px);

    padding: 24px 20px 20px;

    border-radius: 18px;
  }

  .menu-label-popup-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .menu-label-popup-done {
    width: 100%;
  }
}

/* =========================================================
   POPUP ITEM GRID
   ========================================================= */

.public-menu-popup-item-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;

  margin-top: 18px;
}

.public-menu-popup-item-card {
  min-width: 0;
  overflow: hidden;
}

/* Make the reused picture-grid cards compact inside popups */

.public-menu-popup-item-card .public-menu-item-image {
  height: 82px;
}

.public-menu-popup-item-card .public-menu-item-content {
  padding: 8px;
}

.public-menu-popup-item-card .public-menu-item-name {
  font-size: 0.76rem;
}

.public-menu-popup-item-card .public-menu-item-description {
  display: none;
}

.public-menu-popup-item-card .public-menu-item-price {
  font-size: 0.75rem;
}

.public-menu-popup-item-card .public-menu-item-labels {
  margin-top: 5px;
}

.public-menu-popup-item-card .public-menu-item-label {
  font-size: 0.62rem;
  padding: 3px 6px;
}

/* =========================================================
   ADMIN MENU VIEW ISOLATION
   ---------------------------------------------------------
   menu.css is also loaded by the Admin Menu View page.
   Keep the public menu variables above unchanged, but
   restore the dark Admin Menu View environment whenever
   this stylesheet is being used on that page.
   ========================================================= */

body:has(.admin-menu-view-settings) {
  --bg: #101012;
  --surface: #131315;
  --surface-dark: #131315;

  --text: #e0e0e2;
  --text-soft: #b8b8bc;

  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.2);

  background:
    radial-gradient(circle at 12% 8%, rgba(229, 36, 42, 0.17), transparent 27%),
    radial-gradient(
      circle at 88% 82%,
      rgba(186, 45, 11, 0.13),
      transparent 31%
    ),
    #101012 !important;

  color: #e0e0e2;
}

body:has(.admin-menu-view-settings) .menu-container {
  background: transparent;
}

/* Fix Wide Cards without a category photo */
.category-card.category-card-wide:not(:has(img)) {
  height: 82px;
  min-height: 82px;
  justify-content: center;
  background: #c8c8ca;
}

/* Fix Picture Grid without a category photo */

.category-card:not(:has(img)) {
  background: #c8c8ca;
}

/* Keep the filter icon visible with any menu color */
.public-menu-filter-button svg {
  stroke: currentColor;
}

/* =========================================================
   EXPIRED PUBLIC ACCESS
   ========================================================= */

.menu-access-expired {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  box-sizing: border-box;
}

.menu-access-expired-card {
  width: min(100%, 520px);
  padding: 48px 36px;
  border: 1px solid rgba(229, 36, 42, 0.2);
  border-radius: 24px;
  background: var(--surface, #ffffff);
  box-shadow: 0 20px 60px rgba(19, 19, 21, 0.08);
  text-align: center;
}

.menu-access-expired-logo {
  display: block;
  width: min(220px, 70%);
  height: auto;
  margin: 0 auto 36px;
}

.menu-access-expired-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--primary, #e5242a);
  background: rgba(229, 36, 42, 0.08);
}

.menu-access-expired-icon svg {
  width: 30px;
  height: 30px;
}

.menu-access-expired-card h1 {
  margin: 0;
  color: var(--text, #131315);
  font-size: clamp(24px, 5vw, 32px);
  line-height: 1.2;
  font-weight: 750;
}

.menu-access-expired-card p {
  max-width: 420px;
  margin: 16px auto 0;
  color: var(--text-soft, #575a5e);
  font-size: 15px;
  line-height: 1.7;
}

@media (max-width: 600px) {
  .menu-access-expired {
    min-height: calc(100vh - 64px);
    padding: 32px 16px;
  }

  .menu-access-expired-card {
    padding: 36px 24px;
    border-radius: 20px;
  }

  .menu-access-expired-logo {
    margin-bottom: 28px;
  }

  .menu-access-expired-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 20px;
  }

  .menu-access-expired-icon svg {
    width: 27px;
    height: 27px;
  }
}
