/* =====================================================
   CSS VARIABLES — Neutral Elegance POS Design System
   ===================================================== */
:root {
  /* Backgrounds */
  --bg:                #ffffff;
  --bg-container:      #fff5f5;
  --bg-container-high: #ffe8e8;

  /* Surfaces */
  --card-bg:           #ffffff;
  --card-bg-alt:       #fff5f5;

  /* Text */
  --text-primary:      #1f2328;
  --text-secondary:    #4a4a4a;
  --text-muted:        #8a8a8a;
  --text-on-primary:   #ffffff;

  /* Primary Brand (deep umber) */
  --primary:           #d62828;
  --primary-rich:      #b71c1c;
  --primary-light:     #f3b0b0;
  --primary-fixed:     #ffd5d5;

  /* Dividers & Outlines */
  --outline:           #8a8a8a;
  --outline-subtle:    #efdada;

  /* Semantics */
  --error:             #ba1a1a;

  /* Typography */
  --font-display:      'Manrope', sans-serif;
  --font-sans:         'Inter', sans-serif;

  /* Radii (from design system) */
  --radius-sm:   4px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  --transition: 0.25s ease;
}

/* =====================================================
   RESET & GLOBAL
   ===================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* =====================================================
   LAYOUT & SECTIONS
   ===================================================== */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: var(--bg);
}

.section {
  display: none;
  padding-bottom: 120px;
  animation: fadeIn 0.35s ease;
}

.section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   HEADER
   ===================================================== */
header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 24px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--outline-subtle);
  z-index: 10;
  position: relative;
}

.wishlist-nav-btn {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--card-bg);
  border: 1px solid var(--outline-subtle);
  color: var(--primary-rich);
  font-size: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wishlist-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background: var(--error);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wishlist-badge.hidden { display: none; }

.logo { text-align: center; }

.logo-wordmark {
  display: inline-block;
  font-family: var(--font-display, 'Manrope', sans-serif);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  color: var(--primary);
}

/* Diner overlays: no valid scan / feedback screen */
.diner-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.diner-overlay__card {
  max-width: 420px;
  width: 100%;
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--outline-subtle);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  box-shadow: 0 12px 40px rgba(40, 40, 40, 0.12);
}
.diner-overlay__card h2 {
  font-family: var(--font-display);
  color: var(--primary);
  font-size: 22px;
  font-weight: 800;
  margin: 12px 0 6px;
}
.diner-overlay__card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}
.fb-stars {
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 34px;
  color: var(--primary);
  margin: 20px 0;
  cursor: pointer;
}
.fb-stars i { transition: transform 0.12s ease; }
.fb-stars i:hover { transform: scale(1.15); }
#fb-comment {
  width: 100%;
  min-height: 80px;
  border: 1px solid var(--outline-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  resize: vertical;
  outline: none;
  margin-bottom: 16px;
}
#fb-comment:focus { border-color: var(--primary); }
.fb-submit {
  width: 100%;
  background: var(--primary);
  color: var(--text-on-primary);
  padding: 14px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 15px;
}
.fb-thanks {
  color: var(--primary);
  font-weight: 700;
  font-size: 16px;
}

/* =====================================================
   CATEGORIES NAVIGATION (FLOATING SLIDER)
   ===================================================== */
.categories-nav {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 12px;
  padding: 16px 16px 12px;
  user-select: none;
  scrollbar-width: none;
  -ms-overflow-style: none;

  position: sticky;
  top: 0;
  z-index: 15;
  background: rgba(255, 255, 255, 0.85); /* Frosty blend with page background */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  margin: 0 0 20px 0;
  border-bottom: 1px solid rgba(160, 160, 160, 0.15);
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

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

.category-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 90px;
  height: 90px;
  border-radius: 16px;
  border: 1px solid var(--outline-subtle);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--card-bg-alt);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.category-btn i {
  font-size: 28px;
  color: var(--primary-light);
  transition: all 0.25s;
}

.category-btn:hover {
  background: var(--primary-fixed);
}

.category-btn.active {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(214, 40, 40, 0.3);
}

.category-btn.active i {
  color: #ffffff;
}

/* =====================================================
   SECTION TITLE
   ===================================================== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 20px 16px;
}

.section-header h2 {
  font-family: var(--font-display);
  color: var(--primary);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* =====================================================
   ITEMS GRID — Single Column
   ===================================================== */
