/* =========================================================
   FEASTLY — components.css
   Buttons, inputs, cards, nav, modals, toasts, badges
   ========================================================= */

/* =========================================================
   1. BUTTONS
   ========================================================= */
.btn {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  --btn-bg-hover: var(--brand-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  height: 44px;
  padding: 0 var(--s-5);
  border-radius: var(--r-full);
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: -0.01em;
  background: var(--btn-bg);
  color: var(--btn-fg);
  transition: transform var(--dur-1) var(--ease),
              background var(--dur-1) var(--ease),
              box-shadow var(--dur-2) var(--ease);
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
}
.btn:hover  { background: var(--btn-bg-hover); }
.btn:active { transform: scale(.97); }

.btn-primary {
  --btn-bg: var(--brand);
  --btn-bg-hover: var(--brand-600);
  box-shadow: var(--sh-brand);
}
.btn-primary:hover { box-shadow: 0 10px 26px rgba(255,107,53,.36); }

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-bg-hover: var(--bg-3);
}

.btn-outline {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-bg-hover: var(--bg-3);
  border: 1px solid var(--border-strong);
}
.btn-outline:hover { border-color: var(--text-3); }

.btn-soft {
  --btn-bg: var(--brand-soft);
  --btn-fg: var(--brand-700);
  --btn-bg-hover: #ffe4d6;
}
[data-theme="dark"] .btn-soft { --btn-bg-hover: #3a2214; }

.btn-danger {
  --btn-bg: var(--danger);
  --btn-bg-hover: #cf3b40;
}

.btn-sm  { height: 36px; padding: 0 var(--s-4); font-size: var(--fs-sm); }
.btn-lg  { height: 52px; padding: 0 var(--s-6); font-size: var(--fs-lg); }
.btn-block { width: 100%; }

.btn[disabled], .btn:disabled {
  opacity: .5; cursor: not-allowed; transform: none;
}

/* Icon inside button */
.btn svg { width: 18px; height: 18px; }

/* =========================================================
   2. ICON BUTTON (bare)
   ========================================================= */
.icon-btn {
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  color: var(--text);
  transition: background var(--dur-1) var(--ease),
              transform var(--dur-1) var(--ease);
}
.icon-btn:hover  { background: var(--bg-3); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.is-active { color: var(--brand); }
.icon-btn.is-active svg { fill: var(--brand); }

/* =========================================================
   3. INPUTS
   ========================================================= */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.field > label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-2);
}
.input,
.select,
.textarea {
  width: 100%;
  height: 48px;
  padding: 0 var(--s-4);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: var(--fs-md);
  color: var(--text);
  transition: border-color var(--dur-1) var(--ease),
              background var(--dur-1) var(--ease),
              box-shadow var(--dur-1) var(--ease);
}
.textarea { height: auto; padding: var(--s-3) var(--s-4); resize: vertical; min-height: 96px; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(255,107,53,.12);
}

/* Input with leading icon */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrap svg {
  position: absolute;
  left: var(--s-4);
  width: 18px; height: 18px;
  color: var(--text-3);
  pointer-events: none;
}
.input-wrap .input { padding-left: 44px; }
.input-wrap .input-action {
  position: absolute;
  right: var(--s-2);
  top: 50%; transform: translateY(-50%);
}

/* Search bar (hero) */
.search-bar {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  height: 56px;
  padding: 0 var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  box-shadow: var(--sh-2);
  transition: box-shadow var(--dur-2) var(--ease),
              border-color var(--dur-2) var(--ease);
}
.search-bar:focus-within {
  border-color: var(--brand);
  box-shadow: 0 8px 24px rgba(255,107,53,.18);
}
.search-bar svg { width: 20px; height: 20px; color: var(--text-3); flex-shrink: 0; }
.search-bar input { flex: 1; height: 100%; font-size: var(--fs-md); }

