/* ============================================
   Cock N Bull DHA Phase 1 - Complete Stylesheet
   Cream + Terracotta Theme | Mobile-First Design
   ============================================ */

/* CSS Variables */
:root {
  --primary: #E07A2E;
  --primary-dark: #c4661f;
  --primary-light: #f09a5e;
  --bg: #F9F7F2;
  --bg-card: #FFFFFF;
  --bg-card-hover: #f5f2ed;
  --bg-input: #f0ece5;
  --bg-overlay: rgba(0, 0, 0, 0.4);
  --bg-nav: rgba(249, 247, 242, 0.95);
  --text: #222222;
  --text-secondary: #555555;
  --text-muted: #888888;
  --border: #e5e0d8;
  --border-light: #d4cfc7;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --header-height: 60px;
  --category-nav-height: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: calc(70px + var(--safe-bottom));
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }
img { max-width: 100%; display: block; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================
   HEADER
   ============================================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  transition: var(--transition);
}

.app-header.scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

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

.header-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-info h1 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.header-status {
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.open { background: var(--success); box-shadow: 0 0 6px var(--success); }
.status-dot.closed { background: var(--danger); box-shadow: 0 0 6px var(--danger); }

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 20px;
  transition: var(--transition);
  position: relative;
}

.header-btn:hover { background: var(--bg-card-hover); transform: scale(1.05); }

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg);
}

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

.install-header-btn {
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--primary);
  color: white;
  font-weight: 600;
  width: auto;
  height: auto;
  display: none;
}

.install-header-btn.visible { display: flex; align-items: center; gap: 4px; }

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  padding: 32px 20px 24px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg) 0%, #faf5ed 50%, var(--bg) 100%);
}

.hero-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-bg-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(249, 247, 242, 0.3) 0%, rgba(249, 247, 242, 0.85) 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(224, 122, 46, 0.08) 0%, transparent 50%);
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0); }
  100% { transform: translate(20px, -10px); }
}

.hero-logo-container {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(224, 122, 46, 0.25);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.hero-logo-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-logo-text {
  font-size: 32px;
  font-weight: 800;
  color: white;
  line-height: 1;
}

.hero h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.hero p {
  font-size: 14px;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

.hero-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 24px;
  background: var(--primary);
  color: white;
  border-radius: 25px;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

.hero-install-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(224, 122, 46, 0.3);
}

.hero-install-btn svg { width: 18px; height: 18px; }

/* ============================================
   SEARCH BAR
   ============================================ */
.search-container {
  padding: 0 16px 16px;
  position: sticky;
  top: var(--header-height);
  z-index: 90;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 14px;
  height: 46px;
  transition: var(--transition);
}

.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(224, 122, 46, 0.12);
}

.search-icon {
  color: var(--text-muted);
  font-size: 18px;
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  height: 100%;
}

.search-bar input::placeholder { color: var(--text-muted); }

.search-clear {
  color: var(--text-muted);
  font-size: 18px;
  display: none;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.search-clear.visible { display: block; }
.search-clear:hover { color: var(--text); }

/* ============================================
   CATEGORY NAVIGATION
   ============================================ */
.category-nav {
  position: sticky;
  top: calc(var(--header-height) + 46px);
  z-index: 89;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px 0;
}

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

.category-nav-inner {
  display: flex;
  gap: 8px;
  padding: 0 16px;
  min-width: min-content;
}

.category-nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 25px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
}

.category-nav-item:hover {
  background: var(--bg-card-hover);
  color: var(--text);
  border-color: var(--border-light);
}

.category-nav-item.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.category-nav-item .cat-emoji {
  font-size: 16px;
}

/* ============================================
   MENU SECTIONS
   ============================================ */
.menu-container {
  padding: 0 16px 100px;
}

.menu-section {
  margin-bottom: 28px;
  scroll-margin-top: calc(var(--header-height) + 46px + var(--category-nav-height) + 16px);
}

