/* ===================================================================
   The Tee Room Cafe — Menu stylesheet
   Reuses The Golf Lounge's exact palette (same CSS variable names as
   style.css) so this page matches the rest of the site precisely.
   Built for two contexts at once: a Samsung Galaxy Tab A9 sitting on
   a table as a passive/touch menu, and a normal browser visit.
   =================================================================== */

:root {
  --color-bg: #121212;
  --color-card: #1a1a1a;
  --color-darkest: #0a0a0a;
  --color-accent: #d3f357;
  --color-text: #ffffff;
  --color-text-light: #a8a8a8;
  --font-display: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1200px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  overflow-x: hidden;
  /* Prevents the double-tap-to-zoom / accidental text selection that
     makes touch kiosks feel janky */
  user-select: none;
  -webkit-user-select: none;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ---------- Header (kept minimal on this page — the menu is the star) ---------- */
.menu-header { padding: 22px 0 10px; text-align: center; }
.menu-header .cafe-name {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(26px, 4vw, 40px); color: var(--color-text); margin: 0;
  letter-spacing: .02em;
}
.menu-header .cafe-name .accent { color: var(--color-accent); }
.menu-header .cafe-sub { color: var(--color-text-light); font-size: 14px; margin: 6px 0 0; }
.back-to-site {
  position: absolute; top: 22px; left: 24px;
  font-size: 13px; color: var(--color-text-light); display: flex; align-items: center; gap: 6px;
}
.back-to-site:hover { color: var(--color-accent); }

/* ---------- Category tabs ---------- */
.category-tabs {
  display: flex; gap: 10px; overflow-x: auto; padding: 18px 24px 22px;
  justify-content: flex-start;
  scrollbar-width: none;
}
@media (min-width: 900px) {
  .category-tabs { justify-content: center; }
}
.category-tabs::-webkit-scrollbar { display: none; }
.category-tab {
  flex-shrink: 0; background: var(--color-card); border: 1px solid transparent;
  color: var(--color-text-light); font-family: var(--font-display); font-weight: 600;
  font-size: 14px; padding: 12px 22px; border-radius: 30px; cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.category-tab.active { background: var(--color-accent); color: var(--color-darkest); }
.category-tab:not(.active):hover { border-color: var(--color-accent); color: var(--color-text); }

/* ---------- Menu grid ---------- */
.menu-section { display: none; padding: 0 24px 60px; }
.all-view-heading {
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
  font-size: 20px; color: var(--color-accent); letter-spacing: .03em;
  max-width: var(--max-width); margin: 34px auto 16px; padding: 0 0 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.all-view-heading:first-child { margin-top: 8px; }
.menu-section.active { display: block; }
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 260px));
  justify-content: center;
  gap: 18px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.item-card {
  background: var(--color-card);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: grid-column .25s ease, transform .2s ease, box-shadow .2s ease;
  border: 1px solid rgba(255,255,255,.06);
}
.item-card:hover { transform: translateY(-3px); border-color: rgba(211,243,87,.35); }

.item-card .thumb-wrap {
  aspect-ratio: 4/3; overflow: hidden; position: relative; background: #0d0d0d;
}
.item-card .thumb-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.item-card:hover .thumb-wrap img { transform: scale(1.04); }

.item-card .card-body { padding: 14px 16px 16px; }
.item-card .item-name { font-family: var(--font-display); font-weight: 600; font-size: 15.5px; margin: 0 0 4px; }
.item-card .item-price { color: var(--color-accent); font-weight: 700; font-size: 15px; font-family: var(--font-display); }
.item-card .item-teaser { color: var(--color-text-light); font-size: 12.5px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.expand-hint {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--color-text-light); margin-top: 10px;
}
.expand-hint .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--color-accent); }

/* ---------- Expanded card state ---------- */
/* When expanded, the card spans the full grid width and restructures
   into a large-image + details layout, right in place — no popup,
   no page jump. */
.item-card.expanded {
  grid-column: 1 / -1;
  cursor: default;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 1.3fr;
  gap: 0;
}
.item-card.expanded .thumb-wrap { aspect-ratio: auto; height: 100%; min-height: 260px; }
.item-card.expanded .card-body {
  padding: 26px 30px 26px 26px;
  display: flex; flex-direction: column;
}
.item-card.expanded .item-name { font-size: 24px; margin-bottom: 8px; }
.item-card.expanded .item-price { font-size: 19px; }
.item-card.expanded .item-teaser { display: none; }
.item-card.expanded .expand-hint { display: none; }

.item-full-desc { color: var(--color-text-light); font-size: 14.5px; line-height: 1.65; margin: 14px 0 0; }

.option-group { margin-top: 18px; }
.option-group .option-label {
  font-family: var(--font-display); font-weight: 600; font-size: 12.5px;
  text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-light); margin-bottom: 8px;
}
.option-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.option-chip {
  background: var(--color-darkest); border: 1px solid rgba(255,255,255,.1);
  color: var(--color-text); font-size: 13px; padding: 7px 14px; border-radius: 20px;
}
.option-chip .chip-price { color: var(--color-accent); font-weight: 600; margin-left: 4px; }

.close-expand {
  margin-top: auto; align-self: flex-start;
  background: none; border: 1px solid rgba(255,255,255,.15); color: var(--color-text-light);
  font-size: 12.5px; padding: 9px 18px; border-radius: 20px; cursor: pointer; margin-top: 20px;
}
.close-expand:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* ---------- Tablet-specific tuning ----------
   Samsung Galaxy Tab A9, used flat on a table in landscape, sits in
   roughly this width range. Larger touch targets, denser default
   grid so it looks well-populated and inviting at rest. */
@media (min-width: 1000px) and (max-width: 1400px) and (pointer: coarse) {
  .menu-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 280px)); justify-content: center; gap: 20px; }
  .item-card .item-name { font-size: 17px; }
  .category-tab { padding: 14px 26px; font-size: 15px; }
}

@media (max-width: 640px) {
  .menu-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .item-card.expanded { grid-template-columns: 1fr; }
  .item-card.expanded .thumb-wrap { min-height: 220px; }
  .back-to-site { position: static; display: inline-flex; margin-bottom: 10px; }
}
