/* OFOQ Public Menu — Buddies-style MD3 RTL */
:root {
  --brand: #e60012;
  --brand-dark: #cc0010;
  --brand-rgb: 230, 0, 18;
  --brand-soft: rgba(230, 0, 18, 0.08);
  --brand-glow: rgba(230, 0, 18, 0.22);
  --chip-bg: rgba(230, 0, 18, 0.07);
  --bg: #ffffff;
  --bg-soft: #ffffff;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --text: #1a1a1a;
  --muted: #6b7280;
  --border: #f0f0f0;
  --border-strong: #e5e7eb;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.05);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 10px;
  --font: 'Cairo', system-ui, sans-serif;
  --hero-gradient: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.75) 65%, #fff 100%);
  --sheet-bg: #ffffff;
  --sheet-text: #1a1a1a;
  --sheet-muted: #6b7280;
  --sheet-border: #e5e7eb;
  --md-ease: cubic-bezier(0.2, 0, 0, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
  -ms-touch-action: manipulation;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
  overscroll-behavior: none;
}

.hidden {
  display: none !important;
}

.load-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--bg-soft);
}

.load-brand {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.28em;
  color: var(--brand);
  text-indent: 0.28em;
}

.load-text {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.load-overlay.fade-out {
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.load-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.menu-app {
  min-height: 100dvh;
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
}

.menu-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.menu-topbar__spacer {
  flex: 1;
}

.menu-topbar__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font-size: 1.05rem;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s var(--md-ease);
}

.icon-btn--menu .icon-btn__bars,
.icon-btn--menu .icon-btn__bars::before,
.icon-btn--menu .icon-btn__bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  position: relative;
}

.icon-btn--menu .icon-btn__bars::before,
.icon-btn--menu .icon-btn__bars::after {
  content: '';
  position: absolute;
  left: 0;
}

.icon-btn--menu .icon-btn__bars::before {
  top: -6px;
}

.icon-btn--menu .icon-btn__bars::after {
  top: 6px;
}

.icon-btn--round {
  border-radius: 50%;
  background: #f3f4f6;
  font-size: 1.25rem;
}

.icon-btn:active {
  background: var(--brand-soft);
}

.lang-switch {
  gap: 4px;
  width: auto;
  padding: 0 10px;
  border-radius: 999px;
  background: #f9fafb;
  font-family: var(--font);
  font-weight: 800;
  font-size: 0.82rem;
}

.lang-switch__flag {
  font-size: 1rem;
  line-height: 1;
}

.menu-search-wrap {
  padding: 8px 16px 10px;
}

.menu-search-wrap input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
}

.menu-search-wrap input::placeholder {
  color: var(--muted);
}

.menu-search-wrap input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* ─── Hero: غلاف + كارد المطعم ─── */
.menu-hero-shell {
  position: relative;
  background: var(--bg);
  padding: 0 16px 12px;
}

.menu-cover-wrap {
  position: relative;
  height: 140px;
  margin: 0 -16px;
  overflow: hidden;
  border-radius: 0 0 20px 20px;
}

.menu-hero-shell:not(.menu-hero-shell--has-cover) .menu-cover-wrap {
  display: none;
}

.menu-cover {
  position: absolute;
  inset: 0;
}

.menu-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.menu-cover-shade {
  position: absolute;
  inset: 0;
  background: var(--hero-gradient);
  pointer-events: none;
}

.menu-cover-noise {
  display: none;
}

.menu-hero-card {
  position: relative;
  z-index: 4;
  margin-top: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.menu-hero-shell--has-cover .menu-hero-card {
  margin-top: -36px;
}

.menu-hero-card__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: 'logo info';
  column-gap: 14px;
  align-items: center;
  padding: 14px;
}

.menu-hero-card__logo-wrap {
  grid-area: logo;
  width: 64px;
  height: 64px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  align-self: center;
}

.menu-hero-card__logo,
.menu-hero-card__logo-fb {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  display: block;
  object-fit: cover;
}

.menu-hero-card__logo-fb {
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 900;
  background: var(--brand-soft);
  color: var(--brand);
}

