/* ============================================================
   LEMON TREE RESTAURANT — main.css
   Shared styles: reset, variables, typography, nav, footer,
   buttons, utility classes, responsive breakpoints.
   DO NOT put page-specific styles here.
   ============================================================ */


/* ── 1. RESET & BASE ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #fff;
  color: #1a1a1a;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
}

ul, ol {
  list-style: none;
}


/* ── 2. DESIGN TOKENS (CSS Variables) ── */
:root {
  /* Brand colours */
  --lemon:        #ffff00;
  --lemon-soft:   #fffde0;
  --lemon-mid:    #fff799;
  --green:        #277722;
  --green-dark:   #1a5217;
  --green-light:  #e8f5e2;

  /* Neutral */
  --white:        #ffffff;
  --text-dark:    #1a1a1a;
  --text-mid:     #444444;
  --text-soft:    #888888;
  --border-c:     #e8e8e8;

  /* Shadows */
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.14);

  /* Border radius */
  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    16px;
  --radius-xl:    24px;

  /* Nav height — used to offset sticky elements */
  --nav-h:        64px;
}


/* ── 3. LAYOUT WRAPPER ── */
.lt-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Full-width section with inner wrap */
.section {
  padding: 72px 0;
}

.section-alt   { background: var(--lemon-soft); }
.section-green { background: var(--green-light); }
.section-dark  { background: var(--green); }


/* ── 4. TYPOGRAPHY HELPERS ── */
.sec-label {
  display: block;
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 700;
  margin-bottom: 8px;
}

.sec-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 10px;
}

.sec-sub {
  font-size: 15px;
  color: var(--text-soft);
  margin-bottom: 36px;
  max-width: 520px;
  line-height: 1.7;
}

.text-green  { color: var(--green); }
.text-center { text-align: center; }
.text-center .sec-sub { margin-left: auto; margin-right: auto; }


/* ── 5. BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 12px 26px;
  border-radius: var(--radius-xl);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--green);
  color: #fff;
}
.btn-primary:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--lemon);
  color: var(--green);
}
.btn-secondary:hover {
  background: var(--lemon-mid);
  transform: translateY(-2px);
}

.btn-wa {
  background: #25D366;
  color: #fff;
}
.btn-wa:hover {
  background: #1da851;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--green);
  border: 2px solid var(--green);
}
.btn-outline:hover {
  background: var(--green);
  color: #fff;
}

.btn-ghost {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.3);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.22);
}


/* ── 6. IMAGE FRAME ──
   Ensures ANY image fills its container without distortion.
   Use height on .img-frame to control the frame size.
   The image always covers and centers regardless of original dimensions.
── */
.img-frame {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--lemon-soft);
  position: relative;
}

.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;       /* fill frame, crop edges */
  object-position: center; /* center the crop */
  display: block;
  transition: transform 0.35s ease;
}

.img-frame:hover img {
  transform: scale(1.05);
}

/* Placeholder shown when image is missing */
.img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lemon-soft);
  color: var(--text-soft);
  font-size: 13px;
  letter-spacing: 0.5px;
}


/* ── 7. ITEM TAGS ── */
.tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  line-height: 1.4;
}

