:root {
  --bg: #fff6ec;
  --ink: #2b2140;
  --muted: #7a6f8f;
  --card: #ffffff;
  --accent: #ff6b4a;
  --accent-2: #ffa23a;
  --lilac: #7c5cff;
  --pink: #ff5fa2;
  --mint: #1fbf9f;
  --danger: #e5484d;
  --radius: 28px;
  --shadow-sm: 0 6px 18px rgba(80, 50, 120, 0.09);
  --shadow-lg: 0 20px 44px rgba(80, 50, 120, 0.2);
  --pop: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

/* Author `display` rules would otherwise beat the UA's [hidden] default. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
body.lock { overflow: hidden; }

button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

:focus-visible { outline: 3px solid var(--lilac); outline-offset: 3px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 44px 20px 56px;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.28) 0 70px, transparent 71px),
    radial-gradient(circle at 88% 70%, rgba(255, 255, 255, 0.2) 0 110px, transparent 111px),
    linear-gradient(135deg, var(--lilac), var(--pink) 70%, var(--accent-2));
  border-radius: 0 0 44px 44px;
  box-shadow: 0 14px 34px rgba(124, 92, 255, 0.28);
}
.hero h1 {
  margin: 6px 0 8px;
  font-size: clamp(30px, 7vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.hero-eyebrow {
  display: inline-block;
  margin: 0;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.hero-sub { margin: 0; font-size: 16px; opacity: 0.95; }
.hero-inner { position: relative; z-index: 1; }

/* Merchant banner photo behind the hero, darkened so the text stays readable */
.hero-banner {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero.has-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(43, 33, 64, 0.35), rgba(43, 33, 64, 0.7));
}
.hero-logo {
  width: 84px;
  height: 84px;
  margin: 0 auto 10px;
  object-fit: cover;
  background: #fff;
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(43, 33, 64, 0.3);
}
.hero-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.hero-meta:empty { display: none; }
.pill {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.pill-open { background: rgba(31, 191, 159, 0.85); }
.pill-closed { background: rgba(229, 72, 77, 0.9); }
.pill-deal { background: rgba(255, 162, 58, 0.92); }

.promo,
.closed-note {
  max-width: 1068px;
  margin: 18px 16px 0;
  padding: 14px 18px;
  text-align: center;
  font-weight: 800;
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
}
.promo { color: #7a3b00; background: linear-gradient(135deg, #fff0c9, #ffe0b3); }
.closed-note { color: var(--danger); background: #ffecec; }
@media (min-width: 1100px) {
  .promo, .closed-note { margin-inline: auto; }
}

/* ---------- Category chips ---------- */

.chips {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 10px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 16px 8px;
  overflow-x: auto;
  scrollbar-width: none;
  background: linear-gradient(var(--bg) 70%, transparent);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 14px;
  background: var(--card);
  border: 2px solid transparent;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--pop), background 0.2s, color 0.2s;
}
.chip:hover { transform: translateY(-2px) scale(1.05); }
.chip[aria-pressed="true"] {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* ---------- Grid ---------- */

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px 130px;
}

.status {
  margin: 36px auto;
  max-width: 420px;
  padding: 22px;
  text-align: center;
  font-weight: 600;
  color: var(--muted);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.status:empty { display: none; }
.status .btn { margin-top: 14px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 18px;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 10px 10px 14px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--pop), box-shadow 0.3s ease;
  /* `backwards`, not `both`: a forwards fill would pin transform:none and
     override the :hover lift below. */
  animation: card-in 0.5s var(--pop) backwards;
}
.card:hover {
  transform: translateY(-6px) rotate(-0.6deg);
  box-shadow: var(--shadow-lg);
}
.card:nth-child(even):hover { transform: translateY(-6px) rotate(0.6deg); }

.card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(135deg, #ffe3d6, #efe7ff);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.card:hover .card-media img { transform: scale(1.08); }
.card-media .ph {
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 54px;
}
.card-qty {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 28px;
  padding: 3px 9px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: var(--mint);
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(31, 191, 159, 0.4);
  animation: pop 0.35s var(--pop);
}

.card-body { padding: 12px 6px 0; flex: 1; }
.card-name { margin: 0 0 4px; font-size: 17px; font-weight: 800; line-height: 1.2; }
.card-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  padding: 0 4px;
}
.price { padding-left: 2px; font-size: 19px; font-weight: 800; }
.price-now { color: var(--accent); }
.price-was { margin-left: 8px; font-size: 14px; font-weight: 700; color: var(--muted); }

.ribbon {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: var(--pink);
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(255, 95, 162, 0.4);
}
.ribbon-out { background: var(--ink); box-shadow: 0 4px 10px rgba(43, 33, 64, 0.35); }
.card.sold-out .card-media img,
.card.sold-out .card-media .ph { filter: grayscale(1); opacity: 0.55; }
.card.sold-out .card-name,
.card.sold-out .price { color: var(--muted); }
.card.sold-out:hover { transform: none; box-shadow: var(--shadow-sm); }
.btn-muted { color: var(--muted); background: #eee9f6; }
.card-action .btn-add { width: 100%; white-space: nowrap; }
.card-action .stepper { display: flex; justify-content: space-between; width: 100%; }
.card-action .stepper output { flex: 1; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-weight: 800;
  border: 0;
  border-radius: 999px;
  transition: transform 0.25s var(--pop), box-shadow 0.25s ease, filter 0.2s;
}
.btn:hover { transform: translateY(-2px) scale(1.04); }
.btn:active { transform: scale(0.95); }
.btn:disabled { opacity: 0.6; pointer-events: none; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 22px rgba(255, 107, 74, 0.38);
}
.btn-primary:hover { box-shadow: 0 14px 28px rgba(255, 107, 74, 0.5); }
.btn-block { width: 100%; padding: 16px; font-size: 17px; }
.btn-add { padding: 9px 16px; font-size: 14px; }

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  background: #f3eeff;
  border-radius: 999px;
}
.stepper button {
  width: 32px;
  height: 32px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  color: var(--lilac);
  background: #fff;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(80, 50, 120, 0.15);
  transition: transform 0.2s var(--pop);
}
.stepper button:hover { transform: scale(1.12); }
.stepper button:active { transform: scale(0.9); }
.stepper output { min-width: 22px; text-align: center; font-weight: 800; }

/* ---------- Floating cart bar ---------- */

.cart-bar {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(560px, calc(100% - 24px));
  padding: 12px 14px 12px 12px;
  color: #fff;
  background: linear-gradient(135deg, #3a2a63, var(--ink));
  border: 0;
  border-radius: 999px;
  box-shadow: 0 16px 36px rgba(43, 33, 64, 0.45);
  transform: translateX(-50%);
  animation: bar-in 0.45s var(--pop) both;
  transition: filter 0.2s;
}
.cart-bar:hover { filter: brightness(1.12); }
.cart-bar.bump { animation: bar-bump 0.4s var(--pop); }
.cart-bar-count {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 999px;
}
.cart-bar-label { flex: 1; text-align: left; font-weight: 800; font-size: 16px; }
.cart-bar-total { font-weight: 800; font-size: 17px; }

/* ---------- Drawer ---------- */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(43, 33, 64, 0.5);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.scrim.open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  z-index: 40;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  background: var(--bg);
  border-radius: 32px 0 0 32px;
  box-shadow: -20px 0 50px rgba(43, 33, 64, 0.25);
  transform: translateX(105%);
  visibility: hidden;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.4s;
}
.drawer.open { transform: none; visibility: visible; }

.drawer-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 8px;
}
.drawer-head h2 { flex: 1; margin: 0; font-size: 24px; font-weight: 800; outline: none; }
.icon-btn {
  width: 40px;
  height: 40px;
  font-size: 22px;
  line-height: 1;
  background: #fff;
  border: 0;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--pop);
}
.icon-btn:hover { transform: scale(1.12) rotate(8deg); }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 18px calc(24px + env(safe-area-inset-bottom, 0px));
  overscroll-behavior: contain;
}