.sub-category-title {
  font-family: var(--font-sans);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 16px 10px;
  margin-top: 20px;
}

.items-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px 40px;
}

.item-card {
  background-color: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: row;
  height: 128px;
  border: 1px solid var(--outline-subtle);
  box-shadow: 0 4px 15px rgba(40, 40, 40, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(40, 40, 40, 0.14);
}

.item-img {
  width: 128px;
  min-width: 128px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg);
}

.item-info {
  padding: 14px 48px 14px 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
  overflow: hidden;
}

.item-info h3 {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.item-info p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.price {
  color: var(--primary-rich);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}

/* =====================================================
   CALL WAITER FLOATING BUTTON & TOAST
   ===================================================== */
.call-waiter-btn {
  position: fixed;
  bottom: 28px;
  right: 22px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-rich);
  color: var(--text-on-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 14px 22px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(40, 40, 40, 0.40);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  letter-spacing: 0.01em;
}

.call-waiter-btn i { font-size: 18px; }

.call-waiter-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(40, 40, 40, 0.50);
}

.call-waiter-btn:active { transform: scale(0.93); }

.call-waiter-btn.ringing i {
  animation: ring-shake 0.5s ease;
}

@keyframes ring-shake {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(-20deg); }
  40%  { transform: rotate(20deg); }
  60%  { transform: rotate(-15deg); }
  80%  { transform: rotate(10deg); }
  100% { transform: rotate(0deg); }
}

/* =====================================================
   SOS FLOATING BUTTON
   ===================================================== */
.sos-btn {
  position: fixed;
  bottom: 84px; /* Above the call waiter btn */
  right: 22px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--error);
  color: var(--text-on-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 14px 22px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(186, 26, 26, 0.40);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  letter-spacing: 0.01em;
}

.sos-btn i { font-size: 18px; }

.sos-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(186, 26, 26, 0.50);
}

.sos-btn:active { transform: scale(0.93); }

.sos-btn.disabled {
  opacity: 0.6;
  pointer-events: none;
}

.sos-btn.hidden {
  display: none;
}

/* =====================================================
   RESOLVE SOS FLOATING BUTTON
   ===================================================== */
.resolve-sos-btn {
  position: fixed;
  bottom: 84px;
  right: 22px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #198754; /* Green */
  color: var(--text-on-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 14px 22px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(25, 135, 84, 0.40);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  letter-spacing: 0.01em;
}

.resolve-sos-btn i { font-size: 18px; }

.resolve-sos-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(25, 135, 84, 0.50);
}

.resolve-sos-btn:active { transform: scale(0.93); }

.resolve-sos-btn.hidden {
  display: none;
}

/* Toast */
.waiter-toast {
  position: fixed;
  bottom: 96px;
  right: 22px;
  z-index: 51;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--primary);
  border: 1px solid rgba(225, 185, 154, 0.3);
  color: var(--primary-fixed);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(77, 51, 27, 0.35);
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.waiter-toast i {
  font-size: 18px;
  color: var(--primary-light);
  flex-shrink: 0;
}

.waiter-toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* =====================================================
   CHECKOUT SECTION (kept for future integration)
   ===================================================== */
.checkout-header {
  display: flex;
  align-items: center;
  padding: 24px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--outline-subtle);
}

#back-to-menu {
  color: var(--primary);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: -8px;
}

.checkout-header h1 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-left: 16px;
  flex-grow: 1;
}

.checkout-header .cf {
  color: var(--primary-rich);
  font-family: var(--font-display);
  font-weight: 800;
}

.checkout-banner {
  margin: 16px 20px;
  background-image: url('https://images.unsplash.com/photo-1542838132-92c53300491e?auto=format&fit=crop&q=80&w=800');
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
}

.checkout-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(41, 24, 8, 0.88), rgba(41, 24, 8, 0.35));
}

.checkout-banner-content { position: relative; z-index: 1; }

.checkout-banner p {
  color: var(--primary-light);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.checkout-banner h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  color: var(--primary-fixed);
  letter-spacing: -0.02em;
}