.menu-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-top: 8px;
}

.menu-section-title {
  font-size: 20px;
  font-weight: 700;
}

.menu-section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-light), transparent);
}

.menu-section-count {
  font-size: 12px;
  color: var(--text-muted);
  background: #FFFFFF;
  padding: 2px 10px;
  border-radius: 10px;
}

/* ============================================
   MENU CARDS GRID
   ============================================ */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 375px) {
  .menu-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

@media (min-width: 768px) {
  .menu-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

@media (min-width: 1024px) {
  .menu-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}

/* ============================================
   MENU CARD
   ============================================ */
.menu-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  animation: cardFadeIn 0.4s ease forwards;
  opacity: 0;
  transform: translateY(10px);
}

.menu-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.menu-card.unavailable {
  opacity: 0.5;
  pointer-events: none;
}

.menu-card.unavailable::after {
  content: 'Unavailable';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  background: rgba(239, 68, 68, 0.9);
  color: white;
  font-weight: 700;
  font-size: 14px;
  padding: 4px 16px;
  border-radius: 4px;
  z-index: 5;
}

.menu-card { position: relative; }

@keyframes cardFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

.card-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #f0ece5;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.menu-card:hover .card-image { transform: scale(1.05); }

.card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 6px;
}

.card-image-placeholder .placeholder-icon {
  font-size: 36px;
  opacity: 0.25;
}

.card-image-placeholder .placeholder-text {
  font-size: 11px;
  opacity: 0.5;
}

.card-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.card-price-small {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: -2px;
}

/* Size Selector for Pizza */
.size-selector {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.size-btn {
  padding: 4px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: pointer;
}

.size-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.size-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.size-btn .size-label {
  font-weight: 700;
  margin-right: 2px;
}

.size-btn .size-price {
  opacity: 0.85;
}

/* Add to Cart Button */
.add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  margin-top: auto;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  box-shadow: 0 2px 8px rgba(224, 122, 46, 0.3);
}

.add-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(224, 122, 46, 0.35);
}

.add-btn:active {
  transform: scale(0.98);
}

.add-btn svg {
  width: 16px;
  height: 16px;
}

.add-btn.added {
  background: var(--success);
}

/* Pizza card price display */
.pizza-price-display {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
}

.pizza-price-display .size-name {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  margin-left: 4px;
}

/* ============================================
   CART SIDEBAR
   ============================================ */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-overlay);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.cart-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: #FFFFFF;
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-lg);
}

.cart-sidebar.open {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: #FFFFFF;
}

.cart-header h2 {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-header h2 span {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.cart-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text);
  transition: var(--transition);
  border: none;
}

.cart-close:hover { background: var(--border-light); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.cart-item-img {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-card-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--text-muted);
}

.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-size {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg);
  border-radius: 8px;
  overflow: hidden;
}

.cart-qty-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  transition: var(--transition);
  border: none;
}

.cart-qty-btn:hover { background: var(--primary); color: white; }

.cart-qty-value {
  width: 32px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

.cart-remove-btn {
  color: var(--text-muted);
  font-size: 11px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  transition: var(--transition);
}

.cart-remove-btn:hover { color: var(--danger); }

/* Cart Empty State */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}

.cart-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.cart-empty h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.cart-empty p {
  font-size: 14px;
}

/* Cart Footer */
.cart-footer {
  padding: 16px 20px;
  padding-bottom: calc(16px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  background: #FFFFFF;
  flex-shrink: 0;
}

.cart-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.cart-summary-label {
  font-size: 16px;
  font-weight: 600;
}

.cart-summary-total {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}

.whatsapp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: #25D366;
  color: white;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  transition: var(--transition);
  border: none;
}