/* Cart lines */
.cart-lines { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.line {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  animation: card-in 0.35s var(--pop) backwards;
}
.line-thumb {
  width: 62px;
  height: 62px;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffe3d6, #efe7ff);
}
.line-thumb img { width: 100%; height: 100%; object-fit: cover; }
.line-thumb .ph { display: grid; place-items: center; height: 100%; font-size: 28px; }
.line-name { margin: 0; font-weight: 800; line-height: 1.2; }
.line-price { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.line-opts { margin: 2px 0 0; font-size: 12.5px; font-weight: 700; color: var(--lilac); }
.line-end { display: grid; justify-items: end; gap: 6px; }
.line-total { font-weight: 800; }

.cart-empty { padding: 36px 8px; text-align: center; font-weight: 600; color: var(--muted); }

/* Totals */
.totals {
  margin: 18px 0;
  padding: 16px 18px;
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}
.totals:empty { display: none; }
.totals div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; color: var(--muted); font-weight: 600; }
.totals .grand {
  margin-top: 8px;
  padding-top: 12px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  border-top: 2px dashed #eadfff;
}

/* Form */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; margin: 0 0 6px 6px; font-size: 13px; font-weight: 800; }
.field em { font-style: normal; font-weight: 600; color: var(--muted); }
.field input,
.field textarea {
  width: 100%;
  padding: 14px 18px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 2px solid transparent;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--lilac);
  box-shadow: 0 0 0 5px rgba(124, 92, 255, 0.16);
}
.field input:user-invalid { border-color: var(--danger); }
.field-note { display: block; min-height: 18px; margin: 6px 0 0 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.field-note.ok { color: var(--mint); }
.field-note.error { color: var(--danger); }

.pay { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 0; padding: 0; border: 0; }
.pay legend { margin: 0 0 8px 6px; padding: 0; font-size: 13px; font-weight: 800; }
.pay-option { position: relative; display: block; }
.pay-option input { position: absolute; opacity: 0; inset: 0; }
.pay-card {
  display: grid;
  gap: 2px;
  height: 100%;
  padding: 14px;
  text-align: center;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--pop), border-color 0.2s, background 0.2s;
}
.pay-card small { font-size: 12px; color: var(--muted); }
.pay-option:hover .pay-card { transform: translateY(-2px); }
.pay-option input:checked + .pay-card { border-color: var(--accent); background: #fff1ec; }
.pay-option input:focus-visible + .pay-card { outline: 3px solid var(--lilac); outline-offset: 3px; }

.form-error { margin: 0 0 12px; padding: 12px 16px; font-weight: 700; color: var(--danger); background: #ffecec; border-radius: 18px; }

/* Confirmation */
.done { text-align: center; }
.done-badge { margin: 12px auto 0; font-size: 64px; animation: pop 0.6s var(--pop); }
.done h3 { margin: 4px 0; font-size: 26px; font-weight: 800; }
.done-sub { margin: 14px 0 0; color: var(--muted); font-weight: 600; }
.done-code {
  margin: 4px 0 10px;
  font-size: 56px;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, var(--lilac), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.done-msg { margin: 0; font-weight: 600; color: var(--muted); }
.done-note { margin-top: 8px; color: var(--ink); font-weight: 800; }
.totals .discount { color: var(--mint); }

/* ---------- Option sheet ---------- */

.sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(43, 33, 64, 0.55);
  backdrop-filter: blur(3px);
}
.sheet {
  display: flex;
  flex-direction: column;
  width: min(480px, 100%);
  max-height: min(720px, 92dvh);
  background: var(--bg);
  border-radius: 32px;
  box-shadow: var(--shadow-lg);
  animation: pop 0.35s var(--pop);
}
.sheet-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 18px 8px; }
.sheet-thumb { flex: none; width: 64px; height: 64px; overflow: hidden; border-radius: 18px; background: linear-gradient(135deg, #ffe3d6, #efe7ff); }
.sheet-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sheet-thumb .ph { display: grid; place-items: center; height: 100%; font-size: 30px; }
.sheet-title { flex: 1; min-width: 0; }
.sheet-title h3 { margin: 0; font-size: 21px; font-weight: 800; line-height: 1.2; outline: none; }
.sheet-title p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.sheet-body { flex: 1; overflow-y: auto; padding: 4px 18px; overscroll-behavior: contain; }
.sheet-foot { padding: 12px 18px calc(18px + env(safe-area-inset-bottom, 0px)); }
.sheet-row { display: flex; align-items: center; gap: 12px; }
.sheet-row .btn-block { flex: 1; padding: 14px; font-size: 16px; }
.sheet-hint { margin: 0 0 10px; text-align: center; font-size: 13px; font-weight: 800; color: var(--danger); }

.opt-group { margin: 0 0 14px; padding: 0; border: 0; }
.opt-group legend { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 8px 4px; padding: 0; font-size: 15px; font-weight: 800; }
.opt-group legend em { padding: 2px 9px; font-size: 11px; font-style: normal; font-weight: 800; color: var(--lilac); background: #ece6ff; border-radius: 999px; }
.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding: 12px 14px;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.2s var(--pop), border-color 0.2s, background 0.2s;
}
.opt:hover { transform: translateY(-1px); }
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opt-box { flex: none; width: 22px; height: 22px; border: 2px solid #cfc4ea; border-radius: 50%; transition: background 0.2s, border-color 0.2s; }
.opt:has(input[type="checkbox"]) .opt-box { border-radius: 7px; }
.opt:has(input:checked) { border-color: var(--accent); background: #fff1ec; }
.opt:has(input:checked) .opt-box { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 4px #fff1ec; }
.opt:has(input:focus-visible) { outline: 3px solid var(--lilac); outline-offset: 2px; }
.opt-name { flex: 1; font-weight: 700; }
.opt-price { font-weight: 800; color: var(--muted); white-space: nowrap; }

@media (max-width: 700px) {
  .sheet-wrap { align-items: flex-end; padding: 0; }
  .sheet { width: 100%; border-radius: 32px 32px 0 0; max-height: 90dvh; }
}

/* Phones: drawer becomes a bottom sheet */
@media (max-width: 700px) {
  .drawer {
    top: auto;
    width: 100%;
    height: 90dvh;
    border-radius: 32px 32px 0 0;
    box-shadow: 0 -20px 50px rgba(43, 33, 64, 0.25);
    transform: translateY(105%);
  }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card-name { font-size: 15px; }
}

/* ---------- Motion ---------- */

@keyframes card-in { from { opacity: 0; transform: translateY(18px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(0.4); } 100% { transform: scale(1); } }
@keyframes bar-in { from { opacity: 0; transform: translate(-50%, 40px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes bar-bump { 0% { transform: translateX(-50%) scale(1); } 40% { transform: translateX(-50%) scale(1.06); } 100% { transform: translateX(-50%) scale(1); } }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { animation: none !important; transition-duration: 0.01ms !important; }
}

.status .offline-emoji { font-size: 48px; }
.status .offline-title { margin: 6px 0 8px; font-size: 20px; font-weight: 800; color: var(--ink); }

/* ---------- address suggestions ---------- */
.address-field { position: relative; }
.address-field > label > span { display: block; margin: 0 0 6px 6px; font-size: 13px; font-weight: 800; }
.address-field input { width: 100%; padding: 14px 18px; font: inherit; color: var(--ink); background: #fff; border: 2px solid transparent; border-radius: 20px; box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s; }
.address-field input:focus { outline: none; border-color: var(--lilac); box-shadow: 0 0 0 5px rgba(124, 92, 255, .16); }
.suggest { position: absolute; z-index: 10; left: 0; right: 0; margin: 6px 0 0; padding: 6px; list-style: none; background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); max-height: 260px; overflow-y: auto; }
.suggest li { padding: 11px 14px; font-weight: 700; border-radius: 14px; cursor: pointer; }
.suggest li:hover, .suggest li.active { background: #f1ecff; color: var(--lilac); }

.status .offline-opens { margin-top: 10px; font-weight: 800; color: var(--lilac); }

/* ---------- Language picker + right-to-left (Hebrew) ---------- */
.hero { position: relative; }
.hero-lang { position: absolute; inset-block-start: 12px; inset-inline-end: 12px; z-index: 5; color: #fff; }
.hero-lang .i18n-select { background: rgba(0, 0, 0, 0.18); }
html[dir="rtl"] .card-qty { right: auto; left: 8px; }
html[dir="rtl"] .ribbon { left: auto; right: 8px; }
html[dir="rtl"] .price { padding-left: 0; padding-right: 2px; }
html[dir="rtl"] .price-was { margin-left: 0; margin-right: 8px; }
html[dir="rtl"] .cart-bar-label { text-align: right; }
html[dir="rtl"] .drawer { right: auto; left: 0; border-radius: 0 32px 32px 0; box-shadow: 20px 0 50px rgba(43, 33, 64, 0.25); transform: translateX(-105%); }
html[dir="rtl"] .drawer.open { transform: none; }
html[dir="rtl"] #drawer-back { transform: scaleX(-1); }
@media (max-width: 700px) {
  html[dir="rtl"] .drawer { left: 0; right: 0; border-radius: 32px 32px 0 0; box-shadow: 0 -20px 50px rgba(43, 33, 64, 0.25); transform: translateY(105%); }
  html[dir="rtl"] .drawer.open { transform: none; }
}

.pay-option.disabled { opacity: .55; cursor: not-allowed; }
.pay-option.disabled .pay-card { background: #f1ecf7; }

/* secure card payment */
.secure-pay { display: grid; gap: 4px; margin: 14px 0; padding: 12px 14px; background: #fff; border: 2px solid #e6dcff; border-radius: 18px; }
.secure-pay small { color: var(--muted, #6f6590); }
.secure-pay .test-note { font-weight: 800; color: #b45a00; }
.pay-view { display: grid; gap: 12px; align-content: start; }
.pay-total { margin: 0; font-size: 18px; font-weight: 800; text-align: center; }
#pay-frame { width: 100%; height: min(72dvh, 680px); border: 0; border-radius: 18px; background: #fff; box-shadow: 0 0 0 2px #e6dcff inset; }
html[dir="rtl"] #drawer-back { transform: scaleX(-1); }

/* Cash / Card choice at checkout (pay at the door) */
.pay-choice { margin: 14px 0; }
.pay-choice legend { padding: 0 6px; }
.pay-opt { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; margin-top: 8px; background: #faf7ff; border: 2px solid #e6dcff; border-radius: 14px; cursor: pointer; }
.pay-opt:has(input:checked) { border-color: var(--accent, #7c5cff); background: #f1eaff; }
.pay-opt input { margin-top: 4px; accent-color: var(--accent, #7c5cff); }
.pay-opt span { display: grid; gap: 2px; }
.field-note.warn { color: #9a5b00; font-weight: 800; }

/* free-delivery incentive banner (header + cart) */
.free-banner { position: relative; margin: 10px 0; padding: 10px 14px; border-radius: 12px; background: rgba(255, 140, 0, 0.12); font-weight: 600; font-size: 0.95rem; overflow: hidden; }
.free-banner[hidden] { display: none; }
.store-call { display: inline-block; margin-top: 10px; padding: 9px 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.94); color: #1d1a33; font-weight: 800; text-decoration: none; }
.store-call[hidden], .store-call-done[hidden] { display: none; }
.store-call-done { margin: 0 0 10px; text-decoration: none; text-align: center; }
.quick-add { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: thin; }
.quick-add-item { flex: 0 0 auto; display: flex; gap: 8px; align-items: baseline; padding: 8px 12px; border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 999px; background: #fff; font: inherit; font-size: 0.9rem; cursor: pointer; white-space: nowrap; }
.quick-add-item b { color: #14653a; }
.free-banner.done { background: rgba(30, 160, 90, 0.16); color: #14653a; }
.free-banner .free-bar { display: block; height: 5px; margin-top: 8px; border-radius: 3px; background: linear-gradient(90deg, #ff8c00 var(--p, 0%), rgba(0, 0, 0, 0.08) var(--p, 0%)); }
.free-banner.done .free-bar { background: #1ea05a; }
#free-banner { background: rgba(255, 255, 255, 0.94); color: #5a3a00; }
#free-banner.done { background: #dff5e7; color: #14653a; }

/* order tracking + cancel, card-only */
.order-track { display: grid; gap: 8px; margin: 14px 0; padding: 12px 14px; border-radius: 14px; background: rgba(124, 92, 255, 0.08); }
.order-track[hidden] { display: none; }
.track-stage { margin: 0; font-weight: 800; }
.pay-opt.disabled { opacity: .45; pointer-events: none; }

/* ---------- checkout option cards (When / How will you pay) ----------
   Inside a .field the text-input styling (full width, big padding, shadow) also reached the radio buttons and pushed the
   labels out of their cards: a radio here is just a radio, and the text wraps inside the card. */
.pay-opt { min-width: 0; overflow: hidden; }
.pay-opt input[type="radio"] { flex: 0 0 auto; width: 18px; height: 18px; margin: 3px 0 0; padding: 0; border: 0; border-radius: 50%; box-shadow: none; background: none; }
.pay-opt > span { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.pay-opt > span > b { line-height: 1.25; }
.pay-opt > span > small { color: var(--muted, #6f6590); line-height: 1.3; }
.pay-methods { display: grid; gap: 8px; min-width: 0; }
.pay-methods .pay-opt { margin-top: 0; }

/* ---------- scheduled order: a day, then a time inside the store's hours ---------- */
.when-picker { margin-top: 10px; padding: 12px; background: #fff; border: 2px solid #e6dcff; border-radius: 18px; overflow: hidden; }
.when-days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.when-day, .when-time { font: inherit; font-weight: 800; color: var(--ink, #1d1a33); background: #faf7ff; border: 2px solid #e6dcff; border-radius: 999px; cursor: pointer; }
.when-day { flex: 0 0 auto; padding: 8px 14px; white-space: nowrap; }
.when-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 8px; margin-top: 10px; max-height: 216px; overflow-y: auto; }
.when-time { padding: 9px 0; text-align: center; font-variant-numeric: tabular-nums; border-radius: 12px; }
.when-day[aria-pressed="true"], .when-time[aria-pressed="true"] { color: #fff; background: var(--accent, #7c5cff); border-color: var(--accent, #7c5cff); }
.when-day:focus-visible, .when-time:focus-visible { outline: 3px solid var(--lilac, #c9b8ff); outline-offset: 2px; }
.when-none, .when-chosen { margin: 10px 0 0; font-size: 14px; }
.when-none { color: var(--muted, #6f6590); }
.when-chosen { font-weight: 800; }
