/* ============================================================
   Yum Express — style.css
   Warm, appetizing light theme
   ============================================================ */
:root {
  --bg: #fff8f0;
  --card: #ffffff;
  --ink: #2d1a0f;
  --muted: #8a7263;
  --accent: #e63946;
  --accent-dark: #c1121f;
  --accent-soft: #fdecec;
  --sun: #f77f00;
  --border: #f0e2d6;
  --shadow: 0 10px 28px rgba(120, 60, 20, 0.1);
  --radius: 18px;
}

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

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

img { vertical-align: middle; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font: inherit; }
.container { width: min(1120px, 92%); margin-inline: auto; }

.btn-primary {
  display: inline-block; padding: 14px 30px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--sun));
  color: #fff; font-weight: 800; box-shadow: 0 8px 22px rgba(230, 57, 70, 0.35);
  transition: transform 0.25s, box-shadow 0.25s;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(230, 57, 70, 0.45); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 248, 240, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.header-inner { display: flex; align-items: center; gap: 18px; }
.logo { font-size: 1.35rem; font-weight: 900; text-decoration: none; color: var(--ink); white-space: nowrap; }
.logo span { color: var(--accent); }

.search-wrap { position: relative; flex: 1; max-width: 430px; }
.search-wrap input {
  width: 100%; padding: 12px 44px 12px 42px; border-radius: 999px;
  border: 1.5px solid var(--border); background: var(--card); color: var(--ink);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.search-wrap input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); opacity: 0.6; }

.cart-btn {
  position: relative; width: 52px; height: 52px; border-radius: 50%;
  background: var(--card); border: 1.5px solid var(--border); font-size: 1.35rem;
  transition: transform 0.2s, border-color 0.2s;
}
.cart-btn:hover { transform: scale(1.08); border-color: var(--accent); }
.cart-badge {
  position: absolute; top: -6px; right: -6px; min-width: 24px; height: 24px;
  padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 0.78rem; font-weight: 800; display: grid; place-items: center;
  animation: pop 0.3s ease;
}
@keyframes pop { from { transform: scale(0.4); } to { transform: scale(1); } }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 48px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
.hero-kicker { font-weight: 800; color: var(--sun); margin-bottom: 10px; }
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); line-height: 1.12; font-weight: 900; }
.hero h1 span { color: var(--accent); }
.hero-sub { color: var(--muted); margin: 18px 0 26px; max-width: 480px; }
.hero-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-note { font-weight: 700; font-size: 0.9rem; color: var(--muted); }

.hero-art { position: relative; height: 300px; }
.plate {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 9rem; filter: drop-shadow(0 20px 30px rgba(120, 60, 20, 0.25));
  animation: spin 40s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.float {
  position: absolute; font-size: 2.6rem;
  animation: bob 4s ease-in-out infinite;
  filter: drop-shadow(0 8px 12px rgba(120, 60, 20, 0.2));
}
.f1 { top: 6%; left: 8%; animation-delay: 0s; }
.f2 { top: 0; right: 12%; animation-delay: -1s; }
.f3 { bottom: 12%; left: 2%; animation-delay: -2s; }
.f4 { bottom: 4%; right: 4%; animation-delay: -1.4s; }
.f5 { top: 38%; right: 0; animation-delay: -2.6s; font-size: 2rem; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }

/* ---------- Menu ---------- */
.menu-section { padding: 40px 0 80px; }
.menu-title { font-size: 2rem; font-weight: 900; text-align: center; margin-bottom: 26px; }

.cat-bar {
  display: flex; gap: 10px; overflow-x: auto; padding: 6px 4px 14px;
  scrollbar-width: thin;
}
.cat-chip {
  flex-shrink: 0; padding: 10px 22px; border-radius: 999px;
  background: var(--card); border: 1.5px solid var(--border);
  font-weight: 700; font-size: 0.92rem; color: var(--muted); transition: 0.25s;
}
.cat-chip:hover { border-color: var(--accent); color: var(--ink); }
.cat-chip.active {
  background: linear-gradient(135deg, var(--accent), var(--sun));
  color: #fff; border-color: transparent;
}

.menu-controls { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 20px; }
.count { color: var(--muted); font-size: 0.9rem; font-weight: 600; }
.sort-wrap { font-size: 0.9rem; font-weight: 700; color: var(--muted); }
.sort-wrap select {
  margin-left: 8px; padding: 8px 12px; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--card); color: var(--ink); font-weight: 600;
}

