:root {
  --primary: #dc2626;
  --primary-dark: #b91c1c;
  --accent: #f97316;
  --bg: #fffbf7;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #fed7aa;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Kanit', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

h1, h2, h3, h4, .brand-badge, .hl-item {
  font-family: 'Prompt', 'Kanit', sans-serif;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: white;
  border-bottom: 2px solid var(--primary);
  padding: 0.8rem 1.5rem;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-badge {
  background: var(--primary);
  color: white;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.brand h1 { font-size: 1.3rem; color: var(--primary-dark); }
.brand p { font-size: 0.75rem; color: var(--muted); }

.cart-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  transition: transform 0.2s;
  font-family: inherit;
}

.cart-trigger:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.cart-badge {
  background: #facc15;
  color: #1c1917;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
}

/* Hero */
.hero-section {
  background: linear-gradient(135deg, #991b1b, #dc2626);
  color: white;
  padding: 3rem 1.5rem;
  text-align: center;
}

.hero-content { max-width: 800px; margin: 0 auto; }
.hero-pill {
  background: rgba(255,255,255,0.2);
  color: #fef08a;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 1rem;
}

.hero-content h2 { font-size: 2.2rem; line-height: 1.3; margin-bottom: 1rem; }
.hero-content p { font-size: 1rem; opacity: 0.9; margin-bottom: 1.8rem; }

.hero-highlights {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hl-item {
  background: white;
  color: var(--primary-dark);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Menu Section */
.menu-container {
  max-width: 1100px;
  margin: 2.5rem auto 4rem;
  padding: 0 1.5rem;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title h2 { font-size: 1.8rem; color: var(--primary-dark); }
.section-title p { color: var(--muted); }

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

.dish-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.dish-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(220,38,38,0.1);
  border-color: var(--primary);
}

.dish-card-top {
  background: #fff7ed;
  text-align: center;
  padding: 2.2rem 1rem;
  position: relative;
}

.dish-emoji-big { font-size: 4rem; }
.price-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--primary);
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
}

.dish-card-body {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.dish-card-body h3 { font-size: 1.2rem; color: var(--primary-dark); margin-bottom: 0.3rem; }
.dish-card-body p { font-size: 0.88rem; color: var(--muted); margin-bottom: 1rem; flex-grow: 1; }

.dish-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #fee2e2;
  padding-top: 0.8rem;
}

.price-display { font-size: 1.4rem; font-weight: 800; color: var(--primary); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #f3f4f6; color: #374151; }
.btn-secondary:hover { background: #e5e7eb; }
.btn-block { width: 100%; margin-top: 12px; }

/* Modals */
.modal { display: none; position: fixed; inset: 0; z-index: 1000; }
.modal.active { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(3px); }
.modal-box {
  position: relative;
  max-width: 500px;
  margin: 30px auto;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 30px rgba(0,0,0,0.25);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1rem 1.4rem;
  background: #fef2f2;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 { font-size: 1.15rem; color: var(--primary-dark); }
.close-btn { background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--muted); }
.modal-body { padding: 1.2rem; overflow-y: auto; }
.modal-footer {
  padding: 1rem 1.4rem;
  background: #fef2f2;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.dish-preview {
  display: flex;
  gap: 12px;
  background: #fff7ed;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.dish-emoji { font-size: 2.5rem; }
.dish-base-price { font-weight: 700; color: var(--primary); }

.custom-group { margin-bottom: 1rem; }
.custom-group label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 0.4rem; }

.options-grid { display: flex; flex-direction: column; gap: 6px; }
.opt-label {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  background: #fff;
  transition: all 0.2s;
}
.opt-label:hover { background: #fff7ed; border-color: var(--accent); }
.opt-label input { margin-right: 8px; }

.qty-control-row { display: flex; justify-content: space-between; align-items: center; }
.qty-btn-wrap { display: flex; align-items: center; gap: 12px; }
.btn-qty { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); background: white; cursor: pointer; font-size: 1.1rem; }

/* Cart */
.cart-items-container { display: flex; flex-direction: column; gap: 8px; }
.cart-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fffbf7;
}

.cart-modal-footer { flex-direction: column; gap: 10px; }
.cart-total-bar { display: flex; justify-content: space-between; font-size: 1.2rem; }
.total-price { color: var(--primary); }
.cart-action-btns { display: flex; justify-content: flex-end; gap: 10px; }

/* Form */
.form-group { margin-bottom: 0.8rem; }
.form-group label { display: block; font-size: 0.85rem; margin-bottom: 0.2rem; font-weight: 600; }
.form-group input, .form-group textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
}

.order-summary-box { background: #fff7ed; padding: 10px; border-radius: 8px; border: 1px dashed var(--border); margin-top: 10px; font-size: 0.85rem; }
.summary-grand-total { text-align: right; margin-top: 6px; font-size: 1.05rem; color: var(--primary); }

.success-icon { font-size: 3.5rem; margin-bottom: 0.5rem; }
.order-id-badge { background: #fef2f2; color: var(--primary-dark); padding: 4px 12px; border-radius: 20px; display: inline-block; margin: 10px 0; font-weight: 700; }
.delivery-time-text { color: var(--muted); margin-bottom: 1rem; }

.app-footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: #18181b;
  color: #a1a1aa;
  font-size: 0.85rem;
}
