/* =============================================
   KARIBU GRILL — Customer Menu Styles
   Warm Kenyan aesthetic: earthy terracotta,
   savanna greens, rich charcoal, warm cream
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,800;1,700&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --terracotta:    #c0392b;
  --terra-dark:    #96281b;
  --terra-light:   #e8725a;
  --gold:          #d4a843;
  --gold-dark:     #b8903a;
  --savanna:       #5a7a3a;
  --charcoal:      #1e1a16;
  --brown:         #6b4c3b;
  --cream:         #faf5ed;
  --cream-dark:    #f0e8d8;
  --text:          #1e1a16;
  --muted:         #8a7060;
  --border:        #ddd0c0;
  --white:         #ffffff;

  /* These are overridden by config.js but kept as fallbacks */
  --red:           #c0392b;
  --red-dark:      #96281b;
  --red-light:     #e8725a;

  --shadow-warm: 0 4px 24px rgba(96,50,30,0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 15% 0%, rgba(192,57,43,0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 100%, rgba(90,122,58,0.06) 0%, transparent 55%);
}

/* ---- HEADER ---- */
.site-header {
  background: var(--charcoal);
  color: var(--cream);
  text-align: center;
  padding: 48px 24px 40px;
  position: relative;
  overflow: hidden;
}

/* Subtle woven/kanga-inspired diagonal texture */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      60deg,
      transparent,
      transparent 28px,
      rgba(212,168,67,0.04) 28px,
      rgba(212,168,67,0.04) 29px
    ),
    repeating-linear-gradient(
      -60deg,
      transparent,
      transparent 28px,
      rgba(192,57,43,0.04) 28px,
      rgba(192,57,43,0.04) 29px
    );
  pointer-events: none;
}

/* Terracotta accent bar at very top */
.site-header::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--terracotta), var(--gold), var(--savanna));
}

.header-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  position: relative;
}

.header-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 9vw, 4.8rem);
  font-weight: 800;
  line-height: 1;
  color: var(--cream);
  position: relative;
  letter-spacing: -1px;
}

.header-name em {
  font-style: italic;
  color: var(--gold);
}

.header-tagline {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(250,245,237,0.5);
  margin-top: 12px;
  position: relative;
}

.header-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px auto 0;
  width: 160px;
  position: relative;
}

.header-divider::before,
.header-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gold);
  opacity: 0.45;
}

/* Small diamond motif between the lines */
.header-divider-inner {
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
  opacity: 0.7;
  flex-shrink: 0;
}

.table-chip {
  display: inline-block;
  margin-top: 20px;
  background: rgba(212,168,67,0.14);
  border: 1px solid rgba(212,168,67,0.4);
  color: var(--gold);
  border-radius: 20px;
  padding: 5px 20px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  position: relative;
}

/* ---- CATEGORY NAV ---- */
.cat-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  border-bottom: 2px solid var(--cream-dark);
  padding: 0 16px;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.cat-nav::-webkit-scrollbar { display: none; }

.cat-nav-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 14px 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.cat-nav-btn:hover { color: var(--text); }

.cat-nav-btn.active {
  color: var(--terracotta);
  border-bottom-color: var(--terracotta);
  font-weight: 600;
}

/* ---- CONTAINER ---- */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px 130px;
}

/* ---- CATEGORY SECTION ---- */
.menu-section {
  padding-top: 44px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.section-emoji {
  font-size: 1.5rem;
  line-height: 1;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--charcoal);
  letter-spacing: -0.3px;
}

.section-rule {
  height: 2px;
  background: linear-gradient(to right, var(--terracotta), var(--gold), transparent);
  opacity: 0.35;
  margin-bottom: 20px;
  border-radius: 1px;
}

/* ---- MENU ITEM ---- */
.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.menu-item:last-child { border-bottom: none; }

.item-body { flex: 1; }

.item-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 4px;
  line-height: 1.25;
}

.item-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.55;
  font-weight: 400;
  margin-bottom: 6px;
}

.badges { display: flex; flex-wrap: wrap; gap: 5px; }

.badge {
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 3px;
  padding: 2px 7px;
}