/* Checkout Cards */
.checkout-card {
  background-color: var(--card-bg);
  margin: 0 20px 20px;
  border-radius: var(--radius-xl);
  padding: 24px;
  color: var(--text-primary);
  border: 1px solid var(--outline-subtle);
  box-shadow: 0 4px 15px rgba(40, 40, 40, 0.07);
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.checkout-item h4 {
  font-family: var(--font-display);
  font-size: 15px;
  margin-bottom: 4px;
  font-weight: 700;
}

.checkout-item span { font-size: 12px; color: var(--text-muted); }

.checkout-item-details {
  display: flex;
  align-items: center;
  gap: 16px;
}

.remove-item-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--error);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 0;
  transition: var(--transition);
}

.remove-item-btn:active {
  transform: scale(0.95);
  opacity: 0.7;
}

.remove-item-btn i { font-size: 14px; }

.checkout-item-price {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-rich);
}

.checkout-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--outline-subtle);
}

.checkout-summary span {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.checkout-summary h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
}

/* Form */
.form-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--outline-subtle);
}

.form-group { margin-bottom: 24px; }

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

.tower-selection {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.tower-selection input[type="radio"] { display: none; }

.tower-btn {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--outline-subtle);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  background: var(--card-bg);
}

.tower-selection input[type="radio"]:checked + .tower-btn {
  background-color: var(--primary-rich);
  border-color: var(--primary-rich);
  color: var(--text-on-primary);
}

.input-wrapper {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--outline-subtle);
  padding-bottom: 10px;
}

@keyframes error-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
}

.input-wrapper.error {
  border-bottom-color: var(--error);
  animation: error-shake 0.3s ease;
}

.input-wrapper.error i {
  color: var(--error);
}

.input-icon {
  margin-right: 12px;
  color: var(--text-muted);
  font-size: 18px;
}

input, select {
  border: none;
  background: transparent;
  width: 100%;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--text-primary);
  outline: none;
}

select option {
  background-color: var(--card-bg);
  color: var(--text-primary);
}

input::placeholder { color: var(--outline-subtle); }

/* Watermark */
.watermark {
  text-align: center;
  opacity: 0.45;
  margin: 40px 0;
}

.watermark svg {
  width: 20px;
  height: 20px;
  margin-bottom: 8px;
  fill: var(--text-muted);
}

.watermark p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12px;
  color: var(--text-muted);
}

/* Place Order */
.checkout-action {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 16px 20px 24px;
  background: var(--bg);
  border-top: 1px solid var(--outline-subtle);
  z-index: 20;
}

#place-order-btn {
  width: 100%;
  background-color: var(--primary-rich);
  color: var(--text-on-primary);
  border-radius: var(--radius-md);
  padding: 18px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  box-shadow: 0 4px 16px rgba(40, 40, 40, 0.3);
  transition: var(--transition);
}

#place-order-btn:active { transform: scale(0.98); }

/* =====================================================
   SUCCESS MODAL
   ===================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(41, 24, 8, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--card-bg);
  padding: 40px 32px;
  border-radius: var(--radius-xl);
  text-align: center;
  max-width: 320px;
  width: 90%;
  transform: translateY(20px);
  transition: var(--transition);
  border: 1px solid var(--outline-subtle);
  box-shadow: 0 20px 60px rgba(40, 40, 40, 0.25);
}

.modal-overlay.active .modal-content { transform: translateY(0); }

.modal-content svg {
  width: 56px;
  height: 56px;
  color: var(--primary-rich);
  margin-bottom: 20px;
}

.modal-content h3 {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.modal-content p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

/* =====================================================
   DISH DETAIL MODAL
   ===================================================== */
.dish-modal-content {
  background: var(--card-bg);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 480px;
  position: absolute;
  bottom: 0;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .dish-modal-content {
  transform: translateY(0);
}

.dish-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #000;
  z-index: 10;
  cursor: pointer;
}

.dish-modal-img {
  width: 100%;
  height: 280px;
  background-size: cover;
  background-position: center;
}

.dish-modal-info {
  padding: 24px;
}

.dish-modal-info h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.dish-modal-tags {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}

.dish-modal-tags i {
  color: var(--primary-rich);
  margin-right: 4px;
}

.dish-modal-info p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.dish-modal-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--outline-subtle);
  padding-top: 20px;
}

.dish-modal-bottom h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--primary-rich);
}