.menu-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}
.empty { text-align: center; color: var(--muted); font-weight: 600; padding: 40px 0; }

/* ---------- Food card ---------- */
.food-card {
  background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform 0.28s, border-color 0.28s;
  display: flex; flex-direction: column;
  animation: rise 0.4s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.food-card:hover { transform: translateY(-6px); border-color: var(--accent); }

.food-visual {
  position: relative; height: 130px; display: grid; place-items: center;
  font-size: 4rem; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.15));
}
.cat-burgers  { background: linear-gradient(135deg, #ffe8c8, #ffd3a3); }
.cat-pizza    { background: linear-gradient(135deg, #ffddb3, #ffbd80); }
.cat-ethiopian{ background: linear-gradient(135deg, #d8f3dc, #b7e4c7); }
.cat-drinks   { background: linear-gradient(135deg, #dbecff, #b8d8ff); }
.cat-desserts { background: linear-gradient(135deg, #ffdff0, #ffc2e2); }

.food-tag {
  position: absolute; top: 10px; left: 10px;
  font-size: 0.72rem; font-weight: 800; color: #fff;
  background: rgba(0, 0, 0, 0.55); padding: 4px 12px; border-radius: 999px;
  backdrop-filter: blur(4px);
}

.food-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.food-body h3 { font-size: 1.08rem; font-weight: 800; }
.food-body .desc { color: var(--muted); font-size: 0.86rem; flex: 1; }
.food-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.rating { font-weight: 800; font-size: 0.88rem; color: var(--sun); }
.price { font-weight: 900; font-size: 1.05rem; color: var(--accent); }

.food-actions { margin-top: 12px; }
.add-btn {
  width: 100%; padding: 11px; border-radius: 12px; font-weight: 800;
  background: var(--accent-soft); color: var(--accent-dark); transition: 0.2s;
}
.add-btn:hover { background: var(--accent); color: #fff; }

.stepper {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, var(--accent), var(--sun));
  border-radius: 12px; padding: 5px;
}
.stepper button {
  width: 34px; height: 34px; border-radius: 9px; color: #fff;
  font-size: 1.1rem; font-weight: 900; background: rgba(255, 255, 255, 0.22);
  transition: background 0.2s;
}
.stepper button:hover { background: rgba(255, 255, 255, 0.38); }
.stepper .qty { color: #fff; font-weight: 900; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 24px 0; background: var(--card); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer p { color: var(--muted); font-size: 0.88rem; }

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

.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 90;
  width: min(420px, 94vw);
  background: var(--card); box-shadow: -12px 0 40px rgba(45, 26, 15, 0.25);
  transform: translateX(105%); transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex; flex-direction: column; padding: 22px;
}
.cart-drawer.open { transform: none; }

.cart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.cart-head h2 { font-size: 1.25rem; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; font-size: 1rem;
  background: var(--bg); border: 1.5px solid var(--border);
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

.promo-row { display: flex; gap: 8px; margin-bottom: 14px; }
.promo-row input {
  flex: 1; padding: 11px 14px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--bg);
}
.promo-row input:focus { outline: none; border-color: var(--accent); }
.promo-row button {
  padding: 11px 18px; border-radius: 12px; font-weight: 800;
  background: var(--ink); color: #fff;
}
.promo-row button:hover { background: #4a2c17; }

.cart-items { flex: 1; overflow-y: auto; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.cart-item {
  display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center;
  padding: 10px; border: 1.5px solid var(--border); border-radius: 14px;
}
.cart-item .ci-emoji {
  width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center; font-size: 1.7rem;
}
.ci-info h4 { font-size: 0.95rem; }
.ci-info .ci-price { color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.ci-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ci-qty { display: flex; align-items: center; gap: 8px; }
.ci-qty button {
  width: 26px; height: 26px; border-radius: 8px; background: var(--bg);
  border: 1.5px solid var(--border); font-weight: 900;
}
.ci-qty button:hover { border-color: var(--accent); color: var(--accent); }
.ci-qty .qty { font-weight: 900; min-width: 1.4ch; text-align: center; }
.ci-total { font-weight: 900; color: var(--accent); font-size: 0.92rem; }
.ci-remove { font-size: 0.72rem; color: var(--muted); text-decoration: underline; }
.ci-remove:hover { color: var(--accent); }

.cart-empty { text-align: center; color: var(--muted); font-weight: 600; padding: 50px 10px; }

.cart-summary { border-top: 1.5px dashed var(--border); margin-top: 14px; padding-top: 14px; }
.sum-row { display: flex; justify-content: space-between; font-weight: 600; color: var(--muted); padding: 3px 0; font-size: 0.95rem; }
.sum-row.discount { color: #2a9d8f; font-weight: 800; }
.sum-row.total { font-size: 1.15rem; font-weight: 900; color: var(--ink); border-top: 1.5px solid var(--border); margin-top: 8px; padding-top: 10px; }

#checkoutBtn { margin-top: 16px; }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 18px;
  background: rgba(45, 26, 15, 0.55);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal.show { opacity: 1; pointer-events: auto; }
.modal-card {
  width: min(520px, 100%); max-height: 92vh; overflow-y: auto;
  background: var(--card); border-radius: 22px; padding: 26px;
  transform: scale(0.92); transition: transform 0.3s;
  box-shadow: 0 30px 80px rgba(45, 26, 15, 0.4);
}
.modal.show .modal-card { transform: none; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-head h2 { font-size: 1.3rem; }

.field { margin-bottom: 14px; display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 0.85rem; font-weight: 800; color: var(--muted); }
.field input {
  padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--border);
  background: var(--bg); color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field input.invalid { border-color: var(--accent); }
.error { color: var(--accent); font-size: 0.78rem; min-height: 1em; font-weight: 700; }

.pay-methods { border: none; margin-bottom: 14px; }
.pay-methods legend { font-size: 0.85rem; font-weight: 800; color: var(--muted); margin-bottom: 8px; }
.pay-methods { display: flex; gap: 10px; flex-wrap: wrap; }
.pay { cursor: pointer; }
.pay input { position: absolute; opacity: 0; }
.pay span {
  display: inline-block; padding: 10px 16px; border-radius: 12px;
  border: 1.5px solid var(--border); font-weight: 700; font-size: 0.9rem; transition: 0.2s;
}
.pay input:checked + span {
  border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark);
}

.order-total-line {
  text-align: center; font-weight: 900; font-size: 1.05rem; margin-bottom: 14px;
}

/* ---------- Success ---------- */
.success { text-align: center; padding: 26px 6px; }
.success-icon { font-size: 4.5rem; animation: pop 0.5s ease; }
.success h2 { margin: 10px 0 4px; }
.order-id {
  display: inline-block; background: var(--bg); border: 1.5px dashed var(--border);
  padding: 8px 20px; border-radius: 999px; font-weight: 800; margin: 10px 0; color: var(--accent-dark);
}
.success-text { color: var(--muted); margin-bottom: 8px; }
.success-eta { font-weight: 700; margin-bottom: 22px; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 80px);
  background: var(--ink); color: #fff; padding: 13px 26px; border-radius: 999px;
  font-weight: 700; opacity: 0; transition: 0.35s; z-index: 200; max-width: 90vw;
  box-shadow: 0 12px 30px rgba(45, 26, 15, 0.4);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { height: 200px; order: -1; }
  .plate { font-size: 6rem; }
  .search-wrap { order: 3; max-width: none; }
  .header-inner { flex-wrap: wrap; }
  .menu-controls { flex-direction: column; gap: 10px; align-items: flex-start; }
}