.menu-hero-card__info {
  grid-area: info;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.menu-hero-card__title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.menu-hero__name {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 900;
  color: var(--brand);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-hero-card__sub-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: flex-start;
  gap: 6px 8px;
  width: 100%;
}

.menu-hero-card__footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 14px 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.menu-hero-card__footer:empty,
.menu-hero-card__footer:not(:has(:not(.hidden))) {
  display: none;
  margin: 0;
  padding: 0;
  border: none;
}

.menu-hero-card__footer .menu-table-badge,
.menu-hero-card__footer .menu-alert {
  margin: 0;
  width: 100%;
  max-width: none;
}

.menu-hero__rating,
.world-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  line-height: 1;
  flex-shrink: 0;
}

.menu-hero__rating.hidden {
  display: none !important;
}

.world-rating__stars {
  color: #f59e0b;
  letter-spacing: -1px;
}

.world-rating__meta {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.status-pill {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  line-height: 1.2;
  white-space: nowrap;
}

.status-pill.open {
  background: #dcfce7;
  color: #166534;
}

.status-pill.busy {
  background: #ffedd5;
  color: #c2410c;
}

.status-pill.closed {
  background: #fee2e2;
  color: #b91c1c;
}

.menu-chips {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
}

.menu-chips.hidden {
  display: none !important;
}

.menu-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--chip-bg);
  border: none;
  color: var(--text);
  white-space: nowrap;
  line-height: 1.2;
}

.menu-track-btn {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--brand);
  font-family: var(--font);
  font-size: 0.65rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
}

.menu-table-badge {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--brand-soft);
  border: 1px solid rgba(var(--brand-rgb), 0.2);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.menu-alert {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-size: 0.85rem;
  text-align: start;
  color: #92400e;
}

.menu-alert--warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.menu-reviews {
  display: none !important;
}

.reviews-carousel__head {
  margin-bottom: 8px;
}

.reviews-carousel__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
}

.reviews-carousel__track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.review-card {
  flex: 0 0 200px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text);
}

.menu-catalog {
  background: var(--bg);
  margin-top: 0;
  position: relative;
  z-index: 3;
}

.category-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 16px;
  scrollbar-width: none;
  position: sticky;
  top: calc(56px + env(safe-area-inset-top, 0px));
  z-index: 90;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.category-chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: none;
  border-radius: 999px;
  background: var(--chip-bg);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s var(--md-ease), color 0.2s var(--md-ease);
}

.chip--icon {
  padding: 10px 12px;
  background: var(--chip-bg);
}

.chip__icon {
  font-size: 1rem;
  line-height: 1;
}

.chip.is-active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 14px var(--brand-glow);
}

.menu-main {
  padding: 4px 16px calc(24px + env(safe-area-inset-bottom, 0px));
}

.menu-section-head {
  margin-bottom: 14px;
}

.menu-section-head__eyebrow {
  display: none;
}

.category-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text);
  text-align: start;
}

.products-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ─── Product rows (Buddies list) ─── */
.product-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  text-align: start;
  transition: transform 0.15s var(--md-ease), box-shadow 0.15s var(--md-ease);
}

.product-row:not(.product-row--disabled) {
  cursor: pointer;
}

.product-row:not(.product-row--disabled):active {
  transform: scale(0.99);
  box-shadow: 0 6px 20px rgba(var(--brand-rgb), 0.12);
}

.product-row--disabled {
  opacity: 0.55;
  pointer-events: none;
}

.product-row__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}

.product-row__title-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  flex-wrap: wrap;
}

.product-row__name {
  margin: 0;
  flex: 1;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text);
}

.product-row__badge {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.product-row__badge--new {
  background: #2563eb;
  color: #fff;
}

.product-row__desc {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-row__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 0;
}

.product-row__price {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--brand);
}

.product-row__qty {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
}

.product-row__media {
  position: relative;
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
}

.product-row__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-row__img--ph {
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  background: var(--chip-bg);
}

.product-row__cart-badge {
  position: absolute;
  top: 6px;
  inset-inline-start: 6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.product-row.cart-bounce,
.product-card.cart-bounce {
  animation: card-pop 0.35s ease;
}

/* اختيار الكمية */
.qty-picker__label {
  margin: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text);
  text-align: center;
}

