/* ==========================================================================
   Limoncello Restaurant Abingdon — design system
   Warm modern trattoria: deep green, warm cream, terracotta accent.
   ========================================================================== */

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/playfair-display-latin-variable.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/playfair-display-italic-latin-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin-variable.woff2') format('woff2');
}

:root {
  /* Real values are measured by main.js; these are only first-paint fallbacks. */
  --sticky-header-h: 76px;
  --sticky-tabs-h: 96px;

  --color-primary: #2C6E4A;
  --color-primary-dark: #1F4F36;
  --color-bg: #FFFACD;
  --color-surface: #FFFFFF;
  --color-accent: #339966;
  --color-accent-dark: #2B7D54;
  --color-accent-2: #B8863B;
  --color-maroon: #712121;
  --color-text: #2B2622;
  --color-muted: #6B6154;
  --color-border: #E8DFA8;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;

  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 2px 10px rgba(43, 38, 34, 0.08);
  --shadow-lg: 0 12px 32px rgba(43, 38, 34, 0.14);
  --max-width: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: #d9d3c4;
  background-image: url('../img/body-bg-lemon-tree.jpg');
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
  background-attachment: fixed;
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* The framed page itself — everything (header/hero/content/footer) lives in
   here. On wide screens the real lemon-tree photo on body shows around it,
   echoing the original site's look; the frame's own background is the
   cream + subtle lemon-sprig watermark used throughout the page content. */
.page-frame {
  max-width: 1320px;
  margin: 0 auto;
  background-color: var(--color-bg);
  background-image: url('../img/lemon-pattern-tile.svg');
  background-repeat: repeat;
  background-size: 130px 130px;
  border: 3px solid var(--color-primary);
  box-shadow: 0 0 50px rgba(0,0,0,0.3);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--space-2);
  color: var(--color-primary);
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
/* Small label above a page heading, e.g. "Italian Restaurant in Abingdon". */
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--color-accent-2);
  margin-bottom: 6px;
}
.hero .eyebrow { color: #F1D9A0; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 var(--space-2); }
.lede {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--color-maroon);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}
.section { padding: var(--space-5) 0; }
.section-tight { padding: var(--space-4) 0; }
.section-alt {
  background-color: var(--color-surface);
  background-image: url('../img/lemon-pattern-tile.svg');
  background-repeat: repeat;
  background-size: 130px 130px;
}
.text-center { text-align: center; }

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: 100px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-dark); }
.btn-outline { background: transparent; border-color: var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #fff; }
.btn-outline-light { background: transparent; border-color: #fff; color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--color-primary); }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-danger { background: #a3382c; color: #fff; }
.btn-danger:hover { background: #832c22; }

/* ---------------- Header / Nav ---------------- */
.site-topbar {
  background: var(--color-primary-dark);
  color: #f1ece0;
  font-size: 0.85rem;
}
.site-topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
  flex-wrap: wrap;
  gap: 4px;
}
.site-topbar a { color: #f1ece0; text-decoration: none; }
.site-topbar a:hover { text-decoration: underline; }

.site-header {
  background-color: var(--color-primary);
  background-image: url('../img/lemon-pattern-tile-light.svg');
  background-repeat: repeat;
  background-size: 130px 130px;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}
.brand {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: #fff;
  text-decoration: none;
  line-height: 1.1;
}
.brand small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-2);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}
.site-nav ul {
  list-style: none;
  display: flex;
  gap: var(--space_3, 4px);
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: block;
  padding: 8px 14px;
  text-decoration: none;
  color: #f1ece0;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: 100px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.site-nav a:hover,
.site-nav a.active {
  background: var(--color-accent);
  color: #fff;
}

@media (max-width: 899px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    width: 100%;
    order: 3;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 2px; padding-bottom: var(--space-2); }
  .site-header .container { flex-wrap: wrap; }
}

/* ---------------- Hero ---------------- */
/* Side-by-side: photo on the left, heading/CTA text on the right. The photo
   column is sized generously (not the cramped 420px-max box from the first
   pass) so a landscape photo has real room to breathe. */
.hero {
  position: relative;
  color: #fff;
  background-color: var(--color-primary);
  background-image: url('../img/lemon-pattern-tile-light.svg');
  background-repeat: repeat;
  background-size: 130px 130px;
  padding: var(--space-5) 0;
}
.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-4);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 800px) {
  .hero .container { grid-template-columns: 1.4fr 1fr; gap: var(--space-5); }
}
.hero h1 { color: #fff; }
.hero .lede { color: #f1ece0; }
.hero-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-3); }
.badge-row { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; margin-top: var(--space-4); }
.badge-row img { height: 56px; width: auto; background: #fff; border-radius: var(--radius); padding: 4px; }
.hero-image-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid rgba(255,255,255,0.15);
}
.hero-image-frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ---------------- Cards / Grids ---------------- */
.grid { display: grid; gap: var(--space-3); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 600px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
}
.card-body { padding: var(--space-3); }
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); }
.gallery-grid img { aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
@media (min-width: 600px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------------- Menu page ---------------- */
.page-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
}
.page-heading img { width: 90px; height: 90px; flex: none; }
.page-heading .flip { transform: scaleX(-1); }
@media (max-width: 700px) {
  .page-heading img { display: none; }
}

.menu-tabs {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--space-4);
}
.menu-tabs a {
  padding: 10px 22px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 600;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.menu-tabs a:hover { background: var(--color-primary); color: #fff; }
.menu-tabs a.active { background: var(--color-primary); color: #fff; }

.menu-subtabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: -8px 0 var(--space-4);
}
.menu-subtabs a {
  padding: 6px 18px;
  border-radius: 100px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent-2);
  border: 1px solid var(--color-accent-2);
}
.menu-subtabs a:hover { background: var(--color-accent-2); color: #fff; }
.menu-subtabs a.active { background: var(--color-accent-2); color: #fff; }

.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--space-4);
  padding: var(--space-2) 0 var(--space-3);
  border-bottom: 1px dashed var(--color-border);
  position: sticky;
  top: var(--sticky-header-h);
  z-index: 40;
  background-color: var(--color-bg);
}
.category-tabs a {
  padding: 6px 16px;
  border-radius: 100px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent-2);
  border: 1px solid var(--color-accent-2);
  white-space: nowrap;
}
.category-tabs a:hover { background: var(--color-accent-2); color: #fff; }
@media (max-width: 700px) {
  /* Wrapped, every category would stack into a bar covering most of a phone
     screen while stuck, so on narrow screens it becomes one row swiped sideways. */
  .category-tabs {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-left: calc(-1 * var(--space-3));
    margin-right: calc(-1 * var(--space-3));
    padding-left: var(--space-3);
    padding-right: var(--space-3);
  }
  .category-tabs::-webkit-scrollbar { display: none; }
  .category-tabs a { flex: none; }
}

/* Jump links land the heading just below the sticky header + category bar. */
.menu-category { margin-bottom: var(--space-4); scroll-margin-top: calc(var(--sticky-header-h) + var(--sticky-tabs-h) + 12px); }
.menu-category h3 {
  border-bottom: 2px solid var(--color-accent-2);
  padding-bottom: var(--space-1);
  margin-bottom: var(--space-2);
}
.menu-item {
  display: flex;
  gap: var(--space-2);
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}
.menu-item:last-child { border-bottom: none; }
.menu-item-photo {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
}
.menu-item-info { flex: 1; }
.menu-item-top { display: flex; justify-content: space-between; gap: var(--space-2); align-items: baseline; }
.menu-item-name { font-weight: 700; color: var(--color-text); }
.menu-item-price { font-family: var(--font-display); font-weight: 700; color: var(--color-accent); white-space: nowrap; }
.menu-item-desc { color: var(--color-muted); font-size: 0.88rem; margin-top: 2px; }
.menu-item.no-photo { padding: 6px 0; gap: 0; }
.menu-item-tiers { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: 6px; }
.menu-item-tier { text-align: center; }
.menu-item-tier-price {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-accent);
  font-size: 0.95rem;
}
.menu-item-tier-label { display: block; font-size: 0.72rem; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.menu-item.is-unavailable { opacity: 0.55; }
.menu-item-unavailable-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #a3382c;
  margin-top: 4px;
}
.menu-category-note {
  background: #F3ECD9;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  color: var(--color-muted);
  font-size: 0.85rem;
  text-align: center;
  margin: 10px 0 0;
}
.menu-note {
  background: #F3ECD9;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-4);
}
.menu-empty { text-align: center; color: var(--color-muted); padding: var(--space-5) 0; }

