/* WinRest Order — Online Ordering Platform CSS */
/* Theme colors are injected via CSS variables per restaurant */

:root {
  --primary: #1a1a2e;
  --accent: #e94560;
  --accent-hover: #d13350;
  --accent-light: rgba(233, 69, 96, 0.08);
  --bg: #f8f9fa;
  --card-bg: #ffffff;
  --text: #1a1a2e;
  --text-light: #6b7280;
  --text-muted: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f0f0f0;
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-full: 9999px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 24px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);
  --max-width: 480px;
  --header-height: 56px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  line-height: 1.5;
}

/* Mobile-first container */
.order-container {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
}

/* ---- HEADER ---- */
.order-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--primary);
  color: #fff;
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}

.order-header .logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}

.order-header .restaurant-name {
  font-size: 15px;
  font-weight: 600;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.order-header .cart-btn {
  position: relative;
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  transition: transform var(--transition);
}

.order-header .cart-btn:active { transform: scale(0.9); }

.order-header .cart-badge {
  position: absolute;
  top: 0;
  right: -2px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid var(--primary);
  animation: badgePop 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes badgePop {
  0% { transform: scale(0); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ---- HERO BANNER ---- */
.restaurant-hero {
  position: relative;
  background: var(--primary);
  padding: 28px 20px 24px;
  color: #fff;
  overflow: hidden;
}

.restaurant-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 50%, rgba(255,255,255,0.05) 100%);
  pointer-events: none;
}

.restaurant-hero .hero-content {
  position: relative;
  z-index: 1;
}

.restaurant-hero .hero-name {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  line-height: 1.2;
}

.restaurant-hero .hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.restaurant-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
}

.restaurant-hero .hero-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
}

.restaurant-hero .hero-status .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: statusPulse 2s ease-in-out infinite;
}

.restaurant-hero .hero-status .status-dot.closed {
  background: var(--danger);
  animation: none;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Closed banner */
.closed-banner {
  background: #fef2f2;
  color: #991b1b;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border-bottom: 1px solid #fecaca;
}

/* ---- SEARCH BAR ---- */
.menu-search {
  position: sticky;
  top: var(--header-height);
  z-index: 85;
  background: var(--bg);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
}

.menu-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.menu-search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
}

.menu-search input {
  width: 100%;
  padding: 10px 36px 10px 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-family: var(--font);
  background: var(--card-bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  color: var(--text);
}

.menu-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.menu-search input::placeholder { color: var(--text-muted); }

.menu-search-clear {
  position: absolute;
  right: 8px;
  background: var(--border);
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  transition: background var(--transition);
}

.menu-search-clear:hover { background: var(--text-muted); color: #fff; }

/* ---- CATEGORY TABS ---- */
.category-tabs {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: var(--card-bg);
  padding: 8px 12px;
  gap: 6px;
  position: sticky;
  top: var(--header-height);
  z-index: 80;
  border-bottom: 1px solid var(--border-light);
}

.category-tabs.with-search {
  top: calc(var(--header-height) + 52px);
}

.category-tabs::-webkit-scrollbar { display: none; }

.category-tab {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  border-radius: var(--radius-full);
  transition: all var(--transition);
  flex-shrink: 0;
  font-family: var(--font);
  letter-spacing: -0.1px;
}

.category-tab:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.category-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ---- MENU ITEMS ---- */
.menu-section {
  padding: 20px 16px 8px;
}

.menu-section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-top: 4px;
  letter-spacing: -0.3px;
}

.menu-item-card {
  display: flex;
  gap: 14px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
  text-decoration: none;
  color: inherit;
  animation: fadeInUp 0.3s ease-out both;
}

.menu-item-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.menu-item-card:active {
  transform: scale(0.98);
  box-shadow: var(--shadow);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.menu-item-card .item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.menu-item-card .item-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 3px;
  letter-spacing: -0.1px;
  line-height: 1.3;
}

.menu-item-card .item-desc {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.menu-item-card .item-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-top: auto;
  padding-top: 6px;
}

.menu-item-card .item-image {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg);
}

.menu-item-card .item-image-placeholder {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}

/* No results state */
.search-no-results {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-light);
}

.search-no-results .no-results-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.search-no-results h3 {
  font-size: 17px;
  color: var(--text);
  margin-bottom: 4px;
  font-weight: 600;
}