.qty-picker__unit {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-dark);
  text-align: center;
}

.qty-picker-block {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* لوحة إدخال الكمية */
.qty-keypad {
  display: flex;
  flex-direction: column;
  gap: 12px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.qty-keypad__display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 72px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 2px solid var(--border);
  transition: border-color 0.2s var(--md-ease), background 0.2s var(--md-ease);
}

.qty-keypad__display--ok {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.qty-keypad__display--warn {
  border-color: #f59e0b;
  background: #fffbeb;
}

.qty-keypad__value {
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  transition: transform 0.18s var(--md-ease);
}

.qty-keypad__value--pop {
  transform: scale(1.06);
}

.qty-keypad__meta {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.qty-keypad__display--ok .qty-keypad__meta {
  color: var(--brand-dark);
}

.qty-keypad__keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.qty-keypad__key {
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.1s var(--md-ease), background 0.1s var(--md-ease), border-color 0.1s var(--md-ease);
}

.qty-keypad__key:active,
.qty-keypad__key--pulse {
  transform: scale(0.92);
  background: var(--brand-soft);
  border-color: var(--brand);
}

.qty-keypad__key--muted {
  font-size: 1.1rem;
  color: var(--muted);
}

.qty-keypad__key--confirm {
  font-size: 0.82rem;
  font-weight: 900;
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 6px 18px var(--brand-glow);
}

.qty-keypad__key--confirm:disabled {
  opacity: 0.45;
  pointer-events: none;
  box-shadow: none;
}

.qty-keypad__key--confirm:not(:disabled):active,
.qty-keypad__key--confirm.qty-keypad__key--pulse {
  background: var(--brand-dark);
  color: #fff;
}

.qty-sheet__body {
  padding-bottom: 20px;
}

.qty-sheet__product {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  border: 1px solid rgba(var(--brand-rgb), 0.22);
}

.qty-sheet__img-wrap {
  flex-shrink: 0;
}

.qty-sheet__img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
}

.qty-sheet__name {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.qty-sheet__price {
  margin: 4px 0 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brand-dark);
}

.sheet--qty .sheet__panel--compact {
  max-height: 78dvh;
}

@keyframes card-pop {
  50% {
    transform: scale(1.02);
  }
}

.menu-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-weight: 600;
}

.menu-footer {
  text-align: center;
  padding: 20px 16px calc(100px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.menu-footer__powered {
  margin: 0 0 6px;
  font-size: 0.75rem;
  color: var(--muted);
}

.menu-footer__rights {
  margin: 10px 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

.ofoq-brand--menu {
  position: static;
  transform: none;
  display: inline-flex;
  margin: 0 auto;
  color: var(--brand-dark) !important;
  background: var(--brand-soft) !important;
  border-color: rgba(var(--brand-rgb), 0.28) !important;
  box-shadow: none !important;
}

.cart-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 500;
}

/* إخفاء شريط السلة عند فتح نافذة الطلب (كان يغطي الأزرار على الموبايل) */
body.checkout-open .cart-bar,
body.sheet-open .cart-bar,
body.drawer-open .cart-bar {
  display: none !important;
}

body.checkout-open .whatsapp-fab,
body.sheet-open .whatsapp-fab,
body.drawer-open .whatsapp-fab {
  display: none !important;
}

.cart-bar__btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: none;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-family: var(--font);
  cursor: pointer;
  box-shadow: 0 8px 24px var(--brand-glow);
}

.cart-bar--empty .cart-bar__btn {
  background: #fff;
  color: var(--text);
  border: 2px solid var(--brand);
  box-shadow: var(--shadow-card);
}

.cart-bar--empty .cart-bar__badge {
  background: var(--brand-soft);
  color: var(--brand);
}

.cart-bar--empty #cart-bar-total {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.cart-bar__icon {
  font-size: 1.25rem;
}

.cart-bar__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: start;
}

.cart-bar__badge,
#cart-count {
  background: #fff;
  color: var(--brand);
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.85rem;
}