/* =========================================================
   4. CHIPS / TAGS
   ========================================================= */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  height: 36px;
  padding: 0 var(--s-4);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--dur-1) var(--ease);
}
.chip:hover { border-color: var(--text-3); color: var(--text); }
.chip.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
}
.chip svg { width: 15px; height: 15px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: 3px 9px;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .01em;
}
.tag-brand   { background: var(--brand-soft); color: var(--brand-700); }
.tag-success { background: rgba(31,169,113,.12); color: var(--success); }
.tag-warning { background: rgba(245,165,36,.14); color: #b06a00; }
.tag-danger  { background: rgba(229,72,77,.12);  color: var(--danger); }
.tag-neutral { background: var(--bg-3); color: var(--text-2); }
[data-theme="dark"] .tag-warning { color: var(--warning); }

/* =========================================================
   5. AVATAR
   ========================================================= */
.avatar {
  width: 40px; height: 40px;
  border-radius: var(--r-full);
  background: var(--bg-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
  font-weight: 800;
  font-size: var(--fs-md);
  color: var(--text-2);
  overflow: hidden;
  flex-shrink: 0;
  user-select: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 38px; height: 38px; font-size: 16px; }
.avatar-lg { width: 72px; height: 72px; font-size: 28px; }
.avatar-brand {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(232, 93, 38, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

#navAvatar {
  width: 38px;
  height: 38px;
  border-radius: var(--r-full);
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 3px 10px rgba(232, 93, 38, 0.26), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  transition: transform var(--dur-1) var(--ease),
              box-shadow var(--dur-2) var(--ease),
              filter var(--dur-1) var(--ease);
}
#navAvatar:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 6px 16px rgba(232, 93, 38, 0.38), inset 0 1px 1px rgba(255, 255, 255, 0.38);
  filter: brightness(1.04);
}
#navAvatar:active {
  transform: scale(0.96);
}

/* =========================================================
   6. CARD (base)
   ========================================================= */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  transition: transform var(--dur-2) var(--ease),
              box-shadow var(--dur-2) var(--ease),
              border-color var(--dur-2) var(--ease);
}
.card-pad { padding: var(--s-5); }

/* =========================================================
   7. RESTAURANT CARD
   ========================================================= */
.rest-card {
  width: 260px;
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--dur-2) var(--ease);
}
.rest-card:hover { transform: translateY(-4px); }
.rest-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-3);
}
.rest-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--dur-3) var(--ease);
}
.rest-card:hover .rest-card__media img { transform: scale(1.06); }
.rest-card__badge {
  position: absolute;
  top: var(--s-3); left: var(--s-3);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(8px);
  color: var(--text);
  padding: 5px 11px;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.rest-card__badge svg { width: 12px; height: 12px; color: var(--brand); }
.rest-card__fav {
  position: absolute;
  top: var(--s-3); right: var(--s-3);
  width: 34px; height: 34px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(8px);
  border-radius: var(--r-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: transform var(--dur-1) var(--ease);
}
.rest-card__fav:hover { transform: scale(1.1); }
.rest-card__fav svg { width: 17px; height: 17px; }
.rest-card__fav.is-active svg { fill: var(--brand); color: var(--brand); }

.rest-card__body { padding: var(--s-3) var(--s-4) var(--s-4); }
.rest-card__title {
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 3px;
}
.rest-card__meta {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-sm);
  color: var(--text-3);
}
.rest-card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }
.rest-card__rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 600;
  color: var(--text-2);
}
.rest-card__rating svg { width: 13px; height: 13px; fill: var(--brand); color: var(--brand); }

/* =========================================================
   8. DISH / MENU ITEM ROW
   ========================================================= */