.search-no-results p { font-size: 14px; }

/* ---- FLOATING CART BAR ---- */
.floating-cart-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: var(--max-width);
  padding: 0 16px 0;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 90;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.floating-cart-bar.visible {
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.floating-cart-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--accent);
  color: #fff;
  padding: 14px 18px;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  text-decoration: none;
}

.floating-cart-bar-inner:hover { background: var(--accent-hover); }
.floating-cart-bar-inner:active { transform: scale(0.98); }

.floating-cart-count {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}

.floating-cart-count .count-circle {
  background: rgba(255,255,255,0.25);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.floating-cart-total {
  font-weight: 700;
  font-size: 15px;
}

/* ---- ITEM DETAIL / CUSTOMIZER ---- */
.item-detail {
  padding: 16px;
  padding-bottom: 100px;
}

.item-detail .item-hero {
  width: calc(100% + 32px);
  margin: -16px -16px 16px;
  height: 260px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--bg) 0%, var(--border) 100%);
}

.item-detail h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.item-detail .item-desc {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 20px;
}

.modifier-group {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--border);
  transition: border-color var(--transition);
}

.modifier-group.has-selection {
  border-left-color: var(--accent);
}

.modifier-group.unmet {
  border-left-color: var(--danger);
  border: 1.5px solid var(--danger);
  border-left-width: 3px;
}

.modifier-group .group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.modifier-group .group-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.1px;
}

.modifier-group .group-req {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  background: var(--bg);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.modifier-group .group-req.required {
  color: var(--danger);
  background: #fef2f2;
}

.modifier-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition);
}

.modifier-option:last-child { border-bottom: none; }

.modifier-option input[type="radio"],
.modifier-option input[type="checkbox"] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.modifier-option .mod-name { flex: 1; font-size: 14px; }
.modifier-option .mod-price { font-size: 13px; font-weight: 600; color: var(--accent); }

/* Size selector */
.size-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.size-option {
  flex: 1;
  padding: 12px 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--card-bg);
}

.size-option:hover { border-color: var(--text-muted); }

.size-option.selected {
  border-color: var(--accent);
  background: var(--accent-light);
}

.size-option .size-name {
  font-size: 13px;
  font-weight: 600;
  display: block;
}

.size-option .size-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-top: 4px;
  display: block;
}

/* Per-item special instructions */
.item-notes-section {
  margin: 16px 0;
}

.item-notes-section label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 6px;
}

.item-notes-section textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  resize: vertical;
  min-height: 44px;
  transition: border-color var(--transition);
  background: var(--card-bg);
  color: var(--text);
}

.item-notes-section textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.item-notes-section textarea::placeholder { color: var(--text-muted); }

/* Quantity selector */
.qty-selector {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  margin: 20px 0;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--card-bg);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  color: var(--text);
}

.qty-btn:hover { border-color: var(--accent); color: var(--accent); }
.qty-btn:active { transform: scale(0.92); }
.qty-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.qty-value {
  font-size: 22px;
  font-weight: 700;
  min-width: 30px;
  text-align: center;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  width: 100%;
  letter-spacing: -0.1px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-outline:hover { background: var(--accent-light); }
.btn-outline:active { transform: scale(0.97); }

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--border-light); }

/* Fixed bottom action bar */
.bottom-action {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: var(--card-bg);
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
  z-index: 80;
}

.bottom-action .btn-label {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

/* ---- CART ---- */
.cart-page { padding: 16px; padding-bottom: 100px; }

.cart-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.cart-page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.clear-cart-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  transition: background var(--transition);
}

.clear-cart-btn:hover { background: var(--accent-light); }

.cart-item {
  display: flex;
  gap: 12px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}

.cart-item .cart-item-info { flex: 1; min-width: 0; }
.cart-item .cart-item-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}
.cart-item .cart-item-size {
  font-weight: 400;
  color: var(--text-light);
}
.cart-item .cart-item-mods {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
  line-height: 1.4;
}
.cart-item .cart-item-notes {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  font-style: italic;
}
.cart-item .cart-item-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-top: 6px;
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.cart-item .cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-item .cart-item-qty button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  color: var(--text);
}

.cart-item .cart-item-qty button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cart-item-qty-value {
  font-weight: 600;
  min-width: 20px;
  text-align: center;
  font-size: 14px;
}

.remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--font);
  cursor: pointer;
  padding: 2px 4px;
  transition: color var(--transition);
}

.remove-btn:hover { color: var(--danger); }

.cart-summary {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 16px;
  box-shadow: var(--shadow);
}

.cart-summary h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.1px;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 14px;
  color: var(--text-light);
}

.cart-summary-row span:last-child { color: var(--text); font-weight: 500; }

.cart-summary-row.total {
  font-size: 18px;
  font-weight: 700;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 2px solid var(--border);
  color: var(--text);
}

.cart-summary-row.total span:last-child { color: var(--text); font-weight: 700; }

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.cart-empty .empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.3; }
.cart-empty h2 { font-size: 20px; color: var(--text); margin-bottom: 8px; font-weight: 700; }

/* ---- CHECKOUT ---- */
.checkout-page { padding: 16px; padding-bottom: 100px; }

.checkout-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--card-bg);
  font-family: var(--font);
  color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-light);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 18px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.form-section h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -0.1px;
}

/* Order type toggle */
.order-type-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.order-type-btn {
  flex: 1;
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  font-family: var(--font);
  transition: all var(--transition);
  color: var(--text-light);
}

.order-type-btn:hover { border-color: var(--text-muted); }

.order-type-btn.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}

/* Tip selector */
.tip-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 18px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.tip-section h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.tip-options {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.tip-btn {
  flex: 1;
  padding: 10px 4px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  font-family: var(--font);
  transition: all var(--transition);
  color: var(--text);
}

.tip-btn:hover { border-color: var(--text-muted); }

.tip-btn.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}

.tip-btn .tip-amount {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 500;
}

.tip-btn.selected .tip-amount { color: var(--accent); }

.custom-tip-input {
  display: flex;
  align-items: center;
  gap: 8px;
}

.custom-tip-input span {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.custom-tip-input input {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font);
  text-align: center;
  background: var(--card-bg);
  color: var(--text);
}

.custom-tip-input input:focus {
  border-color: var(--accent);
  outline: none;
}

/* Schedule toggle */
.schedule-section {
  margin-top: 14px;
}

.schedule-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.schedule-btn {
  flex: 1;
  padding: 10px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  font-family: var(--font);
  transition: all var(--transition);
  color: var(--text);
}

.schedule-btn.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}

/* Promo code */
.promo-section {
  margin-top: 12px;
}

.promo-toggle-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.promo-toggle-btn:hover { text-decoration: underline; }

.promo-input-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.promo-input-row input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  background: var(--card-bg);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text);
}

.promo-input-row input:focus {
  border-color: var(--accent);
  outline: none;
}

.promo-apply-btn {
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}

.promo-apply-btn:hover { background: var(--accent-hover); }

.promo-feedback {
  font-size: 13px;
  margin-top: 6px;
  font-weight: 500;
}

.promo-feedback.success { color: var(--success); }
.promo-feedback.error { color: var(--danger); }

.error-box {
  background: #fef2f2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid #fecaca;
}

/* ---- ORDER TRACKING ---- */
.tracking-page { padding: 16px; }

.tracking-header {
  text-align: center;
  padding: 28px 16px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}

.tracking-header .check-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.tracking-header h1 { font-size: 22px; margin-bottom: 4px; font-weight: 700; letter-spacing: -0.3px; }
.tracking-header .order-num { font-size: 14px; color: var(--text-light); }

.status-timeline {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}

.status-timeline h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.timeline-step {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  position: relative;
}

.timeline-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 15px;
  top: 40px;
  bottom: -4px;
  width: 2px;
  background: var(--border);
  transition: background 0.5s;
}

.timeline-step.completed:not(:last-child)::after {
  background: var(--success);
}

.timeline-step.active:not(:last-child)::after {
  background: linear-gradient(to bottom, var(--success) 0%, var(--border) 100%);
}

.timeline-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  background: var(--bg);
  color: var(--text-light);
  border: 2px solid var(--border);
  transition: all 0.3s;
}

.timeline-step.completed .timeline-dot {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.timeline-step.active .timeline-dot {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(233,69,96,0.3); }
  50% { box-shadow: 0 0 0 8px rgba(233,69,96,0); }
}

.timeline-info { flex: 1; }
.timeline-label { font-size: 14px; font-weight: 600; }
.timeline-time { font-size: 12px; color: var(--text-light); margin-top: 2px; }

