:root {
  --primary: #C81E2E;
  --primary-dark: #A01522;
  --primary-light: #FEECEE;
  --secondary: #1D3557;
  --accent: #E76F51;
  --bg: #F4F6F9;
  --surface: #FFFFFF;
  --text-main: #111827;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --shadow-sm: 0 2px 6px rgba(0,0,0,0.04);
  --shadow-md: 0 6px 18px rgba(0,0,0,0.06);
  --shadow-lg: 0 16px 36px rgba(0,0,0,0.12);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.5;
  padding-bottom: 96px;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.app-header {
  background: linear-gradient(135deg, #0F1E33 0%, var(--secondary) 50%, #16263D 100%);
  color: #FFFFFF;
  padding: 24px 16px 22px;
  border-bottom: 2px solid rgba(200, 30, 46, 0.4);
}

.header-container {
  max-width: 640px;
  margin: 0 auto;
}

.brand-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.brand-tagline {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 14px;
  font-weight: 500;
}

.meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  text-decoration: none;
}

.location-badge {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  backdrop-filter: blur(8px);
}

.status-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.table-badge {
  background: var(--primary);
  color: #FFFFFF;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(200, 30, 46, 0.4);
  transition: transform 0.15s ease;
}

.table-badge:active {
  transform: scale(0.96);
}

.qr-link-badge {
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.2s ease;
}

.qr-link-badge:hover {
  background: #FFFFFF;
  color: var(--secondary);
}

/* Sticky Nav (Search + Categories) */
.nav-sticky {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.search-icon {
  position: absolute;
  left: 14px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.search-wrapper input {
  width: 100%;
  padding: 12px 38px 12px 42px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: #F8F9FA;
  font-size: 0.92rem;
  font-weight: 500;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.search-wrapper input:focus {
  background: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(200, 30, 46, 0.12);
}

.clear-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  cursor: pointer;
}

.categories-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}

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

.cat-pill {
  white-space: nowrap;
  background: #F3F4F6;
  border: 1px solid var(--border-light);
  color: #4B5563;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.cat-pill.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(200, 30, 46, 0.3);
}

/* Menu Content */
.menu-container {
  max-width: 640px;
  margin: 16px auto;
  padding: 0 16px;
}

.products-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Product Card — Professional App Layout */
.product-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  gap: 16px;
  border: 1px solid rgba(229, 231, 235, 0.8);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
}

.product-img-wrapper {
  width: 110px;
  height: 110px;
  min-width: 110px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #F3F4F6;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.product-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.product-card:hover .product-img-wrapper img {
  transform: scale(1.04);
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-category-tag {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 2px;
  letter-spacing: 0.5px;
}

.product-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 4px;
}

.product-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

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

.product-price {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--secondary);
  letter-spacing: -0.3px;
}

.add-btn {
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  box-shadow: 0 3px 10px rgba(200, 30, 46, 0.25);
  transition: all 0.15s ease;
}

.add-btn:active {
  background: var(--primary-dark);
  transform: scale(0.96);
}

/* Quantity Control */
.qty-control {
  display: inline-flex;
  align-items: center;
  background: var(--primary-light);
  border-radius: 999px;
  padding: 3px;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: #FFFFFF;
  color: var(--primary);
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
  transition: transform 0.1s ease;
}

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

.qty-val {
  min-width: 30px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--primary-dark);
}

/* Floating Cart */
.floating-cart {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 608px;
  margin: 0 auto;
  z-index: 50;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.cart-bar-inner {
  background: linear-gradient(135deg, var(--secondary) 0%, #0F1E33 100%);
  color: #FFFFFF;
  padding: 14px 20px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-count-pill {
  background: var(--primary);
  color: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(200, 30, 46, 0.4);
}

.cart-bar-details {
  display: flex;
  flex-direction: column;
}

.cart-label {
  font-size: 0.92rem;
  font-weight: 800;
}

.cart-table-info {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
}

.cart-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-total-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: #FFFFFF;
}

.cart-arrow {
  font-size: 1.1rem;
  color: var(--accent);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.cart-drawer {
  background: #FFFFFF;
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  flex-direction: column;
  animation: drawerUp 0.25s ease-out;
}

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

.drawer-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.drawer-title-group h2 {
  font-size: 1.25rem;
  font-weight: 800;
}

.drawer-table-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
}

.close-drawer-btn {
  background: #F3F4F6;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
}

.cart-item-details {
  flex: 1;
  padding-right: 14px;
}

.cart-item-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

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

.drawer-footer {
  padding: 18px 20px;
  background: #F9FAFB;
  border-top: 1px solid var(--border);
}

.order-inputs {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input-group label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.input-group input {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-family: inherit;
  outline: none;
  background: #FFFFFF;
}

.input-group input:focus {
  border-color: var(--primary);
}

.bill-summary {
  margin-bottom: 16px;
}

.bill-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.total-row {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--secondary);
  border-top: 1.5px dashed var(--border);
  padding-top: 10px;
}

.whatsapp-btn {
  width: 100%;
  background: #25D366;
  color: #FFFFFF;
  border: none;
  padding: 15px;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  font-family: inherit;
  transition: transform 0.15s ease;
}

.whatsapp-btn:active {
  background: #1EBE5D;
  transform: scale(0.98);
}

.wa-disclaimer {
  font-size: 0.75rem;
  text-align: center;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Table Modal */
.table-modal-box {
  background: #FFFFFF;
  padding: 24px;
  border-radius: var(--radius-lg);
  max-width: 400px;
  width: 90%;
  margin: auto;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.table-modal-box h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.table-modal-box p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.table-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.table-select-btn {
  background: #F3F4F6;
  border: 2px solid transparent;
  padding: 14px 6px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.table-select-btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.cancel-table-btn {
  background: none;
  border: 1.5px solid var(--border);
  padding: 10px 24px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

/* Loading & Empty */
.loading-state, .no-results {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 14px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 10px;
}
