/* =========================================================
   KENYA BITES — GOLD & WHITE THEME
   ========================================================= */
:root {
  --gold: #d4af37;
  --gold-dark: #b8860b;
  --gold-light: #f7e7ac;
  --gold-gradient: linear-gradient(135deg, #f7e7ac 0%, #d4af37 50%, #b8860b 100%);
  --white: #ffffff;
  --off-white: #fffdf6;
  --text-dark: #2b2314;
  --text-muted: #7a6f57;
  --shadow: 0 10px 30px rgba(212, 175, 55, 0.25);
  --radius: 18px;
}

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

body {
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  background: var(--off-white);
  color: var(--text-dark);
  overflow-x: hidden;
}

/* ---------------- Scrollbar ---------------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 10px; }

/* ---------------- Top Bar ---------------- */
.topbar {
  background: var(--gold-gradient);
  color: var(--text-dark);
  text-align: center;
  font-size: 0.85rem;
  padding: 6px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ---------------- Navbar ---------------- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 5%;
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 15px rgba(0,0,0,0.06);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-dark);
}
.logo span { color: var(--gold-dark); }
.logo .emoji { font-size: 1.8rem; animation: bounce 2s infinite; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  position: relative;
  cursor: pointer;
  transition: color 0.3s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 3px;
  background: var(--gold);
  transition: width 0.3s;
  border-radius: 3px;
}
.nav-links a:hover { color: var(--gold-dark); }
.nav-links a:hover::after { width: 100%; }

.cart-btn {
  background: var(--gold-gradient);
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
  position: relative;
}
.cart-btn:hover { transform: translateY(-3px) scale(1.03); }
.cart-count {
  background: var(--text-dark);
  color: var(--gold-light);
  border-radius: 50%;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  position: absolute;
  top: -8px; right: -8px;
}

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 5%;
  background:
    radial-gradient(circle at 20% 20%, rgba(212,175,55,0.15), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(212,175,55,0.15), transparent 40%),
    var(--off-white);
  overflow: hidden;
}
.hero::before, .hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: var(--gold-gradient);
  opacity: 0.15;
  filter: blur(10px);
  animation: float 6s ease-in-out infinite;
}
.hero::before { width: 260px; height: 260px; top: -60px; left: -60px; }
.hero::after { width: 200px; height: 200px; bottom: -50px; right: -30px; animation-delay: 2s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-25px) rotate(15deg); }
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.2;
  z-index: 2;
}
.hero h1 .highlight {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  margin-top: 18px;
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  z-index: 2;
}
.hero-buttons {
  margin-top: 30px;
  display: flex;
  gap: 18px;
  justify-content: center;
  z-index: 2;
  flex-wrap: wrap;
}
.btn-primary, .btn-outline {
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s;
  border: 2px solid var(--gold-dark);
}
.btn-primary {
  background: var(--gold-gradient);
  color: var(--text-dark);
  box-shadow: var(--shadow);
}
.btn-primary:hover { transform: translateY(-4px); box-shadow: 0 15px 30px rgba(212,175,55,0.4); }
.btn-outline {
  background: transparent;
  color: var(--gold-dark);
}
.btn-outline:hover { background: var(--gold-light); }

/* ---------------- Category Filter ---------------- */
.categories {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 25px 5%;
  scrollbar-width: thin;
}
.category-chip {
  flex-shrink: 0;
  padding: 10px 22px;
  border-radius: 50px;
  border: 2px solid var(--gold-light);
  background: var(--white);
  color: var(--text-dark);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
}
.category-chip:hover { border-color: var(--gold); transform: translateY(-2px); }
.category-chip.active {
  background: var(--gold-gradient);
  border-color: var(--gold-dark);
  box-shadow: var(--shadow);
}

/* ---------------- Search ---------------- */
.search-wrap {
  padding: 0 5% 10px;
  display: flex;
  justify-content: center;
}
.search-wrap input {
  width: 100%;
  max-width: 500px;
  padding: 14px 22px;
  border-radius: 50px;
  border: 2px solid var(--gold-light);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
}
.search-wrap input:focus { border-color: var(--gold); }

/* ---------------- Menu Grid ---------------- */
.menu-section { padding: 20px 5% 60px; }
.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.section-title span { color: var(--gold-dark); }
.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 35px;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 26px;
}