#cart-count.pop {
  animation: pop 0.35s ease;
}

@keyframes pop {
  50% {
    transform: scale(1.15);
  }
}

.cart-bar__label {
  flex: 1;
  text-align: start;
  font-weight: 700;
}

.menu-drawer {
  position: fixed;
  inset: 0;
  z-index: 800;
}

.menu-drawer.is-open .menu-drawer__panel {
  transform: translateX(0);
}

.menu-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.menu-drawer__panel {
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: min(320px, 90vw);
  height: 100%;
  background: #fff;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 0 calc(16px + env(safe-area-inset-bottom, 0px));
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s var(--md-ease);
  overflow-y: auto;
}

.menu-drawer__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--border);
}

.menu-drawer__head h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 900;
}

.drawer-nav {
  flex: 1;
  padding: 8px 0;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: start;
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}

.drawer-link__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.drawer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 18px 16px;
  background: var(--brand);
  margin-top: auto;
}

.drawer-social__link {
  width: 28px;
  height: 28px;
  background: #fff;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  opacity: 0.95;
}

.drawer-social__link--fb {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z'/%3E%3C/svg%3E");
}

.drawer-social__link--ig {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z'/%3E%3C/svg%3E");
}

.drawer-social__link--tt {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M19.59 6.69a4.83 4.83 0 01-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 01-2.88 2.5 2.89 2.89 0 01-2.89-2.89 2.89 2.89 0 012.89-2.89c.28 0 .54.04.79.1V9.01a6.27 6.27 0 00-.79-.05 6.34 6.34 0 00-6.34 6.34 6.34 6.34 0 006.34 6.34 6.34 6.34 0 006.33-6.34V8.69a8.18 8.18 0 004.78 1.52V6.76a4.85 4.85 0 01-1.01-.07z'/%3E%3C/svg%3E");
}

.drawer-social__link--wa {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.435 9.884-9.881 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E");
}

.drawer-google {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 16px 0;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: var(--text);
}

.drawer-google__g {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: conic-gradient(from -45deg, #ea4335, #fbbc05, #34a853, #4285f4, #ea4335);
  color: #fff;
  font-weight: 900;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.drawer-google__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: start;
}

.drawer-google__stars {
  color: #f59e0b;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.drawer-google__text {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.4;
}

.whatsapp-fab {
  position: fixed;
  inset-inline-start: 16px;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  z-index: 480;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

.whatsapp-fab__icon {
  width: 28px;
  height: 28px;
  background: #fff;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.435 9.884-9.881 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E")
    center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.435 9.884-9.881 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E")
    center/contain no-repeat;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 600;
  pointer-events: none;
}

#checkout-sheet {
  z-index: 700;
}

.sheet:not(.hidden) {
  pointer-events: auto;
}

.sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.28s;
}

.sheet.is-open .sheet__backdrop {
  opacity: 1;
}

.sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(92dvh, 100%);
  background: var(--sheet-bg);
  color: var(--sheet-text);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

#checkout-sheet .sheet__panel {
  height: min(92dvh, 100%);
  max-height: min(92dvh, 100%);
}

.sheet.is-open .sheet__panel {
  transform: translateY(0);
}

.sheet__panel--compact {
  max-height: 85dvh;
}

.sheet__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sheet__head h2 {
  flex: 1;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  text-align: center;
  color: var(--sheet-text);
}

.sheet .field span,
.sheet .checkout-form__lead,
.sheet .qty-picker__label {
  color: var(--sheet-muted);
}

.sheet .field input,
.sheet .field select,
.sheet .field textarea {
  color: var(--sheet-text);
  background: #f8fafc;
  border-color: var(--sheet-border);
}

.sheet .receipt,
.sheet .cart-line {
  background: #f8fafc;
  border-color: var(--sheet-border);
  color: var(--sheet-text);
}

.sheet .cart-line__name,
.sheet .qty-sheet__name {
  color: var(--sheet-text);
}

.sheet .icon-btn {
  background: #f1f5f9;
  border-color: var(--sheet-border);
  color: var(--sheet-text);
}