.whatsapp-btn:hover {
  background: #1da851;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:active { transform: scale(0.98); }

.whatsapp-btn svg { width: 20px; height: 20px; }

.clear-cart-btn {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
}

.clear-cart-btn:hover {
  color: var(--danger);
  border-color: var(--danger);
}

/* ============================================
   FLOATING CART BUTTON (Mobile)
   ============================================ */
.floating-cart {
  position: fixed;
  bottom: calc(16px + var(--safe-bottom));
  right: 16px;
  z-index: 150;
  display: none;
}

.floating-cart.visible { display: block; }

.floating-cart-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 2px 12px rgba(224, 122, 46, 0.25);
  transition: var(--transition);
  border: none;
  position: relative;
}

.floating-cart-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 20px rgba(224, 122, 46, 0.35);
}

.floating-cart-btn .cart-badge {
  top: -2px;
  right: -2px;
  border-color: var(--primary);
}

.floating-cart-total {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: #FFFFFF;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
  white-space: nowrap;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ============================================
   LOADING STATE
   ============================================ */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 20px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-text {
  font-size: 14px;
  color: var(--text-muted);
}

/* Skeleton Loading */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.skeleton-card {
  background: var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-img {
  aspect-ratio: 4/3;
  background: linear-gradient(90deg, var(--border-light) 25%, var(--bg-card-hover) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-line {
  height: 14px;
  background: linear-gradient(90deg, var(--border) 25%, var(--border-light) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

.skeleton-line.short { width: 60%; }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ============================================
   NO RESULTS
   ============================================ */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.no-results-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.no-results h3 {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 8px;
}

.no-results p {
  font-size: 14px;
}

/* ============================================
   RESTAURANT CLOSED BANNER
   ============================================ */
.closed-banner {
  background: linear-gradient(135deg, var(--danger), #b91c1c);
  color: white;
  text-align: center;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  display: none;
}

.closed-banner.visible { display: block; }

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: #FFFFFF;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }

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

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

/* ============================================
   FOOTER
   ============================================ */
.app-footer {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.app-footer a {
  color: var(--primary);
  text-decoration: none;
}

/* ============================================
   CLOSED OVERLAY
   ============================================ */
.closed-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-overlay);
  z-index: 500;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px;
}

.closed-overlay.visible {
  display: flex;
}

.closed-overlay-icon {
  font-size: 64px;
  opacity: 0.7;
}

.closed-overlay h2 {
  font-size: 24px;
  font-weight: 700;
}

.closed-overlay p {
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  max-width: 300px;
}

/* ============================================
   INSTALL POPUP
   ============================================ */
.install-popup {
  position: fixed;
  bottom: calc(80px + var(--safe-bottom));
  left: 16px;
  right: 16px;
  max-width: 400px;
  margin: 0 auto;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  z-index: 180;
  box-shadow: var(--shadow-lg);
  display: none;
  animation: slideUp 0.4s ease;
}

.install-popup.visible { display: block; }

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

.install-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.install-popup-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.install-popup-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.install-popup-close:hover { background: var(--danger); color: white; }

.install-popup p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.5;
}

.install-popup-actions {
  display: flex;
  gap: 10px;
}

.install-popup-actions .install-btn-primary {
  flex: 1;
  padding: 10px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.install-popup-actions .install-btn-primary:hover { background: var(--primary-dark); }

.install-popup-actions .install-btn-dismiss {
  padding: 10px 16px;
  background: var(--bg-input);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.install-popup-actions .install-btn-dismiss:hover { color: var(--text); }

/* ============================================
   ADMIN STYLES
   ============================================ */

/* Admin Login */
.admin-login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-login-overlay.hidden { display: none; }

.admin-login-box {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.admin-login-box h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.admin-login-box p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.admin-login-box .logo-circle {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: white;
  box-shadow: 0 4px 16px rgba(224, 122, 46, 0.25);
  overflow: hidden;
}

/* Admin Layout */
.admin-container {
  display: none;
  min-height: 100vh;
  background: var(--bg);
}

.admin-container.visible { display: block; }

.admin-header {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-header h1 {
  font-size: 18px;
  font-weight: 700;
}

.admin-header-actions {
  display: flex;
  gap: 8px;
}

.admin-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.admin-btn-primary {
  background: var(--primary);
  color: white;
}

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

.admin-btn-secondary {
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border);
}

.admin-btn-secondary:hover { border-color: var(--border-light); }

.admin-btn-danger {
  background: var(--danger);
  color: white;
}

.admin-btn-danger:hover { opacity: 0.9; }

.admin-btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  gap: 0;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.admin-tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.admin-tab:hover { color: var(--text); }

.admin-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Admin Content */
.admin-content {
  padding: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.admin-panel {
  display: none;
}

.admin-panel.active { display: block; }

/* Admin Cards */
.admin-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.admin-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Form Styles */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(224, 122, 46, 0.12);
}

.form-input::placeholder { color: var(--text-muted); }

.form-select {
  width: 100%;
  padding: 10px 14px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  transition: var(--transition);
  outline: none;
  appearance: auto;
}

.form-select:focus {
  border-color: var(--primary);
}

.form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-family: 'Courier New', monospace;
  resize: vertical;
  min-height: 200px;
  outline: none;
  transition: var(--transition);
}

.form-textarea:focus {
  border-color: var(--primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
}

/* Toggle Switch */
.toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.toggle-wrapper:last-child { border-bottom: none; }

.toggle-label {
  font-size: 14px;
  font-weight: 500;
}

.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--border-light);
  border-radius: 13px;
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

/* Admin Menu Item List */
.admin-category-section {
  margin-bottom: 24px;
}

.admin-category-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: var(--transition);
}

.admin-item-row:hover { border-color: var(--border-light); }

.admin-item-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-muted);
}

.admin-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.admin-item-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-item-price {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
}

.admin-item-price-sizes {
  font-size: 12px;
  color: var(--text-muted);
}

.admin-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* Image Upload */
.image-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.image-upload-area:hover {
  border-color: var(--primary);
  background: rgba(224, 122, 46, 0.05);
}

.image-upload-area.has-image {
  padding: 8px;
  border-style: solid;
  border-color: var(--success);
}

.image-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-placeholder {
  color: var(--text-muted);
  font-size: 14px;
}

.upload-placeholder .upload-icon {
  font-size: 32px;
  margin-bottom: 8px;
  display: block;
}

.upload-preview {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.upload-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border);
}

.upload-progress-bar {
  height: 100%;
  background: var(--primary);
  transition: width 0.3s;
  width: 0%;
}

/* File input styled */
.file-input-wrapper {
  position: relative;
}

.file-input-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.file-input-btn:hover { border-color: var(--primary); }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.modal-close:hover { background: var(--danger); color: white; }

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Developer JSON Editor */
.json-editor-wrapper {
  position: relative;
}

.json-editor-wrapper .line-count {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Alert Box */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--warning);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--success);
}

/* Responsive Admin */
@media (min-width: 768px) {
  .admin-content {
    padding: 24px 32px;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

/* Confirm Dialog */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.confirm-overlay.visible { display: flex; }

.confirm-box {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  animation: modalIn 0.3s ease;
}

.confirm-box h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.confirm-box p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.confirm-actions {
  display: flex;
  gap: 10px;
}

.confirm-actions button {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.confirm-actions .confirm-yes {
  background: var(--danger);
  color: white;
}

.confirm-actions .confirm-no {
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border);
}

/* Color Picker */
.color-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-input-wrapper input[type="color"] {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: none;
  padding: 0;
}

.color-input-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.color-input-wrapper input[type="color"]::-webkit-color-swatch {
  border: 1px solid var(--border);
  border-radius: 6px;
}

.color-input-wrapper .color-hex {
  flex: 1;
}

/* Back to main site link */
.back-to-site {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  transition: var(--transition);
}

.back-to-site:hover { color: var(--primary); }
