/* ============================================
   PIZZA HUT QATAR — 1:1 CLONE STYLES
============================================ */

:root {
  --red: #c8102e;
  --red-dark: #a70e26;
  --red-hero: #7a0e1e;
  --red-hero-dark: #4d0812;
  --ink: #231f20;
  --ink-soft: #333;
  --grey-1: #f5f5f5;
  --grey-2: #e5e5e5;
  --grey-3: #999;
  --grey-4: #666;
  --white: #ffffff;
  --font-body: 'Open Sans', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  /* iOS Safari respects overflow-x on html; body-only fails on some builds.
     Belt-and-suspenders so horizontal scroll never appears at first load.
     `clip` is stronger than `hidden` in modern browsers; add `hidden`
     fallback for iOS 10 Safari (5c) that doesn't recognise `clip`. */
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
}
body {
  margin: 0;
  overflow-x: hidden;     /* iOS 10 fallback — see html rule above */
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100%;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }

/* ============ HEADER ============ */
.site-header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.header-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
}
.header-top {
  background: var(--white);
}
.header-top > .header-container {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 12px;
  padding-bottom: 0;
}
.logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.logo img {
  height: 44px;
  width: auto;
}
.mode-tabs {
  display: flex;
  gap: 0;
  margin-left: 20px;
}
.mode-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 24px 18px;
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  position: relative;
  transition: color .2s;
}
.mode-tab .mode-icon {
  display: inline-flex;
  align-items: center;
}
.mode-tab.active {
  color: var(--ink);
}
.mode-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 8px;
  right: 8px;
  height: 3px;
  background: var(--red);
  border-radius: 2px 2px 0 0;
}
.mode-tab:hover {
  color: var(--red);
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}
.lang-btn, .cart-btn {
  padding: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
}
/* Language pill button — clean typographic toggle showing target lang */
.lang-btn {
  padding: 7px 12px 7px 10px;
  gap: 7px;
  border: 1.5px solid #e5e5e5;
  border-radius: 999px;
  color: #231f20;
  background: #fff;
  transition: border-color .18s, color .18s, background-color .18s, transform .1s;
  min-width: 76px;
  justify-content: center;
}
.lang-btn:hover {
  border-color: #c8102e;
  color: #c8102e;
  background: #fff5f6;
}
.lang-btn:active { transform: scale(.97); }
.lang-btn .lang-globe {
  color: currentColor;
  opacity: .82;
  transition: opacity .18s, transform .3s;
  flex-shrink: 0;
}
.lang-btn:hover .lang-globe {
  opacity: 1;
  transform: rotate(45deg);
}
.lang-btn-label {
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .01em;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .lang-btn { padding: 6px 10px 6px 8px; min-width: 0; }
  .lang-btn-label { font-size: 12px; }
  .lang-btn .lang-globe { width: 16px; height: 16px; }
}
/* Sidebar lang pills with flag chips */
.sidebar-langs .lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1.5px solid #e5e5e5;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  color: #231f20;
  transition: all .15s;
}
.sidebar-langs .lang-pill svg { border-radius: 2px; overflow: hidden; flex-shrink: 0; }
.sidebar-langs .lang-pill.active {
  border-color: #c8102e;
  background: #fff5f6;
  color: #c8102e;
}
.sidebar-langs .lang-pill:hover { border-color: #c8102e; }
.cart-btn .cart-count {
  position: absolute;
  top: -2px;
  right: -4px;
  background: var(--red);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.cart-btn .cart-count[hidden] { display: none !important; }
.login-btn {
  background: var(--red);
  color: var(--white);
  padding: 10px 26px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  transition: background .15s;
}
.login-btn:hover { background: var(--red-dark); }

.header-bottom {
  background: var(--white);
  border-bottom: 1px solid var(--grey-2);
}
.header-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 32px;
}
.header-left-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 2px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
}
.menu-link {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  transition: color .15s;
}
.menu-link:hover { color: var(--red); }
.find-restaurant {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}
.find-restaurant img { height: 26px; width: auto; }
.find-restaurant:hover { color: var(--red); }

/* ============ HERO ============ */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--red-hero-dark);
}
.hero-track {
  display: flex;
  transition: transform .5s ease;
}
.hero-slide {
  flex: 0 0 100%;
  width: 100%;
}
.hero-slide img {
  width: 100%;
  height: auto;
  display: block;
}
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(0,0,0,.35);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  z-index: 5;
  transition: background .2s;
}
.hero-arrow:hover { background: rgba(0,0,0,.6); }
.hero-arrow.prev { left: 20px; }
.hero-arrow.next { right: 20px; }
.hero-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}
.hero-dot {
  width: 9px;
  height: 9px;
  background: rgba(255,255,255,.5);
  border-radius: 50%;
  transition: all .2s;
}
.hero-dot.active {
  background: var(--red);
  width: 22px;
  border-radius: 6px;
}

/* ============ REORDER STRIP ============ */
.reorder-strip {
  background: var(--white);
  padding: 18px 32px;
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--grey-2);
}
.reorder-btn {
  background: var(--red-hero);
  color: var(--white);
  padding: 12px 60px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  opacity: .5;
  cursor: not-allowed;
  transition: opacity .2s;
}
.reorder-btn:hover { opacity: .65; }

/* ============ SECTIONS ============ */
.section {
  padding: 30px 0 20px;
}
.section-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
}
.section-title {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 22px;
  color: var(--ink);
  margin: 0;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--red);
  display: inline-block;
}
.section-title.underlined {
  margin-bottom: 20px;
}
.view-all {
  color: var(--red);
  font-weight: 600;
  font-size: 13px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--red);
}
.view-all:hover { color: var(--red-dark); }

/* ============ CATEGORY CAROUSEL ============ */
.categories-section {
  padding-top: 30px;
}
.cat-carousel {
  position: relative;
}
.cat-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 4px 0;
}
.cat-track::-webkit-scrollbar { display: none; }
.cat-card {
  flex: 0 0 220px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid #ebebeb;
  transition: transform .25s ease, box-shadow .25s ease, border-color .2s;
  display: block;
  scroll-snap-align: start;
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
  border-color: var(--red);
}
.cat-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.cat-card:hover img { transform: scale(1.05); }
.cat-card h3 {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  padding: 12px 14px;
  margin: 0;
  letter-spacing: .04em;
  text-align: left;
  text-transform: uppercase;
}
.cat-track { scroll-snap-type: x mandatory; }
.cat-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  background: var(--white);
  border: 1px solid var(--grey-2);
  border-radius: 50%;
  display: grid;
  place-items: center;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0,0,0,.1);
  transition: all .2s;
}
.cat-arrow:hover {
  background: var(--red);
  border-color: var(--red);
}
.cat-arrow:hover svg { stroke: #fff; }
.cat-arrow.prev { left: -14px; }
.cat-arrow.next { right: -14px; }

/* ============ PRODUCTS ============ */
.products-section {
  padding: 30px 0;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.deals-grid {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 1100px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .deals-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 780px) {
  .products-grid, .deals-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .products-grid, .deals-grid { grid-template-columns: 1fr; }
}

.product-card {
  background: var(--white);
  border-radius: 8px;
  border: 1px solid #ebebeb;
  overflow: hidden;
  position: relative;
  transition: box-shadow .25s ease, transform .25s ease, border-color .2s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: 0 10px 30px rgba(0,0,0,.09);
  transform: translateY(-2px);
  border-color: #dedede;
}
.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  background: var(--white);
  border-radius: 50%;
  display: grid;
  place-items: center;
  z-index: 3;
  box-shadow: 0 2px 6px rgba(0,0,0,.1);
  transition: transform .15s;
}
.fav-btn:hover { transform: scale(1.1); }
.fav-btn.active svg { fill: var(--red); }

.product-image {
  aspect-ratio: 408/200;  /* matches source thumbnail — no crop, no stretch */
  background: #ffffff;
  display: block;
  position: relative;
  overflow: hidden;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .5s ease;
  image-rendering: auto;
}
.product-card:hover .product-image img {
  transform: scale(1.06);
}
.fav-btn {
  /* iOS Safari (esp. iPhone 5c / iOS 10) ignores flex/grid centering
     when applied to <button> because of built-in UA padding + inner
     text baseline. Absolute-position the SVG child instead — pixel-
     perfect regardless of button intrinsic paddings. */
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,.95);
  border-radius: 50%;
  padding: 0;
  border: 0;
  margin: 0;
  font: 0/0 a;                  /* kill any inherited font-size/line-height */
  color: inherit;
  cursor: pointer;
  z-index: 3;
  box-shadow: 0 2px 5px rgba(0,0,0,.15);
  transition: transform .15s;
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  -webkit-appearance: none;
  overflow: hidden;             /* clip any UA text baseline pseudo-content */
}
.fav-btn svg {
  /* Absolute-center — bulletproof across all Safari versions */
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;        /* -half-width, -half-height */
  display: block;
}
.fav-btn:hover { transform: scale(1.12); }
.fav-btn.active svg { fill: var(--red); animation: heartBeat .6s ease; }
.product-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 4px;
}
.product-name {
  font-size: 13px;
  font-weight: 800;
  margin: 0;
  letter-spacing: .01em;
  color: var(--ink);
  line-height: 1.25;
  text-transform: uppercase;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-price {
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  margin: 0 0 2px;
}
.product-desc {
  color: var(--grey-4);
  font-size: 11.5px;
  line-height: 1.4;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 32px;
}
.product-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}
.select-wrap {
  position: relative;
  border: 1px solid #d5d5d5;
  border-radius: 4px;
  overflow: hidden;
  transition: border-color .15s;
}
.select-wrap:hover { border-color: var(--red); }
.select-wrap select {
  width: 100%;
  padding: 6px 20px 6px 8px;
  border: 0;
  appearance: none;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  outline: none;
  cursor: pointer;
  line-height: 1.4;
}
.select-wrap svg {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.product-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px;
  align-items: center;
  margin-top: auto;
}
.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #d5d5d5;
  border-radius: 4px;
  padding: 2px 4px;
  height: 30px;
}
.qty-btn {
  color: var(--red);
  font-weight: 900;
  font-size: 15px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background .15s;
  line-height: 1;
}
.qty-btn:hover { background: rgba(200,16,46,.12); }
.qty-btn:active { transform: scale(.9); }
.qty-val {
  font-weight: 700;
  font-size: 12px;
  min-width: 16px;
  text-align: center;
}
.add-btn {
  background: var(--red);
  color: var(--white);
  padding: 0 12px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
  transition: background .15s, transform .1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 30px;
  letter-spacing: .02em;
}
.add-btn::before {
  content: '+';
  font-size: 14px;
  line-height: 1;
  font-weight: 900;
}
.add-btn:hover { background: var(--red-dark); }
.add-btn:active { transform: scale(.97); }
.add-btn.full {
  width: 100%;
  padding: 10px 14px;
  height: 36px;
  font-size: 13px;
  margin-top: auto;
}

/* Deal cards */
.deal-card .product-image {
  aspect-ratio: 1.3;
}
.deal-card .product-body {
  padding: 14px 16px 16px;
}

.view-all-wrap {
  display: flex;
  justify-content: center;
  padding: 24px 0 8px;
}
.view-all-btn {
  background: var(--red);
  color: var(--white);
  padding: 12px 40px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  transition: background .15s;
}
.view-all-btn:hover { background: var(--red-dark); }