.food-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  transition: transform 0.35s, box-shadow 0.35s;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid rgba(212,175,55,0.15);
}
.food-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow);
}
.food-img-wrap { position: relative; height: 190px; overflow: hidden; }
.food-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s;
}
.food-card:hover .food-img-wrap img { transform: scale(1.12); }
.food-tag {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--gold-gradient);
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dark);
}
.food-info { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.food-info h3 { font-size: 1.05rem; font-weight: 700; }
.food-price { font-size: 1.2rem; font-weight: 800; color: var(--gold-dark); }
.food-price small { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }

.add-btn {
  margin-top: auto;
  background: var(--text-dark);
  color: var(--gold-light);
  border: none;
  padding: 11px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.add-btn:hover { background: var(--gold-dark); color: var(--text-dark); }
.add-btn:active { transform: scale(0.96); }
.add-btn.added { background: #2e7d32; color: #fff; }

/* ---------------- Cart Drawer ---------------- */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.overlay.show { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0; right: -420px;
  width: 400px; max-width: 92vw;
  height: 100%;
  background: var(--white);
  z-index: 201;
  box-shadow: -10px 0 40px rgba(0,0,0,0.2);
  transition: right 0.4s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { right: 0; }

.cart-header {
  padding: 22px 24px;
  background: var(--gold-gradient);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-header h2 { font-size: 1.3rem; }
.close-btn {
  background: rgba(0,0,0,0.15);
  border: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-dark);
}

.cart-items { flex: 1; overflow-y: auto; padding: 15px 20px; }
.cart-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0e9d0;
  animation: slideIn 0.3s ease;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(20px);} to { opacity: 1; transform: translateX(0);} }
.cart-item img { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-info h4 { font-size: 0.92rem; }
.cart-item-info p { font-size: 0.85rem; color: var(--gold-dark); font-weight: 700; }
.qty-control { display: flex; align-items: center; gap: 8px; }
.qty-control button {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--white);
  cursor: pointer;
  font-weight: 700;
  color: var(--gold-dark);
}
.remove-item { background:none;border:none;color:#c0392b;cursor:pointer;font-size:1rem; }

.empty-cart { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-cart .big-icon { font-size: 3rem; margin-bottom: 10px; }

.cart-footer { padding: 20px 24px; border-top: 2px solid var(--gold-light); background: var(--off-white); }
.cart-total-row { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.15rem; margin-bottom: 16px; }
.checkout-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 12px;
  background: var(--gold-gradient);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.checkout-btn:hover { transform: translateY(-2px); }
.checkout-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ---------------- Modal ---------------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 300;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
  padding: 20px;
}
.modal-overlay.show { opacity: 1; pointer-events: auto; }

.modal-box {
  background: var(--white);
  border-radius: 20px;
  width: 420px; max-width: 100%;
  padding: 30px;
  position: relative;
  transform: scale(0.85);
  transition: transform 0.3s;
  text-align: center;
}
.modal-overlay.show .modal-box { transform: scale(1); }

.modal-box .mpesa-logo {
  width: 70px; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  height: 70px; border-radius: 50%;
  background: var(--gold-gradient);
  font-size: 1.8rem;
}
.modal-box h2 { margin-bottom: 6px; }
.modal-box p.sub { color: var(--text-muted); margin-bottom: 20px; font-size: 0.9rem; }

.modal-box input[type=text], .modal-box input[type=tel] {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--gold-light);
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
}
.modal-box input:focus { border-color: var(--gold); }

.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: #f5f0dc; border: none;
  width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer;
}

.pay-status {
  margin-top: 16px;
  padding: 14px;
  border-radius: 10px;
  font-weight: 600;
  display: none;
}
.pay-status.info { display: block; background: #fff8e1; color: #8a6d00; }
.pay-status.success { display: block; background: #e8f5e9; color: #2e7d32; }
.pay-status.error { display: block; background: #fdecea; color: #c0392b; }

.spinner {
  width: 34px; height: 34px;
  border: 4px solid var(--gold-light);
  border-top-color: var(--gold-dark);
  border-radius: 50%;
  margin: 14px auto;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--text-dark);
  color: var(--gold-light);
  padding: 14px 26px;
  border-radius: 50px;
  font-weight: 600;
  z-index: 400;
  transition: transform 0.4s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------------- Footer ---------------- */
footer {
  background: var(--text-dark);
  color: var(--gold-light);
  text-align: center;
  padding: 40px 5%;
  margin-top: 40px;
}
footer p { opacity: 0.7; margin-top: 8px; font-size: 0.85rem; }

/* ---------------- Responsive ---------------- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero h1 { font-size: 2.2rem; }
  .cart-drawer { width: 100%; }
}
