:root {
  --accent: #F5C227;
  --accent-dark: #d4a41f;
  --bg: #1e1e1e;
  --surface: #252525;
  --surface2: #2d2d2d;
  --border: #333;
  --text: #f0f0f0;
  --muted: #888;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Splash screen ── */
#splash-screen {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .65s ease;
}
#splash-screen.fade-out { opacity: 0; pointer-events: none; }
#splash-logo {
  width: 200px; max-width: 55vw;
  animation: splashAppear .9s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes splashAppear {
  0%   { opacity:0; transform:scale(.82); }
  65%  { opacity:1; transform:scale(1.04); }
  100% { opacity:1; transform:scale(1); }
}

/* ── Suspended overlay ── */
#suspended-overlay {
  position: fixed; inset: 0;
  background: #111;
  z-index: 8888;
  display: none;
  align-items: center; justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 24px;
}
#suspended-overlay.active { display: flex; }
#suspended-overlay img { width: 80px; margin-bottom: 20px; border-radius: 12px; }
#suspended-overlay h2 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
#suspended-overlay p { font-size: 14px; color: var(--muted); }

/* ── Nav ── */
.navbar {
  background: rgba(18,18,18,.97);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  max-width: 700px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px; height: 56px;
}

.nav-logo { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; }
.nav-title { font-weight: 900; font-size: 16px; flex: 1; }
.nav-title.bebas { font-family: 'Bebas Neue', sans-serif; font-size: 22px; letter-spacing: 1px; }

.nav-tabs {
  display: flex; gap: 4px; overflow-x: auto;
  scrollbar-width: none;
}
.nav-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 6px 14px; border-radius: 20px;
  border: none; background: transparent;
  color: var(--muted); font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: all .15s; white-space: nowrap;
}
.tab-btn.active { background: var(--accent); color: #111; }

.cart-btn {
  position: relative;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 6px 14px;
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--text);
  cursor: pointer; border: none; font-family: inherit;
  transition: background .15s;
}
.cart-btn:hover { background: var(--surface2); }
.cart-count {
  background: var(--accent); color: #111;
  border-radius: 10px; padding: 1px 7px;
  font-size: 12px; font-weight: 800;
  display: none;
}
.cart-count.visible { display: inline; }

/* ── Closed banner ── */
.closed-banner {
  background: rgba(239,68,68,.12);
  border-bottom: 1px solid rgba(239,68,68,.25);
  padding: 10px 16px;
  text-align: center;
  font-size: 13px;
  color: #f87171;
  font-weight: 600;
}

/* ── Marquee ── */
.marquee-wrapper {
  background: var(--accent); overflow: hidden;
  white-space: nowrap; padding: 7px 0;
}
.marquee-track {
  display: inline-block;
  animation: marquee 30s linear infinite;
}
.marquee-track span {
  font-size: 12px; font-weight: 800; color: #111;
  text-transform: uppercase; letter-spacing: 2px;
  padding: 0 32px;
}
@keyframes marquee { from { transform:translateX(0); } to { transform:translateX(-50%); } }

/* ── Screens ── */
.screen { display: none; max-width: 700px; margin: 0 auto; padding: 16px; }
.screen.active { display: block; animation: screenIn .25s ease; }
@keyframes screenIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }

/* ── Section title ── */
.section-title {
  font-size: 18px; font-weight: 900;
  margin-bottom: 14px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

/* ── Product grid ── */
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
}
.product-card:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(245,194,39,.1); }
.product-card.out-of-stock { opacity: .5; pointer-events: none; }

.p-img {
  width: 100%; aspect-ratio: 4/3;
  object-fit: cover; background: var(--surface2);
  transition: transform .35s ease;
}
.product-card:hover .p-img { transform: scale(1.06); }

.p-body { padding: 10px; }
.p-name { font-size: 13px; font-weight: 700; margin-bottom: 3px; line-height: 1.3; }
.p-desc { font-size: 11px; color: var(--muted); margin-bottom: 8px; line-height: 1.4; }
.p-footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.p-price { font-size: 15px; font-weight: 900; color: var(--accent); }

.add-btn {
  background: var(--accent); color: #111;
  border: none; border-radius: 8px;
  padding: 6px 12px; font-size: 13px; font-weight: 800;
  cursor: pointer; font-family: inherit;
  transition: background .15s;
  position: relative; overflow: hidden;
}
.add-btn:hover { background: var(--accent-dark); }
.add-btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  transform: translateX(-100%);
  transition: transform .4s;
}
.add-btn:hover::after { transform: translateX(100%); }