/* ============ FOOTER ============ */
/* ============ FOOTER (Variant B — compact trust) ============
   Was: 4-column grid, 18 dead links + fake app badges + ghost socials,
   573px tall on mobile (21% of page). Now: 2 real CS CTAs + one legal
   line, ~140px total. Every element goes somewhere real. */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--grey-2);
  margin-top: 40px;
}
.footer-trust {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ft-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--grey-2);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s, background .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.ft-cta:active { transform: scale(.98); }
.ft-cta > svg { flex-shrink: 0; }
.ft-cta > span {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}
.ft-cta b {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.ft-cta small {
  font-size: 11px;
  color: var(--grey-4);
  font-weight: 500;
  margin-top: 2px;
}
.ft-cta.call svg { color: #c8102e; }
.ft-cta.call:hover { border-color: #c8102e; background: #fff5f6; }
.ft-cta.wa svg   { color: #25d366; }
.ft-cta.wa:hover { border-color: #25d366; background: #f4fbf6; }

/* Variant C: trust badges strip — payment logos + halal + secure padlock */
.footer-badges {
  max-width: 720px;
  margin: 0 auto;
  padding: 4px 20px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: center;
  align-items: center;
}
.fb-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #666;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.fb-item small { font-size: 11px; font-weight: 700; }
.fb-item.halal  { color: #256a2e; }
.fb-item.halal svg { color: #2e7d32; }
.fb-item.secure svg { color: #666; }
.fb-pay-strip {
  display: block;
  height: 20px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  opacity: .95;
  image-rendering: -webkit-optimize-contrast;
}
.fb-sep {
  width: 1px;
  height: 14px;
  background: var(--grey-2);
  align-self: center;
}
@media (max-width: 380px) {
  .footer-badges { gap: 8px 10px; padding: 4px 12px 12px; }
  .fb-sep { display: none; }
  .fb-pay-strip { height: 18px; }
}

/* Variant C: legal/nav links row — Privacy · Terms · About · FAQ · Stores */
.footer-links {
  max-width: 720px;
  margin: 0 auto;
  padding: 4px 20px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  justify-content: center;
  border-top: 1px solid var(--grey-2);
  padding-top: 14px;
}
.footer-links a {
  color: var(--grey-4);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  padding: 4px 2px;
  transition: color .15s;
  -webkit-tap-highlight-color: transparent;
}
.footer-links a:hover { color: var(--red); }

.footer-bottom {
  border-top: 1px solid var(--grey-2);
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
}
.footer-bottom-inner {
  max-width: 1440px;
  margin: 0 auto;
  text-align: center;
  font-size: 11px;
  color: var(--grey-4);
  line-height: 1.5;
}
.ft-legal a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(0,0,0,.15);
  text-underline-offset: 2px;
}
.ft-legal a:hover { color: var(--red); text-decoration-color: var(--red); }

@media (max-width: 380px) {
  .footer-trust { padding: 18px 14px 12px; gap: 8px; }
  .ft-cta { padding: 10px 12px; gap: 8px; }
  .ft-cta b { font-size: 13px; }
  .ft-cta small { font-size: 10.5px; }
  .footer-links { gap: 4px 14px; font-size: 12px; }
}

/* ============ LEGAL PLACEHOLDER PAGES (privacy / terms / about / faq) ============ */
.page-legal { background: #fafafa; }
.legal-page { min-height: 60vh; }
.legal-hero {
  background: linear-gradient(135deg, #c8102e 0%, #7a0e1e 100%);
  color: #fff;
  padding: 32px 0 24px;
}
.legal-hero h1 {
  font-family: 'Sansita', sans-serif;
  font-weight: 900;
  font-size: 28px;
  margin: 0 0 4px;
}
.legal-hero .legal-updated {
  opacity: .85;
  font-size: 13px;
  margin: 0;
}
.legal-body {
  padding: 32px 0 60px;
  color: #333;
  line-height: 1.65;
  font-size: 15px;
}
.legal-body .section-container {
  max-width: 780px;
  padding: 0 20px;
}
.legal-body h2 {
  color: #231f20;
  font-family: 'Sansita', sans-serif;
  font-weight: 800;
  font-size: 19px;
  margin: 32px 0 10px;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body p { margin: 10px 0; }
.legal-body ul { margin: 10px 0 10px 24px; padding: 0; }
.legal-body li { margin: 6px 0; }
.legal-body a { color: #c8102e; text-decoration: underline; text-decoration-color: rgba(200,16,46,.35); }
.legal-body a:hover { text-decoration-color: #c8102e; }
.legal-body code { background: #f0f0f2; padding: 1px 6px; border-radius: 4px; font-size: 13px; }
.legal-body details {
  border: 1px solid var(--grey-2);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 10px 0;
  background: #fff;
}
.legal-body details[open] { border-color: #c8102e; box-shadow: 0 4px 12px rgba(200,16,46,.06); }
.legal-body details summary {
  cursor: pointer;
  font-weight: 700;
  color: #231f20;
  font-size: 15px;
  list-style: none;
  padding-right: 24px;
  position: relative;
}
.legal-body details summary::-webkit-details-marker { display: none; }
.legal-body details summary::after {
  content: '＋';
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  color: #c8102e;
  font-weight: 700;
  font-size: 18px;
}
.legal-body details[open] summary::after { content: '−'; }
.legal-body details p, .legal-body details ul { color: #555; font-size: 14px; margin-top: 10px; }
@media (max-width: 380px) {
  .legal-hero { padding: 24px 0 16px; }
  .legal-hero h1 { font-size: 22px; }
  .legal-body { padding: 24px 0 48px; font-size: 14px; }
  .legal-body h2 { font-size: 17px; margin-top: 24px; }
}

/* ============ MODAL: DELIVERY OR PICKUP ============ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: grid;
  place-items: center;
  z-index: 500;
  padding: 20px;
  opacity: 1;
  transition: opacity .3s;
}
.modal-backdrop.hidden {
  opacity: 0;
  pointer-events: none;
}
.modal-card {
  background: var(--white);
  border-radius: 20px;
  padding: 30px 40px 0;
  width: 100%;
  max-width: 440px;
  position: relative;
  text-align: center;
  overflow: hidden;
}
.modal-close {
  /* Same iOS-Safari-safe centering as .fav-btn — absolute-position the
     SVG child instead of relying on flex/grid which iPhone 5c misapplies. */
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: var(--red);
  border-radius: 50%;
  padding: 0;
  border: 0;
  margin: 0;
  font: 0/0 a;
  color: inherit;
  cursor: pointer;
  z-index: 3;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  -webkit-appearance: none;
  overflow: hidden;
}
.modal-close svg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  display: block;
}
.modal-close:hover { background: var(--red-dark); }
.modal-logo {
  height: 60px;
  width: auto;
  margin: 0 auto 12px;
}
.modal-title {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 22px;
  margin: 0 0 8px;
  letter-spacing: .02em;
}
.modal-sub {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 16px;
}
.modal-sub b {
  color: var(--red);
  font-weight: 800;
}
.modal-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 18px;
}
.modal-divider::before,
.modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  border-top: 1px dashed #ccc;
}
.pizza-slice {
  width: 32px;
  height: 32px;
  background:
    radial-gradient(circle at 50% 10%, transparent 0 4px, #d92a17 5px 8px, transparent 9px),
    radial-gradient(circle at 30% 60%, #4caf50 3px, transparent 4px),
    radial-gradient(circle at 70% 55%, #1a1a1a 3px, transparent 4px),
    linear-gradient(180deg, #ffd970 0%, #ffb300 100%);
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
}
.modal-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.modal-opt {
  background: var(--white);
  border: 1.5px solid #d0d0d0;
  border-radius: 12px;
  padding: 20px 12px;
  position: relative;
  transition: all .2s;
  text-align: center;
}
.modal-opt.active {
  border-color: var(--red);
  border-width: 2px;
}
.modal-opt:hover { border-color: var(--red); }
.modal-opt img {
  height: 56px;
  width: auto;
  margin: 0 auto 8px;
}
.modal-opt h3 {
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--ink);
  letter-spacing: .04em;
}
.modal-opt p {
  font-size: 11px;
  color: var(--grey-4);
  line-height: 1.3;
  margin: 0;
}
.opt-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--red);
  color: var(--white);
  font-size: 9px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: .05em;
  white-space: nowrap;
}
.modal-safe {
  padding: 12px 0;
  background: var(--grey-1);
  margin: 20px -40px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--grey-4);
  letter-spacing: .05em;
}

/* ============ CART DRAWER ============ */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 92vw;
  height: 100vh;
  background: var(--white);
  box-shadow: -6px 0 30px rgba(0,0,0,.15);
  z-index: 200;
  transition: right .35s ease;
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { right: 0; }
.cart-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--grey-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-head h4 {
  font-weight: 800;
  font-size: 18px;
  margin: 0;
}
.cart-close {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--grey-1);
  color: #231f20;
  /* Perfect optical center + kill iOS UA default blue tint on <button> */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: background .15s, color .15s, transform .12s;
}
.cart-close svg { display: block; }
.cart-close:hover, .cart-close:active { background: var(--red); color: #fff; }
.cart-close:active { transform: scale(0.94); }
.cart-empty {
  flex: 1;
  padding: 40px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
}
.cart-empty img {
  width: 160px;
  height: auto;
  margin-bottom: 8px;
}
.cart-empty-title {
  font-weight: 800;
  font-size: 16px;
  margin: 0;
}
.cart-empty-sub {
  font-size: 13px;
  color: var(--grey-4);
  margin: 0;
}
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 22px;
  display: none;
  flex-direction: column;
  gap: 12px;
}
.cart-drawer.has-items .cart-items { display: flex; }
.cart-drawer.has-items .cart-empty { display: none; }
.cart-drawer:not(.has-items) .cart-summary { display: none; }
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid var(--grey-2);
  gap: 10px;
}
.cart-item-name {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 4px;
  /* Long product names (e.g. "My Box: One Sicilian Pizza + 2 Sides – A
     Delicious Combo!") were wrapping to 4+ lines on 320px, crowding
     the cart drawer. Clamp to 2 lines with ellipsis — reads faster,
     preserves vertical rhythm across all items. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.cart-item-price {
  font-size: 12px;
  color: var(--grey-4);
}
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--grey-1);
  padding: 4px 10px;
  border-radius: 999px;
}
.cart-item-qty button {
  width: 22px;
  height: 22px;
  color: var(--red);
  font-weight: 800;
  font-size: 14px;
}
.cart-summary {
  padding: 18px 22px 22px;
  border-top: 1px solid var(--grey-2);
}
.cart-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 4px 0;
}
.cart-row.total {
  font-weight: 800;
  font-size: 17px;
  padding: 10px 0 14px;
}
.checkout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--red);
  color: var(--white);
  padding: 16px 22px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .01em;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(200,16,46,.22);
  transition: background .15s, transform .1s, box-shadow .15s;
}
.checkout-btn:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(200,16,46,.28);
}
.checkout-btn:active { transform: translateY(0); }

.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0;
  pointer-events: none;
  z-index: 150;
  transition: opacity .3s;
}
.cart-backdrop.open { opacity: 1; pointer-events: auto; }

/* ============ TOAST ============ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
  opacity: 0;
  pointer-events: none;
  transition: all .3s;
  z-index: 400;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 780px) {
  .header-top > .header-container { flex-wrap: wrap; }
  .mode-tabs { order: 3; width: 100%; margin: 0; justify-content: center; }
  .header-bottom-inner { padding: 10px 16px; }
  .header-right { gap: 10px; }
  .login-btn { padding: 8px 18px; font-size: 13px; }
  .section-container { padding: 0 16px; }
  .cat-card { flex: 0 0 200px; }
  .cat-card img { height: 130px; }
  .cat-arrow { display: none; }
}

/* ============================================
   SITE ANIMATIONS
============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideInLeft {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}
@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.25); }
  50% { transform: scale(.9); }
  75% { transform: scale(1.1); }
}
@keyframes toastPop {
  0% { transform: translateX(-50%) translateY(30px) scale(.9); opacity: 0; }
  60% { transform: translateX(-50%) translateY(-6px) scale(1.03); opacity: 1; }
  100% { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-3deg); }
  75% { transform: rotate(3deg); }
}
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(.92); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes addPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(200,16,46,.5); }
  50% { transform: scale(1.06); box-shadow: 0 0 0 8px rgba(200,16,46,0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(200,16,46,0); }
}
.add-btn.pulse { animation: addPulse .45s ease; }

/* Attention flash — draws eye to the contact card when user tries to skip phone step */
@keyframes needsAttentionFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200,16,46, 0);   border-color: transparent; }
  25%      { box-shadow: 0 0 0 6px rgba(200,16,46, .35); border-color: #c8102e; }
  50%      { box-shadow: 0 0 0 12px rgba(200,16,46, 0);  border-color: #c8102e; }
  75%      { box-shadow: 0 0 0 6px rgba(200,16,46, .35); border-color: #c8102e; }
}
.needs-attention {
  animation: needsAttentionFlash 1.1s ease-in-out 2;
  border-radius: 12px;
  border: 2px solid transparent;
  transition: border-color .3s;
}

/* Apply to sections */
.hero-slide.active { animation: fadeIn .6s ease; }
.cat-card { animation: fadeInUp .5s ease backwards; }
.cat-card:nth-child(2) { animation-delay: .05s; }
.cat-card:nth-child(3) { animation-delay: .1s; }
.cat-card:nth-child(4) { animation-delay: .15s; }
.cat-card:nth-child(5) { animation-delay: .2s; }
.cat-card:nth-child(6) { animation-delay: .25s; }
.product-card { animation: fadeInUp .45s ease backwards; }
.product-card:nth-child(2) { animation-delay: .05s; }
.product-card:nth-child(3) { animation-delay: .1s; }
.product-card:nth-child(4) { animation-delay: .15s; }
.product-card:nth-child(5) { animation-delay: .2s; }
.product-card:nth-child(6) { animation-delay: .25s; }

.fav-btn.active svg {
  fill: #c8102e;
  animation: heartBeat .6s ease;
}

.toast.show { animation: toastPop .35s cubic-bezier(.34,1.56,.64,1); }

/* Modal fade-in */
.modal-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s;
}
.modal-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}
.modal-backdrop.visible .modal-card {
  animation: fadeInScale .4s cubic-bezier(.34,1.56,.64,1);
}

/* Button hover ripple */
.btn-primary, .btn-secondary, .add-btn, .login-btn, .checkout-btn, .view-all-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-primary::after, .add-btn::after, .login-btn::after, .checkout-btn::after, .view-all-btn::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 10px; height: 10px;
  background: rgba(255,255,255,.5);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  transition: transform .5s, opacity .5s;
  opacity: 0;
  z-index: -1;
}
.btn-primary:active::after, .add-btn:active::after, .login-btn:active::after, .checkout-btn:active::after, .view-all-btn:active::after {
  transform: translate(-50%, -50%) scale(15);
  opacity: 1;
  transition: 0s;
}

/* Sticky header shadow */
.site-header.scrolled { box-shadow: 0 4px 12px rgba(0,0,0,.08); }

/* ============================================
   PRIMARY / SECONDARY BUTTONS (missing before)
============================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #c8102e;
  color: #fff;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  transition: background .2s, transform .1s;
  text-decoration: none;
}
.btn-primary:hover { background: #a70e26; }
.btn-primary:active { transform: scale(.98); }
.btn-primary.block { width: 100%; }
.btn-primary[disabled] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #c8102e;
  border: 1.5px solid #c8102e;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  transition: all .2s;
  text-decoration: none;
}
.btn-secondary:hover { background: #c8102e; color: #fff; }
.btn-secondary.block { width: 100%; }

/* ============================================
   TAGS (bestseller/new/spicy/veg)
============================================ */
.tags {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 4px;
  z-index: 2;
}
.tag {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
  color: #fff;
  background: #666;
}
.tag-best { background: #ffcc00; color: #231f20; }
.tag-new { background: #231f20; color: #ffcc00; }
.tag-hot, .tag-spicy { background: #c8102e; }
.tag-veg { background: #2d8f2d; }
.tag-vegan { background: #66bb6a; color: #231f20; }
.tag-halal { background: #009e60; }

/* ============================================
   SIDEBAR DRAWER (hamburger nav)
============================================ */
.sidebar-drawer {
  position: fixed;
  top: 0; left: -320px;
  width: 300px;
  max-width: 88vw;
  height: 100vh;
  background: #fff;
  z-index: 250;
  transition: left .35s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 30px rgba(0,0,0,.2);
}
.sidebar-drawer.open { left: 0; }
.sidebar-head {
  padding: 20px;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sidebar-head img { height: 40px; }
.sidebar-close {
  width: 36px; height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #f5f5f5;
  color: #231f20;
  /* Same centering/appearance reset as .cart-close — kills iOS blue UA tint */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.sidebar-close svg { display: block; }
.sidebar-close:hover, .sidebar-close:active { background: var(--red); color: #fff; }
.sidebar-close:hover { background: #c8102e; color: #fff; }
.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  padding: 14px 22px;
  color: #231f20;
  font-weight: 600;
  font-size: 15px;
  border-left: 3px solid transparent;
  transition: all .15s;
}
.sidebar-nav a:hover {
  background: #f8f8f8;
  border-left-color: #c8102e;
  color: #c8102e;
}
.sidebar-foot {
  padding: 20px;
  border-top: 1px solid #e5e5e5;
}
.sidebar-langs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.lang-pill {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  background: #f5f5f5;
  font-weight: 700;
  font-size: 13px;
  transition: all .15s;
}
.lang-pill.active { background: #c8102e; color: #fff; }
.sidebar-socials {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.sidebar-socials a { padding: 0; }
.sidebar-socials img { height: 24px; width: 24px; }
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 240;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.sidebar-backdrop.open { opacity: 1; pointer-events: auto; }

/* ============================================
   MENU PAGE (menu.html)
============================================ */
.page-menu, .page-category { background: #fafafa; }

.menu-page, .cat-page {
  display: grid;
  grid-template-columns: 260px 1fr;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
  gap: 30px;
  min-height: 80vh;
}
@media (max-width: 900px) {
  .menu-page, .cat-page { grid-template-columns: 1fr; padding: 0 16px; }
  .menu-sidebar { display: none; }
}

.menu-sidebar {
  position: sticky;
  top: 130px;
  align-self: flex-start;
  padding: 20px 0;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.sidebar-title {
  font-weight: 800;
  font-size: 14px;
  color: #231f20;
  padding: 0 12px 10px;
  border-bottom: 2px solid #c8102e;
  margin-bottom: 8px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.sidebar-cat-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-cat-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background .15s;
  font-size: 13px;
  font-weight: 600;
  color: #231f20;
}
.sidebar-cat-link img {
  width: 36px; height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}
.sidebar-cat-link span { flex: 1; }
.sidebar-cat-link em {
  font-style: normal;
  font-size: 11px;
  color: #999;
  font-weight: 700;
}
.sidebar-cat-link:hover { background: #f5f5f5; }
.sidebar-cat-link.active {
  background: rgba(200,16,46,.08);
  color: #c8102e;
  border-left: 3px solid #c8102e;
  padding-left: 9px;
}

.menu-main { padding: 30px 0 60px; }
.menu-hero {
  background: linear-gradient(135deg, #c8102e 0%, #7a0e1e 100%);
  color: #fff;
  border-radius: 12px;
  padding: 30px 40px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.menu-hero::before {
  content: '';
  position: absolute;
  right: -50px; top: -50px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255,204,0,.2), transparent 70%);
  border-radius: 50%;
}
.menu-hero-inner { position: relative; z-index: 2; }
.menu-hero h1 {
  font-family: 'Sansita', 'Open Sans', sans-serif;
  font-weight: 900;
  font-size: 40px;
  margin: 0 0 8px;
  letter-spacing: -.01em;
}
.menu-hero p { margin: 0; opacity: .9; font-size: 15px; max-width: 520px; }

.menu-search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.search-wrap {
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f5f5f7;
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 11px 18px;
  transition: border-color .18s, background-color .18s, box-shadow .18s;
}
.search-wrap:hover { background: #efeff2; }
.search-wrap:focus-within {
  border-color: #c8102e;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(200,16,46,.08);
}
.search-wrap input {
  flex: 1;
  border: 0; outline: 0;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: #231f20;
}
.search-wrap input::placeholder { color: #999; }

/* Legacy sort-wrap (still used elsewhere e.g. stores.html) — kept intact.
   Menu page now uses .sort-chips below. */
.sort-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid #e5e5e5;
  border-radius: 999px;
  padding: 10px 16px;
}
.sort-wrap label { font-weight: 600; font-size: 13px; color: #666; }
.sort-wrap select {
  border: 0; outline: 0;
  background: transparent;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

/* ============================================
   SORT CHIPS — visible filter row for menu page
   ============================================
   Replaces the old <select> so every sort option is visible without a
   tap. Radio-style toggle: one active at a time.
*/
/* Sort chip row — single horizontal line, horizontally scrollable on narrow
   viewports. flex-wrap disabled so 4 chips never break onto 2 rows.
   No negative margin — that would push the row beyond parent bounds and
   force the whole page to horizontal-overflow. */
.sort-chips {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0;              /* let hover shadow breathe without clip */
  max-width: 100%;
}
.sort-chips::-webkit-scrollbar { display: none; }
.sort-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f5f5f7;
  color: #4a4a4a;
  border: 1.5px solid transparent;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .16s, color .16s, border-color .16s, transform .1s, box-shadow .18s;
  white-space: nowrap;
  line-height: 1;
  flex-shrink: 0;              /* prevent shrink-then-wrap on tight widths */
}
.sort-chip svg { flex-shrink: 0; opacity: .75; }
.sort-chip:hover { background: #ececef; color: #231f20; }
.sort-chip:hover svg { opacity: 1; }
.sort-chip:active { transform: scale(.96); }
.sort-chip.active {
  background: #c8102e;
  color: #fff;
  border-color: #c8102e;
  box-shadow: 0 2px 6px rgba(200,16,46,.25);
}
.sort-chip.active svg { opacity: 1; }

.menu-group {
  margin-bottom: 40px;
  animation: fadeInUp .5s ease;
}
.menu-group-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 2px solid #c8102e;
  margin-bottom: 20px;
}
.menu-group-head h2 {
  font-weight: 800;
  font-size: 22px;
  margin: 0;
  color: #231f20;
}
.menu-group-count {
  color: #999;
  font-size: 13px;
  font-weight: 600;
}
.menu-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.menu-empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 16px;
  font-weight: 600;
}

/* ============================================
   CATEGORY HERO
============================================ */
.cat-hero {
  position: relative;
  height: 260px;
  overflow: hidden;
  margin-bottom: 30px;
}
.cat-hero-inner { position: relative; width: 100%; height: 100%; }
.cat-hero-inner > img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.cat-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.2), rgba(0,0,0,.7));
  color: #fff;
  display: flex;
  align-items: flex-end;
  padding-bottom: 40px;
}
.cat-hero-overlay h1 {
  font-family: 'Sansita', sans-serif;
  font-weight: 900;
  font-size: 48px;
  margin: 8px 0 4px;
  letter-spacing: -.02em;
}
.cat-hero-overlay p { margin: 0; opacity: .9; }
.back-link {
  display: inline-block;
  color: #fff;
  opacity: .85;
  font-size: 13px;
  font-weight: 600;
  transition: opacity .15s;
}
.back-link:hover { opacity: 1; }

/* ============================================
   PRODUCT DETAIL (product.html)
============================================ */
.page-product { background: #fafafa; }
.product-page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 32px 80px;
}
.product-crumbs {
  padding: 16px 0;
  font-size: 13px;
  color: #666;
}
.product-crumbs a { color: #666; }
.product-crumbs a:hover { color: #c8102e; }
.product-crumbs .sep { margin: 0 6px; color: #ccc; }
.product-crumbs b { color: #231f20; font-weight: 700; }

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}
@media (max-width: 900px) {
  .product-detail { grid-template-columns: 1fr; gap: 30px; }
}
.pd-gallery { position: sticky; top: 130px; align-self: flex-start; }
.pd-image-main {
  aspect-ratio: 1;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  animation: fadeInScale .4s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.pd-image-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.pd-image-main:hover img { transform: scale(1.05); }
.pd-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.pd-thumb {
  width: 70px; height: 70px;
  border-radius: 8px;
  background: #ffffff;
  border: 2px solid #e5e5e5;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  transition: border-color .15s;
}
.pd-thumb.active { border-color: #c8102e; }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }

.pd-right { padding-top: 8px; }
.pd-cat {
  color: #c8102e;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.pd-name {
  font-family: 'Sansita', sans-serif;
  font-weight: 900;
  font-size: 36px;
  margin: 8px 0 16px;
  letter-spacing: -.01em;
}
.pd-price {
  font-size: 26px;
  font-weight: 800;
  color: #c8102e;
  margin: 0 0 16px;
}
.pd-desc {
  color: #666;
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 24px;
}
.pd-option-group {
  margin-bottom: 20px;
}
.pd-option-group h4 {
  font-size: 13px;
  font-weight: 800;
  color: #231f20;
  margin: 0 0 10px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.pd-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pd-choice {
  padding: 12px 16px;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all .15s;
  min-width: 100px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}
.pd-choice.active {
  border-color: #c8102e;
  background: rgba(200,16,46,.05);
}
.pd-choice:hover { border-color: #c8102e; }
.ch-label { font-weight: 700; font-size: 14px; color: #231f20; }
.ch-price, .ch-sub { font-size: 12px; color: #666; }
.pd-choice.active .ch-price { color: #c8102e; font-weight: 700; }

.pd-qty {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  border: 1.5px solid #e5e5e5;
  border-radius: 999px;
  padding: 4px 20px;
}
.pd-qty button {
  width: 32px; height: 32px;
  border-radius: 50%;
  color: #c8102e;
  font-weight: 900;
  font-size: 20px;
  transition: background .15s;
}
.pd-qty button:hover { background: rgba(200,16,46,.1); }
.pd-qty span { font-weight: 800; font-size: 17px; min-width: 30px; text-align: center; }

.pd-cta {
  display: flex;
  gap: 12px;
  margin: 24px 0 20px;
}
.pd-add-btn {
  flex: 1;
  background: #c8102e;
  color: #fff;
  padding: 16px 24px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 15px;
  transition: all .2s;
}
.pd-add-btn:hover { background: #a70e26; transform: translateY(-2px); }
.pd-fav {
  width: 52px; height: 52px;
  border-radius: 8px;
  background: #fff;
  border: 1.5px solid #e5e5e5;
  display: grid;
  place-items: center;
  transition: all .15s;
}
.pd-fav:hover { border-color: #c8102e; transform: scale(1.05); }
.pd-fav.active svg { fill: #c8102e; animation: heartBeat .6s ease; }
.pd-tags {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}
.product-related {
  margin-top: 40px;
}

/* ============================================
   AUTH / LOGIN PAGE (login.html)
============================================ */
.page-auth { background: #fafafa; }
.auth-page {
  min-height: calc(100vh - 200px);
  display: grid;
  place-items: center;
  padding: 40px 20px 80px;
}
.auth-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 900px;
  width: 100%;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.1);
}
@media (max-width: 800px) {
  .auth-container { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
}
.auth-visual {
  background: linear-gradient(135deg, #c8102e 0%, #7a0e1e 100%);
  color: #fff;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.auth-visual::before {
  content: '';
  position: absolute;
  top: -30%; right: -30%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,204,0,.25), transparent 70%);
  border-radius: 50%;
}
.auth-logo {
  height: 50px;
  width: auto;
  margin-bottom: 20px;
  filter: brightness(0) invert(1);
}
.auth-visual h2 {
  font-family: 'Sansita', sans-serif;
  font-weight: 900;
  font-size: 32px;
  margin: 0 0 12px;
  position: relative;
  z-index: 2;
}
.auth-visual p {
  opacity: .9;
  font-size: 15px;
  margin: 0 0 20px;
  position: relative;
  z-index: 2;
}
.auth-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 2;
}
.auth-benefits li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.auth-benefits svg { background: #fff; padding: 4px; border-radius: 50%; }

.auth-form-card { padding: 36px 40px; }
.auth-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #e5e5e5;
  margin-bottom: 24px;
}
.auth-tab {
  padding: 12px 4px;
  font-weight: 700;
  font-size: 15px;
  color: #999;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: all .15s;
  flex: 1;
  text-align: center;
}
.auth-tab.active {
  color: #c8102e;
  border-bottom-color: #c8102e;
}

.auth-form label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #666;
  margin: 12px 0 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.input-group {
  display: flex;
  align-items: center;
  border: 1.5px solid #e5e5e5;
  border-radius: 8px;
  padding: 10px 14px;
  gap: 10px;
  transition: border-color .15s;
}
.input-group:focus-within { border-color: #c8102e; }
.input-group input {
  flex: 1;
  border: 0; outline: 0;
  font-family: inherit;
  font-size: 15px;
  background: transparent;
}
.country-code {
  font-weight: 700;
  color: #666;
  padding-right: 10px;
  border-right: 1px solid #e5e5e5;
}
.pw-toggle {
  padding: 4px;
  color: #999;
  transition: color .15s;
}
.pw-toggle:hover { color: #c8102e; }
.pw-toggle:hover svg { stroke: #c8102e; }

.auth-form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px 0 20px;
  font-size: 13px;
}
.remember { display: inline-flex; align-items: center; gap: 6px; color: #666; }
.forgot { color: #c8102e; font-weight: 600; }

.auth-submit {
  width: 100%;
  background: #c8102e;
  color: #fff;
  padding: 14px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 15px;
  transition: background .15s;
}
.auth-submit:hover { background: #a70e26; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #999;
  font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e5e5;
}
.auth-oauth {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border: 1.5px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
  transition: all .15s;
  font-size: 13px;
  font-weight: 600;
}
.oauth-btn:hover { border-color: #c8102e; }
.auth-terms {
  margin-top: 20px;
  font-size: 12px;
  color: #999;
  text-align: center;
  line-height: 1.5;
}
.auth-terms a { color: #c8102e; }

/* ============================================
   STORES PAGE
============================================ */
.page-stores { background: #fafafa; }
.stores-page { min-height: 80vh; }
.stores-header {
  background: linear-gradient(135deg, #c8102e 0%, #7a0e1e 100%);
  color: #fff;
  padding: 40px 0 30px;
}
.stores-header h1 {
  font-family: 'Sansita', sans-serif;
  font-weight: 900;
  font-size: 40px;
  margin: 0 0 8px;
}
.stores-header p { opacity: .9; margin: 0 0 20px; font-size: 15px; }
/* Round 4: compact hero on mobile so card #1 fits above the fold.
   Before: card #1 started at 417px in a 568px viewport. */
@media (max-width: 480px) {
  .stores-header { padding: 18px 0 14px !important; }
  .stores-header h1 { font-size: 22px !important; margin-bottom: 4px !important; }
  .stores-header p { font-size: 13.5px; margin-bottom: 14px !important; }
}
.stores-search {
  display: flex;
  gap: 12px;
  max-width: 620px;
  flex-wrap: wrap;
}
.stores-search .search-wrap {
  min-width: 240px;
  /* Round 1: make tap-target real — 44px min-height meets iOS/Material rules
     Global .search-wrap kept slim for menu chip contexts; here we override. */
  padding: 8px 16px;
  min-height: 44px;
}
.stores-search .search-wrap input {
  /* 15px font — bigger than global 14px, plus 16px prevents iOS zoom-on-focus
     when combined with min-height 44px in wrapper. */
  font-size: 15px;
  height: 100%;
}
.stores-search .search-wrap input::placeholder {
  color: #9a9a9a;
  font-size: 14px;
}
/* Round 2: "Nearest to me" geo-sort button.
   Sits next to search (wraps below on mobile). Active state = red fill so
   user sees at a glance that geo-sort is on. Busy state = spinner + disable. */
.stores-locate {
  position: relative;
  min-height: 44px;
  padding: 0 16px;
  background: #fff;
  border: 1.5px solid #e5e5e5;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13.5px;
  color: #231f20;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .15s, border-color .15s, color .15s;
  -webkit-appearance: none; appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.stores-locate svg { color: #c8102e; transition: color .15s; }
.stores-locate:hover { border-color: #c8102e; }
.stores-locate.active {
  background: #c8102e; color: #fff; border-color: #c8102e;
  box-shadow: 0 2px 8px rgba(200,16,46,.22);
}
.stores-locate.active svg { color: #fff; }
.stores-locate.busy { pointer-events: none; opacity: .7; }
.stores-locate.busy svg, .stores-locate.busy span { opacity: 0; }
.stores-locate.busy::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border: 2.5px solid rgba(200,16,46,.25); border-top-color: #c8102e;
  border-radius: 50%;
  animation: addrLocSpin .8s linear infinite;
}
@media (max-width: 380px) {
  .stores-locate { width: 100%; justify-content: center; }
}

/* Round 2: distance chip on store cards when geo-sort is active */
.store-km {
  display: inline-flex; align-items: center;
  background: linear-gradient(135deg, #fff4d2 0%, #ffe89a 100%);
  border: 1px solid #f0d888;
  color: #8a5a00;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .01em;
  white-space: nowrap;
}

/* Round 2: List/Map view toggle — mobile-only segment control.
   Desktop shows both list AND map side-by-side (grid), so toggle hidden. */
.stores-view-toggle {
  display: none;
  grid-column: 1 / -1;
  gap: 0;
  padding: 4px;
  background: #f0f0f2;
  border-radius: 999px;
  margin-bottom: 12px;
}
.svt-btn {
  flex: 1;
  min-height: 40px;
  padding: 0 14px;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13.5px;
  color: #666;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background .15s, color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.svt-btn.active {
  background: #fff;
  color: #c8102e;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.svt-btn svg { color: currentColor; }

@media (max-width: 900px) {
  .stores-view-toggle { display: flex; }
  /* Toggle-controlled visibility on mobile only */
  .stores-layout[data-view="list"] .stores-map     { display: none; }
  .stores-layout[data-view="map"]  .stores-list-wrap { display: none; }
  /* When map is the active view, let it fill remaining viewport height */
  .stores-layout[data-view="map"] #storesMap { height: 70vh; min-height: 460px; }
}

.stores-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  max-width: 1440px;
  margin: 0 auto;
  gap: 30px;
  padding: 30px 32px 80px;
  align-items: flex-start;
}
@media (max-width: 900px) {
  .stores-layout { grid-template-columns: 1fr; padding: 20px 16px 60px; }
}

.stores-count {
  color: #999;
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 13px;
}
/* Round 4: tighten toggle → count → cards gap on mobile */
@media (max-width: 900px) {
  .stores-view-toggle { margin-bottom: 8px; }
  .stores-count { margin-bottom: 8px; }
}
.stores-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 800px;
  overflow-y: auto;
  padding-right: 8px;
}
.store-card {
  background: #fff;
  border-radius: 10px;
  padding: 18px 20px;
  border: 1.5px solid #e5e5e5;
  transition: all .15s;
  animation: fadeInUp .35s ease backwards;
}
.store-card:hover { border-color: #c8102e; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.store-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.store-head h3 {
  margin: 0; font-size: 17px; font-weight: 800; color: #231f20;
  /* Round 3: h3 can overflow when store name + km chip both present;
     min-width:0 lets flex shrink us, keeps the chip anchored right. */
  min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Round 3: "branch" suffix — softer weight/colour so it reads as label,
   not part of the proper name. Also hidden on ultra-narrow if it would
   push the km chip off. */
.store-branch-suffix {
  color: #888;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .01em;
}
.store-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
}
.store-badge.halal { background: #009e60; color: #fff; }
/* .store-city rule removed in Round 3 — element no longer rendered
   (was showing raw numeric zone IDs like "52", removed in Round 1). */
.store-address, .store-phone, .store-hours {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 13px;
  color: #666;
  margin: 4px 0;
}
/* Round 4: pin/clock icons sit at top of first text line (flex-start) so
   multi-line addresses don't push them into vertical centre of the block. */
.store-address > svg, .store-hours > svg { flex-shrink: 0; margin-top: 3px; }
/* Round 4: line-clamp address to 2 lines — stabilises card height when
   Nominatim/data.json returns long strings. Was causing 150→208px jitter. */
.store-address-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-width: 0;
  line-height: 1.4;
}
.store-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  /* Round 3: primary Delivery gets more room than outline Pickup */
  align-items: stretch;
}
.store-action {
  /* Round 3: base = shared props. Primary + outline get flex/padding
     specific overrides below. */
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background .15s, border-color .15s, transform .1s;
  -webkit-appearance: none; appearance: none;
  -webkit-tap-highlight-color: transparent;
  min-height: 40px;
}
.store-action.primary {
  /* Round 3: 2:1 weight for delivery vs pickup (was 1:1 before) */
  flex: 2;
  background: #c8102e;
  color: #fff;
  box-shadow: 0 2px 6px rgba(200,16,46,.20);
}
.store-action.primary:hover  { background: #a70e26; }
.store-action.primary:active { transform: scale(.97); }
.store-action.outline {
  flex: 1;
  background: transparent;
  color: #c8102e;
  border: 1.5px solid #e5e5e5;
}
.store-action.outline:hover  { border-color: #c8102e; background: #fff5f6; }
.store-action.outline:active { transform: scale(.97); }
/* Round 3: compact padding for iPhone 5c — every px counts on 320w */
@media (max-width: 380px) {
  .store-card { padding: 14px 16px; }
  .store-head h3 { font-size: 16px; }
  .store-branch-suffix { display: none; }
  .store-action { padding: 9px 10px; font-size: 12.5px; }
  .store-action.primary svg { display: none; }  /* label alone is clearer at tiny widths */
}

.stores-map {
  position: sticky;
  top: 130px;
  align-self: flex-start;
}
.map-inner {
  aspect-ratio: 1;
  background:
    linear-gradient(45deg, #d9e8d9 25%, transparent 25%),
    linear-gradient(-45deg, #d9e8d9 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d9e8d9 75%),
    linear-gradient(-45deg, transparent 75%, #d9e8d9 75%),
    #edf5ed;
  background-size: 30px 30px;
  background-position: 0 0, 0 15px, 15px -15px, -15px 0;
  border-radius: 12px;
  border: 1.5px solid #cfe0cf;
  position: relative;
  overflow: hidden;
}
.map-pin-cluster { position: absolute; inset: 0; }
.map-pin {
  position: absolute;
  width: 28px; height: 28px;
  background: #c8102e;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 4px 10px rgba(0,0,0,.25);
  animation: fadeInScale .4s ease backwards;
}
.map-pin::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 10px; height: 10px;
  background: #fff;
  border-radius: 50%;
}
.map-pin.p1 { top: 30%; left: 40%; animation-delay: 0s; }
.map-pin.p2 { top: 45%; left: 55%; animation-delay: .1s; }
.map-pin.p3 { top: 25%; left: 60%; animation-delay: .2s; }
.map-pin.p4 { top: 60%; left: 35%; animation-delay: .3s; }
.map-pin.p5 { top: 55%; left: 65%; animation-delay: .4s; }
.map-overlay {
  position: absolute;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,.9);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #666;
}

/* ============================================
   CART PAGE / CHECKOUT
============================================ */
.page-cart, .page-checkout { background: #fafafa; }
.cart-page, .checkout-page { min-height: 80vh; padding-bottom: 80px; }
.cart-crumbs {
  padding: 24px 0 16px;
  font-size: 13px;
  color: #666;
}
.cart-crumbs a { color: #666; }
.cart-crumbs a:hover { color: #c8102e; }
.cart-crumbs b { color: #231f20; }

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 30px;
}
@media (max-width: 900px) {
  /* minmax(0, 1fr) — plain `1fr` lets grid track auto-expand to intrinsic
     min-content (item card wanting 329px), which overshoots the 305px
     viewport padding. Same class of fix as menu page horizontal overflow. */
  .cart-layout { grid-template-columns: minmax(0, 1fr); }
  .cart-items-col, .cart-summary-col { min-width: 0; }
}
.cart-items-col h1 {
  font-family: 'Sansita', sans-serif;
  font-weight: 900;
  font-size: 32px;
  margin: 0 0 20px;
}
.cart-page-items { display: flex; flex-direction: column; gap: 12px; }
.cart-page-item {
  display: grid;
  grid-template-columns: 90px 1fr auto auto auto;
  gap: 20px;
  align-items: center;
  background: #fff;
  padding: 16px;
  border-radius: 10px;
  border: 1.5px solid #e5e5e5;
  transition: box-shadow .15s;
  animation: fadeInUp .3s ease backwards;
}
.cart-page-item:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.cart-page-item img {
  width: 90px; height: 90px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
  border: 1px solid #f0f0f0;
}
.cpi-body h4 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 800;
  /* Long combo names ("My Box: One Sicilian Pizza + 2 Sides – A
     Delicious Combo!") were eating 3-4 lines on the cart page item
     card. Clamp to 2 lines with ellipsis for consistent card height. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.cpi-variant { margin: 0 0 4px; font-size: 12px; color: #999; }
.cpi-unit { margin: 0; font-size: 13px; color: #666; }
.cpi-qty {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  padding: 4px 12px;
}
.cpi-qty button {
  width: 24px; height: 24px;
  border-radius: 50%;
  color: #c8102e;
  font-weight: 900;
  font-size: 16px;
  transition: background .15s;
}
.cpi-qty button:hover { background: rgba(200,16,46,.1); }
.cpi-qty span { font-weight: 800; min-width: 20px; text-align: center; }
.cpi-line { font-weight: 800; font-size: 16px; color: #c8102e; min-width: 90px; text-align: right; }
.cpi-remove {
  padding: 6px;
  transition: transform .15s;
}
.cpi-remove:hover { transform: scale(1.1); }
@media (max-width: 600px) {
  .cart-page-item { grid-template-columns: 60px 1fr; grid-template-areas: 'img body' 'img body' 'qty line' 'rm rm'; }
  .cart-page-item img { grid-area: img; width: 60px; height: 60px; }
  .cpi-body { grid-area: body; }
  .cpi-qty { grid-area: qty; }
  .cpi-line { grid-area: line; }
  .cpi-remove { grid-area: rm; justify-self: end; }
}

.cart-summary-col, .checkout-summary {
  background: #fff;
  border-radius: 10px;
  border: 1.5px solid #e5e5e5;
  padding: 24px;
  position: sticky;
  top: 130px;
  align-self: flex-start;
}
.cart-summary-col h3, .checkout-summary h3 {
  font-family: 'Sansita', sans-serif;
  font-weight: 900;
  font-size: 20px;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e5e5;
}
.cs-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
  color: #666;
}
.cs-row.total {
  font-weight: 800;
  font-size: 18px;
  color: #231f20;
  padding: 12px 0;
  border-top: 1px solid #e5e5e5;
  margin-top: 8px;
}
.cs-promo {
  display: flex;
  gap: 6px;
  margin-top: 16px;
}
.cs-promo input {
  flex: 1;
  border: 1.5px solid #e5e5e5;
  border-radius: 6px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
}
.cs-promo button {
  padding: 10px 18px;
  background: #231f20;
  color: #fff;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  transition: background .15s;
}
.cs-promo button:hover { background: #c8102e; }
.cart-empty-page {
  text-align: center;
  padding: 80px 20px;
  background: #fff;
  border-radius: 12px;
  animation: fadeInUp .5s ease;
}
.cart-empty-page img { width: 220px; margin: 0 auto 20px; }
.cart-empty-page h2 { font-size: 24px; margin: 0 0 8px; }
.cart-empty-page p { color: #666; margin: 0 0 20px; }

/* ============ CHECKOUT SPECIFIC ============ */
.checkout-stepper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 30px;
  max-width: 500px;
}
.step { display: flex; align-items: center; gap: 8px; }
.step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #e5e5e5;
  color: #666;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  transition: all .3s;
}
.step.done .step-dot { background: #c8102e; color: #fff; }
.step.active .step-dot { background: #c8102e; color: #fff; box-shadow: 0 0 0 4px rgba(200,16,46,.2); }
.step-label { font-size: 13px; font-weight: 700; color: #666; }
.step.active .step-label, .step.done .step-label { color: #231f20; }
.step-line {
  flex: 1;
  height: 2px;
  background: #e5e5e5;
  transition: background .3s;
}
.step-line.active { background: #c8102e; }

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 30px;
  align-items: start;
}
@media (max-width: 900px) {
  .checkout-layout { grid-template-columns: 1fr; }
}
.checkout-forms { display: flex; flex-direction: column; gap: 20px; }
.checkout-card {
  background: #fff;
  border-radius: 10px;
  border: 1.5px solid #e5e5e5;
  padding: 24px;
}
.checkout-card h3 {
  font-family: 'Sansita', sans-serif;
  font-weight: 900;
  font-size: 18px;
  margin: 0 0 16px;
}
.addr-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 700px) { .addr-cards { grid-template-columns: 1fr; } }
.addr-card {
  padding: 14px;
  border: 1.5px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: all .15s;
  position: relative;
}
.addr-card:hover { border-color: #c8102e; }
.addr-card.active { border-color: #c8102e; background: rgba(200,16,46,.03); }
.addr-tag {
  display: inline-block;
  background: #f5f5f5;
  color: #666;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  margin-bottom: 8px;
}
.addr-card.active .addr-tag { background: #c8102e; color: #fff; }
.addr-card h4 { margin: 0 0 4px; font-size: 14px; font-weight: 800; }
.addr-card p { margin: 0; font-size: 12px; color: #666; }
.addr-card.add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-style: dashed;
  color: #c8102e;
  font-weight: 700;
  font-size: 13px;
  min-height: 88px;
}

/* Saved-address card (real address list rendered by checkout.js).
   Grid layout: tag chip | main lines | small actions. Active state uses
   a red left-rail + top-right check badge — impossible to miss on mobile. */
.addr-card-saved {
  position: relative;
  padding: 14px 44px 14px 18px;
  border: 1.5px solid #e5e5e5;
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s, background .18s, box-shadow .18s, transform .1s;
  width: 100%;
  min-height: 78px;
  overflow: hidden;
  animation: acsFadeIn .3s ease backwards;
}
@keyframes acsFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}
.addr-card-saved:hover { border-color: #c8102e; }
.addr-card-saved:active { transform: scale(.99); }
.addr-card-saved.active {
  border-color: #c8102e;
  background: linear-gradient(90deg, rgba(200,16,46,.06) 0%, rgba(200,16,46,.02) 100%);
  box-shadow: 0 0 0 3px rgba(200,16,46,.08), inset 4px 0 0 #c8102e;
  padding-left: 22px;  /* offset for left rail */
}
/* Bright ✓ badge top-right on active — the primary selection signal */
.addr-card-saved.active::after {
  content: '';
  position: absolute;
  top: 12px; right: 12px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #c8102e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/14px 14px no-repeat;
  box-shadow: 0 2px 6px rgba(200,16,46,.35);
  animation: acsCheckIn .3s ease .05s backwards;
}
@keyframes acsCheckIn {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}
.acs-tag {
  display: inline-block;
  background: #f5f5f5;
  color: #666;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .04em;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.addr-card-saved.active .acs-tag {
  background: #c8102e;
  color: #fff;
}
.acs-line1 { font-size: 14px; font-weight: 700; color: #231f20; line-height: 1.35; margin-bottom: 2px; }
.acs-line2 { font-size: 12.5px; color: #666; line-height: 1.4; }
.acs-instr {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 6px; padding: 3px 7px;
  background: #fff8e1;
  color: #7a5a00;
  border-radius: 4px;
  font-size: 11px;
  border: 1px solid #f0d888;
}
.acs-actions {
  position: absolute;
  bottom: 10px; right: 10px;
  display: flex; gap: 6px;
}
.addr-card-saved.active .acs-actions { right: 40px; }  /* clear the badge */
.acs-action {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px;
  color: #999;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.acs-action:hover { background: #f5f5f5; color: #c8102e; }

.time-slots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (max-width: 500px) { .time-slots { grid-template-columns: 1fr 1fr; } }
.time-slot {
  padding: 12px;
  border: 1.5px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.time-slot {
  position: relative;
}
.time-slot.active {
  border-color: #c8102e;
  background: linear-gradient(180deg, #fff5f6 0%, #ffeaee 100%);
  box-shadow: 0 0 0 3px rgba(200,16,46,.08);
}
.time-slot.active .ts-label { color: #c8102e; }
/* Checkmark badge top-right of selected slot — clear "this is selected"
   affordance without a radio button (which would fight the card look). */
.time-slot.active::after {
  content: "";
  position: absolute;
  top: 6px; right: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #c8102e url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-11'/%3E%3C/svg%3E") no-repeat center / 11px 11px;
}
.time-slot:hover { border-color: #c8102e; }
.ts-label { font-weight: 800; font-size: 14px; color: #231f20; }
.ts-sub { font-size: 11px; color: #666; }

.pay-methods { display: flex; flex-direction: column; gap: 8px; }
.pay-method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid #e5e5e5;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
}
.pay-method:hover { border-color: #c8102e; }
.pay-method.active { border-color: #c8102e; background: rgba(200,16,46,.03); }
.pay-method input { display: none; }
.pm-body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}
.pm-body b { display: block; font-size: 14px; }
.pm-body span:not(b) { color: #999; font-size: 12px; }
.pm-check {
  color: #c8102e;
  font-weight: 900;
  font-size: 18px;
  opacity: 0;
  transition: opacity .15s;
}
.pay-method.active .pm-check { opacity: 1; }

.card-fields {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e5e5;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeInUp .3s ease;
}
.field-row { display: flex; flex-direction: column; gap: 4px; }
.field-row label { font-size: 12px; font-weight: 700; color: #666; }
.field-row input {
  padding: 12px 14px;
  border: 1.5px solid #e5e5e5;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
}
.field-row input:focus { border-color: #c8102e; outline: 0; }
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.checkout-card textarea {
  width: 100%;
  min-height: 80px;
  border: 1.5px solid #e5e5e5;
  border-radius: 8px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}
.checkout-card textarea:focus { border-color: #c8102e; outline: 0; }

.cs-items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; max-height: 200px; overflow-y: auto; padding-right: 4px; }
.cs-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}
.cs-item img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; }
.cs-item-body { min-width: 0; }
.cs-item-body p {
  margin: 0;
  /* Same 2-line clamp as cart drawer — see .cart-item-name comment.
     Applies to Order Summary on checkout Step 1/2/3. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.cs-item-variant { font-size: 11px; color: #999; }
.cs-item-price { font-weight: 800; color: #c8102e; }
.cs-empty { text-align: center; color: #999; padding: 20px 0; }
.cs-empty a { color: #c8102e; font-weight: 700; }
.cs-secure {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: #999;
  font-weight: 700;
  letter-spacing: .05em;
}

/* ============================================
   CART DRAWER — cart-item thumb
============================================ */
.cart-item {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  border-radius: 6px;
}
.cart-item-thumb {
  width: 50px; height: 50px;
  border-radius: 6px;
  object-fit: cover;
  background: #fff;
  border: 1px solid #f0f0f0;
}
.cart-item-variant {
  font-size: 11px;
  color: #999;
  margin: 0 0 2px;
}

/* ============================================
   REDUCED MOTION
============================================ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ============================================
   RTL (ARABIC) SUPPORT
============================================ */
[dir="rtl"] {
  font-family: 'Tajawal', 'Cairo', 'Open Sans', sans-serif;
}
[dir="rtl"] .header-right {
  margin-left: 0;
  margin-right: auto;
}
[dir="rtl"] .mode-tabs {
  margin-left: 0;
  margin-right: 20px;
}
[dir="rtl"] .header-left-nav {
  flex-direction: row-reverse;
}
[dir="rtl"] .sidebar-drawer {
  left: auto;
  right: -320px;
}
[dir="rtl"] .sidebar-drawer.open {
  left: auto;
  right: 0;
}
[dir="rtl"] .sidebar-drawer {
  box-shadow: -4px 0 30px rgba(0,0,0,.2);
}
[dir="rtl"] .sidebar-nav a {
  border-left: 0;
  border-right: 3px solid transparent;
}
[dir="rtl"] .sidebar-nav a:hover,
[dir="rtl"] .sidebar-cat-link.active {
  border-left: 0;
  border-right: 3px solid #c8102e;
  padding-left: 12px;
  padding-right: 9px;
}
[dir="rtl"] .cart-drawer {
  right: auto;
  left: -420px;
  box-shadow: 6px 0 30px rgba(0,0,0,.15);
}
[dir="rtl"] .cart-drawer.open {
  right: auto;
  left: 0;
}
[dir="rtl"] .fav-btn {
  right: auto;
  left: 8px;
}
[dir="rtl"] .tags {
  left: auto;
  right: 8px;
}
[dir="rtl"] .hero-arrow.prev,
[dir="rtl"] .cat-arrow.prev {
  left: auto;
  right: 20px;
  transform: translateY(-50%) scaleX(-1);
}
[dir="rtl"] .hero-arrow.next,
[dir="rtl"] .cat-arrow.next {
  right: auto;
  left: 20px;
  transform: translateY(-50%) scaleX(-1);
}
[dir="rtl"] .cat-arrow.prev { right: -14px; }
[dir="rtl"] .cat-arrow.next { left: -14px; }
[dir="rtl"] .product-card *,
[dir="rtl"] .cart-item *,
[dir="rtl"] .cart-page-item * {
  text-align: right;
}
[dir="rtl"] .add-btn::before {
  order: 2;
  margin-inline-start: 3px;
}
[dir="rtl"] .cat-track {
  direction: rtl;
}
[dir="rtl"] .menu-page,
[dir="rtl"] .cat-page {
  direction: rtl;
}
[dir="rtl"] .sidebar-cat-link em {
  margin-left: 0;
  margin-right: auto;
}
[dir="rtl"] .footer-container * {
  text-align: right;
}
[dir="rtl"] .search-wrap svg,
[dir="rtl"] .menu-search svg {
  order: 2;
}
[dir="rtl"] .checkout-stepper { flex-direction: row-reverse; }
[dir="rtl"] .cs-item { grid-template-columns: auto 1fr 40px; direction: rtl; }
[dir="rtl"] .breadcrumbs, [dir="rtl"] .product-crumbs { direction: rtl; }
[dir="rtl"] .cart-item-qty { direction: ltr; }
[dir="rtl"] .qty-control { direction: ltr; }

/* ============================================
   MOBILE BREAKPOINTS — < 640px
============================================ */
@media (max-width: 640px) {
  /* Header: hamburger LEFT, mode tabs CENTER, logo RIGHT — matches original pizzahutqatar.com mobile.
     lang/bag/Login are HIDDEN on mobile (they move into the hamburger drawer).
     Hamburger is relocated via JS into .header-top on mobile (`body.mobile-header-relocated`). */
  .header-top > .header-container {
    padding: 10px 12px;
    gap: 8px;
    align-items: center;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: 'left tabs brand';
  }
  .logo { grid-area: brand; justify-self: end; }
  .logo img { height: 32px; }
  .mode-tabs { grid-area: tabs; width: auto; justify-content: center; margin: 0; gap: 12px; }
  .mode-tab { padding: 8px 6px 10px; font-size: 12px; gap: 4px; }
  .mode-tab .mode-icon svg { width: 22px; height: 14px; }
  /* Hide right-side icons on mobile — original has ONLY hamburger + tabs + logo */
  .header-right { display: none !important; }
  /* Hide the bottom row entirely (hamburger has been relocated to top by JS) */
  .header-bottom { display: none; }
  /* Hamburger button placed in the left grid area */
  .header-top #hamburgerBtn { grid-area: left; justify-self: start; }
  .find-restaurant span { display: none; }
  .find-restaurant img { height: 22px; }

  /* Hero */
  .hero-arrow { width: 32px; height: 32px; }
  .hero-arrow.prev { left: 8px; }
  .hero-arrow.next { right: 8px; }
  .hero-dots { bottom: 8px; }
  .hero-dot { width: 6px; height: 6px; }
  .hero-dot.active { width: 16px; }

  /* Sections */
  .section { padding: 24px 0 12px; }
  .section-container { padding: 0 12px; }
  .section-title { font-size: 20px; }
  .cat-track { gap: 10px; padding: 4px 0; }
  .cat-card { flex: 0 0 160px; }
  .cat-card img { height: 100px; }
  .cat-card h3 { font-size: 11px; padding: 8px 10px; }
  .cat-arrow { display: none; }

  /* Product grid */
  .products-grid, .deals-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .product-image { aspect-ratio: 1; }
  .product-body { padding: 10px 10px 12px; }
  .product-name { font-size: 12px; }
  .product-price { font-size: 12px; }
  .product-desc { font-size: 10.5px; min-height: 28px; }
  .product-options { grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 6px; }
  .select-wrap select { padding: 5px 16px 5px 6px; font-size: 10.5px; }
  .qty-control { padding: 2px; height: 26px; }
  .qty-btn { width: 18px; height: 18px; font-size: 13px; }
  .qty-val { font-size: 11px; }
  .add-btn { padding: 0 8px; height: 26px; font-size: 11px; }
  .add-btn::before { font-size: 12px; }

  /* Menu page: sidebar becomes horizontal category pills.
     Override display:none set higher up (@media 900px) — without this the
     mobile client has no category quick-nav and must scroll the entire
     menu to find each section.
     `minmax(0, 1fr)` is required — plain `1fr` lets the grid track grow
     to fit the sidebar's intrinsic min-content (pills row ~373px), which
     inflates the whole grid past the viewport width. minmax(0,1fr) forces
     min = 0 so track honours viewport width. */
  .menu-page, .cat-page { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 0 12px; }
  /* Positioning wrapper needed so the ::after fade gradient can hang over
     the sticky bar without scrolling with the pills. */
  .menu-sidebar {
    display: block !important;
    position: sticky;
    top: 56px;                  /* right below the compact mobile header */
    background: #fff;
    z-index: 40;
    padding: 10px 12px 9px;    /* internal breathing room, NO negative margin */
    /* Constrain to parent grid column. Root cause: `.menu-page` uses grid
       `1fr` on mobile, but grid tracks auto-expand to fit intrinsic MIN
       content of items. Sidebar's pills row has min-content ~373px because
       browsers don't let overflow:auto elements shrink below content unless
       explicitly told via `min-width: 0`. Without this the grid track
       inflates to 373px → sidebar overflows viewport horizontally.
       — Fix: `min-width: 0` allows grid track to collapse to `1fr` correctly. */
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    /* Soft downward shadow — replaces the harsh 1px border-bottom. Reads
       as a floating bar hovering over content, not a stray divider. */
    border-bottom: 0;
    box-shadow: 0 4px 12px -6px rgba(0,0,0,.10);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;      /* Firefox */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 24px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 24px), transparent 100%);
  }
  /* When scrolled to the very end, drop the right-side fade so no ghostly
     translucency lingers over the last pill. */
  .menu-sidebar.scroll-end {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 100%);
  }
  .menu-sidebar.scroll-start {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent 100%);
            mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent 100%);
  }
  .menu-sidebar::-webkit-scrollbar { display: none; }    /* Chrome/Safari */
  .sidebar-title { display: none; }
  .sidebar-cat-list {
    flex-direction: row;
    gap: 8px;                   /* more finger-comfortable gap between pills */
    padding-bottom: 2px;
  }
  .sidebar-cat-link {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 7px 12px 7px 7px;  /* left tighter for the icon to breathe */
    border-radius: 999px;
    background: #f5f5f5;
    color: #231f20;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    border: 1.5px solid transparent;
    transition: background-color .16s, color .16s, border-color .16s, transform .1s;
  }
  .sidebar-cat-link:active { transform: scale(.97); }
  .sidebar-cat-link img {
    width: 26px; height: 26px;
    border-radius: 999px;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
    flex-shrink: 0;
  }
  /* Small count badge inside the pill — tells client the category size
     without them having to scroll into it. */
  .sidebar-cat-link em {
    display: inline-block;
    font-style: normal;
    font-size: 10.5px;
    font-weight: 800;
    color: #999;
    background: transparent;
    padding: 0 0 0 2px;
    letter-spacing: .02em;
  }
  .sidebar-cat-link.active {
    background: #c8102e !important;
    color: #fff !important;
    /* Keep border-width same to prevent layout shift on toggle */
    border: 1.5px solid #c8102e !important;
    padding: 7px 12px 7px 7px !important;
    box-shadow: 0 2px 6px rgba(200,16,46,.28);
  }
  /* Icon stays visible on active pill — no visual jump when toggling */
  .sidebar-cat-link.active img {
    display: block;
    background: rgba(255,255,255,.9);
  }
  .sidebar-cat-link.active em { color: rgba(255,255,255,.75); }

  /* Menu hero */
  .menu-hero { padding: 22px 20px; margin-bottom: 16px; }
  .menu-hero h1 { font-size: 26px; }
  .menu-hero p { font-size: 13px; }
  .menu-search-bar { flex-direction: column; }
  .search-wrap, .sort-wrap { min-width: 0; width: 100%; }
  .menu-group-head h2 { font-size: 18px; }

  /* Category hero */
  .cat-hero { height: 200px; margin-bottom: 20px; }
  .cat-hero-overlay h1 { font-size: 30px; }

  /* Product detail */
  .product-page { padding: 12px 12px 60px; }
  .product-crumbs { padding: 10px 0; font-size: 11px; }
  .product-detail { gap: 20px; }
  .pd-gallery { position: static; }
  .pd-name { font-size: 26px; }
  .pd-price { font-size: 22px; }
  .pd-desc { font-size: 13px; }
  .pd-choice { min-width: 80px; padding: 10px 12px; }
  .pd-cta { flex-direction: column; }
  .pd-fav { width: 100%; }

  /* Cart drawer full width */
  .cart-drawer { width: 100vw; max-width: 100vw; right: -100vw; }
  [dir="rtl"] .cart-drawer { left: -100vw; }

  /* Footer */
  .footer-container { grid-template-columns: 1fr; padding: 24px 16px 12px; gap: 22px; }
  .footer-bottom-inner { flex-direction: column; gap: 6px; text-align: center; font-size: 11px; }

  /* Stores */
  .stores-header { padding: 24px 0 16px; }
  .stores-header h1 { font-size: 24px; }
  .stores-layout { grid-template-columns: 1fr; padding: 16px 12px 60px; gap: 16px; }
  .stores-map { position: static; }

  /* Login */
  .auth-form-card { padding: 24px 20px; }
  .auth-oauth { grid-template-columns: 1fr; }
  .auth-visual h2 { font-size: 24px; }

  /* Checkout — enforce container widths so nothing overflows on mobile */
  body.page-checkout, body.page-cart { overflow-x: hidden; }
  .checkout-page, .cart-page { overflow-x: hidden; }
  .checkout-layout {
    gap: 16px;
    grid-template-columns: minmax(0, 1fr);   /* min:0 lets kids shrink under viewport */
  }
  .checkout-forms, .checkout-summary { min-width: 0; max-width: 100%; }
  .checkout-stepper { flex-wrap: wrap; }
  .checkout-card { padding: 18px; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
  .addr-cards { grid-template-columns: 1fr; }
  .time-slots { grid-template-columns: 1fr 1fr; }
  .cart-summary-col, .checkout-summary { position: static; }
  .cart-layout { grid-template-columns: 1fr; }

  /* Review card blocks — long addresses / instructions should wrap, not overflow */
  .review-card, .rv-block, .rv-body { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }

  /* Card form inputs never wider than container */
  .cf-input-wrap, .cf-field input, .card-form input { max-width: 100%; box-sizing: border-box; }
  .cf-row-2 { grid-template-columns: 1fr 1fr; gap: 10px; }

  /* Contact card phone input — force compact on narrow */
  .phone-input.compact input { min-width: 0; }
  .cp-form { grid-template-columns: 1fr; gap: 8px; }
  .cp-continue { width: 100%; }

  /* ETA breakdown lines wrap on narrow */
  .eta-breakdown, .eb-head, .eb-lines, .eb-lines li { min-width: 0; overflow-wrap: anywhere; }

  /* Stepper narrow-fit */
  .checkout-stepper .step-label { font-size: 11px; }
  .checkout-stepper .step-dot { width: 22px; height: 22px; font-size: 12px; }
  .checkout-stepper { gap: 4px; }
  .checkout-stepper .step-line { min-width: 12px; }

  /* Utility bar */
  .util-inner { flex-direction: column; gap: 6px; text-align: center; }

  /* Reorder */
  .reorder-strip { padding: 12px 16px; }
  .reorder-btn { padding: 10px 40px; font-size: 13px; }

  /* Rewards / promise / app cta if any */
  .promise-inner, .rewards-inner, .app-inner { grid-template-columns: 1fr !important; padding: 24px; gap: 20px; }

  /* Bottom sticky cart bar (mobile only) — 90px = 64px bar + 26px breathing */
  body.has-cart-mobile { padding-bottom: 90px; }
}

/* ============================================
   MOBILE STICKY CART BAR (< 640px, always mounted)
============================================ */
.mobile-cart-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #c8102e;
  color: #fff;
  padding: 12px 18px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 -6px 20px rgba(0,0,0,.2);
  z-index: 90;
  transform: translateY(100%);
  transition: transform .3s ease;
  animation: slideInUp .3s ease forwards;
}
@keyframes slideInUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.mobile-cart-bar.visible { display: flex; }
.mobile-cart-bar .mcb-left {
  display: flex; align-items: center; gap: 10px;
}
.mobile-cart-bar .mcb-count {
  background: #ffcc00;
  color: #231f20;
  min-width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 13px;
  padding: 0 6px;
}
.mobile-cart-bar .mcb-label {
  font-weight: 700; font-size: 14px;
}
.mobile-cart-bar .mcb-total {
  font-weight: 800; font-size: 15px;
}
.mobile-cart-bar .mcb-btn {
  background: #ffcc00;
  color: #231f20;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 13px;
  transition: transform .1s;
}
.mobile-cart-bar .mcb-btn:active { transform: scale(.95); }
@media (min-width: 641px) {
  .mobile-cart-bar { display: none !important; }
}

/* ============================================
   PAYMENT — SINGLE TRUSTED CARD (checkout)
============================================ */
.pay-card { padding: 0; overflow: hidden; }
.pay-card h3 { padding: 22px 24px 0; margin-bottom: 18px; }

.pay-hero {
  padding: 0 24px 24px;
}
.pay-hero-inner {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  background: linear-gradient(135deg, #fff5f6 0%, #fef8e7 100%);
  border: 1.5px solid #f5c8c8;
  border-radius: 10px;
  margin-bottom: 18px;
}
.pay-hero-lock {
  width: 44px; height: 44px;
  background: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px solid #c8102e;
}
.pay-hero-copy b {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: #231f20;
  margin-bottom: 2px;
}
.pay-hero-copy span {
  display: block;
  font-size: 12.5px;
  color: #666;
  line-height: 1.4;
}
.pay-hero-badge {
  background: #c8102e;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  padding: 5px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  white-space: nowrap;
}

.pay-brands, .pay-brand { display: none; }
.pay-brands-strip {
  padding: 14px 16px;
  background: #fafafa;
  border-radius: 10px;
  margin-bottom: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.pay-brands-strip img {
  max-width: 100%;
  height: 30px;
  width: auto;
  image-rendering: -webkit-optimize-contrast;
  filter: contrast(1.02);
}
@media (max-width: 500px) {
  .pay-brands-strip img { height: 22px; }
}

.pay-trust {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
@media (max-width: 640px) {
  .pay-trust { grid-template-columns: 1fr; }
  .pay-hero-inner { grid-template-columns: 40px 1fr; }
  .pay-hero-badge { grid-column: 2; justify-self: start; margin-top: 6px; }
}
.pay-trust-row {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid #eee;
}
.pay-trust-row > svg {
  margin-top: 2px;
  flex-shrink: 0;
}
.pay-trust-row b {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  color: #231f20;
  margin-bottom: 1px;
}
.pay-trust-row span {
  display: block;
  font-size: 11px;
  color: #888;
  line-height: 1.35;
}

.pay-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  background: #f5f5f5;
  border-radius: 8px;
  font-size: 11.5px;
  color: #666;
  line-height: 1.5;
}
.pay-note svg { flex-shrink: 0; margin-top: 2px; }

/* Powered by strip inside checkout summary */
.cs-powered {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eee;
  text-align: center;
  font-size: 10.5px;
  color: #999;
  letter-spacing: .04em;
}
.cs-powered b { color: #c8102e; font-weight: 800; }

/* ============================================
   PICKUP PICKER BUTTON (checkout)
============================================ */
.pickup-picker {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  background: #fafafa;
  border: 1.5px dashed #c8102e;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: all .2s;
}
.pickup-picker:hover {
  background: #fff5f6;
  border-style: solid;
}
.pp-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  border: 1.5px solid #c8102e;
  flex-shrink: 0;
}
.pp-body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
/* 1-line ellipsis for both — name+city were wrapping into 4+2 lines when body
   shrunk to ~66px, blowing plashka height to 202px on 320. */
.pp-body b {
  font-size: 14px; font-weight: 800; color: #231f20;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: block;
}
.pp-body span {
  font-size: 12px; color: #666;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: block;
}
.pp-body small.pp-hours {
  font-size: 11.5px; color: #888; font-weight: 600;
  display: flex; align-items: center; gap: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-top: 2px;
}
.pp-body small.pp-hours svg { flex-shrink: 0; }
/* CTA — pencil edit icon instead of "Choose →" text (was 81px wide, taking
   more room than the branch name itself). Icon-only reads as "tap to
   change" and yields 40px+ back to the branch name body. */
.pp-cta {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid #e5e5e5;
  background: #fff;
  color: transparent;
  font-size: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  padding: 0;
  position: relative;
}
.pp-cta::after {
  content: '';
  display: block;
  width: 14px; height: 14px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8102e' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}
[dir="rtl"] .pp-cta::after { transform: scaleX(-1); }
.pickup-picker:hover .pp-cta { border-color: #c8102e; background: #fff5f6; }
[dir="rtl"] .pickup-picker { text-align: right; }
/* Mobile compact — 44px icon + 34px CTA still leaves body ~127px for name.
   That covers 15-char branch names comfortably. */
@media (max-width: 380px) {
  .pickup-picker { padding: 14px; gap: 12px; }
  .pp-icon { width: 38px; height: 38px; }
  .pp-icon svg { width: 20px; height: 20px; }
  .pp-cta { width: 32px; height: 32px; }
}
/* Desktop — cap the plashka width so chevron doesn't fly to far right corner
   in the 900px-wide forms column, and content stays visually grouped. */
@media (min-width: 1024px) {
  .pickup-picker { max-width: 560px; }
}

/* ============================================
   STORE-PICKER MODAL (checkout)
============================================ */
/* ── REBUILT (Rounds A+B+C, 2026-08-24): full-width list card, Locate-me
   chip, search+toggle toolbar, sticky footer with prominent Confirm. Card
   visuals mirror .store-card from stores.html for cross-surface parity. */
.store-picker-modal {
  position: fixed;
  inset: 0;
  top: 0; right: 0; bottom: 0; left: 0;  /* iOS 10 fallback */
  background: rgba(0,0,0,.55);
  z-index: 300;
  display: flex;
  align-items: stretch;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.store-picker-modal.visible { opacity: 1; pointer-events: auto; }
/* Flex column instead of grid — resilient to extra rows (locate-err strip
   inserts a 5th child that grid-template-rows: auto auto 1fr auto pushes
   footer offscreen, hiding the Confirm CTA). Flex lets each child claim
   its natural height; body flexes 1 1 auto to fill remaining space. */
.spc-card {
  background: #fff;
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fadeInScale .32s cubic-bezier(.34,1.56,.64,1);
}
.spc-card > .spc-head,
.spc-card > .spc-locate-err,
.spc-card > .spc-toolbar,
.spc-card > .spc-foot { flex: 0 0 auto; }
.spc-card > .spc-body { flex: 1 1 auto; min-height: 0; }
@media (min-width: 640px) {
  .store-picker-modal { padding: 24px; align-items: center; }
  .spc-card { max-height: 88vh; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
}
/* Desktop 1024+ — LANDSCAPE split: map (left) + list (right).
   Kills the phone-emulator portrait ratio. Uses grid inside .spc-body so
   the modal shell stays flex-col but body becomes 2-col with map+list. */
@media (min-width: 1024px) {
  .spc-card { max-width: 960px; max-height: 640px; }
  .spc-view-toggle { display: none !important; }       /* Both views visible, no toggle needed */
  .spc-toolbar { grid-template-columns: 1fr; }         /* Search takes full width, toggle gone */
  .spc-body {
    display: grid !important;
    grid-template-columns: 1fr 360px;
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "count   count"
      "map     list";
    overflow: hidden;
  }
  .spc-count       { grid-area: count; border-bottom: 1px solid #eee; }
  .spc-last-chosen { display: none !important; }       /* Redundant — active state on card shows it */
  .spc-list {
    grid-area: list;
    border-left: 1px solid #eee;
    display: flex !important;
    overflow-y: auto;
    padding: 10px 12px 16px;
  }
  .spc-map-wrap {
    grid-area: map;
    display: block !important;
    position: relative !important;
    inset: auto !important;
    top: auto !important; right: auto !important; bottom: auto !important; left: auto !important;
    width: auto !important;
  }
  /* Compact store card in 360px sidebar */
  .spc-store        { padding: 11px 12px; border-radius: 10px; }
  .spc-store h4     { font-size: 14px; }
  .spc-store-line   { font-size: 12px; }
  .spc-store-badges { margin-top: 8px; }
  .spc-store-check  { top: 10px; }
  [dir="rtl"] .spc-list { border-left: 0; border-right: 1px solid #eee; }
}
/* On mobile, don't fix height explicitly — align-items:stretch on the parent
   flex modal already stretches card to full viewport. Explicit height:100vh
   was pushing 2px past viewport (Confirm CTA clipped by URL bar on iOS). */
@media (max-width: 639px) {
  .spc-card { height: auto; max-height: 100vh; max-height: 100dvh; }
}

/* Header: Close · Title · Locate me chip */
.spc-head {
  padding: 12px 14px;
  border-bottom: 1px solid #eee;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 10px;
  background: #fff;
}
.spc-head h3 {
  margin: 0;
  font-family: 'Sansita', sans-serif;
  font-weight: 900;
  font-size: 18px;
  color: #231f20;
  text-align: left;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spc-head .spc-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #f4f4f6;
  color: #333;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  transition: all .15s;
}
.spc-head .spc-close:hover { background: #c8102e; color: #fff; }
.spc-locate {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 12px;
  background: #fff;
  border: 1.5px solid #e5e5e5;
  border-radius: 999px;
  color: #c8102e;
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
.spc-locate:hover { border-color: #c8102e; }
.spc-locate.active {
  background: #c8102e; color: #fff; border-color: #c8102e;
  box-shadow: 0 2px 8px rgba(200,16,46,.22);
}
.spc-locate.active svg { color: #fff; }
.spc-locate.busy { pointer-events: none; opacity: .75; }
.spc-locate.busy svg, .spc-locate.busy span { opacity: 0; }
.spc-locate.busy::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border: 2.5px solid rgba(200,16,46,.25); border-top-color: #c8102e;
  border-radius: 50%;
  animation: addrLocSpin .8s linear infinite;
}
/* Fix 1: Keep label ALWAYS visible even at 320px — short "Near me"/"Using GPS"
   copy fits. Hiding the label leaves an unlabeled red circle that confuses
   first-time users. */
@media (max-width: 380px) {
  .spc-locate { padding: 0 10px; font-size: 11.5px; }
  .spc-head { padding: 12px 10px; gap: 8px; }
  .spc-head h3 { font-size: 16px; }
}

/* Toolbar: search input + view toggle */
.spc-toolbar {
  padding: 10px 14px 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  background: #fff;
}
.spc-search {
  position: relative;
  display: flex;
  align-items: center;
}
.spc-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.spc-search input {
  width: 100%;
  padding: 10px 14px 10px 34px;
  border: 1.5px solid #e5e5e5;
  border-radius: 999px;
  outline: 0;
  font-family: inherit;
  font-size: 14px;
  background: #fafafa;
  transition: border-color .15s, background .15s;
}
.spc-search input:focus {
  border-color: #c8102e;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(200,16,46,.08);
}
.spc-view-toggle {
  display: flex;
  gap: 0;
  padding: 3px;
  background: #f0f0f2;
  border-radius: 999px;
}
.spc-tab {
  padding: 6px 12px;
  border: 0;
  background: transparent;
  color: #666;
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s;
}
.spc-tab.active {
  background: #fff;
  color: #c8102e;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* Body: list OR map (never both, toggled via data-view).
   Fix 5: convert to flex-col so count stays put and only list scrolls. */
.spc-body {
  overflow: hidden;
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.spc-count {
  padding: 4px 14px 6px;
  font-size: 12px;
  color: #888;
  font-weight: 600;
  background: #fff;
  flex: 0 0 auto;
}
.spc-list {
  overflow-y: auto;
  padding: 4px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
/* Fix 9: "Last chosen" hint above the list — grey subtle strip so it reads
   as context (not another CTA fighting for attention). */
.spc-last-chosen {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  margin: 0 14px 8px;
  background: #f7f7f8;
  border-radius: 8px;
  font-size: 11.5px;
  color: #666;
  flex: 0 0 auto;
}
.spc-last-chosen b { color: #231f20; font-weight: 700; }
.spc-last-chosen[hidden] { display: none; }
/* Fix 6: inline error strip for locate failures — modal-level, visible above
   the toolbar so user sees why nothing happened. */
.spc-locate-err {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fbe5e5;
  color: #a11919;
  font-size: 12.5px;
  font-weight: 600;
  border-bottom: 1px solid #f5cccc;
  animation: fadeSlideDown .25s ease;
}
.spc-locate-err[hidden] { display: none; }
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.spc-map-wrap {
  display: none;
  position: absolute;
  inset: 0;
  top: 0; right: 0; bottom: 0; left: 0;
}
.spc-body[data-view="list"] .spc-list { display: flex; }
.spc-body[data-view="list"] .spc-map-wrap { display: none; }
.spc-body[data-view="map"] .spc-list { display: none; }
.spc-body[data-view="map"] .spc-map-wrap { display: block; }
.spc-body[data-view="map"] ~ .spc-count,
.spc-body[data-view="map"] .spc-count { display: none; }

.spc-leaflet {
  width: 100%;
  height: 100%;
  min-height: 300px;
  background: #eaeaea;
}
.spc-empty {
  text-align: center;
  color: #999;
  padding: 40px 20px;
  font-size: 13px;
}

/* Store card — visual DNA cloned from .store-card in stores.html */
.spc-store {
  position: relative;
  background: #fff;
  border: 1.5px solid #e5e5e5;
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all .15s;
}
.spc-store:hover { border-color: #c8102e; box-shadow: 0 6px 18px rgba(0,0,0,.06); }
/* Fix 8: bumped from .04 to .09 — selected state was barely visible on white
   modal body. Now the pink tint reads clearly without shouting. */
.spc-store.active {
  border-color: #c8102e;
  background: rgba(200,16,46,.09);
  box-shadow: 0 4px 14px rgba(200,16,46,.14);
}
.spc-store-check {
  position: absolute;
  top: 12px;
  right: 12px;   /* LTR default */
  inset-inline-end: 12px;   /* RTL: mirror to left edge to stay paired with dist chip */
  width: 22px; height: 22px;
  background: #c8102e;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(200,16,46,.4);
}
[dir="rtl"] .spc-store-check { right: auto; left: 12px; }
.spc-store-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.spc-store-nameblock { min-width: 0; flex: 1; }
.spc-store h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #231f20;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spc-store-city {
  font-size: 11px;
  color: #888;
  font-weight: 600;
  margin-top: 2px;
}
.spc-store-dist {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: #fff;
  color: #c8102e;
  border: 1.5px solid #c8102e;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.spc-store.active .spc-store-dist { padding-right: 32px; }  /* room for check */
.spc-store-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12.5px;
  color: #666;
  margin: 4px 0 0;
  line-height: 1.4;
}
.spc-store-line svg { flex-shrink: 0; margin-top: 3px; }
.spc-store-line span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-width: 0;
}
.spc-store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}
.spc-badge {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: .03em;
}
/* Fix 7: unified outline style — Halal was solid green fill which read as an
   ad-tag; now matches Open Now visual weight, both feel like trust markers. */
.spc-badge.open   { background: #e6f4ea; color: #256a2e; }
.spc-badge.closed { background: #fbe5e5; color: #a11919; }
.spc-badge.halal  { background: #e6f4ea; color: #256a2e; }

/* User's location dot (pulsing green) */
.spc-user-icon { background: transparent !important; border: 0 !important; }
.spc-user-dot {
  position: relative;
  width: 16px; height: 16px;
  background: #2d8f2d;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.spc-user-pulse {
  position: absolute;
  top: -3px; right: -3px; bottom: -3px; left: -3px;
  border-radius: 50%;
  border: 2px solid #2d8f2d;
  opacity: .6;
  animation: spcPulse 1.6s ease-out infinite;
}
@keyframes spcPulse {
  0% { transform: scale(1); opacity: .6; }
  100% { transform: scale(2.5); opacity: 0; }
}
/* Store markers on map */
.spc-store-icon { background: transparent !important; border: 0 !important; }
.spc-store-pin {
  transform-origin: 50% 100%;
  transition: transform .2s;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.35));
}
.spc-store-icon:hover .spc-store-pin { transform: scale(1.15); z-index: 999; }
.spc-store-icon.active .spc-store-pin { transform: scale(1.3); z-index: 1000; }
.spc-store-icon.active .spc-store-pin svg path { fill: #ffcc00; stroke: #c8102e; }
.spc-store-icon.active .spc-store-pin svg text { fill: #231f20; }

/* Sticky footer with prominent Confirm CTA */
.spc-foot {
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid #eee;
  background: #fff;
  box-shadow: 0 -4px 12px rgba(0,0,0,.05);
}
.spc-confirm {
  width: 100%;
  background: #c8102e;
  color: #fff;
  padding: 14px 20px;
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .01em;
  cursor: pointer;
  transition: all .15s;
  box-shadow: 0 4px 12px rgba(200,16,46,.24);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spc-confirm:hover { background: #a70e26; }
.spc-confirm:active { transform: scale(.98); }
.spc-confirm[disabled] {
  opacity: 1;
  background: #e5e5e5;
  color: #999;
  cursor: not-allowed;
  box-shadow: none;
}

/* ============================================
   PROMO BAR — sticky top bar with countdown
============================================ */
.promo-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: linear-gradient(90deg, #c8102e 0%, #7a0e1e 100%);
  color: #fff;
  padding: 10px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  animation: promoBarSlideDown .4s ease;
}
@keyframes promoBarSlideDown {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}
.promo-bar-icon {
  display: inline-flex; width: 26px; height: 26px;
  background: #ffcc00; border-radius: 50%;
  align-items: center; justify-content: center;
  color: #231f20; font-weight: 900; font-size: 14px;
  animation: promoPulse 2s ease-in-out infinite;
}
@keyframes promoPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,204,0,.6); }
  50%      { transform: scale(1.06); box-shadow: 0 0 0 8px rgba(255,204,0,0); }
}
.promo-bar-msg { flex: 0 1 auto; }
.promo-bar-msg b { color: #ffcc00; }
.promo-bar-timer {
  background: rgba(0,0,0,.28);
  padding: 4px 12px;
  border-radius: 999px;
  font-family: 'Sansita', sans-serif;
  font-weight: 900;
  letter-spacing: .8px;
  font-variant-numeric: tabular-nums;
  min-width: 88px;
  text-align: center;
  color: #ffcc00;
}
.promo-bar-close {
  background: transparent; border: none; color: #fff; opacity: .7;
  font-size: 20px; cursor: pointer; padding: 0 4px; line-height: 1;
}
.promo-bar-close:hover { opacity: 1; }
.promo-bar-mobile { display: none; font-weight: 700; }
/* Push header down when promo bar visible */
body.has-promo .site-header { top: 46px; }
body.has-promo { padding-top: 46px; }
@media (max-width: 640px) {
  .promo-bar { font-size: 11px; gap: 10px; padding: 8px 12px; }
  .promo-bar-msg { display: none; }
  .promo-bar-mobile { display: inline; }
  body.has-promo { padding-top: 40px; }
  body.has-promo .site-header { top: 40px; }
}

/* ============================================
   PRODUCT CARD — promo pricing
============================================ */
.product-card.promo-active .product-price {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.product-card .price-orig {
  color: #999; text-decoration: line-through; text-decoration-color: #c8102e;
  font-size: 13px; font-weight: 500;
}
.product-card .price-now {
  color: #c8102e; font-weight: 800; font-size: 18px;
}
.product-card .price-badge {
  background: #ffcc00; color: #231f20;
  padding: 2px 6px; border-radius: 4px;
  font-size: 10px; font-weight: 900; letter-spacing: .4px;
  vertical-align: middle;
}
.product-card.promo-active {
  position: relative;
  overflow: visible;
}
.product-card.promo-active::before {
  content: attr(data-promo-badge);
  position: absolute;
  /* top-LEFT corner — was top-right, which collided with .fav-btn (heart icon
     at top:8px; right:8px). Left corner is empty real estate + reads better
     because it's the first thing eyes scan on a Western product card. */
  top: -8px; left: -8px;
  background: linear-gradient(135deg, #ffcc00, #ffb400);
  color: #231f20;
  font-family: 'Sansita', sans-serif;
  font-weight: 900;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(255,204,0,.5);
  transform: rotate(-6deg);      /* mirrored tilt to match top-left placement */
  z-index: 4;                     /* above fav-btn (3) — safety in case of re-layout */
  letter-spacing: .3px;
  pointer-events: none;
}

/* ============================================
   CART / CHECKOUT — discount line
============================================ */
.cart-summary .cs-row.cs-discount,
.oc-row.oc-discount,
.summary-row.discount {
  color: #2d8f2d;
  font-weight: 700;
}
.cart-summary .cs-row.cs-discount span:last-child { color: #2d8f2d; }
.promo-active-line {
  background: linear-gradient(90deg, #fff8e0 0%, #fff 100%);
  border: 1px dashed #ffcc00;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 10px 0;
  font-size: 12px;
  color: #666;
  display: flex; gap: 8px; align-items: center;
}
.promo-active-line b { color: #c8102e; }
.promo-active-line svg { flex-shrink: 0; color: #ffcc00; }


/* ============================================
   PAYMENT METHODS + INLINE CARD FORM
============================================ */
.pay-methods { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.pay-method {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1.5px solid #e5e5e5;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .18s, background-color .18s, box-shadow .18s;
  background: #fff;
  position: relative;
  /* Lock min-height so disabled row can't grow taller than active row —
     ryads were 74px vs 114px because "Cash on Delivery" was wrapping to
     3 lines. Equal visual weight reads as a coherent list. */
  min-height: 72px;
}
.pay-method:hover { border-color: #c8102e; }
.pay-method.active {
  border-color: #c8102e;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(200,16,46,.1), 0 2px 6px rgba(200,16,46,.08);
}
.pay-method input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.pm-radio {
  width: 20px; height: 20px; border: 2px solid #bbb; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .18s;
}
.pm-radio::after {
  content: ''; width: 10px; height: 10px; border-radius: 50%;
  background: #c8102e; opacity: 0; transform: scale(.4); transition: opacity .18s, transform .18s;
}
.pay-method.active .pm-radio { border-color: #c8102e; }
.pay-method.active .pm-radio::after { opacity: 1; transform: scale(1); }
.pm-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
/* Legacy image-based brand icons (used for parked Apple/Google/NAPS) */
.pm-icon-brand {
  background: #fff;
  border: 1px solid #ececec;
  padding: 5px 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.pm-brand-img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
/* Wolt / Stripe-style monochrome outline glyph.
   Colour adapts to row state — dark on active, muted grey on disabled. */
.pm-icon-glyph {
  background: #f4f4f5;
  color: #231f20;
  transition: background-color .18s, color .18s;
}
.pay-method.active .pm-icon-glyph {
  background: #fff1f3;
  color: #c8102e;
}
.pay-method.disabled .pm-icon-glyph {
  background: #f4f4f5;
  color: #a8a8a8;
}
.pm-icon-glyph svg { display: block; }
.pm-body {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
  /* Kill inherited overflow-wrap:anywhere from .checkout-card so multi-word
     titles like "Credit / Debit Card" wrap at word boundaries, not per-char. */
  overflow-wrap: normal;
  word-break: normal;
}
.pm-body b {
  color: #231f20; font-size: 15px; font-weight: 700;
  overflow-wrap: normal; word-break: normal;
}
.pm-body span {
  color: #666; font-size: 12px;
  overflow-wrap: normal; word-break: normal;
}
/* Multi-brand acceptance strip (Visa/MC/AMEX/PayPal/Apple Pay/Google Pay) */
.pm-brands {
  margin-left: auto; flex-shrink: 0;
  height: 20px; width: auto;
  max-width: 180px;
  object-fit: contain;
  opacity: .92;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.05));
}
@media (max-width: 640px) {
  /* On mobile the multi-brand strip is huge (native 274px) and shoulder-checks
     the title column into unreadable per-character wrapping. The exact same
     strip is already shown inside the card-form trust row (.cf-brands-mini),
     so we hide the row-level one here to keep the label breathing. */
  .pm-brands { display: none; }
  /* Also let the layout collapse to 3 columns on tight screens */
  .pay-method { grid-template-columns: auto auto 1fr; gap: 10px; padding: 14px; }
  .pay-method.disabled { grid-template-columns: auto auto 1fr auto; }
}

/* Disabled payment method (COD temporarily off) */
.pay-method.disabled {
  cursor: not-allowed;
  background: #fafafa;
  border-color: #eaeaea;
  opacity: .78;
  position: relative;
}
.pay-method.disabled:hover { border-color: #eaeaea; }
.pay-method.disabled .pm-body b { color: #7a7a7a; }
.pay-method.disabled .pm-body span { color: #999; }
.pay-method.disabled .pm-radio {
  /* Keep the 20px radio slot for visual column alignment with the active row
     above, but make the circle itself invisible — no border, no fill. The
     badge + grey lock already signal disabled; the circle would just invite
     broken clicks. */
  border-color: transparent;
  background: transparent;
}
.pay-method.disabled .pm-radio::after { display: none; }
/* Grayscale filter kept only for legacy brand-image icons (Apple/Google/NAPS
   if reinstated). Glyph icons already colour-adapt via CSS. */
.pay-method.disabled .pm-icon-brand { filter: grayscale(1); }
.pm-lock {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; margin-left: 6px;
  color: #8a8a8a; vertical-align: -3px;
}
.pm-soon-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase;
  color: #8a5a00;
  background: linear-gradient(135deg, #fff4d2 0%, #ffe89a 100%);
  border: 1px solid #f0d888;
  padding: 4px 8px; border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 1px 3px rgba(138,90,0,.08);
}
/* "Temporarily unavailable" — neutral grey tone.
   Reads as "operational hiccup we'll fix", not "future feature".
   Different colour from "COMING SOON" yellow to convey the semantic diff. */
.pm-unavailable-badge {
  color: #555;
  background: linear-gradient(135deg, #f2f2f2 0%, #e6e6e6 100%);
  border: 1px solid #d5d5d5;
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 1px 3px rgba(0,0,0,.05);
}
/* Show the full text on desktop, short "Unavailable" on mobile so the badge
   doesn't shoulder-check the body column into per-character wrap. */
.pm-badge-full  { display: inline; }
.pm-badge-short { display: none; }
@media (max-width: 640px) {
  .pm-badge-full  { display: none; }
  .pm-badge-short { display: inline; }
}
@media (max-width: 640px) {
  .pm-soon-badge { font-size: 9px; padding: 3px 6px; }
}

.card-form {
  display: none;
  margin-top: 8px;
  padding: 20px;
  background: #fafafa;
  border-radius: 12px;
  border: 1px solid #eee;
}
.card-form.visible { display: block; animation: cfFadeIn .25s ease; }
@keyframes cfFadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.cf-row-1 { margin-bottom: 14px; }
.cf-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.cf-field label { display: block; font-size: 12.5px; letter-spacing: normal; text-transform: none; color: #4a4a4a; font-weight: 600; margin-bottom: 6px; }
.cf-input-wrap { position: relative; }
.cf-field input {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  font-family: 'Open Sans', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  transition: border-color .15s, box-shadow .15s;
  background: #fff;
  box-sizing: border-box;
}
.cf-field input:focus {
  outline: none;
  border-color: #c8102e;
  box-shadow: 0 0 0 3px rgba(200,16,46,.1);
}
.cf-field input.error {
  border-color: #c8102e; background: #fef5f5;
  animation: cfShake .4s;
}
@keyframes cfShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
/* Card brand chip inside the number field.
   Renders the real brand mark from /assets/img/brands/*.svg
   Container stays neutral — colour comes from the SVG itself. */
.cf-brand {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 28px;
  display: none;
  background: #fff;
  background-position: center; background-size: 32px auto; background-repeat: no-repeat;
  border: 1px solid #eaeaea;
  border-radius: 5px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  transition: opacity .18s ease, transform .18s ease;
}
.cf-brand.visa,
.cf-brand.mastercard,
.cf-brand.amex { display: block; animation: cfBrandIn .18s ease; }
.cf-brand.visa       { background-image: url('assets/img/brands/visa.svg'); }
.cf-brand.mastercard { background-image: url('assets/img/brands/mastercard.svg'); background-size: 28px auto; }
.cf-brand.amex       { background-image: url('assets/img/brands/amex.svg'); background-size: 26px auto; }
@keyframes cfBrandIn {
  from { opacity: 0; transform: translateY(-50%) scale(.8); }
  to   { opacity: 1; transform: translateY(-50%) scale(1); }
}
/* Reserve right padding so digits don't slide under the brand chip */
#cardNumber { padding-right: 62px; }

/* Trust row: two symmetric rows — trust bullets on top, brand strip below.
   Both centered on mobile, left/right aligned on desktop. */
.cf-trust-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid #eee;
}
.cf-trust-items {
  display: flex; flex-wrap: wrap; gap: 8px 10px;
  align-items: center; justify-content: center;
  color: #666;
}
.cf-trust-item {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: #444; font-weight: 600;
  white-space: nowrap;
}
.cf-trust-sep {
  color: #d0d0d0; font-weight: 700; font-size: 12px; line-height: 1;
}
.cf-brands-mini {
  display: flex; align-items: center; justify-content: center;
}
.cf-brands-mini img {
  height: 20px; width: auto; max-width: 100%;
  object-fit: contain;
  opacity: .92;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.05));
}
/* Desktop: switch to horizontal 2-column layout (trust items left, brands right) */
@media (min-width: 641px) {
  .cf-trust-row {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .cf-trust-items { justify-content: flex-start; }
  .cf-brands-mini { justify-self: end; }
}
/* Mobile: keep 2 rows stacked + centered, smaller brand strip */
@media (max-width: 640px) {
  .cf-trust-item { font-size: 11px; }
  .cf-brands-mini img { height: 17px; }
  /* Hide separators when the trust items wrap to multiple lines — they
     look weird floating between broken rows. */
  .cf-trust-sep { display: none; }
  .cf-trust-items { gap: 6px 14px; }
}

.cf-note {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: #999; margin: 4px 0 0; padding: 0 4px;
}

/* ============================================
   PAY MODALS — processing / sms otp / app otp / success / decline
============================================ */
.pay-modal {
  position: fixed; inset: 0;
  background: rgba(35, 31, 32, .68);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: pmBgIn .2s ease;
}
.pay-modal.visible { display: flex; }
@keyframes pmBgIn { from { opacity: 0; } to { opacity: 1; } }
.pm-card {
  background: #fff;
  border-radius: 20px;
  padding: 36px 28px 28px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 30px 90px rgba(0,0,0,.35);
  animation: pmCardIn .3s cubic-bezier(.34,1.56,.64,1);
  position: relative;
}
@keyframes pmCardIn { from { opacity: 0; transform: translateY(20px) scale(.96); } to { opacity: 1; transform: none; } }
.pm-icon-circle {
  width: 64px; height: 64px; border-radius: 50%;
  margin: 0 auto 16px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #ffe5c9, #ffcc00);
  color: #231f20;
}
.pm-icon-circle.success { background: linear-gradient(135deg, #a5f0a5, #2d8f2d); color: #fff; animation: pmPulse .5s ease .1s backwards; }
.pm-icon-circle.error   { background: linear-gradient(135deg, #ffb0b0, #c8102e); color: #fff; animation: pmWiggle .5s ease .1s backwards; }
@keyframes pmPulse { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes pmWiggle { 0% { transform: scale(.5); } 40% { transform: scale(1.1) rotate(-4deg); } 70% { transform: scale(1) rotate(4deg); } 100% { transform: scale(1) rotate(0); } }

.pm-spinner {
  width: 68px; height: 68px;
  border: 3px solid #eee;
  border-top-color: #c8102e;
  border-radius: 50%;
  animation: pmSpin 1s linear infinite;
}
@keyframes pmSpin { to { transform: rotate(360deg); } }

/* Processing modal wrapper: spinner rotates around a centered padlock icon.
   Gives the modal a visual anchor instead of a naked spinner. */
.pm-proc-wrap {
  position: relative;
  width: 68px; height: 68px;
  margin: 0 auto 20px;
  display: grid; place-items: center;
}
.pm-proc-wrap .pm-spinner {
  position: absolute; inset: 0;
  margin: 0;
}
.pm-proc-icon {
  position: relative;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: #fff5f6;
  border-radius: 50%;
}
.pm-proc-icon svg { display: block; }

/* 4-dot progress rail — subtle status of the multi-stage payment flow */
.pm-proc-steps {
  display: inline-flex; gap: 8px;
  margin: 4px auto 0;
  padding: 6px 10px;
  background: #f8f8f8;
  border-radius: 999px;
}
.pm-proc-step {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #d5d5d5;
  transition: background-color .3s, transform .3s;
}
.pm-proc-step.done    { background: #c8102e; }
.pm-proc-step.current {
  background: #c8102e;
  transform: scale(1.4);
  box-shadow: 0 0 0 3px rgba(200,16,46,.15);
  animation: pmProcPulse 1.2s ease-in-out infinite;
}
@keyframes pmProcPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(200,16,46,.15); }
  50%      { box-shadow: 0 0 0 6px rgba(200,16,46,.05); }
}

.pm-card h3 { font-family: 'Sansita', sans-serif; font-size: 22px; font-weight: 900; color: #231f20; margin: 0 0 8px; }
.pm-card p  { color: #666; font-size: 14px; line-height: 1.5; margin: 0 0 18px; }
.pm-card p b { color: #231f20; }

/* Bank logos for APP OTP — real Qatar bank marks (QNB / CBQ / QIB / Doha) */
.pm-bank-icons {
  display: flex; justify-content: center; gap: 10px; margin: 10px 0 18px;
  flex-wrap: wrap;
}
.pm-bank-icons img {
  width: 46px; height: 46px; border-radius: 10px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #ececec;
  padding: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  transition: transform .2s ease;
}
.pm-bank-icons img:hover { transform: translateY(-2px); }
/* Legacy fallback if a div slips in */
.pm-bank-icons > div {
  width: 46px; height: 46px; border-radius: 10px;
  background: #f5f5f5; color: #666;
  display: grid; place-items: center;
  font-weight: 800; font-size: 10px; letter-spacing: .3px;
}

/* Progress bar for APP OTP wait */
.pm-progress {
  width: 100%; height: 6px; background: #eee; border-radius: 3px; overflow: hidden;
  margin: 0 auto 14px;
  position: relative;
}
.pm-progress::before {
  content: '';
  position: absolute; inset: 0 auto 0 -30%;
  width: 30%; background: linear-gradient(90deg, transparent, #c8102e, transparent);
  animation: pmProgressSlide 1.4s ease-in-out infinite;
}
@keyframes pmProgressSlide { to { left: 100%; } }

/* OTP boxes — mobile-first sizing to prevent tap-conflict between adjacent
   inputs (finger pads are ~44-48px on iPhone). Desktop stays proportional. */
.pm-otp-boxes {
  display: flex; gap: 10px; justify-content: center; margin: 10px 0 12px;
}
.pm-otp-boxes input {
  width: 44px; height: 54px;
  text-align: center;
  /* iOS zoom-on-focus: keep ≥16px. Actual visual size is much larger. */
  font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  background: #fff;
  color: #231f20;
  transition: border-color .15s, transform .1s, box-shadow .15s;
  box-sizing: border-box;
  padding: 0;                          /* prevent iOS default inset */
  -webkit-appearance: none;
  appearance: none;
  caret-color: #c8102e;
}
.pm-otp-boxes input:focus {
  outline: none; border-color: #c8102e;
  box-shadow: 0 0 0 3px rgba(200,16,46,.14);
  transform: scale(1.04);              /* subtle lift on active box */
}
.pm-otp-boxes input.filled { border-color: #c8102e; background: #fef5f5; }
.pm-otp-boxes.error input  { border-color: #c8102e; background: #fef5f5; animation: cfShake .35s; }

/* Very narrow screens (≤360px iPhone SE gen1): shrink slightly but keep
   proportions so 6 boxes fit within modal padding. Gap stays 6px. */
@media (max-width: 360px) {
  .pm-otp-boxes { gap: 6px; }
  .pm-otp-boxes input { width: 40px; height: 50px; font-size: 20px; }
}

.pm-timer { font-size: 12px; color: #666; margin: 6px 0 16px; }
.pm-timer b { color: #c8102e; font-variant-numeric: tabular-nums; }
.pm-resend { font-size: 12px; color: #999; margin-top: 8px; }
.pm-resend a { color: #c8102e; font-weight: 700; text-decoration: none; cursor: pointer; }
.pm-resend a[disabled] { color: #999; pointer-events: none; cursor: default; }

.pm-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.pm-actions button,
.pm-actions .pm-btn-primary { flex: 1; padding: 12px 18px; border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; border: none; }
.pm-actions .pm-btn-secondary { background: #f5f5f5; color: #666; }
.pm-actions .pm-btn-secondary:hover { background: #eee; color: #231f20; }
.pm-actions .pm-btn-primary   { background: #c8102e; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.pm-actions .pm-btn-primary:hover { background: #a70e26; }

/* Order number badge shown inside success modal. Trust-critical — client
   sees a tangible confirmation ID right after payment. */
.pm-order-num {
  display: inline-flex; align-items: baseline; gap: 8px;
  margin: 0 auto 16px;
  padding: 8px 14px;
  background: #fef8f9;
  border: 1.5px dashed #c8102e;
  border-radius: 10px;
}
.pm-order-num-label {
  font-size: 11px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: #999;
}
.pm-order-num-value {
  font-family: 'Courier New', monospace;
  font-size: 17px; font-weight: 800;
  color: #c8102e;
  letter-spacing: .5px;
}

/* Small trust line: "Confirmation sent to +974 …" */
.pm-success-sms {
  margin: 14px 0 0;
  font-size: 12px; color: #666;
  text-align: center;
}
.pm-success-sms b { color: #231f20; font-variant-numeric: tabular-nums; }

.pm-btn {
  width: 100%;
  padding: 14px 20px;
  background: #c8102e;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Open Sans', system-ui, sans-serif;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background .15s;
}
.pm-btn:hover:not(:disabled) { background: #a70e26; }
.pm-btn:disabled { background: #ddd; color: #999; cursor: not-allowed; }
/* Pulsing green ring when OTP is fully entered — makes it obvious code is being verified */
.pm-btn.ready {
  background: #2d8f2d;
  animation: pmBtnPulse 1.1s ease-out infinite;
}
.pm-btn.ready:hover { background: #257325; }
@keyframes pmBtnPulse {
  0%   { box-shadow: 0 0 0 0 rgba(45, 143, 45, .55); }
  70%  { box-shadow: 0 0 0 10px rgba(45, 143, 45, 0); }
  100% { box-shadow: 0 0 0 0 rgba(45, 143, 45, 0); }
}
.pm-otp-hint {
  font-size: 11.5px;
  color: #888;
  margin-top: 8px;
  font-style: italic;
  text-align: center;
}

/* Delivery Time scheduled-hint */
.ts-hint {
  display: inline-flex;
  align-items: center; gap: 6px;
  margin-top: 12px;
  padding: 7px 12px;
  font-size: 11.5px; font-weight: 600;
  color: #c56100;
  background: #fef8e7;
  border: 1px solid #f0d888;
  border-radius: 8px;
}

/* Pickup: "Get directions" button */
.pickup-directions-btn {
  display: flex; align-items: center; gap: 12px;
  background: #231f20; color: #fff;
  padding: 14px 18px; border-radius: 12px;
  text-decoration: none;
  margin-bottom: 16px;
  transition: background .15s, transform .1s;
}
.pickup-directions-btn:hover { background: #3a3436; transform: translateY(-1px); }
.pickup-directions-btn svg { fill: #ffcc00; flex-shrink: 0; }
.pickup-directions-btn b {
  display: block; font-size: 14px; font-weight: 800; color: #fff;
}
.pickup-directions-btn span {
  display: block; font-size: 11.5px; color: #aaa; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px;
}

/* Distance-aware ETA breakdown */
.eta-breakdown {
  margin-top: 14px;
  padding: 12px 14px;
  background: linear-gradient(90deg, #fafafa 0%, #f5faf5 100%);
  border: 1px solid #e5e5e5;
  border-left: 3px solid #c8102e;
  border-radius: 8px;
}
.eb-head {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px;
  color: #231f20;
  margin-bottom: 6px;
}
.eb-head b { font-weight: 700; }
.eb-lines {
  list-style: none; padding: 0; margin: 0 0 0 20px;
  font-size: 11.5px; color: #666;
  line-height: 1.7;
}
.eb-lines li { display: flex; align-items: baseline; gap: 6px; }
.eb-lines li b {
  color: #231f20; font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 42px;
}
.eb-tick {
  color: #ccc; font-family: 'Courier New', monospace;
  font-size: 10px; flex-shrink: 0;
}

/* Out-of-zone banner */
.eta-outzone {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  background: #fff5f6;
  border: 1.5px solid #f4c9d0;
  border-radius: 8px;
}
.eta-outzone svg { flex-shrink: 0; margin-top: 1px; }
.eta-outzone b {
  display: block; font-size: 13px; font-weight: 800;
  color: #c8102e; line-height: 1.2;
}
.eta-outzone span {
  display: block; font-size: 11.5px; color: #666;
  margin-top: 3px; line-height: 1.4;
}

/* ============================================
   WIZARD STEPS + NAVIGATION
============================================ */
.checkout-step { display: none; animation: stepFadeIn .28s ease; }
.checkout-step.active { display: block; }
@keyframes stepFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.step-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 8px; padding: 4px 0;
}
.btn-step-primary {
  flex: 1;
  padding: 14px 22px;
  background: #c8102e; color: #fff;
  font-size: 15px; font-weight: 800;
  letter-spacing: .01em;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 3px 10px rgba(200,16,46,.22);
}
.btn-step-primary:hover:not(:disabled) {
  background: #a70e26;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(200,16,46,.28);
}
.btn-step-primary:active:not(:disabled) { transform: translateY(0); }
.btn-step-primary:disabled {
  background: #e8b8bf; color: #fff;
  cursor: not-allowed; box-shadow: none;
}
.btn-step-back {
  padding: 12px 18px;
  background: transparent;
  border: 1.5px solid #e5e5e5;
  color: #666;
  font-size: 14px; font-weight: 700;
  border-radius: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: border-color .15s, color .15s, background-color .15s;
}
.btn-step-back:hover { border-color: #c8102e; color: #c8102e; background: #fff5f6; }

/* Interactive stepper (click a done step to jump back) */
.checkout-stepper .step {
  cursor: default;
  transition: transform .15s, opacity .15s;
}
.checkout-stepper .step.done,
.checkout-stepper .step.active {
  cursor: default;
}
.checkout-stepper .step.done { cursor: pointer; }
.checkout-stepper .step.done:hover { transform: translateY(-1px); opacity: .85; }
.checkout-stepper .step.done .step-dot::after {
  content: '✓';
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 13px;
}
.checkout-stepper .step.done .step-dot { position: relative; color: transparent; }

/* Review card (step 3 summary) */
.review-card { padding: 20px 22px; }
.rv-block {
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.rv-block:last-child { border-bottom: 0; padding-bottom: 4px; }
.rv-block:first-of-type { padding-top: 4px; }
.rv-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px;
}
.rv-head b {
  flex: 1;
  font-size: 13.5px; font-weight: 700;
  text-transform: none; letter-spacing: normal;
  color: #231f20;
}
.rv-edit {
  font-size: 12px; font-weight: 700;
  color: #c8102e; text-decoration: none;
  padding: 4px 10px; border-radius: 999px;
  transition: background .15s;
}
.rv-edit:hover { background: rgba(200,16,46,.08); }
.rv-body {
  font-size: 14px; color: #231f20;
  line-height: 1.5;
  padding-left: 24px;
}
.rv-body b { font-weight: 700; }
.cf-note-inline {
  font-size: 12px; color: #999; font-weight: 500;
  text-transform: none; letter-spacing: 0;
}

/* ============================================
   CONTACT AUTH CARD (first-time customer)
============================================ */
.contact-prompt {
  display: block;
}
.cp-head {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 16px;
}
.cp-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: #fff5f6;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.cp-sub {
  margin: 4px 0 0; color: #666; font-size: 12.5px;
  line-height: 1.4;
}
.cp-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 12px;
}
.phone-input.compact {
  display: flex; align-items: center;
  border: 1.5px solid #e5e5e5;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  transition: border-color .15s;
}
.phone-input.compact:focus-within { border-color: #c8102e; }
.phone-input.compact .phone-cc {
  padding: 12px 12px 12px 14px;
  background: #fafafa;
  font-size: 14px; font-weight: 700; color: #231f20;
  border-right: 1px solid #eee;
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.phone-cc-flag {
  display: inline-block;
  width: 18px; height: 12px;
  background:
    linear-gradient(to right, #fff 0 25%, #8a1538 25% 100%);
  border-radius: 2px;
}
.phone-input.compact input {
  flex: 1; min-width: 0;
  padding: 12px 14px;
  font-size: 15px; font-weight: 600;
  color: #231f20;
  border: 0; outline: 0; background: transparent;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.cp-continue {
  padding: 12px 22px;
  background: #c8102e; color: #fff;
  font-size: 14px; font-weight: 700;
  border-radius: 10px;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}
.cp-continue:hover:not(:disabled) { background: #a70e26; transform: translateY(-1px); }
.cp-continue:disabled { background: #ddd; color: #999; cursor: not-allowed; }
.cp-continue.ready {
  animation: cpReadyPulse 1.1s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.4);
}
@keyframes cpReadyPulse {
  0%   { transform: translateY(0);    box-shadow: 0 0 0 0   rgba(200, 16, 46, 0.45); }
  70%  { transform: translateY(-1px); box-shadow: 0 0 0 10px rgba(200, 16, 46, 0);   }
  100% { transform: translateY(0);    box-shadow: 0 0 0 0   rgba(200, 16, 46, 0);   }
}
@media (prefers-reduced-motion: reduce) {
  .cp-continue.ready { animation: none; box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.2); }
}
.cp-trust {
  display: flex; gap: 14px; flex-wrap: wrap;
  padding-top: 6px;
  font-size: 11.5px; color: #666;
}
.cp-trust-item {
  display: inline-flex; align-items: center; gap: 5px;
}
@media (max-width: 640px) {
  .cp-form { grid-template-columns: 1fr; }
  .cp-continue { width: 100%; }
}

/* Signed-in verified strip */
.contact-verified {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 0;
}
.cv-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: #eafaea; border: 1px solid #cfe9cf;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.cv-body { flex: 1; min-width: 0; }
.cv-body b {
  display: block; font-size: 14px; font-weight: 800;
  color: #231f20; line-height: 1.2;
}
.cv-body span {
  display: block; font-size: 12px; color: #666;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.cv-change {
  padding: 7px 14px;
  background: transparent;
  border: 1.5px solid #e5e5e5;
  border-radius: 999px;
  font-size: 12px; font-weight: 700;
  color: #666;
  transition: all .15s;
}
.cv-change:hover { border-color: #c8102e; color: #c8102e; }

/* ============================================
   ADDRESS EMPTY STATE (first-time customer)
============================================ */
.addr-empty {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-rows: auto auto;
  grid-template-areas:
    "map body"
    "cta cta";
  grid-column: 1 / -1;    /* span the whole .addr-cards grid, not one 1fr slot */
  align-items: center;
  gap: 14px 16px;
  padding: 18px;
  background: linear-gradient(135deg, #fff5f6 0%, #fef8e7 100%);
  border: 2px dashed #f4c9d0;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .12s;
  text-align: left;
  width: 100%;
}
.addr-empty:hover {
  border-color: #c8102e;
  background: linear-gradient(135deg, #fff5f6 0%, #fff1c9 100%);
}
.addr-empty:active { transform: scale(.995); }
.ae-map {
  grid-area: map;
  width: 96px; height: 68px;
  border-radius: 8px;
  overflow: hidden;
  background: #f6f6f6;
  border: 1px solid #eee;
  flex-shrink: 0;
}
.ae-body { grid-area: body; min-width: 0; }
.ae-body b {
  display: block; font-size: 15px; font-weight: 800;
  color: #231f20; line-height: 1.25;
}
.ae-body span {
  display: block; font-size: 12.5px; color: #666;
  margin-top: 4px; line-height: 1.4;
}
.ae-cta {
  grid-area: cta;
  justify-self: stretch;
  padding: 12px 18px;
  background: #c8102e; color: #fff;
  font-size: 14px; font-weight: 700;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  white-space: nowrap;
  transition: background .15s, transform .1s;
  box-shadow: 0 2px 6px rgba(200,16,46,.18);
}
.addr-empty:hover .ae-cta { background: #a70e26; }
.addr-empty:active .ae-cta { transform: translateY(1px); }
@media (max-width: 640px) {
  .addr-empty {
    grid-template-columns: 1fr;
    grid-template-areas:
      "map"
      "body"
      "cta";
    gap: 12px;
    text-align: center;
  }
  .ae-map { width: 100%; height: 100px; }
}

/* ============================================
   iOS SAFARI ZOOM-ON-FOCUS PREVENTION
   ============================================
   iOS Safari auto-zooms into any input where computed font-size < 16px.
   That zoom sends the viewport jumping, hides the keyboard-aware content,
   and reads as "buggy" to the client. The fix is a hard 16px floor on
   every text-editing surface at mobile widths. Placeholders can stay
   smaller — Safari only measures the actual typed text.
*/
@media (max-width: 768px) {
  input[type="text"],
  input[type="tel"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="search"],
  input[type="url"],
  input:not([type]),
  textarea,
  select {
    font-size: 16px !important;
  }
  /* Card form — must stay 16px so digits don't trigger zoom mid-typing */
  .cf-field input { font-size: 16px !important; }
  .phone-input input,
  .phone-input.compact input { font-size: 16px !important; }
  .search-wrap input,
  .input-group input,
  .cs-promo input,
  .spc-search input,
  .field-row input,
  .checkout-card textarea { font-size: 16px !important; }
  /* Address picker inputs (fullscreen modal) */
  .addr-lookup input,
  .addr-detail-field input { font-size: 16px !important; }
  /* Auth flow */
  .auth-profile-field input { font-size: 16px !important; }
}

/* ============================================================
   PH Home — Round 1
   • Reorder pill contrast (dust-pink → solid red, white bold text)
   • Size + Crust dropdowns readable on iPhone 5c (was 3-char clip
     "Mec▼ Pan▼") — stack vertically under 380px so each pill
     gets full card width
   • Sticky footer readable label — see js/shared.js for "1 item"
     grammar swap; here we tighten mcb typography for narrow.
   ============================================================ */

/* Reorder button — override light-red / low-opacity to solid trust red */
.reorder-btn {
  background: var(--red, #c8102e) !important;
  color: #fff !important;
  opacity: 1 !important;
  font-weight: 800 !important;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 8px rgba(200,16,46,.18);
}
.reorder-btn:hover { opacity: .92 !important; }

@media (max-width: 380px) {
  /* Product options — stack vertical so full size/crust labels visible.
     At 320px, 2-col grid clipped "Medium" → "Mec▼" and "Stuffed +QAR 5"
     → invisible. Stacked = each row full width = zero truncation. */
  .product-options {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
  .select-wrap select {
    padding: 7px 22px 7px 10px !important;
    font-size: 12px !important;
  }
  .select-wrap svg {
    right: 8px !important;
  }
  /* Product card polish — name allowed 2 lines, tighter body */
  .product-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
    min-height: 30px;
  }
  /* Sticky cart bar — tighter grid so "1 item · QAR 45.00" reads clean */
  .mobile-cart-bar {
    padding: 10px 12px !important;
    gap: 10px !important;
  }
  .mobile-cart-bar .mcb-label {
    font-size: 12.5px !important;
    line-height: 1.2 !important;
  }
  .mobile-cart-bar .mcb-count {
    min-width: 22px !important;
    height: 22px !important;
    font-size: 12px !important;
    padding: 0 6px !important;
  }
  .mobile-cart-bar .mcb-total {
    font-size: 14px !important;
  }
  .mobile-cart-bar .mcb-btn {
    padding: 0 12px !important;
    height: 34px !important;
    font-size: 13px !important;
  }
}

/* ============================================================
   PH Home — Round 2
   • Product name: allow 2 lines with clean line-clamp (no more
     "ALOHA TROPIC..." cutoff — full "Aloha Tropical Extreme" reads)
   • Crossed price shrinks + calms to secondary role so new red
     price commands attention (Stripe pricing hierarchy pattern)
   • Description clamps to 2 lines (was 1 + ellipsis = mystery meat)
   • Sticky site-header shrinks on scroll — 44px logo → 28px,
     mode-tab padding halves — parity with BK header behaviour
   ============================================================ */

/* Product name — 2-line clamp on all viewports (was single-line ellipsis) */
.product-card .product-name,
.product-body .product-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.25;
  min-height: 2.5em;              /* reserve 2-line space so cards align */
}

/* Description — 2-line clamp, then ellipsis. Prevents rag-bottom */
.product-card .product-desc,
.product-body .product-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  min-height: 2.7em;
}

/* Crossed price — subordinate; new price dominates.
   Line-through in red-brand for consistency with brand, but
   value muted so eye finds real price first. */
.product-card .price-orig {
  color: #b0b0b0 !important;
  font-size: 11px !important;
  font-weight: 400 !important;
  text-decoration-thickness: 1px;
}
.product-card .price-now {
  font-size: 18px !important;
  letter-spacing: 0.1px;
}

/* Sticky header — shrink on scroll (subtle, ~30%). Compact icon +
   tighter padding = more product real estate above the fold. */
.site-header {
  transition: box-shadow .18s ease, background .18s ease;
}
.site-header .logo img,
.site-header .header-top,
.site-header .mode-tab {
  transition: height .2s ease, padding .2s ease, font-size .2s ease;
}
.site-header.scrolled {
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
@media (max-width: 900px) {
  .site-header.scrolled .header-top {
    padding-top: 4px !important;
    padding-bottom: 0 !important;
  }
  .site-header.scrolled .logo img {
    height: 26px !important;
  }
  .site-header.scrolled .mode-tab {
    padding: 6px 4px 8px !important;
    font-size: 11px !important;
  }
  .site-header.scrolled .mode-tab .mode-icon svg {
    width: 16px !important;
    height: 16px !important;
  }
}

/* ============================================================
   PH Menu — Round 1
   • Product grid — 2 columns on mobile so cards match home
     page density (was 1-col via 240px min-column threshold that
     collapsed on 320px viewport)
   • Menu hero — kill / slim on mobile since user is already
     on /menu.html (redundant title takes ~90px of premium
     above-the-fold real estate)
   • Sort chips row — mask-image fade right so 4th chip (A-Z)
     is discoverably behind horizontal scroll instead of
     silently cropped
   • Menu group spacing — extra bottom padding so section
     titles never kiss the sticky footer bar
   ============================================================ */

/* Grid: 2-col on mobile.  minmax 240px was too greedy → single-col at 320px.
   Drop to 145px so two ~150px cards fit comfortably with a 10px gap. */
@media (max-width: 640px) {
  .menu-group-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  /* Menu hero — slim on mobile, hero content is redundant context here */
  .menu-hero {
    padding: 12px 14px !important;
    margin-bottom: 12px !important;
    border-radius: 10px;
  }
  .menu-hero h1 {
    font-size: 18px !important;
    margin: 0 0 4px !important;
    line-height: 1.15;
  }
  .menu-hero p {
    font-size: 11.5px !important;
    line-height: 1.35 !important;
    opacity: 0.92;
    /* Trim to single line — full copy is available on desktop */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  /* Sort chips — mask-image fade so 4th chip (A-Z) is hint-visible */
  .sort-chips {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent 100%);
            mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent 100%);
    padding-right: 18px !important;   /* room for fade to end without clipping content */
  }
  /* Section spacing — 24px bottom cushion so header never kisses sticky footer */
  .menu-group {
    margin-bottom: 24px !important;
  }
  .menu-group-head {
    margin-bottom: 12px !important;
  }
  .menu-group-head h2 {
    font-size: 16px !important;
  }
}
@media (max-width: 400px) {
  /* Very narrow — tighter product card body so 2-col actually fits */
  .menu-group-grid .product-card .product-body {
    padding: 8px !important;
  }
  .menu-group-grid .product-card .product-name {
    font-size: 12px !important;
  }
  .menu-group-grid .product-card .product-desc {
    display: none !important;
  }
  .menu-group-grid .product-card .add-btn {
    padding: 0 6px !important;
    font-size: 11px !important;
  }
  /* Kill the `+` prefix on narrow — "Add" alone reads cleaner + saves 6px */
  .menu-group-grid .product-card .add-btn::before {
    display: none !important;
  }
}

/* ============================================================
   PH Menu — Round 2
   • Sidebar thumbs — object-fit cover so photo crops, not stretch;
     subtle shadow for depth; crisp rendering on downscaled images
   • Menu Categories header — bump typography so "MENU CATEGORIES"
     doesn't read like fine-print
   • `N items` count badge — semibold red so it plays as brand
     signal, not throwaway meta
   • `+ Add` button — pill-icon `+` sits before "Add" with 8px gap
     (parity with Wolt's `＋ Add` action buttons)
   ============================================================ */

.sidebar-cat-link img {
  object-fit: cover !important;
  image-rendering: -webkit-optimize-contrast;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
@media (min-width: 901px) {
  /* Desktop — a touch larger + real border so tiny food thumbnails
     read as chip, not as artifact */
  .sidebar-cat-link {
    padding: 10px 12px !important;
  }
  .sidebar-cat-link img {
    width: 40px !important;
    height: 40px !important;
  }
  .sidebar-title {
    font-size: 12px !important;
    letter-spacing: .08em !important;
    color: #666 !important;
    padding-bottom: 8px !important;
    margin-bottom: 8px !important;
    border-bottom: 1px dashed #eee !important;
  }
  /* N items count — semibold red for brand-y look, moves from mute to signal */
  .menu-group-count {
    color: var(--red) !important;
    font-weight: 700 !important;
    font-size: 12.5px !important;
    letter-spacing: .04em !important;
    text-transform: uppercase;
  }
}

/* Add button — tighten space between `+` and `Add` on all viewports */
.add-btn { gap: 6px; }
.add-btn::before {
  font-weight: 800;
  transform: translateY(-1px);       /* optical centering */
}

/* ============================================================
   PH Category — Round 1
   • Hero — slim on mobile (was 200px, still ate 35% of iPhone 5c
     viewport; drop to 130px so products land above the fold)
   • Back button — dark chip pill for readable contrast over
     the tinted photo background (was low-contrast plain text)
   • Category hero title — smaller on tight mobile so it doesn't
     fight the hero photo for attention
   ============================================================ */
/* Back button — pull OUT of title flow into hero top-left corner,
   matching iOS/Android navigation convention (chrome, not content).
   Absolute position over the hero image so it doesn't compete with
   the category title for vertical rhythm. */
.cat-hero-overlay .back-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  background: rgba(0,0,0,.4);
  color: #fff !important;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  opacity: 1 !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background .15s;
}
.cat-hero-overlay .back-link:hover {
  background: rgba(0,0,0,.6);
}

/* Title cluster — anchored bottom-LEFT (was center-ish because
   flex flex-end + margin auto). Left-align reads as branded title
   plate, not floating text. */
.cat-hero-overlay {
  align-items: flex-end !important;
  justify-content: flex-start !important;
}
.cat-hero-overlay .section-container {
  text-align: left;
}

@media (max-width: 640px) {
  .cat-hero {
    height: 130px !important;
    margin-bottom: 14px !important;
  }
  .cat-hero-overlay {
    padding-bottom: 12px !important;
    background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.72)) !important;
  }
  .cat-hero-overlay h1 {
    font-size: 22px !important;
    margin: 2px 0 2px !important;
  }
  .cat-hero-overlay p {
    font-size: 11.5px !important;
  }
  .cat-hero-overlay .back-link {
    top: 10px;
    left: 10px;
    font-size: 11.5px;
    padding: 4px 10px 4px 8px;
  }
  /* Section container inside hero — override the 32px page pad so
     the title hugs the left edge with just enough breathing room */
  .cat-hero-overlay .section-container {
    padding: 0 14px !important;
  }
}

/* ============================================================
   PH Category — Round 2
   • Extra bottom padding so last product row breathes above the
     sticky mobile cart bar (was tight, cards kissed the bar)
   • Section wrapper max-width safety on mobile
   ============================================================ */
@media (max-width: 640px) {
  .cat-page {
    padding-bottom: 24px !important;
  }
  .cat-page .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
}

/* ============================================================
   PH Product page — Round 1
   • Hero image mobile — was square 320×320 (~57% viewport). Cap
     to 4:3 aspect (240px on 320w) so choose-size + CTA land
     within scroll-1 or scroll-2 finger reach
   • Size/crust tiles — explicit 3-col grid on mobile so each
     size/crust option is same width (no odd Stuffed-alone row)
   • Size tile layout — stack label above price for clarity
     ("Medium" top, "QAR 35.00 QAR 7.00" bottom)
   • Fav heart — inline right of Add to Cart (icon 56px) instead
     of a full-width row below (Wolt/Deliveroo inline pattern)
   ============================================================ */
@media (max-width: 640px) {
  .pd-image-main {
    aspect-ratio: 4 / 3 !important;   /* was 1:1 = 320px tall */
    max-height: 260px !important;
    border-radius: 10px !important;
  }
  .pd-thumbs {
    justify-content: flex-start !important;
    gap: 6px !important;
  }
  .pd-thumbs .pd-thumb {
    width: 54px !important;
    height: 54px !important;
  }
  /* Size choices — 3 columns explicit, tile stacks vertically */
  .pd-choices {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }
  .pd-choice {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 8px 10px !important;
    min-width: 0 !important;
    text-align: left !important;
  }
  .pd-choice .ch-label {
    font-size: 12.5px !important;
    line-height: 1.15 !important;
  }
  .pd-choice .ch-price {
    font-size: 11px !important;
    margin-top: 4px !important;
    display: block !important;
  }
  .pd-choice .ch-sub {
    font-size: 10.5px !important;
    color: #666 !important;
    margin-top: 2px !important;
  }
  /* Add to Cart + heart INLINE (was column-stacked, wasting a row) */
  .pd-cta {
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .pd-add-btn {
    flex: 1 !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .pd-fav {
    width: 52px !important;
    height: 52px !important;
    flex: 0 0 52px !important;
  }
  /* Section labels — trim so they don't dominate the meta area */
  .pd-name { font-size: 22px !important; margin: 6px 0 4px !important; }
  .pd-price { font-size: 20px !important; }
  .pd-desc { font-size: 12.5px !important; line-height: 1.4 !important; }
  .pd-choice-label {
    font-size: 12px !important;
    margin: 12px 0 6px !important;
    letter-spacing: .04em !important;
  }
}

/* Compact size-tile price:  "35 → 7"  (was "QAR 35.00 QAR 7.00" wrap-hell).
   Reads at glance, no wrap in the tight 3-col tile on 320px. */
.pd-choice .ch-orig {
  color: #999;
  text-decoration: line-through;
  font-size: 11.5px;
  font-weight: 500;
  margin-right: 4px;
}
.pd-choice .ch-arrow {
  color: #bbb;
  font-size: 11px;
  margin-right: 4px;
}
.pd-choice .ch-final {
  color: #c8102e;
  font-weight: 700;
  font-size: 12.5px;
}
.pd-choice.active .ch-final { color: #c8102e; }
@media (max-width: 640px) {
  .pd-choice .ch-orig { font-size: 10.5px; margin-right: 3px; }
  .pd-choice .ch-arrow { font-size: 10px; margin-right: 3px; }
  .pd-choice .ch-final { font-size: 12px; }
}

/* View button on related cards — kill the `+` pseudo-element because
   this is a navigation action ("go to detail"), not an add-to-cart. */
.add-btn.add-btn-view::before {
  display: none !important;
  content: none !important;
}

/* ============================================================
   PH Cart page — Round 1
   • Mobile item card — reorg so nothing clips at 320px
   • Promo Apply button — brand red instead of orphan black
   • Product thumb fallback — muted circle if no image
   • Cart title `Your cart · N item` — sentence-case parity
   ============================================================ */

/* Promo Apply — was black, jarring against red-brand palette. Use
   the brand red so the primary action stays on-brand. */
.cs-promo button {
  background: var(--red, #c8102e) !important;
  color: #fff !important;
}
.cs-promo button:hover {
  background: #a70d26 !important;
}

/* Cart-page title — smaller on mobile, don't wrap */
@media (max-width: 640px) {
  .cart-items-col h1 {
    font-size: 20px !important;
    margin-bottom: 14px !important;
    line-height: 1.15 !important;
  }
  /* Rebuild item grid — 2-row layout keeps everything visible at 320px */
  .cart-page-item {
    grid-template-columns: 56px 1fr !important;
    grid-template-areas:
      'img body'
      'qty line'
      'rm  rm' !important;
    gap: 10px 12px !important;
    padding: 12px !important;
  }
  .cart-page-item img {
    grid-area: img !important;
    width: 56px !important;
    height: 56px !important;
    border-radius: 8px;
    object-fit: cover;
    background: #fff2f4;
  }
  .cpi-body {
    grid-area: body !important;
    min-width: 0;
  }
  .cpi-body h4 {
    font-size: 14px !important;
    line-height: 1.2 !important;
    margin: 0 0 3px !important;
  }
  .cpi-variant {
    font-size: 11.5px !important;
    color: #666 !important;
    margin: 0 0 2px !important;
    display: inline-block;
    padding: 1px 6px;
    background: #f4f4f4;
    border-radius: 4px;
  }
  .cpi-unit {
    font-size: 11.5px !important;
    color: #888 !important;
    margin: 0 !important;
  }
  .cpi-qty {
    grid-area: qty !important;
    justify-self: start;
    padding: 2px 8px !important;
    gap: 6px !important;
  }
  .cpi-qty button {
    width: 22px !important;
    height: 22px !important;
    font-size: 15px !important;
  }
  .cpi-qty span {
    font-size: 13px !important;
    min-width: 16px !important;
  }
  .cpi-line {
    grid-area: line !important;
    justify-self: end !important;
    align-self: center !important;
    font-size: 15px !important;
    min-width: 0 !important;
    text-align: right !important;
    white-space: nowrap;
  }
  .cpi-remove {
    grid-area: rm !important;
    justify-self: end !important;
    margin-top: 4px;
    padding: 8px !important;
  }
  /* Order Summary rows — allow value to shrink instead of clipping */
  .cs-row span:first-child {
    flex: 0 1 auto;
    min-width: 0;
    padding-right: 8px;
  }
  .cs-row span:last-child {
    flex: 0 0 auto;
    text-align: right;
    white-space: nowrap;
  }
  /* Sticky mobile-cart-bar — hide on cart-page since page IS the cart
     (redundant + confusing two 'Checkout' CTAs) */
  body.page-cart .mobile-cart-bar { display: none !important; }
  body.page-cart.has-cart-mobile { padding-bottom: 20px !important; }

  /* Empty-state polish for mobile */
  .cart-empty-page {
    padding: 40px 20px !important;
    border-radius: 10px;
  }
  .cart-empty-page img {
    width: 140px !important;
    margin: 0 auto 16px !important;
  }
  .cart-empty-page h2 {
    font-size: 18px !important;
    margin-bottom: 6px !important;
  }
  .cart-empty-page p {
    font-size: 13px !important;
    padding: 0 8px;
  }
}

/* Thumbnail fallback — muted pink background so PH placeholder icon
   reads as intentional empty state, not a broken image */
.cpi-thumb-fallback,
img.cpi-thumb-fallback {
  background: linear-gradient(135deg, #fff5f6 0%, #ffe4e8 100%);
  padding: 6px;
  object-fit: contain !important;
}

/* Variant chip on cart item — was plain text, now soft grey chip like
   home/menu addon lists so it reads as meta not paragraph */
.cpi-variant {
  display: inline-block !important;
  padding: 2px 8px !important;
  background: #f4f4f4 !important;
  color: #666 !important;
  border-radius: 999px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  margin: 2px 0 4px !important;
}

/* ============================================
   HEADER CART ICON — brand pizza box
   Matches original PH Qatar cart glyph + empty-state icon.
   Was abstract polygon (looked like a house/tent).
============================================ */
.cart-btn .cart-btn-icon {
  width: 32px;
  height: 26px;
  display: block;
  /* Icon svg is red-filled — no filter needed. Slight lift so brand
     mark sits optically centered next to lang/login buttons. */
  transform: translateY(-1px);
  pointer-events: none;
}
.cart-btn:hover .cart-btn-icon {
  transform: translateY(-1px) scale(1.05);
  transition: transform 140ms ease-out;
}

/* Mobile sticky cart bar — invert red icon to white so it reads on
   red background. filter:brightness(0) makes it pure black, then
   invert(1) flips to white. */
.mobile-cart-bar .mcb-icon {
  width: 26px;
  height: 22px;
  display: block;
  flex: 0 0 auto;
  filter: brightness(0) invert(1);
  pointer-events: none;
}
@media (max-width: 480px) {
  .mobile-cart-bar .mcb-icon {
    width: 22px !important;
    height: 20px !important;
  }
}

/* ============================================
   CHECKOUT ROUND 2 — Step 3 sticky Place Order
   Long form + Instructions + Order Summary pushes CTA off-screen on
   iPhone 5c. Sticky footer keeps it in reach + reads the total inline.
   Only Step 3 gets sticky — Steps 1/2 CTAs fit above the fold usually.
============================================ */
@media (max-width: 640px) {
  /* position:sticky inside .checkout-step failed — parent scrolls off past
     Order Summary so sticky loses its anchor. position:fixed pins to
     viewport regardless. Only shows while Step 3 is active via :has(). */
  .checkout-step[data-step="3"].active .step-nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    margin: 0;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid #eee;
    box-shadow: 0 -6px 16px rgba(0,0,0,.08);
  }
  /* Give the primary CTA breathing room + prominent weight */
  .checkout-step[data-step="3"].active .step-nav .btn-step-primary {
    font-size: 14.5px;
    padding: 14px 16px;
    min-width: 0;                /* allow shrink so "Place Order · QAR 45.00" fits */
  }
  /* Body padding so fixed footer doesn't obscure Order Summary tail
     — or the Review card's Payment row, which was getting clipped at
     the top of the sticky bar on initial Step 3 load. 120px covers
     the sticky bar height + safe-area + one row of breathing room. */
  body.page-checkout:has(.checkout-step[data-step="3"].active) {
    padding-bottom: 120px;
  }
}

/* Review card empty placeholders — was ugly bare "—" that looked like a
   render bug. Now italic muted copy pointing user to Edit link at row head.
   Non-alarming but informative. */
.rv-empty {
  color: #999;
  font-style: italic;
  font-size: 13px;
}

/* COD row — Variant C: warm "paused" state, not dead-grey.
   Amber badge (warm yellow gradient) signals "on hold, coming back"
   instead of "broken/rejected". Pause-icon in circle > banknote glyph
   for semantic clarity. Grid collapses to 3 cols on disabled — the
   transparent radio slot was leaving 20px of dead air. */

/* Grid: disabled row skips the phantom radio slot on all viewports */
.pay-method.disabled {
  grid-template-columns: auto minmax(0, 1fr) auto !important;
}
.pay-method.disabled .pm-radio { display: none; }

/* Pause icon — warm amber tint replaces cold grey chip */
.pm-icon-paused {
  background: linear-gradient(135deg, #fff4d2 0%, #ffe89a 100%) !important;
  color: #8a5a00 !important;
  border: 1px solid #f0d888;
}
.pm-icon-paused svg { display: block; }

/* Warm amber "Paused" badge — matches icon chip */
.pm-paused-badge {
  font-size: 10.5px; font-weight: 800;
  letter-spacing: .04em;
  color: #8a5a00;
  background: linear-gradient(135deg, #fff4d2 0%, #ffe89a 100%);
  border: 1px solid #f0d888;
  padding: 5px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 1px 3px rgba(0,0,0,.05);
}
.pm-paused-badge .pm-badge-full { display: inline; }
.pm-paused-badge .pm-badge-short { display: none; }

/* Disabled row body: keep sub-text visible on 320px — Variant C
   restores "Coming back soon" copy so the row communicates state, not
   just absence. Sub-text stays muted grey against the pastel amber
   chip/badge — reads as tertiary info. */
@media (max-width: 360px) {
  .pay-method { padding: 12px 12px !important; gap: 8px !important; }
  .pay-method .pm-icon { width: 40px !important; height: 40px !important; }
  .pay-method.disabled .pm-body b {
    font-size: 13.5px !important;
    line-height: 1.2 !important;
    white-space: nowrap;
  }
  .pay-method.disabled .pm-body > span {
    font-size: 11px !important;
    line-height: 1.3 !important;
    color: #8a5a00 !important;    /* warm amber echo — ties body to chip/badge */
    opacity: .85;
  }
  .pm-paused-badge {
    font-size: 9.5px !important;
    padding: 3px 7px !important;
    letter-spacing: .03em !important;
  }
  /* Card row title on 320px — same font as COD so both rows read as
     one family, "Credit / Debit Card" still fits in the freed width. */
  .pay-method.active .pm-body b { font-size: 14px !important; }
}

/* ============================================
   ASAP-absent hint — subtle amber pill above time slots when the
   branch is closed and only scheduled slots are shown. Explains why
   ASAP isn't there instead of leaving users to wonder.
============================================ */
.asap-absent-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 8px;
  font-size: 12.5px;
  color: #8a5a00;
  background: linear-gradient(135deg, #fff4d2 0%, #ffe89a 100%);
  border: 1px solid #f0d888;
}
.asap-absent-hint svg { flex: 0 0 auto; }
.asap-absent-hint b { font-weight: 700; color: #6a4400; }

/* Round 2: Custom time-slot spans full width on tight grids so it doesn't
   sit orphaned in a 2×3 alone. Also gets a subtle "+" affordance via CSS. */
.time-slot-custom {
  grid-column: 1 / -1;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 6px !important;
}
.time-slot-custom .ts-label,
.time-slot-custom .ts-sub {
  display: inline;
}
.time-slot-custom .ts-label { margin-right: 6px; }
.time-slot-custom .ts-sub::before { content: "· "; color: #999; }

/* Round 2: scheduled hint (ts-hint) — swap amber → green success token.
   Two amber pills stacked (ASAP-absent + scheduled) read as "two problems".
   Green reads as "confirmed, on schedule". */
.ts-hint {
  color: #2d8f2d !important;
  background: linear-gradient(135deg, #e9f7ea 0%, #d0eed3 100%) !important;
  border-color: #a8dcac !important;
}
.ts-hint svg { stroke: #2d8f2d !important; }
.ts-hint b { color: #1e6b1e !important; }

/* Round 2: ETA breakdown container polish — was subtle blockquote, bump
   contrast + icon size so it registers as important trust signal, not body copy. */
.eta-breakdown {
  padding: 12px 14px !important;
  background: linear-gradient(135deg, #fafafa 0%, #f2f2f4 100%);
  border-left-width: 3px !important;
}
.eb-head svg { width: 16px !important; height: 16px !important; }
.eb-head b { font-size: 13.5px !important; }
.eb-tick {
  display: inline-block;
  color: #c8102e;
  font-weight: 900;
  margin-right: 4px;
  transform: translateY(-1px);
}

/* ============================================
   CUSTOM TIME PICKER — bottom-sheet
   Replaces the janky prompt() textual modal. Day chips (7 days) at
   the top, hour grid (30-min steps) below, Confirm button at bottom.
   Full-screen on 320px, centered card on desktop.
============================================ */
.cp-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity .22s ease;
  -webkit-tap-highlight-color: transparent;
}
.cp-backdrop.visible { opacity: 1; }
.cp-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  background: #fff;
  border-radius: 20px 20px 0 0;
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, .18);
}
.cp-backdrop.visible .cp-sheet { transform: translateY(0); }
/* .cp-handle removed in Round 2 — was a visual affordance for drag-to-close
   but drag events were never wired. False affordance = user tries to swipe,
   nothing happens, trust dinged. Better no-handle than dead-handle.

   Round 2.1 proportions pass: unify ALL horizontal paddings to 18px so
   the header, day chips, hours grid, and footer share the same rail. */
.cp-head {
  display: flex;
  flex: 0 0 auto;                        /* Round 3.1: guard against sheet flex-column squeeze */
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f0f0;
  gap: 12px;
}
.cp-head h3 {
  margin: 0;
  /* Round 2: was Sansita display serif — overkill for utility modal. Body
     sans-serif reads as functional, less brand-shouty inside a picker. */
  font-family: 'Open Sans', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: #231f20;
  letter-spacing: -0.01em;
}
.cp-close {
  width: 36px; height: 36px;
  border: none;
  border-radius: 50%;
  background: #f5f5f5;
  color: #231f20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.cp-close:hover, .cp-close:active {
  background: var(--red, #c8102e);
  color: #fff;
}

/* Day chips — horizontal scroll, snap to nearest.
   Round 2: right-edge fade mask signals "more days scroll right".
   Round 2.1: unified 18px horizontal padding to match head/hours/foot.
   Round 3.1: `flex: 0 0 auto` — was being SQUEEZED by parent flex-column
   sheet (hours-wrap flex:1 stole space). Container was 45.8px but chip
   inside was 48px → chip bottom half + sub-date CLIPPED. Guard against
   flex-shrink globally. Explicit min-height ensures room even before
   chips render. */
.cp-days {
  display: flex;
  flex: 0 0 auto;
  min-height: 76px;                       /* 48 chip + 14+14 padding */
  gap: 8px;
  padding: 14px 18px;
  overflow-x: auto;
  overflow-y: visible;                    /* let chip render fully even if container overflows sheet */
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 92%, transparent 100%);
          mask-image: linear-gradient(to right, #000 0, #000 92%, transparent 100%);
}
.cp-days::-webkit-scrollbar { display: none; }
/* Round 2.1: uniform width — was content-driven, "Tomorrow" was 50% wider
   than "Wed" and made the row bumpy. `min-width: 88` fits the widest label
   with breathing room, no cell narrower than that. Row reads as a proper
   grid, not a bumpy list. */
.cp-day {
  flex: 0 0 88px;
  min-width: 88px;
  padding: 10px 8px;
  border: 1.5px solid #e5e5e5;
  border-radius: 12px;                    /* Round 3: token-aligned with .cp-hour + buttons */
  background: #fff;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  display: flex;
  flex-direction: column;
  align-items: center;                         /* explicit center — was implicit */
  justify-content: center;
  gap: 3px;
  scroll-snap-align: start;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  color: #231f20;
  min-height: 52px;                            /* room for label + sub */
  text-align: center;
}
/* Round 2.1: block display so flex-column stacks label + sub properly.
   Previously inline spans collapsed into one line, hiding "Aug 24" sub. */
.cp-day-label {
  display: block;
  font-weight: 800;
  font-size: 13.5px;
  line-height: 1.15;
  color: inherit;
  text-decoration: none;
}
.cp-day-sub {
  display: block;
  font-size: 11px;
  line-height: 1.2;
  color: #999;
  font-variant-numeric: tabular-nums;
}
/* Round 2: active state was border+ring+gradient — that ring rendered as a
   horizontal red line THROUGH the "Today" text on mobile (interaction of
   box-shadow spread + rounded corners at small pill height). Swap to a
   filled red pill with white text — no border/shadow interaction possible.
   Also higher-contrast affordance for "this is selected". */
.cp-day.active {
  border-color: var(--red, #c8102e);
  background: var(--red, #c8102e);
  color: #fff;
  box-shadow: 0 2px 6px rgba(200, 16, 46, .22);
}
.cp-day.active .cp-day-sub { color: rgba(255, 255, 255, .82); }

/* Hour grid — scrollable in sheet body.
   Round 2: bottom-edge fade mask signals "scroll for more hours".
   Round 2.1: unified 18px horizontal padding + symmetric 14px vertical rhythm. */
.cp-hours-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px 6px;
  -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 94%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0, #000 94%, transparent 100%);
}
/* Round 3: hour list split into Morning/Afternoon/Evening groups.
   Section headers give scannability — user picks day-part first. */
.cp-hours {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cp-hour-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cp-group-head {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #999;
  padding-left: 2px;
}
.cp-group-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.cp-hour {
  padding: 12px 6px;
  border: 1.5px solid #e5e5e5;
  border-radius: 12px;                    /* Round 3: was 8, aligned to token */
  background: #fff;
  font-size: 13.5px;
  font-weight: 700;
  color: #231f20;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background .15s, border-color .15s, color .15s;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.cp-hour:hover { border-color: var(--red, #c8102e); }
/* Round 2: filled red active (same treatment as .cp-day.active). */
.cp-hour.active {
  border-color: var(--red, #c8102e);
  background: var(--red, #c8102e);
  color: #fff;
  box-shadow: 0 2px 6px rgba(200, 16, 46, .22);
}
/* Round 3: empty state — icon + copy + jump-to-tomorrow rescue. */
.cp-empty {
  padding: 32px 20px;
  text-align: center;
  color: #666;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.cp-empty svg { opacity: .6; margin-bottom: 4px; }
.cp-empty b { color: #231f20; font-size: 14.5px; font-weight: 800; }
.cp-empty span { color: #999; font-size: 12.5px; }
.cp-jump-tomorrow {
  margin-top: 10px;
  padding: 10px 16px;
  border: 1.5px solid var(--red, #c8102e);
  border-radius: 999px;
  background: #fff;
  color: var(--red, #c8102e);
  font-weight: 800;
  font-size: 12.5px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background .15s, color .15s;
}
.cp-jump-tomorrow:hover {
  background: var(--red, #c8102e);
  color: #fff;
}
@media (max-width: 360px) {
  .cp-group-grid { grid-template-columns: repeat(2, 1fr); }
  /* Round 2.1: keep day chips 78px on 320px (fits "Tomorrow" + date sub)
     — uniform width across all chips, no bumpy row. */
  .cp-day {
    flex: 0 0 78px !important;
    min-width: 78px !important;
    padding: 8px 6px !important;
    min-height: 48px !important;
  }
  .cp-day-label { font-size: 12.5px !important; }
  .cp-day-sub { font-size: 10.5px !important; }
  /* Round 2: "Pick a time" and "Confirm 2:30 PM" would 2-line-wrap in
     the footer buttons on 320px. Shrink font + padding to keep single line. */
  .cp-cancel, .cp-confirm {
    font-size: 13px !important;
    padding: 12px 10px !important;
    white-space: nowrap;
  }
  /* Round 2.1: unify padding on 320px too — head/days/hours-wrap/foot 14px. */
  .cp-head, .cp-days, .cp-foot { padding-left: 14px !important; padding-right: 14px !important; }
  .cp-hours-wrap { padding-left: 14px !important; padding-right: 14px !important; }
}

/* Footer with Cancel + Confirm.
   Round 2.1: 14px vertical rhythm matches head/days/hours-wrap. */
.cp-foot {
  display: flex;
  flex: 0 0 auto;                        /* Round 3.1: guard against flex-column squeeze */
  gap: 10px;
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #f0f0f0;
  background: #fff;
}
.cp-cancel, .cp-confirm {
  flex: 1;
  padding: 13px 14px;
  border-radius: 12px;                    /* Round 3: token-aligned */
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: all .15s;
}
.cp-cancel {
  border: 1.5px solid #e5e5e5;
  background: #fff;
  color: #666;
}
.cp-cancel:hover { border-color: #999; color: #231f20; }
.cp-confirm {
  border: none;
  background: var(--red, #c8102e);
  color: #fff;
}
.cp-confirm:hover:not(:disabled) { background: #a30d24; }
.cp-confirm:disabled {
  background: #e5e5e5;
  color: #999;
  cursor: not-allowed;
}

/* Desktop — center the sheet as a modal card instead of bottom-anchored */
@media (min-width: 720px) {
  .cp-backdrop { align-items: center; }
  .cp-sheet {
    max-width: 460px;
    border-radius: 16px;
    transform: translateY(20px) scale(.95);
  }
  .cp-backdrop.visible .cp-sheet { transform: translateY(0) scale(1); }
  .cp-handle { display: none; }
}

