/* ============================================================
   QuickBite – Main Stylesheet
   Font: Syne (headings) + DM Sans (body)
   ============================================================ */

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

body {
  font-family: 'DM Sans', sans-serif;
  background: #fafafa;
  color: #222;
  line-height: 1.6;
}

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 2px solid #f0f0f0;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 64px;
}
.nav-brand {
  font-family: 'Syne', sans-serif; font-size: 1.5rem; font-weight: 800;
  color: #e53935; text-decoration: none; letter-spacing: -1px;
}
.nav-brand span { color: #ff7043; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  padding: 8px 14px; border-radius: 8px; font-weight: 500;
  color: #555; text-decoration: none; transition: .2s;
}
.nav-links a:hover, .nav-links a.active { background: #fff3e0; color: #e53935; }
.btn-logout {
  padding: 8px 16px; background: #ffebee; color: #e53935;
  border: none; border-radius: 8px; font-family: 'DM Sans', sans-serif;
  font-weight: 600; cursor: pointer; transition: .2s;
}
.btn-logout:hover { background: #e53935; color: #fff; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #e53935 0%, #ff7043 60%, #ffb300 100%);
  padding: 80px 20px;
  text-align: center;
  color: #fff;
}
.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800; letter-spacing: -2px;
  margin-bottom: 12px;
}
.hero h1 span { opacity: .85; }
.hero p { font-size: 1.15rem; opacity: .9; margin-bottom: 32px; }
.search-form { display: flex; gap: 0; max-width: 560px; margin: 0 auto; }
.search-input {
  flex: 1; padding: 16px 20px;
  border: none; border-radius: 14px 0 0 14px;
  font-family: 'DM Sans', sans-serif; font-size: 1rem;
  outline: none;
}
.search-btn {
  padding: 16px 28px;
  background: #222; color: #fff; border: none;
  border-radius: 0 14px 14px 0;
  font-family: 'DM Sans', sans-serif; font-weight: 700;
  cursor: pointer; transition: .2s;
}
.search-btn:hover { background: #000; }

/* ── Container ────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; }

/* ── Section header ───────────────────────────────────────── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.section-header h2 {
  font-family: 'Syne', sans-serif; font-size: 1.6rem; font-weight: 800;
}
.clear-search {
  color: #e53935; font-weight: 600; text-decoration: none;
  font-size: .9rem;
}

/* ── Restaurant Grid ──────────────────────────────────────── */
.restaurant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.restaurant-card {
  background: #fff; border-radius: 18px;
  overflow: hidden; text-decoration: none; color: inherit;
  box-shadow: 0 4px 20px rgba(0,0,0,.07);
  transition: transform .2s, box-shadow .2s;
}
.restaurant-card:hover { transform: translateY(-4px); box-shadow: 0 12px 36px rgba(0,0,0,.13); }
.card-img-wrap { position: relative; height: 180px; overflow: hidden; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.restaurant-card:hover .card-img-wrap img { transform: scale(1.06); }
.cuisine-tag {
  position: absolute; top: 12px; left: 12px;
  background: rgba(0,0,0,.6); color: #fff;
  padding: 4px 10px; border-radius: 20px; font-size: .78rem; font-weight: 600;
  backdrop-filter: blur(4px);
}
.card-body { padding: 18px 20px; }
.card-body h3 { font-family: 'Syne', sans-serif; font-size: 1.1rem; margin-bottom: 4px; }
.card-desc { color: #888; font-size: .88rem; margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; align-items: center; gap: 4px; font-size: .85rem; color: #666; flex-wrap: wrap; }
.card-meta .dot { color: #ddd; }
.rating { color: #ff8f00; font-weight: 600; }

/* ── Restaurant Hero ──────────────────────────────────────── */
.rest-hero { position: relative; height: 320px; }
.rest-hero-img {
  width: 100%; height: 100%;
  background-size: cover; background-position: center;
  filter: brightness(.45);
}
.rest-hero-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 40px 0;
  color: #fff;
}
.rest-hero-overlay h1 {
  font-family: 'Syne', sans-serif; font-size: 2.4rem;
  font-weight: 800; margin-bottom: 6px;
}
.rest-hero-overlay p { opacity: .85; max-width: 600px; margin-bottom: 12px; }
.rest-meta { display: flex; gap: 20px; font-size: .92rem; opacity: .9; flex-wrap: wrap; }
.back-link { color: rgba(255,255,255,.7); text-decoration: none; font-size: .9rem; margin-bottom: 12px; display: block; }
.back-link:hover { color: #fff; }

/* ── Menu Layout ──────────────────────────────────────────── */
.menu-layout {
  display: grid; grid-template-columns: 1fr 320px;
  gap: 32px; padding: 40px 20px; align-items: start;
}
@media (max-width: 860px) { .menu-layout { grid-template-columns: 1fr; } }
.menu-section h2 { font-family: 'Syne', sans-serif; font-size: 1.5rem; margin-bottom: 20px; }
.menu-grid { display: flex; flex-direction: column; gap: 16px; }
.menu-card {
  background: #fff; border-radius: 16px;
  display: flex; gap: 16px;
  padding: 16px; box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: box-shadow .2s;
}
.menu-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.11); }
.menu-img-wrap { width: 90px; height: 90px; border-radius: 12px; overflow: hidden; flex-shrink: 0; }
.menu-info { flex: 1; }
.menu-name-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.menu-name-row h4 { font-size: 1rem; font-weight: 700; }
.menu-desc { color: #888; font-size: .83rem; margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.menu-footer { display: flex; align-items: center; justify-content: space-between; }
.menu-price { font-weight: 700; color: #e53935; font-size: 1rem; }
.add-btn {
  padding: 7px 16px; background: #e53935; color: #fff;
  border: none; border-radius: 8px; font-weight: 700; font-size: .88rem;
  cursor: pointer; transition: .2s; display: inline-flex;
}
.add-btn:hover { background: #c62828; }
.qty-controls { display: flex; align-items: center; gap: 8px; }
.qty-btn {
  width: 30px; height: 30px; border-radius: 8px;
  background: #fff3e0; border: none; font-size: 1rem; font-weight: 700;
  cursor: pointer; color: #e53935; transition: .15s;
}
.qty-btn:hover { background: #e53935; color: #fff; }
.qty-val { font-weight: 700; font-size: 1rem; min-width: 20px; text-align: center; }

/* ── Cart Sidebar ─────────────────────────────────────────── */
.cart-sidebar {
  background: #fff; border-radius: 18px;
  padding: 24px; box-shadow: 0 4px 24px rgba(0,0,0,.09);
  position: sticky; top: 80px;
}
.cart-sidebar h2 { font-family: 'Syne', sans-serif; font-size: 1.3rem; margin-bottom: 18px; }
.cart-empty { color: #bbb; text-align: center; padding: 24px 0; font-size: .92rem; }
.cart-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid #f5f5f5;
}
.cart-row-info { display: flex; flex-direction: column; }
.cart-item-name { font-weight: 600; font-size: .9rem; }
.cart-item-qty { color: #aaa; font-size: .8rem; }
.cart-item-price { font-weight: 700; color: #e53935; }
.cart-total-row {
  display: flex; justify-content: space-between;
  padding: 14px 0 0; font-size: 1.05rem;
}
.btn-checkout {
  width: 100%; margin-top: 16px; padding: 14px;
  background: linear-gradient(135deg,#e53935,#ff7043);
  color: #fff; border: none; border-radius: 12px;
  font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 1rem;
  cursor: pointer; transition: .2s;
}
.btn-checkout:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(229,57,53,.3); }

/* ── Checkout ─────────────────────────────────────────────── */
.checkout-layout {
  display: grid; grid-template-columns: 1fr 360px; gap: 32px;
}
@media (max-width:860px) { .checkout-layout { grid-template-columns:1fr; } }
.checkout-form-card, .checkout-summary-card {
  background: #fff; border-radius: 18px; padding: 28px;
  box-shadow: 0 4px 20px rgba(0,0,0,.07);
}
.checkout-form-card h3, .checkout-summary-card h3 {
  font-family: 'Syne', sans-serif; font-size: 1.2rem; margin-bottom: 20px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-weight: 600; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .5px; color: #555; margin-bottom: 6px;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 14px; border: 2px solid #eee;
  border-radius: 10px; font-family: 'DM Sans', sans-serif; font-size: .95rem;
  outline: none; transition: .2s; resize: none;
}
.form-group input:focus, .form-group textarea:focus { border-color: #e53935; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.payment-options { display: flex; gap: 12px; }
.pay-opt {
  flex: 1; border: 2px solid #eee; border-radius: 10px;
  padding: 12px; cursor: pointer; transition: .2s;
  display: flex; align-items: center; gap: 8px; font-weight: 500;
}
.pay-opt:has(input:checked) { border-color: #e53935; background: #fff5f5; }
.pay-opt input { width: auto; }
.summary-row {
  display: flex; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid #f5f5f5; font-size: .92rem;
}
.summary-row small { color: #aaa; }
.summary-total-row {
  display: flex; justify-content: space-between;
  padding: 8px 0; font-size: .95rem; color: #555;
}
.grand-total { font-size: 1.1rem; color: #222; padding-top: 12px; }
.btn-place-order {
  width: 100%; margin-top: 20px; padding: 15px;
  background: linear-gradient(135deg,#e53935,#ff7043);
  color: #fff; border: none; border-radius: 12px;
  font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 1rem;
  cursor: pointer; transition: .2s;
}
.btn-place-order:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(229,57,53,.3); }
.btn-place-order:disabled { opacity: .6; cursor: not-allowed; }

/* ── Modal ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.modal-box {
  background: #fff; border-radius: 24px; padding: 48px 40px;
  text-align: center; max-width: 400px; width: 90%;
  box-shadow: 0 24px 60px rgba(0,0,0,.2);
  animation: pop .3s ease;
}
@keyframes pop { from { transform: scale(.8); opacity:0; } to { transform: scale(1); opacity:1; } }
.modal-box h2 { font-family: 'Syne', sans-serif; font-size: 1.8rem; margin: 12px 0 8px; }

/* ── Orders List ──────────────────────────────────────────── */
.orders-list { display: flex; flex-direction: column; gap: 16px; }
.order-card {
  background: #fff; border-radius: 16px; padding: 20px 24px;
  box-shadow: 0 2px 14px rgba(0,0,0,.07);
}
.order-card-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
}
.order-id { font-weight: 800; font-size: 1rem; color: #e53935; margin-right: 10px; }
.order-restaurant { font-weight: 600; }
.order-status-badge {
  padding: 5px 12px; border-radius: 20px; font-size: .82rem; font-weight: 700;
}
.order-items-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.order-item-tag {
  background: #f5f5f5; border-radius: 20px; padding: 4px 10px; font-size: .82rem; color: #555;
}
.order-card-footer { display: flex; justify-content: space-between; align-items: center; }
.order-date { color: #aaa; font-size: .85rem; }
.order-total { font-weight: 800; font-size: 1.05rem; color: #e53935; }

/* ── Profile ──────────────────────────────────────────────── */
.profile-card {
  background: #fff; border-radius: 20px; padding: 36px;
  box-shadow: 0 4px 20px rgba(0,0,0,.08); text-align: center;
}
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg,#e53935,#ff7043);
  color: #fff; font-family: 'Syne', sans-serif; font-size: 2rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 12px;
}
.profile-email { color: #888; font-size: .92rem; margin-bottom: 8px; }
.profile-role-badge {
  background: #fff3e0; color: #ff6f00; padding: 4px 12px; border-radius: 20px;
  font-size: .8rem; font-weight: 700; display: inline-block; margin-bottom: 28px;
}
.profile-form { text-align: left; }
.btn-primary {
  padding: 13px 24px; background: linear-gradient(135deg,#e53935,#ff7043);
  color: #fff; border: none; border-radius: 10px;
  font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: .95rem;
  cursor: pointer; transition: .2s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(229,57,53,.3); }

/* ── Empty State ──────────────────────────────────────────── */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-icon { font-size: 4rem; margin-bottom: 16px; }
.empty-state h3 { font-family: 'Syne', sans-serif; font-size: 1.4rem; margin-bottom: 8px; }
.empty-state p { color: #888; margin-bottom: 24px; }
.btn-red {
  display: inline-block; padding: 12px 28px;
  background: #e53935; color: #fff; border-radius: 10px;
  text-decoration: none; font-weight: 700; transition: .2s;
}
.btn-red:hover { background: #c62828; }

/* ── Loading ──────────────────────────────────────────────── */
.loading-spinner { text-align: center; padding: 60px; color: #aaa; font-size: 1rem; }

/* ── Footer ───────────────────────────────────────────────── */
.footer { text-align: center; padding: 32px; color: #bbb; font-size: .85rem; margin-top: 40px; }