.sheet-steps {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.sheet-step {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 8px;
  background: #f1f5f9;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--muted);
}

.sheet-step.is-active {
  background: var(--brand);
  color: #fff;
}

.sheet__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.sheet__body--checkout {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  min-height: 0;
}

.sheet-pane {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.sheet-pane:not(.hidden) {
  display: flex;
}

.sheet-pane__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px 8px;
  overscroll-behavior: contain;
}

.sheet-pane__foot {
  flex-shrink: 0;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 16px rgba(15, 23, 42, 0.06);
}

.sheet-pane__foot .btn-primary {
  margin-top: 0;
}

.btn-primary {
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-primary--accent {
  background: var(--brand-dark);
}

.btn-ghost {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: transparent;
  font-family: var(--font);
  cursor: pointer;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.field span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--font);
  font-size: 16px;
}

.track-delivery-map {
  height: 240px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 10px;
  border: 1px solid var(--border);
  touch-action: pan-x pan-y;
}

.track-delivery-map--live {
  border-color: rgba(22, 163, 74, 0.45);
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.12);
}

.track-delivery-map .leaflet-container {
  font-family: var(--font);
}

/* Order & delivery tracking timeline */
.track-progress {
  position: relative;
  padding: 8px 0 14px;
}

.track-progress-rail {
  position: absolute;
  top: 22px;
  left: 6%;
  right: 6%;
  height: 3px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}

.track-progress-fill {
  height: 100%;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, var(--brand), #22c55e);
  border-radius: 99px;
  transition: width 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.track-progress-fill--run {
  animation: track-fill-glow 2.4s ease-in-out infinite;
}

.track-progress-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
}

.track-progress-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.track-progress-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  background: #fff;
  color: #64748b;
  transition: transform 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}

.track-progress-step.done .track-progress-dot {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.track-progress-step.active .track-progress-dot {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(var(--brand-rgb), 0.1);
  transform: scale(1.08);
}

.track-progress-dot--pulse {
  animation: track-step-pulse 1.6s ease-in-out infinite;
}

.track-progress-label {
  font-size: 0.58rem;
  font-weight: 700;
  color: #64748b;
  text-align: center;
  line-height: 1.2;
}

.track-progress-step.active .track-progress-label {
  color: var(--brand);
}

.track-progress-label--short {
  display: none;
}

@media (max-width: 420px) {
  .track-progress-label--full {
    display: none;
  }
  .track-progress-label--short {
    display: block;
  }
}

.track-delivery-card {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fafc;
}

.track-delivery-card--waiting {
  text-align: center;
}

.track-delivery-title {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 800;
}

.track-delivery-status {
  margin: 0 0 10px;
  color: var(--brand);
  font-weight: 700;
  font-size: 0.88rem;
}

.track-delivery-hint,
.track-map-hint {
  margin: 8px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

.track-waiting-driver {
  padding: 16px 8px;
}

.track-waiting-driver__icon {
  display: inline-block;
  font-size: 2rem;
  margin-bottom: 8px;
}

.track-waiting-driver__icon--pulse {
  animation: track-step-pulse 1.4s ease-in-out infinite;
}

.track-driver-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
}

.track-driver-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(var(--brand-rgb), 0.12);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.track-driver-card__body {
  flex: 1;
  min-width: 0;
}

.track-driver-card__name {
  margin: 0;
  font-weight: 800;
  font-size: 0.92rem;
}

.track-driver-card__phone {
  display: inline-block;
  margin-top: 2px;
  color: var(--brand);
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
}

.track-driver-card__live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 800;
  color: #16a34a;
  white-space: nowrap;
}

.track-driver-card__live--muted {
  color: #94a3b8;
}

.track-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  animation: track-live-blink 1.2s ease-in-out infinite;
}

.track-driver-marker-wrap {
  background: transparent;
  border: none;
}

.track-driver-marker {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}