.add-to-order-btn {
  background: var(--primary-rich);
  color: var(--text-on-primary);
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.2s ease;
}

.add-to-order-btn:active {
  transform: scale(0.95);
}

.dish-modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wishlist-btn {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  border: 1px solid var(--outline-subtle);
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.wishlist-btn.active {
  color: var(--error);
  border-color: var(--error);
}

.wishlist-btn:active {
  transform: scale(0.9);
}

.wishlist-items-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.wishlist-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wishlist-item-img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.wishlist-item-info {
  flex: 1;
  min-width: 0;
}

.wishlist-item-info h4 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wishlist-item-info .price {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-rich);
}

.wishlist-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.wishlist-remove-btn,
.wishlist-add-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wishlist-remove-btn {
  background: var(--card-bg);
  border: 1px solid var(--error);
  color: var(--error);
}

.wishlist-add-btn {
  background: var(--primary-rich);
  color: var(--text-on-primary);
  border: none;
  /* TEMPORARILY HIDDEN — remove this line to re-enable the "+" Add button */
  display: none;
}

.wishlist-empty-state {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  padding: 32px 8px;
}

.wishlist-empty-state.hidden { display: none; }

/* =====================================================
   STATUS BANNER & MODAL ADDITIONS
   ===================================================== */
.status-banner {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  background: var(--primary-rich);
  color: var(--text-on-primary);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(40, 40, 40, 0.40);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.status-banner.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(-20px);
}

.status-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-content i {
  font-size: 18px;
  color: var(--primary-light);
}

.call-waiter-btn.disabled {
  background: #a9a9a9;
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}

/* =====================================================
   TABLE NUMBER POPUP
   ===================================================== */
.table-modal-content {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: 40px 28px 32px;
  text-align: center;
  max-width: 340px;
  width: 90%;
  transform: translateY(24px) scale(0.95);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
  border: 1px solid var(--outline-subtle);
  box-shadow: 0 24px 64px rgba(77, 51, 27, 0.35);
}

.modal-overlay.active .table-modal-content {
  transform: translateY(0) scale(1);
}

.table-modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-fixed), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--primary);
  box-shadow: 0 8px 24px rgba(214, 40, 40, 0.2);
}

.table-modal-content h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.table-modal-content > p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 28px;
}

.table-input-group {
  text-align: left;
  margin-bottom: 24px;
}

.table-input-group label {
  display: block;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 700;
}

.table-input-wrapper {
  display: flex;
  align-items: center;
  background: var(--card-bg-alt);
  border: 2px solid var(--outline-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.table-input-wrapper:focus-within {
  border-color: var(--primary-rich);
  box-shadow: 0 0 0 3px rgba(40, 40, 40, 0.12);
}

.table-prefix {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-rich);
  margin-right: 6px;
  user-select: none;
}

.table-input-wrapper input {
  border: none;
  background: transparent;
  width: 100%;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  outline: none;
  letter-spacing: 0.02em;
}

.table-input-wrapper input::placeholder {
  color: var(--outline-subtle);
  font-weight: 500;
}

/* Hide spinner for number input */
.table-input-wrapper input[type="number"]::-webkit-inner-spin-button,
.table-input-wrapper input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.table-input-wrapper input[type="number"] {
  -moz-appearance: textfield;
}

.table-submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary-rich);
  color: var(--text-on-primary);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(40, 40, 40, 0.30);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.table-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(40, 40, 40, 0.40);
}

.table-submit-btn:active {
  transform: scale(0.97);
}

.table-submit-btn i {
  font-size: 20px;
}

/* Error shake animation */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

.table-input-wrapper.error {
  border-color: var(--error);
  animation: shake 0.4s ease;
}

/* =====================================================
   ITEM CARD — WISHLIST HEART BUTTON
   ===================================================== */
.item-card {
  position: relative;
}