.badge-veg     { background: #edf7ed; color: #2d6a2d; border: 1px solid #c3e6c3; }
.badge-spicy   { background: #fff3e0; color: #b84c00; border: 1px solid #ffd49e; }
.badge-popular { background: #fdf3e3; color: #9c6900; border: 1px solid #f5d99a; }
.badge-new     { background: #e8f0fe; color: #1a56c4; border: 1px solid #bdd0fc; }

.item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.item-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--terracotta);
}

/* Price prefix "KSh" */
.item-price::before {
  content: 'KSh ';
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.7;
  vertical-align: middle;
}

.add-btn {
  background: var(--terracotta);
  color: var(--cream);
  border: none;
  border-radius: 10px;
  width: 38px;
  height: 38px;
  font-size: 1.5rem;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  padding-bottom: 1px;
}

.add-btn:hover  { background: var(--terra-dark); }
.add-btn:active { transform: scale(0.92); }
.add-btn.added  { background: var(--savanna); }

/* ---- ALLERGEN ---- */
.allergen {
  margin: 32px 0 0;
  padding: 14px 18px;
  background: rgba(107,76,59,0.06);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ---- FLOATING ACTION BAR ---- */
.fab-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 200;
  width: calc(100% - 32px);
  max-width: 480px;
}

.cart-fab {
  flex: 1;
  background: var(--charcoal);
  color: var(--cream);
  border: none;
  border-radius: 16px;
  padding: 16px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(30,26,22,0.38);
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s, background 0.2s;
}

.cart-fab:hover  { background: var(--terracotta); transform: translateY(-2px); }
.cart-fab:active { transform: scale(0.97); }

.cart-fab-count {
  background: var(--gold);
  color: var(--charcoal);
  border-radius: 12px;
  padding: 2px 10px;
  font-size: 0.85rem;
  font-weight: 700;
}

.waiter-fab {
  flex: 1;
  background: var(--gold);
  color: var(--charcoal);
  border: none;
  border-radius: 16px;
  padding: 16px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(212,168,67,0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s, background 0.2s;
}

.waiter-fab:hover  { background: var(--gold-dark); transform: translateY(-2px); }
.waiter-fab:active { transform: scale(0.97); }

.fab-bar.fab-docked {
  position: relative;
  bottom: auto;
  left: auto;
  transform: none;
  margin: 0 auto 0;
  width: calc(100% - 32px);
  max-width: 480px;
  padding: 16px 0;
}

.waiter-fab.called {
  background: #e8f5e9;
  color: #2e7d32;
  box-shadow: 0 8px 28px rgba(46,125,50,0.2);
}

/* ---- MODAL BASE ---- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30,26,22,0.65);
  z-index: 300;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal-overlay.open { display: flex; }

.modal-sheet {
  background: var(--cream);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 680px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  animation: sheetUp 0.32s cubic-bezier(0.32,0.72,0,1);
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto 0;
  flex-shrink: 0;
}

.modal-head {
  padding: 16px 22px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--charcoal);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--muted);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s;
}

.modal-close:hover { color: var(--terracotta); }

.modal-body {
  padding: 18px 22px;
  overflow-y: auto;
  flex: 1;
}

.modal-foot {
  padding: 14px 22px 28px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* ---- CUSTOMIZATION MODAL ---- */
.extras-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 10px;
}

.extra-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.extra-row:last-child { border-bottom: none; }

.extra-name  { font-size: 0.92rem; font-weight: 500; color: var(--text); }
.extra-price { font-size: 0.82rem; color: var(--terracotta); font-weight: 600; margin-top: 2px; }

.qty-ctrl {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--charcoal);
  background: white;
  color: var(--charcoal);
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.15s;
  font-family: 'DM Sans', sans-serif;
}

.qty-btn:hover { background: var(--charcoal); color: var(--cream); }

.qty-val {
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 18px;
  text-align: center;
}

.note-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 8px;
}

.note-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--white);
  resize: vertical;
  min-height: 72px;
  outline: none;
  transition: border-color 0.2s;
}

.note-input:focus { border-color: var(--charcoal); }

/* ---- CART MODAL ---- */
.cart-table-label {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--terracotta);
  margin-bottom: 14px;
}

.cart-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}

.cart-item:last-child { border-bottom: none; }

.cart-item-left  { flex: 1; }
.cart-item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }

.cart-item-name {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--charcoal);
}

.cart-extras {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.cart-extra-tag {
  background: #fdf0ed;
  color: var(--terracotta);
  border: 1px solid #f5cfc8;
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 0.72rem;
  font-weight: 600;
}

.cart-note-tag {
  font-size: 0.76rem;
  color: #7a5c3a;
  background: #fdf6e3;
  border-left: 2px solid var(--gold);
  padding: 2px 8px;
  border-radius: 0 4px 4px 0;
  margin-top: 4px;
}

.cart-base-price {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 2px;
}

.cart-item-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--terracotta);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0 0;
  margin-top: 6px;
  border-top: 2px solid var(--charcoal);
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.cart-total-row span:last-child { color: var(--terracotta); }

.cart-empty {
  text-align: center;
  padding: 32px 0;
  color: var(--muted);
  font-size: 1rem;
}

/* ---- BUTTONS ---- */
.btn-primary {
  flex: 1;
  padding: 13px;
  background: var(--terracotta);
  color: var(--cream);
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover { background: var(--terra-dark); }

.btn-secondary {
  flex: 1;
  padding: 13px;
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover { border-color: var(--charcoal); color: var(--text); }

/* ---- SUCCESS MODAL ---- */
.success-body {
  text-align: center;
  padding: 28px 16px;
}

.success-icon { font-size: 3rem; margin-bottom: 12px; }

.success-order-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--terracotta);
  margin-bottom: 8px;
}

.success-msg { font-size: 0.9rem; color: var(--muted); line-height: 1.7; }

/* ---- FOOTER ---- */
.site-footer {
  background: var(--charcoal);
  color: rgba(250,245,237,0.55);
  text-align: center;
  padding: 32px 20px;
  font-size: 0.82rem;
  line-height: 2.1;
  position: relative;
}

.site-footer::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--terracotta), var(--gold), var(--savanna));
  position: absolute;
  top: 0; left: 0; right: 0;
}

.site-footer strong { color: var(--cream); }

.site-footer .powered {
  margin-top: 14px;
  font-size: 0.66rem;
  opacity: 0.3;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ---- OUT OF STOCK ---- */
.item-out-of-stock { opacity: 0.5; }

.badge-esaurito {
  display: inline-block;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 3px;
  padding: 2px 7px;
  background: #fdecea;
  color: var(--terracotta);
  border: 1px solid #f5c6c2;
  margin-top: 4px;
}

.add-btn-disabled {
  background: var(--terracotta);
  color: white;
  border: none;
  border-radius: 10px;
  width: auto;
  height: auto;
  padding: 8px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: not-allowed;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 480px) {
  .header-name  { font-size: 2.6rem; }
  .container    { padding-left: 14px; padding-right: 14px; }
  .modal-body   { padding: 14px 16px; }
  .modal-foot   { padding: 12px 16px 24px; }
  .modal-head   { padding: 14px 16px 12px; }
}