.track-driver-marker__icon {
  position: relative;
  z-index: 2;
  font-size: 1.35rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.track-driver-marker__pulse {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: rgba(22, 163, 74, 0.35);
  animation: driver-map-pulse 2s ease-out infinite;
  z-index: 1;
}

.track-restaurant-marker-wrap {
  background: transparent;
  border: none;
}

.track-restaurant-marker {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.track-map-geocoding {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 160px;
  padding: 16px;
  text-align: center;
  color: #4b5563;
  font-size: 0.9rem;
  background: #f3f4f6;
}

.track-address {
  margin: 0 0 10px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text);
}

.track-eta-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 0 0 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  border: 1px solid #bfdbfe;
}

.track-eta-badge__icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.track-eta-badge__text {
  font-size: 0.84rem;
  font-weight: 800;
  color: #1e3a8a;
  line-height: 1.35;
}

.order-state {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  background: #f1f5f9;
  color: #475569;
}

.order-state.delivered {
  background: #dcfce7;
  color: #166534;
}

.order-state.cancelled {
  background: #fee2e2;
  color: #b91c1c;
}

@keyframes track-fill-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.82; }
}

@keyframes track-step-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(var(--brand-rgb), 0.35); }
  50% { transform: scale(1.06); box-shadow: 0 0 0 8px rgba(var(--brand-rgb), 0); }
}

@keyframes track-live-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@keyframes driver-map-pulse {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .track-progress-fill--run,
  .track-progress-dot--pulse,
  .track-waiting-driver__icon--pulse,
  .track-live-dot,
  .track-driver-marker__pulse {
    animation: none !important;
  }
}

.cart-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.cart-line {
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #f8fafc;
}

.cart-line__top {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.cart-line__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

.cart-line__info {
  flex: 1;
  min-width: 0;
}

.cart-line__name {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  word-break: break-word;
  line-height: 1.3;
}

.cart-line__meta {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.cart-line__unit {
  margin: 4px 0 0;
  font-size: 0.72rem;
  color: #94a3b8;
}

.cart-line__total {
  margin: 0;
  margin-inline-start: auto;
  font-weight: 800;
  color: var(--brand-dark);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 380px) {
  .cart-line__top {
    flex-direction: column;
  }

  .cart-line__total {
    margin-inline-start: 0;
    width: 100%;
    text-align: start;
    padding-top: 4px;
  }

  .cart-bar__btn {
    padding: 12px 14px;
    gap: 8px;
  }

  .cart-bar__label {
    font-size: 0.88rem;
  }

  #cart-bar-total {
    font-size: 0.9rem;
    max-width: 42%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.cart-line__actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  display: flex;
  justify-content: flex-end;
}

.cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  background: #fff;
}

.cart-qty button {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #f1f5f9;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
}

.cart-qty span {
  min-width: 28px;
  text-align: center;
  font-weight: 800;
}

.receipt {
  padding: 12px;
  border-radius: var(--radius);
  background: #f8fafc;
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

.receipt .row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
}

.receipt .row.total {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-weight: 800;
}

.receipt .hint {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}

.checkout-message.error {
  color: #b91c1c;
}

.option-block__title {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--muted);
}

.option-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.option-chip {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-family: var(--font);
  font-weight: 700;
  cursor: pointer;
}

.option-chip.is-active {
  border-color: var(--brand);
  background: #f0fdfa;
  color: var(--brand-dark);
}

.option-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
}

.option-row.is-on {
  border-color: var(--brand);
  background: #f0fdfa;
}

.option-row__name {
  flex: 1;
  font-weight: 700;
}

.option-row__price {
  font-weight: 700;
  color: var(--brand-dark);
}