.dish {
  display: flex;
  gap: var(--s-4);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--border);
}
.dish:last-child { border-bottom: 0; }
.dish__body { flex: 1; min-width: 0; }
.dish__title {
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.dish__desc {
  font-size: var(--fs-sm);
  color: var(--text-3);
  margin-bottom: var(--s-2);
}
.dish__price {
  font-weight: 700;
  font-size: var(--fs-md);
  color: var(--text);
}
.dish__media {
  position: relative;
  width: 116px;
  height: 116px;
  border-radius: var(--r-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-3);
}
.dish__media img { width: 100%; height: 100%; object-fit: cover; }
.dish__add {
  position: absolute;
  bottom: -6px; left: 50%;
  transform: translateX(-50%);
  height: 32px;
  padding: 0 var(--s-4);
  background: var(--surface);
  color: var(--brand);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .02em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: var(--sh-2);
  transition: all var(--dur-1) var(--ease);
}
.dish__add:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.dish__add svg { width: 12px; height: 12px; }

/* Veg / non-veg indicator */
.veg-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px; height: 14px;
  border: 1.5px solid var(--success);
  border-radius: 3px;
  flex-shrink: 0;
}
.veg-dot::after {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
}
.veg-dot.nonveg { border-color: var(--danger); }
.veg-dot.nonveg::after { background: var(--danger); }

/* =========================================================
   9. QUANTITY STEPPER
   ========================================================= */
.qty {
  display: inline-flex;
  align-items: center;
  background: var(--brand);
  color: #fff;
  border-radius: var(--r-full);
  height: 34px;
  overflow: hidden;
  box-shadow: var(--sh-brand);
}
.qty button {
  width: 34px; height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background var(--dur-1) var(--ease);
}
.qty button:hover { background: rgba(0,0,0,.12); }
.qty span {
  min-width: 22px;
  text-align: center;
  font-weight: 700;
  font-size: var(--fs-sm);
}
.qty svg { width: 14px; height: 14px; }

/* =========================================================
   10. TOP NAVBAR (desktop)
   ========================================================= */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: var(--z-nav);
}
.navbar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--s-4);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-weight: 800;
  font-size: var(--fs-xl);
  letter-spacing: -0.03em;
  color: var(--text);
  flex-shrink: 0;
}
.brand__mark {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--sh-brand);
}
.brand__mark svg { width: 18px; height: 18px; }

.navbar__links {
  display: none;
  align-items: center;
  gap: var(--s-1);
  margin-left: var(--s-5);
}
.navbar__links a {
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-2);
  transition: color var(--dur-1) var(--ease),
              background var(--dur-1) var(--ease);
}
.navbar__links a:hover { color: var(--text); background: var(--bg-3); }
.navbar__links a.is-active { color: var(--brand); font-weight: 600; }

.navbar__search {
  flex: 1;
  max-width: 420px;
  margin-inline: auto;
  display: none;
}
.navbar__actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-left: auto;
}

@media (min-width: 900px) {
  .navbar__links { display: flex; }
  .navbar__search { display: block; }
}

/* Cart badge */
.cart-btn { position: relative; }
.cart-badge {
  position: absolute;
  top: -2px; right: -2px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  background: var(--brand);
  color: #fff;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
}

/* =========================================================
   11. BOTTOM NAV (mobile)
   ========================================================= */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: var(--z-nav);
}
.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--s-2) 0;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 500;
  transition: color var(--dur-1) var(--ease);
  position: relative;
}
.bottom-nav__item svg { width: 22px; height: 22px; }
.bottom-nav__item.is-active { color: var(--brand); }
.bottom-nav__item.is-active svg { fill: var(--brand); }
.bottom-nav__item .cart-badge { top: 4px; right: 50%; margin-right: -20px; }

@media (min-width: 900px) {
  .bottom-nav { display: none; }
}

/* =========================================================
   12. MODAL / SHEET
   ========================================================= */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,10,14,.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-2) var(--ease),
              visibility var(--dur-2) var(--ease);
}
.overlay.is-open { opacity: 1; visibility: visible; }

