@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600&display=swap');

:root {
  --page-bg: #f7f3ec;
  --surface: #fffaf3;
  --surface-soft: #f1eadf;
  --text: #2f3432;
  --muted: #7b817d;
  --muted-light: #a8afab;
  --line: rgba(47, 52, 50, 0.12);
  --accent: #b88a55;
  --accent-soft: rgba(184, 138, 85, 0.12);
  --shadow: 0 24px 70px rgba(52, 45, 36, 0.1);
  --shadow-card: 0 8px 32px rgba(52, 45, 36, 0.07);
}

/* ================================================================
   BASE
================================================================ */

.menu-page,
.menu-page * {
  box-sizing: border-box;
}

.menu-page {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top, rgba(184, 138, 85, 0.12), transparent 34rem),
    linear-gradient(180deg, #fbf7f0 0%, var(--page-bg) 100%);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
}

/* ================================================================
   HERO
================================================================ */

.menu-hero {
  position: relative;
  text-align: center;
  padding: clamp(2.6rem, 5vw, 4.2rem) clamp(1rem, 4vw, 2rem) clamp(1.4rem, 3vw, 2.2rem);
  overflow: hidden;
}

.menu-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 55% at 50% 0%, rgba(184, 138, 85, 0.16), transparent 70%);
  pointer-events: none;
}

.menu-hero h1 {
  position: relative;
  z-index: 1;
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  font-weight: 300;
  font-style: normal;
  line-height: 1;
  letter-spacing: 0.08em;
  margin: 0 0 0.9rem;
  color: var(--text);
}

.menu-sub {
  position: relative;
  z-index: 1;

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

  gap: 0.9rem;

  width: fit-content;
  max-width: 100%;
  margin: 0 auto;

  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;

  font-family: 'Poppins', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);

  text-align: center;
  white-space: nowrap;
}

.menu-sub::-webkit-scrollbar {
  display: none;
}

.menu-sub span {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.menu-sub-divider {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.menu-hero-rule,
.ep-rule--center {
  display: none !important;
}

/* ================================================================
   TABS
================================================================ */

.menu-tabs-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 320px;
  max-width: calc(100% - 2rem);
  margin: clamp(1.25rem, 3vw, 2rem) auto 0;
  padding: 5px;
  background: rgba(255, 250, 243, 0.9);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  gap: 0;
}

.menu-tab {
  flex: 0 0 auto;
  min-width: 140px;
  border: none;
  border-radius: 999px;
  background: transparent;
  padding: 0.78rem 1.25rem;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 0.56rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  font-style: normal;
  text-align: center;
  transition: background 0.25s ease, color 0.25s ease;
}

.menu-tab:hover {
  color: var(--text);
}

.menu-tab.active {
  background: var(--text);
  color: var(--surface);
}

.tab-divider {
  flex: 0 0 1px;
  width: 1px;
  height: 20px;
  background: var(--line);
}

/* ================================================================
   SECTION
================================================================ */

.menu-section {
  width: min(100% - 4rem, 1200px);
  margin: clamp(3rem, 5vw, 4.5rem) auto 0;
}

.menu-section.hidden {
  display: none;
}

.menu-section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.25rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.section-bar-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.section-bar-flower {
  width: 1rem;
  height: 1rem;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.92;
}

.section-bar-kicker {
  font-family: 'Poppins', sans-serif;
  font-size: 0.52rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--text);
  font-weight: 700;
  line-height: 1;
}

.section-bar-line,
.section-bar-line--ice {
  display: none !important;
}

.section-bar-right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.section-bar-label {
  font-family: 'Poppins', sans-serif;
  font-size: 0.52rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

/* ================================================================
   ARROWS
================================================================ */

.nav-arrow {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  transition: all 0.25s ease;
  font-family: inherit;
  padding: 0;
}

.nav-arrow:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--surface);
  transform: translateY(-2px);
}

.nav-arrow:disabled {
  opacity: 0.28;
  cursor: default;
}

/* Arrows are a desktop-only affordance — touch screens always get
   the full-width grid instead, regardless of exact breakpoint */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .menu-grid-outer .nav-arrow {
    display: none !important;
  }

  .menu-grid-outer {
    gap: 0 !important;
  }
}

/* ================================================================
   CAROUSEL OUTER
================================================================ */

.menu-grid-outer {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.2vw, 1rem);
}

.menu-grid-outer .nav-arrow {
  flex-shrink: 0;
}

/* ================================================================
   GRID — subgrid so all cards share the same row tracks
================================================================ */