/* ── Promos ── */
.promo-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.promo-card {
  background: linear-gradient(135deg, #2d2600, var(--surface));
  border: 1px solid rgba(245,194,39,.25);
  border-radius: 14px; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.promo-name { font-size: 14px; font-weight: 800; }
.promo-desc { font-size: 12px; color: var(--muted); margin-top: 3px; }
.promo-badge { background: var(--accent); color: #111; border-radius: 8px; padding: 4px 10px; font-size: 13px; font-weight: 900; white-space: nowrap; }

/* ── Cart screen ── */
.cart-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px; margin-bottom: 8px;
}
.cart-item-img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; background: var(--surface2); flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 14px; font-weight: 700; }
.cart-item-price { font-size: 13px; color: var(--accent); font-weight: 700; margin-top: 2px; }
.cart-qty { display: flex; align-items: center; gap: 8px; }
.qty-btn {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); font-size: 16px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
}
.cart-total-row {
  display: flex; justify-content: space-between;
  padding: 14px 0; border-top: 1px solid var(--border);
  font-size: 16px; font-weight: 900; margin-top: 8px;
}
.cart-total-row .total-val { color: var(--accent); }

/* ── Checkout form ── */
.checkout-section { margin-bottom: 20px; }
.checkout-section-title { font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 13px; color: var(--text);
  font-size: 14px; font-family: inherit; transition: border-color .15s;
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--accent); }
.form-group select option { background: var(--surface2); }

/* WhatsApp checkout button (Starter plan) */
.wa-order-btn {
  width: 100%; padding: 16px;
  background: #25D366; color: #fff;
  border: none; border-radius: 14px;
  font-size: 16px; font-weight: 800; cursor: pointer;
  font-family: inherit; display: flex; align-items: center;
  justify-content: center; gap: 10px;
  transition: background .15s;
}
.wa-order-btn:hover { background: #1fba58; }

/* MP checkout button */
.checkout-btn {
  width: 100%; padding: 16px;
  background: var(--accent); color: #111;
  border: none; border-radius: 14px;
  font-size: 16px; font-weight: 800; cursor: pointer;
  font-family: inherit; transition: background .15s;
  position: relative;
}
.checkout-btn:hover { background: var(--accent-dark); }
.checkout-btn.loading { color: transparent; pointer-events: none; }
.checkout-btn.loading::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 22px; height: 22px;
  border: 3px solid #111;
  border-top-color: transparent;
  border-radius: 50%;
  transform: translate(-50%,-50%);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg); } }

/* ── Status screen ── */
.status-progress {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin: 24px 0;
  flex-wrap: wrap;
}
.status-step {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; flex: 1; min-width: 60px;
}
.status-step .dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--border); border: 2px solid var(--border);
  transition: all .4s;
}
.status-step.done .dot { background: var(--accent); border-color: var(--accent); }
.status-step .label { font-size: 11px; color: var(--muted); text-align: center; }
.status-step.done .label { color: var(--accent); }
.status-line { flex: 1; height: 2px; background: var(--border); min-width: 20px; transition: background .4s; }
.status-line.done { background: var(--accent); }

/* ── Custom burger builder ── */
.ingredient-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ing-chip {
  padding: 9px 12px; border-radius: 10px;
  background: var(--surface); border: 1.5px solid var(--border);
  color: var(--muted); font-size: 13px; font-weight: 600;
  cursor: pointer; text-align: center;
  transition: all .15s; font-family: inherit;
}
.ing-chip.selected { background: rgba(245,194,39,.12); border-color: var(--accent); color: var(--accent); }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 20px;
  font-size: 14px; font-weight: 600; color: var(--text);
  opacity: 0; transition: all .3s; z-index: 500;
  white-space: nowrap; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Mobile optimizations ── */
@media (max-width: 500px) {
  .screen { padding: 12px; }
  .product-grid { gap: 8px; }
  .p-name { font-size: 12px; }
  .p-price { font-size: 14px; }
  .add-btn { padding: 5px 10px; font-size: 12px; }
  .section-title { font-size: 16px; }
}

@media (min-width: 501px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}