.modal {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -48%) scale(.96);
  width: min(92vw, 440px);
  max-height: 90dvh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-3);
  z-index: calc(var(--z-modal) + 1);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-2) var(--ease),
              transform var(--dur-2) var(--ease),
              visibility var(--dur-2) var(--ease);
}
.modal.is-open {
  opacity: 1; visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}
.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-5);
  border-bottom: 1px solid var(--border);
}
.modal__head h3 { font-size: var(--fs-lg); }
.modal__body { padding: var(--s-5); }
.modal__foot {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-5);
  border-top: 1px solid var(--border);
}

/* Bottom sheet (mobile modal) */
@media (max-width: 640px) {
  .modal {
    left: 0; right: 0; bottom: 0; top: auto;
    width: 100%;
    max-height: 88dvh;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    transform: translateY(100%);
  }
  .modal.is-open { transform: translateY(0); }
  .modal__head { position: relative; }
  .modal__head::before {
    content: '';
    position: absolute;
    top: 8px; left: 50%;
    transform: translateX(-50%);
    width: 40px; height: 4px;
    border-radius: var(--r-full);
    background: var(--border-strong);
  }
}

/* =========================================================
   13. CART DRAWER
   ========================================================= */
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  background: var(--surface);
  z-index: calc(var(--z-modal) + 1);
  transform: translateX(100%);
  transition: transform var(--dur-3) var(--ease);
  display: flex;
  flex-direction: column;
}
.drawer.is-open { transform: translateX(0); }
.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-5);
  border-bottom: 1px solid var(--border);
}
.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--s-5);
}

/* =========================================================
   14. TOAST
   ========================================================= */
.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottom-nav-h) + var(--s-4) + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  align-items: center;
  pointer-events: none;
}
@media (min-width: 900px) {
  .toast-wrap { bottom: var(--s-6); left: auto; right: var(--s-6); transform: none; align-items: flex-end; }
}
.toast {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: var(--text);
  color: var(--bg);
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: 500;
  box-shadow: var(--sh-3);
  pointer-events: auto;
  animation: toastIn var(--dur-2) var(--ease) both;
  max-width: min(92vw, 400px);
}
.toast svg { width: 16px; height: 16px; flex-shrink: 0; }
.toast.is-out { animation: toastOut var(--dur-2) var(--ease) both; }

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

/* =========================================================
   15. RATING PILL
   ========================================================= */
.rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  background: var(--brand-soft);
  color: var(--brand-700);
  font-size: var(--fs-xs);
  font-weight: 700;
}
.rating svg { width: 12px; height: 12px; fill: var(--brand); color: var(--brand); }

/* =========================================================
   16. EMPTY STATE
   ========================================================= */
.empty {
  text-align: center;
  padding: var(--s-9) var(--s-5);
  max-width: 340px;
  margin-inline: auto;
}
.empty__icon {
  width: 84px; height: 84px;
  margin: 0 auto var(--s-4);
  border-radius: var(--r-full);
  background: var(--brand-soft);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.empty__icon svg { width: 38px; height: 38px; }
.empty h3 { margin-bottom: var(--s-2); }
.empty p { color: var(--text-3); font-size: var(--fs-sm); margin-bottom: var(--s-5); }

/* =========================================================
   17. SECTION SPACING
   ========================================================= */
.section { margin-top: var(--s-8); }
@media (max-width: 640px) { .section { margin-top: var(--s-7); } }

/* =========================================================
   18. UTILITY: sr-only
   ========================================================= */

/* =========================================================
   19. UTILITY: hide/show by breakpoint
   ========================================================= */
.only-mobile { display: block; }
.only-desktop { display: none; }
@media (min-width: 900px) {
  .only-mobile { display: none !important; }
  .only-desktop { display: block !important; }
  .avatar.only-desktop,
  #navAvatar.only-desktop { display: inline-flex !important; }
}

/* =========================================================
   OPTION GROUPS — customization modal
   ========================================================= */
.opt-group {
  margin-bottom: var(--s-5);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--border);
}
.opt-group:last-child { border-bottom: 0; padding-bottom: 0; }

