* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #00aeef;
  --primary-dark: #0096d1;
  --accent: #003366;
  --action: #003366;
  --header-from: #00aeef;
  --header-to: #0096d1;
  --bg: #f8f9fa;
  --card: #ffffff;
  --text: #1a2b3c;
  --muted: #6b7c8f;
  --border: #e8edf2;
  --danger: #ef4444;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
  --radius: 24px;
  --radius-sm: 16px;
}

body {
  font-family: 'Noto Naskh Arabic', 'Segoe UI', system-ui, Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  line-height: 1.55;
  min-height: 100vh;
}

.site-header {
  background: linear-gradient(135deg, var(--header-from) 0%, var(--header-to) 100%);
  color: #fff;
  padding: 1.1rem 1rem 1.65rem;
  border-radius: 0 0 28px 28px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 120;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-fallback {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.brand-fallback.hidden { display: none; }

.header-meta {
  text-align: left;
  min-width: 0;
}

.mobile-nav {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 110;
  box-shadow: var(--shadow);
}

.mobile-nav-title {
  font-weight: 700;
  font-size: 0.95rem;
  flex: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  font-size: 1.1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  color: var(--text);
}

.page-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem 130px;
}

.screen-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 1.25rem 0 0.35rem;
}

.screen-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.restaurant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.85rem;
  padding-bottom: 2rem;
}

.restaurant-card {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  text-align: right;
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}

.restaurant-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
}

.restaurant-logo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f8fafc;
}

.restaurant-logo.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.restaurant-info { flex: 1; min-width: 0; }
.restaurant-info h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.restaurant-info p { font-size: 0.8rem; color: var(--muted); line-height: 1.4; }
.restaurant-info p.muted { font-size: 0.75rem; }

.category-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 0.25rem;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: right;
  width: 100%;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--card);
  box-shadow: var(--shadow);
  cursor: pointer;
  font-family: inherit;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.category-card-media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(145deg, #eef8fd, #f5fbff);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.category-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card-icon {
  font-size: 3rem;
}

.category-card-body {
  padding: 0.85rem 1rem 1rem;
}

.category-card-body h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.category-card-emoji { font-size: 1rem; }

.category-card-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.category-card-chevron {
  display: none;
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1.25rem;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn-back:hover { background: #f8fafc; }


.business-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.95);
  padding: 3px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.business-logo.hidden { display: none; }

.site-header h1 {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-header p {
  font-size: 0.82rem;
  opacity: 0.95;
}

.header-address {
  margin-top: 0.15rem;
  font-size: 0.75rem !important;
  opacity: 0.85 !important;
}

.hero-search-wrap {
  margin: -1.1rem 0 1.25rem;
  position: relative;
  z-index: 130;
}

.hero-search {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  background: var(--card);
  border-radius: 999px;
  padding: 0.35rem 0.35rem 0.35rem 0.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0.75rem 0.85rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
}

.hero-search input:focus { outline: none; }

.hero-search input::placeholder { color: #9aa8b8; }

.btn-search {
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.65rem 1.15rem;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 35%, transparent);
}

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

.categories-head { margin-top: 0.5rem; }

.whatsapp-menu-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}

.whatsapp-menu-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.whatsapp-menu-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--primary) 14%, white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.whatsapp-menu-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-align: right;
}

.whatsapp-menu-text strong {
  font-size: 0.95rem;
  color: var(--text);
}

.whatsapp-menu-text span:last-child {
  font-size: 0.78rem;
  color: var(--muted);
}

.whatsapp-menu-arrow {
  color: var(--primary);
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.category-nav {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0 0 0.85rem;
  scrollbar-width: none;
  margin-bottom: 0.25rem;
}

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

.category-chip {
  flex: 0 0 auto;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}

.category-chip:hover { transform: translateY(-1px); }

.category-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 40%, transparent);
}

.menu-section { margin-top: 1.25rem; }

.menu-section h2 {
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.menu-section h2 img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.item-card {
  background: var(--card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 0.85rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.15s, box-shadow 0.15s;
}

.item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
}

.item-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  background: #f8fafc;
}

.item-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.item-price {
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 0.95rem;
}

.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-top: auto;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 12%, white);
  color: var(--primary-dark);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
}

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

.qty-num {
  min-width: 1.5rem;
  text-align: center;
  font-weight: 700;
}

.cart-dock {
  position: fixed;
  bottom: 0.85rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 1.5rem);
  max-width: 560px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

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

.cart-dock-inner {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  background: color-mix(in srgb, var(--primary) 12%, white);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
  border-radius: 999px;
  padding: 0.4rem 0.4rem 0.4rem 0.55rem;
  box-shadow: var(--shadow-lg);
}

.cart-dock-cart {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  text-align: right;
  padding: 0.35rem 0.5rem;
  min-width: 0;
}

.cart-dock-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.cart-dock-meta {
  display: flex;
  flex-direction: column;
  font-size: 0.78rem;
  color: var(--muted);
  min-width: 0;
}