.product-sheet__foot {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

.product-sheet__qty {
  display: flex;
  align-items: center;
  gap: 4px;
}

.qty-round {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

#product-sheet-add {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

body.table-order-mode .sheet-step[data-step='2'] {
  display: none;
}

.empty-menu {
  text-align: center;
  padding: 24px 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.checkout-message {
  margin: 0 0 8px;
  font-size: 0.85rem;
}

/* نموذج التوصيل المبسّط */
.checkout-form__lead {
  margin: 0 0 14px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
}

.checkout-form .field textarea {
  min-height: 88px;
  resize: vertical;
}

.location-box {
  margin-bottom: 14px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  border: 1px dashed rgba(15, 118, 110, 0.35);
}

.btn-location {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #fff;
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.3);
}

.btn-location:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-location.is-done {
  background: #166534;
  box-shadow: 0 4px 14px rgba(22, 101, 52, 0.25);
}

.btn-location__icon {
  font-size: 1.2rem;
}

.location-status {
  margin: 10px 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}

.location-status.is-ok {
  color: #166534;
}

.location-status.is-error {
  color: #b91c1c;
}

@media (min-width: 560px) {
  .products-list {
    gap: 14px;
  }
}

@media (min-width: 720px) {
  .menu-app {
    max-width: 520px;
    margin: 0 auto;
    background: var(--bg-soft);
    box-shadow: 0 0 0 1px var(--border), var(--shadow-lg);
  }

  .cart-bar {
    max-width: 488px;
    left: 50%;
    transform: translateX(-50%);
  }

  .menu-cover-wrap {
    height: 220px;
  }
}

/* ——— Live delivery tracking (reference UI) ——— */
.track-sheet {
  position: fixed;
  inset: 0;
  z-index: 10050;
  pointer-events: none;
}

.track-sheet:not(.hidden) {
  pointer-events: auto;
}

.track-sheet--live {
  background: #fff;
}

.track-live-layout {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #eef2f6;
}

.track-live-layout.hidden {
  display: none !important;
}

.track-live-layout__map {
  flex: 1 1 54%;
  min-height: 260px;
  position: relative;
}

.track-live-map {
  width: 100%;
  height: 100%;
  background: #e2e8f0;
}

.track-live-map .leaflet-container {
  font-family: var(--font);
  background: #e2e8f0;
}

.track-live-fab {
  position: absolute;
  top: max(14px, env(safe-area-inset-top, 0px));
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #fff;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.14);
  display: grid;
  place-items: center;
  color: #475569;
  cursor: pointer;
  z-index: 500;
}

.track-live-fab--back {
  left: 16px;
}

.track-live-fab--gps {
  right: 16px;
  color: #16a34a;
}

.track-live-layout__panel {
  flex: 0 0 auto;
  background: #fff;
  border-radius: 26px 26px 0 0;
  margin-top: -20px;
  padding: 22px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.08);
  position: relative;
  z-index: 600;
}

.track-live-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}

.track-live-info__item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
}

.track-live-info__icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.track-live-info__text {
  min-width: 0;
}

.track-live-info__label {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 4px;
}

.track-live-info__value {
  display: block;
  font-size: 0.86rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  word-break: break-word;
}

.track-live-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 18px 0;
  border: none;
}

.track-live-courier {
  display: flex;
  align-items: center;
  gap: 12px;
}

.track-live-courier__avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(145deg, #dcfce7, #bbf7d0);
  color: #15803d;
  font-weight: 900;
  font-size: 1rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.track-live-courier__meta {
  flex: 1;
  min-width: 0;
}

.track-live-courier__meta strong {
  display: block;
  font-size: 0.96rem;
  font-weight: 800;
  color: #0f172a;
}

.track-live-courier__meta span {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 600;
}

.track-live-courier__btn {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #22c55e;
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}

.track-live-courier__btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.track-live-cta {
  width: 100%;
  margin-top: 18px;
  padding: 16px;
  border: none;
  border-radius: 14px;
  background: #22c55e;
  color: #fff;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(34, 197, 94, 0.35);
}

.track-live-status {
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
}

.track-dest-pin-wrap {
  background: transparent;
  border: none;
}

.track-dest-pin {
  width: 26px;
  height: 26px;
  background: #ef4444;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.45);
  margin-left: 3px;
}

.track-classic-layout {
  position: absolute;
  inset: 0;
}

.track-classic-layout.hidden {
  display: none !important;
}

.track-sheet .track-classic-layout .sheet__backdrop {
  opacity: 0;
  transition: opacity 0.28s;
}

.track-sheet.is-open .track-classic-layout .sheet__backdrop {
  opacity: 1;
}

.track-sheet .track-classic-layout .sheet__panel {
  transform: translateY(100%);
}

.track-sheet.is-open .track-classic-layout .sheet__panel {
  transform: translateY(0);
}