.opt-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}
.opt-group__head h4 {
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.opt-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.opt-choice {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--dur-2) var(--ease);
  user-select: none;
  position: relative;
}
.opt-choice:hover { border-color: var(--border-strong); }

.opt-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.opt-choice__box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--dur-1) var(--ease);
}
.opt-choice input[type="checkbox"] + .opt-choice__box {
  border-radius: 5px;
}
.opt-choice input:checked ~ .opt-choice__box {
  border-color: var(--brand);
  background: var(--brand);
}
.opt-choice input:checked ~ .opt-choice__box::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}
.opt-choice input[type="checkbox"]:checked ~ .opt-choice__box::after {
  content: '✓';
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  background: none;
  width: auto;
  height: auto;
}

.opt-choice__body { flex: 1; min-width: 0; }
.opt-choice__body strong {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: 2px;
}
.opt-choice__body small {
  font-size: var(--fs-xs);
  color: var(--text-3);
}

.opt-choice:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.opt-counter {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.qty-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  transition: all var(--dur-1) var(--ease);
}
.qty-btn:hover { border-color: var(--brand); color: var(--brand); }
.qty-btn:active { transform: scale(.94); }

.opt-counter__value {
  min-width: 28px;
  text-align: center;
  font-weight: 700;
  font-size: var(--fs-md);
}
.opt-counter__price {
  margin-left: auto;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-2);
}

/* =========================================================
   20. FLOATING CART BAR
   ========================================================= */
.floating-cart {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottom-nav-h) + var(--s-3) + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(16px);
  width: min(92vw, 520px);
  background: var(--text);
  color: var(--bg);
  border-radius: var(--r-lg);
  padding: var(--s-3) var(--s-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  box-shadow: var(--sh-3);
  z-index: calc(var(--z-nav) + 10);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all var(--dur-2) var(--ease);
}
@media (min-width: 900px) {
  .floating-cart {
    bottom: var(--s-5);
  }
}
.floating-cart.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.floating-cart__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.floating-cart__count {
  font-size: var(--fs-xs);
  opacity: 0.78;
  font-weight: 600;
}
.floating-cart__total {
  font-size: var(--fs-md);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.floating-cart__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  background: var(--brand);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: 700;
  transition: background var(--dur-1) var(--ease);
}
.floating-cart__cta:hover {
  background: var(--brand-600);
}
.floating-cart__cta svg {
  width: 16px;
  height: 16px;
}

.rest-card.is-closed .rest-card__media img,
.result.is-closed .result__media img {
  filter: grayscale(0.75);
  opacity: 0.8;
}
.dish-card.is-soldout {
  opacity: 0.6;
}

/* =========================================================
   21. CHROME-STYLE LINEAR TOP PROGRESS BAR
   ========================================================= */
.top-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 10000;
  pointer-events: none;
  background: transparent;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.top-progress.is-active {
  opacity: 1;
}
.top-progress__fill {
  height: 100%;
  width: 0%;
  background: var(--brand);
  box-shadow: 0 0 8px rgba(232, 93, 38, 0.55);
  border-radius: 0 2px 2px 0;
  transition: width 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* =========================================================
   22. COMPANION / ADD-ON DISH ROWS IN CUSTOMIZER
   ========================================================= */
.companion-grid {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.companion-item {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3);
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  transition: all var(--dur-1) var(--ease);
}
.companion-item.is-selected {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.companion-item__img {
  width: 46px;
  height: 46px;
  border-radius: var(--r-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-3);
}
.companion-item__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.companion-item__body {
  flex: 1;
  min-width: 0;
}
.companion-item__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text);
}
.companion-item__meta {
  font-size: var(--fs-xs);
  color: var(--text-2);
  margin-top: 2px;
}