.tag-bestseller { background: #fff3cd; color: #7a5c00; }
.tag-new        { background: var(--lemon); color: var(--green); }
.tag-spicy      { background: #ffe8e8; color: #c0392b; }
.tag-veg        { background: var(--green-light); color: var(--green); }


/* ── 8. PAGE HERO (inner pages) ── */
.page-hero {
  background: linear-gradient(135deg, #fffde0 0%, #fff9b0 50%, #e8f5e2 100%);
  padding: 80px 32px;
  text-align: center;
}


.page-hero-badge {
  display: inline-flex;
  background: var(--green);
  color: #fff;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 20px;
  margin-bottom: 18px;
  font-weight: 700;
}

.page-hero h1 {
  font-size: 40px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 14px;
  line-height: 1.15;
}

.page-hero h1 span {
  color: var(--green);
}

.page-hero p {
  font-size: 15px;
  color: var(--text-mid);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.75;
}


/* ── 9. NAVBAR ──
   Nav HTML is injected by js/components.js into #nav-placeholder.
   All nav styles live here so any nav change is one file.
── */
.lt-nav {
  background: #fff;
  height: var(--nav-h);
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--lemon);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

/* Logo — uses actual image file, not emoji */
.lt-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.lt-logo-img {
  height: 40px;       /* adjust to your logo's natural height */
  width: auto;
  object-fit: contain;
  display: block;
}

/* Desktop nav links */
.nav-links {
  display: flex;
  gap: 2px;
  align-items: center;
}

.nav-links a {
  padding: 7px 12px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-mid);
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-links a:hover {
  background: var(--lemon-soft);
  color: var(--green);
}

/* Active page highlight */
.nav-links a.active {
  background: var(--lemon);
  color: var(--green);
  font-weight: 700;
}

/* Order Now CTA button in nav */
.nav-links .nav-cta {
  background: var(--green);
  color: #fff;
  padding: 9px 20px;
  border-radius: 20px;
  margin-left: 6px;
}

.nav-links .nav-cta:hover {
  background: var(--green-dark);
  color: #fff;
}

/* Mobile hamburger button */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border: none;
  background: none;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
  display: block;
  transition: all 0.3s;
}

/* Mobile dropdown menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: #fff;
  border-bottom: 3px solid var(--lemon);
  padding: 10px 20px 16px;
  gap: 3px;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: var(--nav-h);
  z-index: 999;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-mid);
  font-weight: 500;
  transition: all 0.2s;
}

.mobile-menu a:hover,
.mobile-menu a.active {
  background: var(--lemon);
  color: var(--green);
  font-weight: 700;
}

.mobile-menu .nav-cta {
  background: var(--green);
  color: #fff;
  text-align: center;
  border-radius: 20px;
  margin-top: 6px;
  padding: 12px;
}

.mobile-menu .nav-cta:hover {
  background: var(--green-dark);
  color: #fff;
}


/* ── 10. FOOTER ──
   Footer HTML is injected by js/components.js into #footer-placeholder.
   All footer styles live here.
── */
.lt-footer {
  background: var(--green);
  padding: 56px 32px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  max-width: 1100px;
  margin: 0 auto;
}

/* Footer logo — actual image file */
.footer-logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
  /* Use CSS filter to make logo appear white/light on green bg */
  /* filter: brightness(0) invert(1); */
  margin-bottom: 10px;
}

.footer-tagline {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-social a {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-social a:hover {
  background: var(--lemon);
  color: var(--green);
}

/* Social icon images in footer */
.footer-social-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  /* filter: brightness(0) invert(1); */
  transition: transform 0.2s;
}

.footer-social a:hover .footer-social-icon {
  transform: scale(1.1);
}

.footer-col-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--lemon);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  transition: color 0.2s;
  line-height: 1.4;
}

.footer-links a:hover {
  color: var(--lemon);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  transition: color 0.2s;
}

.footer-bottom-links a:hover {
  color: var(--lemon);
}


/* ── 11. CART STICKY BAR (Menu page) ──
   Shared because it might show on multiple pages in future.
── */
.cart-bar {
  display: none; /* shown via JS when cart has items */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--green-dark);
  padding: 14px 32px;
  justify-content: space-between;
  align-items: center;
  z-index: 998;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}

.cart-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 14px;
}

.cart-count-badge {
  background: var(--lemon);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}

.cart-total-text {
  color: var(--lemon);
  font-weight: 700;
  font-size: 16px;
}

.cart-bar-right {
  display: flex;
  gap: 12px;
}


/* ── 12. RESPONSIVE BREAKPOINTS ── */

/* Tablet */
@media (max-width: 900px) {
  .lt-nav {
    padding: 0 20px;
  }

  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .lt-wrap {
    padding: 0 20px;
  }

  .section {
    padding: 52px 0;
  }

  .sec-title {
    font-size: 24px;
  }

  .page-hero {
    padding: 56px 20px;
  }

  .page-hero h1 {
    font-size: 30px;
  }

  .cart-bar {
    padding: 12px 20px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .page-hero h1 {
    font-size: 24px;
  }

  .sec-title {
    font-size: 20px;
  }

  .btn {
    padding: 11px 20px;
    font-size: 13px;
  }

  .cart-bar {
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
  }

  .cart-bar-right {
    width: 100%;
    justify-content: center;
  }
}