.menu-grid-wrap {
  flex: 1;
  width: 100%;
  overflow: hidden;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* 3 row tracks per card: image | title-row | description */
  grid-template-rows: auto auto auto;
  gap: clamp(1.4rem, 2.5vw, 2.8rem);
  /* no row gap between the internal rows of a card */
  row-gap: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.menu-grid.fading {
  opacity: 0;
  transform: translateX(-14px);
}

/* ================================================================
   ITEM CARD — spans all 3 row tracks via subgrid
================================================================ */

.menu-item {
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  min-width: 0;
  padding: clamp(0.6rem, 1.2vw, 1rem);
  border-radius: 26px;
  transition: transform 0.32s ease, background 0.32s ease, box-shadow 0.32s ease;
  align-items: start;
}

@media (hover: hover) and (pointer: fine) {
  .menu-item:hover {
    background: rgba(255, 250, 243, 0.82);
    box-shadow: var(--shadow-card);
    transform: translateY(-5px);
  }

  .menu-item:hover .item-image img {
    transform: scale(1.05);
  }
}

/* ================================================================
   ITEM IMAGE — CIRCULAR, FIXED SQUARE via padding-bottom trick
================================================================ */

.item-image {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(184, 138, 85, 0.09), transparent 62%),
    rgba(255, 250, 243, 0.45);
  flex-shrink: 0;
}

.item-image img {
  position: absolute;
  inset: 8%;
  width: 84%;
  height: 84%;
  object-fit: contain;
  display: block;
  transition: transform 0.45s ease;
}

.item-image-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-light);
  font-family: 'Poppins', sans-serif;
  font-size: clamp(0.44rem, 0.8vw, 0.55rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ================================================================
   ITEM CONTENT — title row + description, both centered
================================================================ */

.item-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.38rem;
  margin: 0 0 0.5rem;
  border: none !important;
  background: none !important;
  align-self: start;
}

.item-title-row::before,
.item-title-row::after {
  display: none !important;
  content: none !important;
}

.item-title-flower {
  width: clamp(0.95rem, 1.3vw, 1.15rem);
  height: clamp(0.95rem, 1.3vw, 1.15rem);
  flex-shrink: 0;
  object-fit: contain;
  opacity: 0.88;
  display: block;
  margin-top: 0.22em;
}

.item-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(0.95rem, 1.1vw + 0.2rem, 1.2rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: var(--text);
  margin: 0;
  word-break: break-word;
  text-align: center;
}

/* item-content wrapper is no longer needed as a flex column —
   subgrid handles layout — but keep it for padding/centering */
.item-content {
  display: contents; /* let children participate in subgrid directly */
}

.item-content::before,
.item-content::after {
  display: none !important;
  content: none !important;
}

/* ── Description — always starts at the same row ── */
.item-desc {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(0.68rem, 0.6vw + 0.32rem, 0.78rem);
  font-weight: 300;
  line-height: 1.85;
  color: var(--muted);
  margin: 0;
  letter-spacing: 0.01em;
  text-align: center;
  align-self: start;
  padding: 0 0.15rem;
}

/* ── Allergen / tag ── */
.item-allergen,
.item-title span.item-tag {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: clamp(0.44rem, 0.5vw + 0.18rem, 0.52rem);
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-light);
  margin: 0.32rem 0 clamp(0.5rem, 1vw, 0.75rem);
  padding-left: 0;
  text-align: center;
}

.menu-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

/* ================================================================
   ORDER BUTTON
================================================================ */

.menu-order-only {
  width: 100%;
  margin: clamp(3rem, 5vw, 4.5rem) auto clamp(5rem, 7vw, 7rem);
  display: flex;
  justify-content: center;
  align-items: center;
}

.menu-order-only .pe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  width: auto;
  background: var(--text);
  border-radius: 999px;
  padding: 1.05rem 2.8rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.56rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--surface);
  text-decoration: none;
  font-weight: 600;
  font-style: normal;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.menu-order-only .pe-btn:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(184, 138, 85, 0.22);
}

.menu-cta-section {
  display: none !important;
}

/* ================================================================
   RESPONSIVE — TABLET (≤ 900px)
================================================================ */

@media (max-width: 900px) {
  .menu-grid-wrap {
    width: 100%;
  }

  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1.2rem, 3vw, 2rem);
    row-gap: 0;
  }

  .item-title {
    font-size: clamp(1rem, 2.5vw + 0.1rem, 1.2rem);
  }

  .item-desc {
    font-size: clamp(0.68rem, 1.4vw + 0.28rem, 0.8rem);
  }
}