/* ---------------- Contact / booking ---------------- */
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { display: flex; gap: var(--space-2); padding: var(--space-1) 0; }
.info-list strong { color: var(--color-primary); min-width: 90px; display: inline-block; }
.map-frame, .booking-frame {
  width: 100%;
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* ---------------- Footer ---------------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background-color: var(--color-primary-dark);
  background-image: url('../img/lemon-pattern-tile-light.svg');
  background-repeat: repeat;
  background-size: 130px 130px;
  color: #cfd6cd;
  padding: var(--space-5) 0 var(--space-3);
  margin-top: var(--space-6);
  font-size: 0.9rem;
}
.footer-lemon-corner {
  position: absolute;
  left: -30px;
  bottom: -30px;
  width: 200px;
  height: 200px;
  opacity: 0.9;
  pointer-events: none;
}
.footer-lemon-corner-right {
  position: absolute;
  right: -30px;
  top: -30px;
  width: 160px;
  height: 160px;
  opacity: 0.5;
  transform: rotate(180deg);
  pointer-events: none;
}
.site-footer .container { position: relative; z-index: 1; }
.site-footer h4 { color: #fff; font-size: 1rem; }
.site-footer a { color: #cfd6cd; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: var(--space-4);
  padding-top: var(--space-2);
  font-size: 0.8rem;
  color: #9aa398;
}

/* ---------------- Forms (admin + contact) ---------------- */
.form-field { margin-bottom: var(--space-3); }
.form-field label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--color-primary); }
.form-field input[type="text"],
.form-field input[type="password"],
.form-field input[type="number"],
.form-field input[type="email"],
.form-field input[type="file"],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fff;
  color: var(--color-text);
}
.form-field textarea { min-height: 90px; resize: vertical; }
.form-hint { color: var(--color-muted); font-size: 0.85rem; margin-top: 4px; }
.form-error {
  background: #fbeae7;
  border: 1px solid #e3a89c;
  color: #832c22;
  padding: var(--space-2);
  border-radius: var(--radius);
  margin-bottom: var(--space-3);
}
.form-success {
  background: #e9f2e9;
  border: 1px solid #a7c8a9;
  color: var(--color-primary-dark);
  padding: var(--space-2);
  border-radius: var(--radius);
  margin-bottom: var(--space-3);
}
.checkbox-field { display: flex; align-items: center; gap: 8px; }
.checkbox-field input { width: auto; }

/* ---------------- Utility page (empty states, misc) ---------------- */
.stack { display: flex; flex-direction: column; gap: var(--space-2); }
.muted { color: var(--color-muted); }
