@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --primary: #FF6B35;
  --primary-dark: #E55A25;
  --secondary: #FFB347;
  --accent: #FF3D3D;
  --dark: #1A1006;
  --dark-2: #2A1E0F;
  --dark-3: #3D2E18;
  --card-bg: #231808;
  --text: #F5EFE6;
  --text-muted: #A89880;
  --gold: #D4A843;
  --white: #FFFFFF;
  --success: #4CAF50;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.3);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --dark: #FFF8F0;
  --dark-2: #FFF0E0;
  --dark-3: #FFE4C4;
  --card-bg: #FFFFFF;
  --text: #1A1006;
  --text-muted: #7A6050;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--dark);
  color: var(--text);
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

/* LOADING SCREEN */
#loader {
  position: fixed; inset: 0;
  background: var(--dark);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s, visibility 0.5s;
}
#loader.hide { opacity: 0; visibility: hidden; }
.loader-inner {
  text-align: center;
  animation: loaderPulse 1s ease-in-out infinite;
}
.loader-logo { font-family: 'Playfair Display', serif; font-size: 2.5rem; color: var(--primary); }
.loader-bar { width: 200px; height: 3px; background: var(--dark-3); border-radius: 2px; margin: 16px auto 0; overflow: hidden; }
.loader-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary)); border-radius: 2px; animation: loaderFill 1.5s ease forwards; }
@keyframes loaderFill { from { width: 0 } to { width: 100% } }
@keyframes loaderPulse { 0%,100% { opacity: 1 } 50% { opacity: 0.6 } }

/* NAVBAR */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(26,16,6,0.92);
  backdrop-filter: blur(20px);
  z-index: 1000;
  padding: 0 5%;
  border-bottom: 1px solid rgba(255,107,53,0.15);
  transition: var(--transition);
}
[data-theme="light"] nav { background: rgba(255,248,240,0.92); }
.nav-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav-logo { font-family: 'Playfair Display', serif; font-size: 1.6rem; color: var(--primary); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.nav-logo span { color: var(--secondary); }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.95rem; position: relative; transition: color 0.2s; }
.nav-links a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: var(--primary); transition: width 0.3s; border-radius: 2px; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.cart-icon { position: relative; color: var(--text); text-decoration: none; font-size: 1.3rem; }
.cart-badge { position: absolute; top: -8px; right: -8px; background: var(--accent); color: white; border-radius: 50%; width: 20px; height: 20px; font-size: 0.65rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.theme-toggle { background: var(--dark-3); border: none; color: var(--text); width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; transition: var(--transition); }
.theme-toggle:hover { background: var(--primary); color: white; }
.hamburger { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; flex-direction: column; gap: 5px; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

/* MOBILE MENU */
.mobile-menu { display: none; position: fixed; top: 72px; left: 0; right: 0; bottom: 0; background: var(--dark); z-index: 999; padding: 40px 5%; flex-direction: column; gap: 24px; transform: translateX(-100%); transition: transform 0.4s cubic-bezier(0.4,0,0.2,1); }
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a { font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--dark-3); padding-bottom: 20px; transition: color 0.2s; }
.mobile-menu a:hover { color: var(--primary); }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; border-radius: 50px; font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 0.95rem; cursor: pointer; border: none; text-decoration: none; transition: var(--transition); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; box-shadow: 0 4px 20px rgba(255,107,53,0.4); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255,107,53,0.5); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-gold { background: linear-gradient(135deg, var(--gold), #B8891A); color: white; }

/* CARDS */
.food-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255,255,255,0.05);
  transition: var(--transition);
  cursor: pointer;
}
.food-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(0,0,0,0.5); border-color: rgba(255,107,53,0.2); }
.food-card img { width: 100%; height: 200px; object-fit: cover; transition: transform 0.5s ease; }
.food-card:hover img { transform: scale(1.05); }
.food-card .card-body { padding: 16px; }
.food-card .card-name { font-family: 'Playfair Display', serif; font-size: 1.1rem; margin-bottom: 6px; }
.food-card .card-price { color: var(--primary); font-weight: 700; font-size: 1.1rem; }
.food-card .card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 50px; font-size: 0.75rem; font-weight: 600; }
.badge-offer { background: rgba(255,61,61,0.15); color: var(--accent); }
.badge-new { background: rgba(76,175,80,0.15); color: var(--success); }

/* SECTIONS */
section { padding: 80px 5%; }
.section-header { text-align: center; margin-bottom: 52px; }
.section-tag { display: inline-block; color: var(--primary); font-size: 0.85rem; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 12px; }
.section-title { font-family: 'Playfair Display', serif; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.2; }
.section-title em { color: var(--primary); font-style: normal; }
.section-sub { color: var(--text-muted); margin-top: 12px; max-width: 500px; margin-left: auto; margin-right: auto; line-height: 1.7; }

/* GRID */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 1280px; margin: 0 auto; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; max-width: 1280px; margin: 0 auto; }
.container { max-width: 1280px; margin: 0 auto; }

/* RATING */
.stars { color: var(--gold); font-size: 0.9rem; }

/* TOAST */
#toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px);
  background: var(--primary); color: white; padding: 12px 28px; border-radius: 50px;
  font-weight: 600; font-size: 0.9rem; z-index: 9998; transition: transform 0.3s ease;
  box-shadow: 0 4px 20px rgba(255,107,53,0.5);
}
#toast.show { transform: translateX(-50%) translateY(0); }

/* SEARCH BAR */
.search-bar { display: flex; align-items: center; gap: 12px; background: var(--card-bg); border: 1px solid var(--dark-3); border-radius: 50px; padding: 8px 8px 8px 20px; max-width: 500px; margin: 0 auto 40px; }
.search-bar input { flex: 1; background: none; border: none; color: var(--text); font-size: 0.95rem; outline: none; font-family: 'DM Sans', sans-serif; }
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar button { background: var(--primary); border: none; color: white; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 1rem; flex-shrink: 0; }

/* FOOTER */
footer { background: var(--dark-2); padding: 60px 5% 30px; border-top: 1px solid rgba(255,107,53,0.1); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; max-width: 1280px; margin: 0 auto 40px; }
.footer-brand p { color: var(--text-muted); margin-top: 12px; line-height: 1.7; font-size: 0.9rem; max-width: 280px; }
.footer-social { display: flex; gap: 12px; margin-top: 20px; }
.footer-social a { width: 40px; height: 40px; border-radius: 50%; background: var(--dark-3); display: flex; align-items: center; justify-content: center; color: var(--text); text-decoration: none; transition: var(--transition); }
.footer-social a:hover { background: var(--primary); }
.footer-col h4 { font-family: 'Playfair Display', serif; font-size: 1rem; margin-bottom: 20px; color: var(--secondary); }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col ul a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.footer-col ul a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--dark-3); padding-top: 24px; text-align: center; color: var(--text-muted); font-size: 0.85rem; max-width: 1280px; margin: 0 auto; }

/* FADE IN */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { display: flex; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  section { padding: 60px 5%; }
}
@media (max-width: 480px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