.timeline-step.pending .timeline-label { color: var(--text-muted); }

/* Order details on tracking page */
.order-details-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  overflow: hidden;
}

.order-details-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  transition: background var(--transition);
}

.order-details-toggle:hover { background: var(--bg); }

.order-details-toggle .toggle-arrow {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.order-details-toggle .toggle-arrow.open {
  transform: rotate(180deg);
}

.order-details-content {
  padding: 0 16px 16px;
}

.order-details-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}

.order-details-item .odi-left {
  display: flex;
  gap: 8px;
  flex: 1;
}

.order-details-item .odi-qty {
  color: var(--text-light);
  font-weight: 600;
  min-width: 24px;
}

.order-details-item .odi-name { flex: 1; }
.order-details-item .odi-price { font-weight: 600; }
.order-details-item .odi-mods {
  font-size: 12px;
  color: var(--text-light);
  padding-left: 32px;
  padding-bottom: 2px;
}

/* Restaurant contact card */
.restaurant-contact-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  text-align: center;
  margin-bottom: 12px;
}

.restaurant-contact-card p {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.auto-refresh-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* ---- LOADING / EMPTY STATES ---- */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  color: var(--text-light);
  font-size: 15px;
  gap: 10px;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---- ERROR STATE ---- */
.error-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.error-state .error-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.error-state h2 {
  font-size: 20px;
  color: var(--text);
  margin-bottom: 8px;
  font-weight: 700;
}

.error-state p { font-size: 14px; line-height: 1.5; }

/* ---- SKELETON LOADING ---- */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}

.skeleton-line {
  background: linear-gradient(90deg, var(--border) 25%, #f0f0f0 50%, var(--border) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.5s infinite ease-in-out;
  border-radius: 6px;
}

.skeleton-menu { padding: 0; }

.skeleton-hero {
  height: 120px;
  background: linear-gradient(90deg, var(--primary) 0%, #2a2a4e 50%, var(--primary) 100%);
  background-size: 400px 100%;
  animation: shimmer 1.5s infinite ease-in-out;
}

.skeleton-info-bar {
  background: var(--card-bg);
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
}

.skeleton-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-light);
}

.skeleton-tab {
  width: 70px;
  height: 34px;
  background: linear-gradient(90deg, var(--border) 25%, #f0f0f0 50%, var(--border) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.5s infinite ease-in-out;
  border-radius: var(--radius-full);
}

.skeleton-card {
  display: flex;
  gap: 14px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 14px;
  margin: 10px 16px;
  box-shadow: var(--shadow);
}

.skeleton-image {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background: linear-gradient(90deg, var(--border) 25%, #f0f0f0 50%, var(--border) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.5s infinite ease-in-out;
}

/* ---- POWERED BY FOOTER ---- */
.powered-by {
  text-align: center;
  padding: 20px 16px;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.powered-by strong { color: var(--text-light); font-weight: 700; }

/* ---- HOMEPAGE ---- */
.home-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  background: linear-gradient(180deg, var(--primary) 0%, #16213e 100%);
  color: #fff;
}

.home-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.home-logo-mark {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(233, 69, 96, 0.3);
}

.home-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.home-subtitle {
  font-size: 16px;
  line-height: 1.6;
  opacity: 0.7;
  max-width: 280px;
  margin-bottom: 32px;
}

.home-cta {
  max-width: 260px;
  margin-bottom: 40px;
  padding: 16px 32px;
  font-size: 16px;
}

.home-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.feature-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
}

.feature-pill .feature-icon { font-size: 14px; }

.home-footer {
  padding: 16px;
  font-size: 12px;
  opacity: 0.4;
}

/* ---- STATUS BADGE ---- */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.status-badge.open { background: var(--success-light); color: #065f46; }
.status-badge.closed { background: #fee2e2; color: #991b1b; }

/* ---- BACK BUTTON ---- */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  padding: 8px 0;
  margin-bottom: 8px;
  transition: color var(--transition);
}

.back-btn:hover { color: var(--accent); }

/* ---- RESPONSIVE ---- */
@media (min-width: 600px) {
  :root { --max-width: 540px; }
}

@media (min-width: 1024px) {
  :root { --max-width: 520px; }

  body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
  }

  .order-container {
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
    min-height: calc(100vh - 40px);
  }

  .order-header { border-radius: 0; }
}