/* ================================================================
   RESPONSIVE — MOBILE (≤ 768px)
   Arrows removed; grid takes full available width
================================================================ */

@media (max-width: 768px) {
  .menu-section {
    width: calc(100% - 2rem);
  }

  .menu-section-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .section-bar-right {
    display: none;
  }

  .section-bar-flower {
    width: 0.9rem;
    height: 0.9rem;
  }

.menu-sub {
    max-width: 100%;
    justify-content: flex-start;
    gap: 0.55rem;

    font-size: 0.56rem;
    letter-spacing: 0.14em;
    line-height: 1.6;
  }

  .menu-sub-divider {
    width: 3px;
    height: 3px;
  }
  .item-title {
    font-size: clamp(0.95rem, 3vw + 0.05rem, 1.15rem);
  }

  .item-desc {
    font-size: clamp(0.68rem, 2vw + 0.2rem, 0.78rem);
    line-height: 1.8;
  }

  /* Arrows already hidden globally above (max-width:900px / touch).
     Grid fills the full width that the arrows used to occupy. */
  .menu-grid-wrap {
    width: 100%;
  }

  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(0.9rem, 4vw, 1.6rem);
    row-gap: 0;
  }

  .item-image {
    margin-bottom: 0.9rem;
  }
}

/* ================================================================
   RESPONSIVE — SMALL MOBILE (≤ 480px)
================================================================ */

@media (max-width: 480px) {
   .menu-hero {
    padding: 2.4rem 1rem 2rem;
  }

  .menu-hero h1 {
    font-size: clamp(2.7rem, 12vw, 3.8rem);
    line-height: 1;
  }
  .menu-tabs-nav {
    width: calc(100% - 2rem);
    min-width: 0;
    margin-top: 1rem;
  }
  .menu-sub {
    gap: 0.45rem;
    justify-content: flex-start;

    font-size: 0.48rem;
    letter-spacing: 0.10em;
    line-height: 1.5;
  }

  .menu-sub-divider {
    width: 2.5px;
    height: 2.5px;
  }
  .menu-tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.72rem 0.8rem;
    font-size: 0.5rem;
    letter-spacing: 0.14em;
  }

  .menu-section {
    width: calc(100% - 1.5rem);
    margin-top: 2.5rem;
  }

  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(0.6rem, 3vw, 1rem);
    row-gap: 0;
  }

  .menu-item {
    border-radius: 18px;
    padding: clamp(0.35rem, 1.5vw, 0.6rem);
  }

  .item-image {
    margin-bottom: 0.7rem;
  }

  .item-title-flower {
    width: 0.85rem;
    height: 0.85rem;
    margin-top: 0.25em;
  }

  .item-title {
    font-size: clamp(0.8rem, 4vw, 0.98rem);
    line-height: 1.28;
  }

  .item-allergen,
  .item-title span.item-tag {
    font-size: 0.4rem;
    letter-spacing: 0.14em;
    padding-left: 0;
  }

  .item-desc {
    font-size: clamp(0.58rem, 2.6vw, 0.68rem);
    line-height: 1.7;
  }

  .section-bar-flower {
    width: 0.8rem;
    height: 0.8rem;
  }

  .section-bar-kicker {
    letter-spacing: 0.24em;
    font-size: 0.48rem;
  }

  .menu-order-only {
    width: calc(100% - 2rem);
    margin-bottom: 5rem;
  }

  .menu-order-only .pe-btn {
    width: 100%;
  }
}

/* ================================================================
   RESPONSIVE — VERY SMALL (≤ 390px)
   Shrink the divider row further so it fits without clipping;
   still scrollable via .menu-sub as a fallback on the narrowest devices.
================================================================ */

@media (max-width: 390px) {
  .menu-sub {
    gap: 0.32rem;
    font-size: 0.42rem;
    letter-spacing: 0.05em;
    line-height: 1.4;
  }

  .menu-sub-divider {
    width: 2px;
    height: 2px;
  }
}

/* ================================================================
   RESPONSIVE — VERY SMALL (≤ 360px)
================================================================ */

@media (max-width: 360px) {
  .menu-grid {
    gap: clamp(0.5rem, 3vw, 0.8rem);
  }

  .item-title {
    font-size: clamp(0.74rem, 4.2vw, 0.9rem);
  }

  .item-desc {
    font-size: clamp(0.54rem, 2.8vw, 0.62rem);
  }

  .section-bar-kicker {
    font-size: 0.44rem;
    letter-spacing: 0.2em;
  }
}