.cart-dock-meta span:last-child {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

.cart-dock-checkout {
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  background: var(--action);
  color: #fff;
  padding: 0.75rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(0, 51, 102, 0.28);
}

.cart-dock-checkout:hover { filter: brightness(1.06); }

.cart-dock-checkout.is-disabled,
.cart-dock-checkout:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}


.cart-min-warning,
.modal-min-warning {
  font-size: 0.8rem;
  font-weight: 600;
  color: #c2410c;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  text-align: center;
  margin: 0;
}

.modal-min-warning {
  margin-bottom: 0.85rem;
}

.btn-checkout.is-disabled,
.btn-checkout:disabled,
.cart-dock-checkout.is-disabled,
.cart-dock-checkout:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

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

.cart-summary {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  color: var(--muted);
}

.cart-summary span:last-child {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

.btn-checkout {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--primary) 35%, transparent);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 300;
  padding: 1rem;
}

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

.modal {
  background: var(--card);
  border-radius: 20px 20px 16px 16px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.modal-header h2 { flex: 1; font-size: 1.1rem; }

.btn-close {
  border: none;
  background: #f1f5f9;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.cart-items-list {
  list-style: none;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.checkout-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.checkout-cart-count {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
}

.checkout-clear-btn {
  border: none;
  background: #fef2f2;
  color: #dc2626;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
}

.checkout-clear-btn:hover:not(:disabled) {
  background: #fee2e2;
}

.checkout-clear-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cart-items-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.checkout-cart-row {
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  padding: 0.75rem 0.85rem !important;
}

.checkout-cart-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.checkout-cart-name {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.35;
}

.checkout-cart-unit {
  font-size: 0.78rem;
  color: var(--muted);
}

.checkout-cart-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.checkout-qty-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.checkout-qty-controls .btn-minus,
.checkout-qty-controls .btn-plus {
  width: 32px;
  height: 32px;
  font-size: 1rem;
}

.checkout-qty-value {
  min-width: 1.5rem;
  text-align: center;
  font-weight: 800;
}

.checkout-remove-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: #fef2f2;
  color: #dc2626;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.checkout-remove-btn:hover {
  background: #fee2e2;
}

.checkout-cart-line-total {
  font-weight: 800;
  color: var(--primary-dark);
  font-size: 0.9rem;
  text-align: left;
}

.checkout-cart-empty {
  justify-content: center;
  color: var(--muted);
  padding: 1.25rem !important;
}

.cart-items-list li:last-child { border-bottom: none; }

.form-group { margin-bottom: 0.85rem; }

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
}

.btn-submit {
  width: 100%;
  padding: 0.9rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--action), color-mix(in srgb, var(--action) 85%, #000));
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  margin-top: 0.5rem;
}

.modal-total-line {
  text-align: center;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.customer-summary {
  background: #f8fafc;
  border-radius: 12px;
  padding: 0.85rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

.summary-title { font-weight: 700; margin-bottom: 0.5rem; font-size: 0.9rem; }
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  padding: 0.25rem 0;
}

.success-screen {
  display: block;
  text-align: center;
  padding: 3rem 1rem 5rem;
}

.success-screen.hidden {
  display: none !important;
}

.success-screen .icon { font-size: 3rem; margin-bottom: 1rem; }

.success-note {
  margin-top: 1rem;
  color: var(--muted);
}

.btn-new-order {
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary-dark);
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.btn-new-order:hover {
  background: color-mix(in srgb, var(--primary) 10%, white);
}

/* Reorder bar */
.reorder-bar {
  margin: 0.75rem 0 0;
}

.reorder-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 15%, white), color-mix(in srgb, var(--primary) 10%, white));
  border: 1px solid color-mix(in srgb, var(--primary) 25%, var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.reorder-bar-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.85rem;
}

.reorder-bar-text strong { font-size: 0.95rem; }

.btn-reorder {
  border: none;
  background: var(--primary);
  color: #fff;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  font-size: 0.85rem;
}

/* Order tracker */
.order-tracker {
  margin: 1.5rem auto;
  max-width: 360px;
}

.tracker-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  text-align: right;
}

.tracker-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  position: relative;
  opacity: 0.45;
  transition: opacity 0.25s ease;
}

.tracker-step::before {
  content: '';
  position: absolute;
  right: 1.05rem;
  top: 2.2rem;
  bottom: -0.65rem;
  width: 2px;
  background: var(--border);
}

.tracker-step:last-child::before { display: none; }

.tracker-step.done,
.tracker-step.active {
  opacity: 1;
}

.tracker-step.done .tracker-icon {
  background: var(--primary);
  color: #fff;
}

.tracker-step.active .tracker-icon {
  background: var(--accent);
  color: #fff;
  animation: tracker-pulse 1.5s ease infinite;
}

.tracker-icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  font-size: 1rem;
  flex-shrink: 0;
  z-index: 1;
}

.tracker-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.tracker-cancelled {
  color: var(--danger);
  font-weight: 600;
  padding: 0.75rem;
  background: #fef2f2;
  border-radius: 12px;
}

@keyframes tracker-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* Item badges */
.item-thumb-wrap {
  position: relative;
  flex-shrink: 0;
}

.item-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.item-thumb-wrap .item-badges {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  left: 0.35rem;
  margin: 0;
  z-index: 2;
  pointer-events: none;
}