.item-wishlist-btn {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid var(--outline-subtle);
  color: var(--text-muted);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.item-wishlist-btn:active {
  transform: translateY(-50%) scale(0.85);
}

.item-wishlist-btn.active {
  color: var(--error);
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(186, 26, 26, 0.3); /* subtle red border for active state */
}

@keyframes heart-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.item-wishlist-btn.pop {
  animation: heart-pop 0.3s ease;
}

/* =====================================================
   FLOATING VIEW CART BUTTON
   ===================================================== */
.view-cart-btn {
  position: fixed;
  bottom: 28px;
  left: 22px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: var(--text-on-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 14px 22px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(77, 51, 27, 0.40);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  letter-spacing: 0.01em;
}

.view-cart-btn.hidden {
  display: none !important;
}

.view-cart-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(77, 51, 27, 0.50);
}

.view-cart-btn:active {
  transform: scale(0.93);
}

.cart-badge {
  background: var(--primary);
  color: #ffffff;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Update Call Waiter position slightly to make space for view cart button */
.call-waiter-btn {
  right: 22px;
}

/* =====================================================
   ADDED ITEMS PAGE
   ===================================================== */
.clear-cart-header-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--error);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(186, 26, 26, 0.2);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.clear-cart-header-btn:active {
  background: rgba(186, 26, 26, 0.05);
  transform: scale(0.95);
}

.added-items-summary {
  margin: 16px 20px 8px;
  background: var(--bg-container);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
}

.summary-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-left i {
  color: var(--primary-rich);
  font-size: 16px;
}

/* Table Wrapper */
.added-items-table-wrapper {
  background: var(--card-bg);
  margin: 0 20px 20px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--outline-subtle);
  box-shadow: 0 4px 15px rgba(40, 40, 40, 0.07);
  overflow: hidden;
}

.added-items-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
}

.added-items-table th {
  background: var(--card-bg-alt);
  padding: 14px 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
  border-bottom: 1px solid var(--outline-subtle);
}

.added-items-table td {
  padding: 12px;
  border-bottom: 1px solid var(--outline-subtle);
  vertical-align: middle;
}

.added-items-table tr:last-child td {
  border-bottom: none;
}

/* Col Styles */
.th-item { width: 45%; }
.th-price { width: 15%; text-align: right; }
.th-qty { width: 20%; text-align: center; }
.th-total { width: 15%; text-align: right; }
.th-actions { width: 5%; text-align: center; }

.td-price, .td-total {
  text-align: right;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
}

.td-total {
  color: var(--primary-rich);
}

/* Table Item Detail */
.table-item-detail {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-item-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  border: 1px solid var(--outline-subtle);
}

.table-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.table-item-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--primary-light);
  font-size: 10px;
  font-weight: 600;
  text-align: left;
  margin-top: 2px;
  transition: color 0.2s;
  width: fit-content;
}

.table-edit-btn:hover {
  color: var(--primary-rich);
}

/* Table Quantity Controls */
.qty-control-table {
  display: inline-flex;
  align-items: center;
  background: var(--card-bg-alt);
  border: 1px solid var(--outline-subtle);
  border-radius: var(--radius-full);
  padding: 4px;
  margin: 0 auto;
}

.qty-btn-table {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-secondary);
  background: var(--card-bg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: all 0.2s;
}

.qty-btn-table:active {
  transform: scale(0.9);
  background: var(--primary-fixed);
}

.qty-val-table {
  font-size: 12px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  color: var(--text-primary);
}

/* Delete Row Button */
.table-delete-btn {
  color: var(--error);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: transform 0.2s;
  margin: 0 auto;
}

.table-delete-btn:active {
  transform: scale(0.85);
}

/* Table Empty State */
.cart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.cart-empty-state i {
  font-size: 48px;
  color: var(--outline-subtle);
  margin-bottom: 16px;
}

.cart-empty-state h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.cart-empty-state p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
  max-width: 260px;
}

.browse-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-rich);
  color: var(--text-on-primary);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(40, 40, 40, 0.2);
  transition: all 0.2s;
}

.browse-menu-btn:active {
  transform: scale(0.95);
}

/* Order Totals */
.order-total-card {
  background-color: var(--card-bg);
  margin: 0 20px 20px;
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  border: 1px solid var(--outline-subtle);
  box-shadow: 0 4px 15px rgba(40, 40, 40, 0.07);
}

.order-total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.order-total-row span:last-child {
  font-family: var(--font-display);
  font-weight: 700;
}

.total-final {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--outline-subtle);
  font-size: 18px;
  color: var(--text-primary);
  font-weight: 800;
}

.total-final span:last-child {
  font-size: 22px;
  color: var(--primary);
}