.item-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  line-height: 1.3;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
  backdrop-filter: blur(4px);
}

.item-badge.popular {
  background: color-mix(in srgb, #f97316 92%, white);
  color: #fff;
}

.item-badge.new {
  background: color-mix(in srgb, var(--primary) 92%, white);
  color: #fff;
}

.popular-section {
  margin-bottom: 0.5rem;
}

.popular-grid .item-card {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.item-card.item-added {
  animation: item-pop 0.35s ease;
}

.cart-bar-pulse {
  animation: cart-pulse 0.55s ease;
}

@keyframes item-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

@keyframes cart-pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.loading {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
}

.hidden { display: none !important; }

.empty-search {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
}

@media (min-width: 768px) {
  .modal-overlay { align-items: center; }
  .modal { border-radius: var(--radius); }
}

/* item cards (order.js markup) */
.category-section { margin-top: 1rem; scroll-margin-top: 8.5rem; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.section-head h2 { font-size: 1.05rem; font-weight: 800; }
.section-meta { font-size: 0.8rem; color: var(--muted); }

.item-card .item-main {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.item-card .item-thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.item-card .item-info { flex: 1; min-width: 0; }
.item-card .item-info h3 { font-size: 0.92rem; margin-bottom: 0.25rem; }
.item-card .price, .item-price { color: var(--primary-dark); font-weight: 800; }

.item-category {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.qty-controls, .qty-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn-minus, .btn-plus, .qty-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 12%, white);
  color: var(--primary-dark);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
}

.item-card.in-cart {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 15%, transparent);
}

.chip-count {
  background: rgba(255,255,255,0.2);
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  font-size: 0.7rem;
  margin-right: 0.25rem;
}

.category-chip:not(.active) .chip-count {
  background: #f1f5f9;
  color: var(--muted);
}

.empty-state { text-align: center; padding: 2rem; color: var(--muted); }

/* Skeleton loaders */
.skeleton-wrap { padding: 0; }

.skeleton-block {
  position: relative;
  overflow: hidden;
  background: #e2e8f0;
  border-radius: 12px;
}

.skeleton-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 100%
  );
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.skeleton-restaurant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.85rem;
}

.skeleton-restaurant {
  height: 88px;
  border-radius: var(--radius);
}

.skeleton-menu { padding-top: 0.25rem; }

.skeleton-search {
  height: 52px;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.skeleton-categories {
  margin-top: 0.5rem;
}

.skeleton-category-card {
  height: 200px;
  border-radius: var(--radius-sm);
}

.skeleton-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.skeleton-item-card {
  height: 148px;
  border-radius: var(--radius);
}

/* Fly to cart */
.fly-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 600;
}

.fly-dot {
  position: fixed;
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -16px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 45%, transparent);
  animation: fly-to-cart 0.55s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes fly-to-cart {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.35); opacity: 0.12; }
}

/* Empty-cart suggestions */
.suggest-bar {
  margin: 0.75rem 0 0.25rem;
  padding: 0.85rem 1rem;
  background: var(--card);
  border: 1px dashed color-mix(in srgb, var(--primary) 35%, var(--border));
  border-radius: var(--radius);
}

.suggest-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.suggest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.suggest-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s, background 0.12s;
}

.suggest-chip:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, white);
}

.suggest-chip strong {
  color: var(--primary-dark);
  font-size: 0.78rem;
}

.suggest-qty-modal {
  text-align: center;
}

.suggest-qty-price {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.suggest-qty-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.suggest-qty-controls #suggestQtyValue {
  font-size: 1.5rem;
  font-weight: 800;
  min-width: 2rem;
}

@media (max-width: 767px) {
  .mobile-nav:not(.hidden) { display: flex; }

  body.mobile-items-view .site-header { display: none; }

  body.mobile-items-view .hero-search-wrap { margin-top: 0.85rem; }

  .category-picker-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .category-card {
    flex-direction: row;
    align-items: center;
    min-height: 92px;
  }

  .category-card-media {
    width: 92px;
    min-height: 92px;
    aspect-ratio: auto;
    flex-shrink: 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  }

  .category-card-body {
    flex: 1;
    padding: 0.85rem 0.65rem;
  }

  .category-card-chevron {
    display: block;
    position: static;
    transform: none;
    padding-inline-start: 0.35rem;
    padding-inline-end: 0.85rem;
  }

  .category-card-emoji { display: none; }

  .hero-search-wrap { margin-top: 0.85rem; }

  .site-header { border-radius: 0 0 22px 22px; padding-bottom: 1.35rem; }

  .header-meta { display: none; }

  .brand-block { flex: 1; justify-content: center; }

  .header-inner { justify-content: center; }

  .items-grid {
    grid-template-columns: 1fr;
  }

  .cart-dock {
    bottom: 0.65rem;
    width: calc(100% - 1rem);
  }
}

@media (min-width: 768px) {
  .category-card-chevron { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .fly-dot,
  .skeleton-shimmer,
  .item-card.item-added,
  .cart-bar-pulse {
    animation: none !important;
  }
}
