/* Casey's homepage local replica — hand-crafted CSS */

/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Brandon Text';
  src: url('/assets/fonts/BrandonText-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Brandon Text';
  src: url('/assets/fonts/BrandonText-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Brandon Text';
  src: url('/assets/fonts/BrandonText-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Brandon Text';
  src: url('/assets/fonts/BrandonText-Black.woff2') format('woff2');
  font-weight: 900; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --brand-red: #cf2128;
  --brand-red-dark: #a8141a;
  --brand-blue: #14365a;
  --text: #2b3340;
  --muted: #5a6473;
  --border: #d9dee5;
  --bg: #ffffff;
  --bg-soft: #f4f6f9;
  --rewards-bg: #e7f4f5;
  --footer-cream: #f7ede0;
  --footer-cream-dark: #ecdec4;
  --radius: 14px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 14px rgba(0,0,0,.08);
  --max-w: 1280px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Brandon Text', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand-red); }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { color: var(--brand-blue); margin: 0; font-weight: 700; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-pill); font-weight: 700;
  border: 2px solid transparent; transition: background .15s, color .15s, border-color .15s; }
.btn-primary { background: var(--brand-red); color: #fff; border-color: var(--brand-red); }
.btn-primary:hover { background: var(--brand-red-dark); border-color: var(--brand-red-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--brand-red); border-color: var(--brand-red); }
.btn-outline:hover { background: var(--brand-red); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 14px; }

/* ---------- Top promo strip ---------- */
.topbar {
  background: var(--brand-red);
  font-size: 13px;
  color: #fff;
}
.topbar-inner {
  display: flex; justify-content: flex-end; align-items: center;
  gap: 24px; max-width: var(--max-w); margin: 0 auto; padding: 8px 24px;
}
.topbar a { color: #fff; font-weight: 500; }
.topbar a:hover { text-decoration: underline; }
.topbar .signin-pill {
  background: #fff; color: var(--brand-red);
  padding: 6px 14px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600;
}
.topbar .signin-pill:hover { background: #fbeaeb; text-decoration: none; }
.topbar .signin-pill svg { color: var(--brand-red); }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  box-shadow: var(--shadow-sm);
  position: sticky; top: 0; z-index: 50;
}
.site-header-inner {
  display: flex; align-items: center; gap: 20px;
  max-width: var(--max-w); margin: 0 auto; padding: 14px 24px; height: 78px;
}
.brand-logo img { width: 100px; height: auto; }
.primary-nav { display: flex; align-items: center; gap: 10px; }
.nav-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border: 1px solid var(--brand-red); color: var(--brand-red);
  border-radius: var(--radius-pill); font-weight: 700; font-size: 15px;
  background: #fff; transition: background .15s, color .15s;
}
.nav-pill:hover { background: var(--brand-red); color: #fff; }
.nav-pill svg, .nav-pill .ico { width: 16px; height: 16px; }
.nav-pill .caret { font-size: 12px; line-height: 1; }
.site-header .start-order {
  padding: 14px 64px;
  font-size: 16px;
  margin-left: auto;
}
.delivery-chip {
  margin-left: auto;
  min-width: 250px; max-width: 330px; height: 56px;
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: #fff; color: var(--brand-blue); padding: 8px 18px;
  display: inline-flex; align-items: center; gap: 10px;
  text-align: left; box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s, color .15s;
}
.delivery-chip:hover { border-color: var(--brand-red); color: var(--brand-red); box-shadow: var(--shadow-md); }
.delivery-chip svg { flex: 0 0 auto; color: var(--brand-red); }
.delivery-chip-copy { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.delivery-chip-label {
  color: var(--muted); font-size: 11px; font-weight: 800;
  line-height: 1; text-transform: uppercase; letter-spacing: 0;
}
.delivery-chip-main {
  display: block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--brand-blue); font-size: 14px; font-weight: 800; line-height: 1.2;
}
.delivery-chip-time {
  display: block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.15;
}
.delivery-chip-time[hidden] { display: none; }
.mobile-delivery-bar { display: none; }
.cart-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  color: var(--brand-red);
  border-radius: 50%;
  background: transparent;
}
.cart-btn:hover { background: #fbeaeb; }

/* Mobile burger header */
.mobile-header {
  display: none;
  align-items: center; justify-content: space-between;
  padding: 12px 16px; gap: 12px;
  background: #fff; box-shadow: var(--shadow-sm);
  position: sticky; top: 0; z-index: 50;
}
.mobile-header .brand-logo img { width: 88px; }
.mobile-header .icon-btn {
  background: transparent; border: 0; color: var(--brand-red);
  width: 36px; height: 36px; font-size: 22px; line-height: 1;
}
.mobile-delivery-bar {
  border: 0; border-bottom: 1px solid var(--border); background: #fff;
  color: var(--brand-blue); width: 100%; padding: 8px 16px;
  align-items: center; justify-content: center; gap: 7px;
  font-weight: 800; font-size: 13px;
  position: sticky; top: 60px; z-index: 49;
}
.mobile-delivery-bar svg { color: var(--brand-red); flex: 0 0 auto; }
.mobile-delivery-main {
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mobile-delivery-time { color: var(--muted); font-weight: 700; }
.mobile-delivery-time[hidden] { display: none; }

/* ---------- Hero carousel (static) ---------- */
.hero {
  background: #fff; padding: 18px 0 8px;
}
.hero-track {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-block: 0;
  padding-inline: max(24px, calc((100% - 1280px) / 2 + 24px));
}
.hero-track::-webkit-scrollbar { display: none; }
.hero-card {
  flex: 0 0 calc(min(100%, 1036px));
  scroll-snap-align: center;
  border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.hero-card img { width: 100%; aspect-ratio: 1036 / 326; object-fit: cover; }
.hero-dots {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 0 4px;
}
.hero-dots .dot {
  width: 8px; height: 8px; border-radius: 50%; background: #f3b4b6;
  border: 0; padding: 0; cursor: pointer; transition: width .25s, background .25s;
}
.hero-dots .dot:hover { background: #e08387; }
.hero-dots .dot.active { background: var(--brand-red); width: 28px; border-radius: 4px; }
.hero-dots .pause {
  width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--brand-red);
  color: var(--brand-red); display: inline-flex; align-items: center; justify-content: center;
  background: #fff; cursor: pointer; padding: 0;
}
.hero-dots .pause svg { width: 12px; height: 12px; display: block; }
.hero-dots .pause:hover { background: var(--brand-red); color: #fff; }
.hero-track { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  .hero-track { scroll-behavior: auto; }
}

/* ---------- Rewards earn strip ---------- */
.rewards-bar {
  background: var(--rewards-bg);
  border-radius: var(--radius);
  padding: 22px 28px;
  display: flex; align-items: center; gap: 18px;
  margin: 32px 0 36px;
}
.rewards-bar-icon { color: var(--brand-red); display: inline-flex; align-items: center; }
.rewards-bar-icon svg { width: 28px; height: 28px; }
.rewards-bar-logo { display: inline-flex; align-items: baseline; gap: 8px; }
.rewards-bar-logo .rewards-mark {
  color: var(--brand-red); font-weight: 900; font-style: italic; font-size: 26px; line-height: 1;
  letter-spacing: -.01em;
}
.rewards-bar-logo .rewards-tag {
  color: var(--brand-red); font-weight: 700; font-size: 13px; letter-spacing: .08em;
}
.rewards-bar-text { flex: 1; color: var(--brand-blue); font-size: 17px; text-align: center; margin: 0; }
.rewards-bar-text b { font-weight: 700; }
.rewards-bar-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ---------- Section heading ---------- */
.section-title {
  font-size: 30px; font-weight: 700; color: var(--brand-blue);
  margin: 0 0 18px;
}
.section-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 18px;
}
.section-row .section-title { margin: 0; }
.view-all { color: var(--brand-blue); font-weight: 700; font-size: 16px; }
.view-all:hover { color: var(--brand-red); }

/* ---------- Categories ---------- */
.categories {
  position: relative;
  padding: 6px 0 28px;
}
.cat-viewport {
  position: relative;
  overflow: hidden;
}
.cat-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 4px 0 6px;
}
@media (prefers-reduced-motion: reduce) {
  .cat-track { scroll-behavior: auto; }
}
.cat-track::-webkit-scrollbar { display: none; }
.cat-card {
  flex: 0 0 110px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  scroll-snap-align: start;
}
.cat-icon {
  width: 92px; height: 92px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fcfcfc 0%, #ececec 100%);
  box-shadow: 0 4px 10px rgba(0,0,0,.06);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: box-shadow .2s;
}
.cat-card:hover .cat-icon { box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.cat-icon img { width: 70%; height: 70%; object-fit: contain; }
.cat-name { font-size: 13px; color: var(--text); font-weight: 500; text-align: center; }
.cat-arrow {
  position: absolute; top: 120px;
  width: 36px; height: 36px; border-radius: 50%;
  background: #fff; color: var(--brand-blue);
  border: 0; display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  cursor: pointer;
  z-index: 2;
  transform: translateY(-50%);
  transition: background .15s, color .15s, opacity .15s;
}
.cat-arrow svg { display: block; }
.cat-arrow-prev { left: -18px; }
.cat-arrow-next { right: -18px; }
.cat-arrow:hover { background: var(--brand-red); color: #fff; }
.cat-arrow[hidden] { display: none; }

/* ---------- Promo trio (Millions / 3for6 / 2for5) ---------- */
.promo-trio {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin: 10px 0 36px;
}
.promo-trio img { width: 100%; border-radius: 12px; aspect-ratio: 334/188; object-fit: cover; box-shadow: var(--shadow-sm); }

/* ---------- Slice into savings cards ---------- */
.deals {
  padding: 0 0 36px;
}
.deals-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.deal-card {
  border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  background: #fff;
  display: flex; flex-direction: column;
  padding-bottom: 18px;
}
.deal-card img { width: 100%; aspect-ratio: 293/166; object-fit: cover; }
.deal-card .deal-body {
  padding: 16px 18px 4px;
  flex: 1;
}
.deal-card h3 {
  color: var(--brand-blue); font-size: 18px; font-weight: 700; margin: 0;
}
.deal-card .deal-action { padding: 8px 18px 0; }

/* ---------- Featured products ---------- */
.products-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px;
}
.product-card {
  border: 1px solid var(--border);
  border-radius: 12px; padding: 14px; background: #fff;
  display: flex; flex-direction: column; gap: 6px;
  min-height: 320px;
}
.product-img {
  background: #fff; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  height: 148px;
}
.product-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.product-card .price { color: var(--brand-blue); font-weight: 700; font-size: 18px; margin-top: 4px; }
.product-card .name { color: var(--brand-blue); font-size: 14px; line-height: 1.25; min-height: 36px; }
.product-card .sponsored { color: var(--muted); font-size: 12px; }
.product-card .savings {
  color: var(--brand-red);
  font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent;
  border: 1px dashed var(--brand-red);
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
  align-self: flex-start;
}
.product-card .savings:hover { background: #fbeaeb; }
.product-card .savings svg { color: var(--brand-red); }
.product-card .savings-spacer { visibility: hidden; align-self: flex-start; }
.product-card .start-order {
  margin-top: auto;
  padding: 9px 14px;
  font-size: 13px;
}

/* ---------- Reward banners trio ---------- */
.rewards-trio {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin: 36px 0 36px;
}
.rewards-trio img { width: 100%; aspect-ratio: 600/338; object-fit: cover; border-radius: 12px; box-shadow: var(--shadow-sm); }

/* ---------- More ways ---------- */
.moreways-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px;
}
.moreway {
  text-align: center;
}
.moreway-img {
  height: 110px; display: flex; align-items: center; justify-content: center;
  border-radius: 12px; overflow: hidden; margin-bottom: 12px;
}
.moreway-img img { max-height: 100%; object-fit: contain; }
.moreway h4 { color: var(--brand-red); font-size: 18px; margin: 0 0 6px; font-weight: 700; }
.moreway p { color: var(--text); font-size: 14px; margin: 0; line-height: 1.4; }

/* ---------- Careers ---------- */
.careers-block { padding: 24px 0 8px; }
.careers-cards { display: flex; flex-direction: column; gap: 20px; }
.careers-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center;
}
.careers-card:nth-child(even) { grid-template-columns: 1fr 1fr; direction: rtl; }
.careers-card:nth-child(even) > * { direction: ltr; }
.careers-card img { width: 100%; border-radius: 14px; aspect-ratio: 578/220; object-fit: cover; }
.careers-card h3 { font-size: 28px; color: var(--brand-blue); margin: 0 0 12px; }
.careers-card p { color: var(--text); font-size: 16px; margin: 0 0 16px; }
.careers-card .btn-outline { background: #f4ede2; border-color: #d8c9a8; color: var(--brand-red); }
.careers-card .btn-outline:hover { background: var(--brand-red); color: #fff; border-color: var(--brand-red); }

/* ---------- Footer ---------- */
.footer-mark {
  display: flex; justify-content: center; align-items: flex-end;
  padding: 8px 0 0;
  margin-bottom: -2px;
}
.footer-mark img { display: none; }
.footer-mark::after {
  content: "";
  display: block;
  width: 28px; height: 32px;
  background-color: var(--brand-red);
  -webkit-mask: url(/assets/img/footer-rooster.svg) center/contain no-repeat;
          mask: url(/assets/img/footer-rooster.svg) center/contain no-repeat;
}
.site-footer {
  background: var(--footer-cream);
  padding: 32px 0 0;
  margin-top: 0;
}
.footer-cols {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
  max-width: var(--max-w); margin: 0 auto; padding: 8px 24px 24px;
}
.footer-col h5 { color: var(--brand-blue); font-size: 16px; font-weight: 700; margin: 0 0 12px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: var(--text); font-size: 14px; }
.footer-col a:hover { color: var(--brand-red); }
.social-row { display: flex; align-items: center; gap: 16px; margin: 14px 0 18px; }
.social-row a {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--brand-blue);
}
.social-row a svg { display: block; }
.social-row a:hover { color: var(--brand-red); }
.app-badges { display: flex; gap: 8px; }
.app-badges img { height: 42px; width: auto; }

.footer-strip {
  background: var(--brand-red);
  color: #fff;
  font-size: 13px;
}
.footer-strip-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 12px 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  flex-wrap: wrap;
}
.footer-strip a { color: #fff; opacity: .95; }
.footer-strip a:hover { opacity: 1; text-decoration: underline; }

/* Small icons (svg defaults via masks would be heavy — use simple unicode/symbols inline) */

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .cat-track { grid-template-columns: repeat(10, 1fr); }
}
@media (max-width: 1023px) {
  .topbar { display: none; }
  .site-header { display: none; }
  .mobile-header { display: flex; }
  .mobile-delivery-bar { display: flex; }
  .container { padding: 0 16px; }
  .hero-card { flex: 0 0 100%; }
  .rewards-bar {
    flex-direction: column; gap: 8px; text-align: center;
    padding: 18px 16px;
  }
  .rewards-bar-text { font-size: 15px; }
  .rewards-bar-actions { width: 100%; justify-content: center; }
  .cat-track {
    grid-template-columns: none;
    grid-auto-flow: column; grid-auto-columns: 110px;
    overflow-x: auto; padding-bottom: 10px;
  }
  .cat-arrow { display: none !important; }
  .promo-trio { grid-template-columns: 1fr; }
  .deals-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .rewards-trio { grid-template-columns: 1fr; }
  .moreways-grid { grid-template-columns: repeat(2, 1fr); }
  .moreway p { font-size: 13px; }
  .careers-card, .careers-card:nth-child(even) {
    grid-template-columns: 1fr; direction: ltr;
  }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .section-title { font-size: 24px; }
}
@media (max-width: 540px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .moreways-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .footer-cols { grid-template-columns: 1fr; }
  .footer-strip-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ============================================================
   Menu category pages
   ============================================================ */
:root {
  --header-h: 78px;   /* sticky desktop site-header */
  --catnav-h: 56px;   /* sticky category tab bar */
  --spy-h: 60px;      /* sticky subcategory pill bar */
}

/* ---------- Sticky category tab bar ---------- */
.menu-catnav {
  background: var(--rewards-bg);
  border-bottom: 1px solid #cfe6e8;
  position: sticky; top: var(--header-h); z-index: 40;
}
.menu-catnav-inner {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  height: var(--catnav-h);
}
.mcat-search {
  flex: 0 0 auto;
  width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: #fff; color: var(--brand-blue);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.mcat-search:hover { background: var(--brand-red); color: #fff; }
.mcat-viewport { position: relative; overflow: hidden; flex: 1 1 auto; }
.mcat-track {
  display: flex; gap: 4px;
  overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth;
}
.mcat-track::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: reduce) { .mcat-track { scroll-behavior: auto; } }
.mcat-tab {
  flex: 0 0 auto; white-space: nowrap;
  padding: 16px 14px; font-weight: 700; font-size: 15px;
  color: var(--brand-blue);
  border-bottom: 3px solid transparent;
}
.mcat-tab:hover { color: var(--brand-red); }
.mcat-tab.is-active { color: var(--brand-red); border-bottom-color: var(--brand-red); }
.mcat-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%;
  background: #fff; color: var(--brand-blue); border: 0; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.18); cursor: pointer; z-index: 2;
}
.mcat-arrow:hover { background: var(--brand-red); color: #fff; }
.mcat-arrow-prev { left: 46px; }
.mcat-arrow-next { right: 6px; }
.mcat-arrow[hidden] { display: none; }

/* ---------- Sticky subcategory pill bar (scrollspy) ---------- */
.spy-menu {
  background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: calc(var(--header-h) + var(--catnav-h)); z-index: 39;
}
.spy-menu-track {
  display: flex; gap: 10px; align-items: center;
  max-width: var(--max-w); margin: 0 auto; padding: 11px 24px;
  height: var(--spy-h);
  overflow-x: auto; scrollbar-width: none;
}
.spy-menu-track::-webkit-scrollbar { display: none; }
.spy-pill {
  flex: 0 0 auto; white-space: nowrap;
  padding: 8px 18px; border-radius: var(--radius-pill);
  background: var(--rewards-bg); color: var(--brand-blue);
  font-weight: 700; font-size: 14px;
  transition: background .15s, color .15s;
}
.spy-pill:hover { background: #d4ebed; color: var(--brand-blue); }
.spy-pill.is-active { background: var(--brand-blue); color: #fff; }
.spy-pill.is-active:hover { color: #fff; }

/* ---------- Menu content ---------- */
.menu-wrap { padding: 24px 0 48px; }
.menu-title { font-size: 34px; font-weight: 900; color: var(--brand-blue); margin: 0 0 8px; }
.menu-section { scroll-margin-top: calc(var(--header-h) + var(--catnav-h) + var(--spy-h) + 12px); padding-top: 22px; }
.menu-section-title { font-size: 22px; font-weight: 700; color: var(--brand-blue); margin: 0 0 16px; }
.product-card .calories { color: var(--muted); font-size: 12px; }
.menu-empty { color: var(--muted); font-size: 15px; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 64px 0 80px; }
.notfound .menu-title { margin-bottom: 10px; }
.notfound p { color: var(--muted); font-size: 17px; margin: 0 0 24px; }

@media (max-width: 1023px) {
  :root { --header-h: 58px; --catnav-h: 50px; --spy-h: 56px; }
  .menu-catnav-inner { padding: 0 16px; }
  .spy-menu-track { padding: 9px 16px; }
  .mcat-tab { padding: 14px 12px; font-size: 14px; }
  .mcat-arrow { display: none !important; }
  .mcat-search { display: none; }
  .menu-title { font-size: 26px; }
}

/* ---------- Product anchor flash (arrival from search) ---------- */
.product-card { scroll-margin-top: calc(var(--header-h) + var(--catnav-h) + var(--spy-h) + 12px); }
.product-card.is-flash { animation: cardFlash 1.6s ease-out; }
@keyframes cardFlash {
  0%, 70% { box-shadow: 0 0 0 3px var(--brand-red); }
  100%    { box-shadow: 0 0 0 0 rgba(207, 33, 40, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .product-card.is-flash { animation: none; outline: 3px solid var(--brand-red); }
}

/* ---------- Search results page ---------- */
.search-page { padding: 24px 0 48px; }
.search-count { color: var(--muted); font-size: 15px; margin: 0 0 18px; }
.search-card-cat { color: var(--muted); font-size: 12px; margin-top: 2px; }
a.product-card-link { color: inherit; text-decoration: none; display: flex; flex-direction: column; cursor: pointer; }
a.product-card-link:hover { color: inherit; box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ---------- Search overlay + autocomplete ---------- */
body.search-open { overflow: hidden; }
.search-overlay { position: fixed; inset: 0; z-index: 200; }
.search-overlay[hidden] { display: none; }
.search-backdrop { position: absolute; inset: 0; background: rgba(20, 54, 90, .45); }
.search-panel {
  position: relative; background: #fff; max-width: 680px; margin: 0 auto;
  border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
  padding: 16px; max-height: 86vh; display: flex; flex-direction: column;
}
.search-form { display: flex; align-items: center; gap: 10px; border: 2px solid var(--brand-blue); border-radius: var(--radius-pill); padding: 8px 14px; }
.search-form-icon { color: var(--muted); flex: 0 0 auto; }
.search-input { flex: 1; border: 0; outline: 0; font-size: 17px; color: var(--brand-blue); background: transparent; }
.search-close { border: 0; background: transparent; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.search-close:hover { color: var(--brand-red); }
.search-results { margin-top: 10px; overflow-y: auto; }
.search-loading, .search-empty { color: var(--muted); font-size: 15px; padding: 14px 6px; }
.search-row { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 10px; color: var(--brand-blue); }
.search-row:hover, .search-row.is-active { background: var(--rewards-bg); color: var(--brand-blue); }
.search-thumb { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 8px; overflow: hidden; background: var(--bg-soft); }
.search-thumb img { width: 100%; height: 100%; object-fit: contain; }
.search-row-main { flex: 1; min-width: 0; }
.search-row-name { display: block; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-row-name mark { background: transparent; color: var(--brand-red); }
.search-row-cat { display: block; font-size: 12px; color: var(--muted); }
.search-row-price { flex: 0 0 auto; font-weight: 700; font-size: 14px; }
.search-all { justify-content: center; font-weight: 700; color: var(--brand-red); border-top: 1px solid var(--border); margin-top: 6px; border-radius: 0; }
.search-all:hover { background: #fff; text-decoration: underline; }

@media (max-width: 1023px) {
  .search-panel { max-width: none; border-radius: 0; min-height: 100%; padding: 12px 14px; }
  .search-input { font-size: 16px; }
}

/* ==================================================================
   Product customization page
   ================================================================== */
.pdp { background: #fff; }
.pdp-container { padding-top: 22px; padding-bottom: 56px; }
.pdp-breadcrumb {
  display: flex; align-items: center; gap: 8px; color: var(--muted);
  font-size: 13px; margin-bottom: 18px;
}
.pdp-breadcrumb a { color: var(--brand-blue); font-weight: 700; }
.pdp-breadcrumb a:hover { color: var(--brand-red); }
.pdp-shell {
  display: grid; grid-template-columns: minmax(280px, 420px) minmax(0, 1fr) 320px;
  gap: 28px; align-items: start;
}
.pdp-media {
  position: sticky; top: 132px; min-height: 300px;
  display: flex; align-items: flex-start; justify-content: center;
}
.pdp-image {
  width: min(100%, 380px); aspect-ratio: 1 / 1; object-fit: contain;
  background: var(--bg-soft); border-radius: var(--radius); padding: 22px;
}
.pdp-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pdp-title-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--border);
}
.pdp-kicker {
  margin: 0 0 5px; color: var(--brand-red); font-size: 13px;
  font-weight: 800; text-transform: uppercase; letter-spacing: 0;
}
.pdp-title { font-size: 34px; line-height: 1.05; }
.pdp-calories { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.pdp-price { color: var(--brand-blue); font-size: 24px; font-weight: 800; white-space: nowrap; }
.pdp-section { border-bottom: 1px solid var(--border); padding-bottom: 18px; }
.pdp-section-title { font-size: 18px; margin: 0; }
.pdp-variant-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px; margin-top: 12px;
}
.pdp-variant {
  border: 1px solid var(--border); background: #fff; color: var(--brand-blue);
  border-radius: 10px; padding: 12px; min-height: 64px; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.pdp-variant:hover { border-color: var(--brand-red); }
.pdp-variant.is-active { border-color: var(--brand-red); box-shadow: inset 0 0 0 1px var(--brand-red); background: #fff7f7; }
.pdp-variant-name { font-weight: 800; line-height: 1.2; }
.pdp-variant-price { flex: 0 0 auto; color: var(--muted); font-weight: 700; font-size: 14px; }
.pdp-group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pdp-group-note { color: var(--muted); font-size: 13px; }
.pdp-mod-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.pdp-mod {
  border: 1px solid var(--border); border-radius: 10px; background: #fff;
  transition: border-color .15s, background .15s;
}
.pdp-mod.is-selected { border-color: var(--brand-red); background: #fff7f7; }
.pdp-mod.is-disabled { opacity: .45; }
.pdp-mod-pick {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px;
  align-items: center; padding: 10px; cursor: pointer;
}
.pdp-mod-input { position: absolute; opacity: 0; pointer-events: none; }
.pdp-mod-img {
  width: 48px; height: 48px; border-radius: 8px; background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  color: var(--brand-blue); font-size: 12px; font-weight: 800;
}
.pdp-mod-img img { width: 100%; height: 100%; object-fit: contain; }
.pdp-mod-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pdp-mod-name { color: var(--brand-blue); font-weight: 800; font-size: 14px; line-height: 1.2; }
.pdp-mod-price { color: var(--muted); font-size: 13px; font-weight: 700; }
.pdp-coverage {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  padding: 0 10px 10px;
}
.pdp-coverage-btn {
  border: 1px solid var(--border); background: #fff; color: var(--brand-blue);
  border-radius: var(--radius-pill); padding: 6px 7px; font-size: 12px; font-weight: 800;
}
.pdp-coverage-btn.is-active { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }
.pdp-summary { position: sticky; top: 132px; }
.pdp-summary-inner {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; background: #fff; box-shadow: var(--shadow-sm);
}
.pdp-summary-title { font-size: 17px; margin-bottom: 10px; }
.pdp-summary-name { color: var(--brand-blue); font-weight: 800; line-height: 1.25; }
.pdp-summary-text { color: var(--muted); font-size: 13px; line-height: 1.4; margin-top: 6px; min-height: 20px; }
.pdp-qty-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 16px 0; color: var(--brand-blue); font-weight: 800;
}
.pdp-qty { display: inline-flex; align-items: center; gap: 10px; }
.pdp-qty-btn {
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--border); background: #fff; color: var(--brand-blue);
  font-size: 17px; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
}
.pdp-qty-btn:hover { border-color: var(--brand-red); color: var(--brand-red); }
.pdp-qty-value { min-width: 18px; text-align: center; }
.pdp-add { justify-content: space-between; }
.pdp-add.is-added { background: var(--brand-blue); border-color: var(--brand-blue); }

@media (max-width: 1180px) {
  .pdp-shell { grid-template-columns: 320px minmax(0, 1fr); }
  .pdp-summary { grid-column: 2; position: static; }
  .pdp-media { top: 112px; }
}

@media (max-width: 860px) {
  .pdp-shell { grid-template-columns: 1fr; }
  .pdp-media { position: static; min-height: 0; }
  .pdp-image { width: min(100%, 320px); }
  .pdp-title-row { flex-direction: column; }
  .pdp-title { font-size: 28px; }
  .pdp-price { font-size: 22px; }
  .pdp-summary { grid-column: auto; }
}

@media (max-width: 540px) {
  .pdp-container { padding-top: 18px; padding-bottom: 36px; }
  .pdp-variant-grid,
  .pdp-mod-grid { grid-template-columns: 1fr; }
}

/* ==================================================================
   Cart + checkout (added with the cart/checkout feature)
   ================================================================== */

/* ---------- Add-to-cart button on menu cards ---------- */
.product-card .js-add-to-cart,
.product-card .product-customize {
  margin-top: auto;
  padding: 9px 14px;
  font-size: 13px;
  cursor: pointer;
}
.product-card .js-add-to-cart:disabled { opacity: .5; cursor: not-allowed; }
.js-add-to-cart.is-added { background: var(--brand-blue); border-color: var(--brand-blue); }

/* ---------- Cart badge on header icons ---------- */
.cart-btn { position: relative; }
.cart-btn-m { position: relative; }
.cart-badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-red); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1;
  border-radius: var(--radius-pill); border: 2px solid #fff;
}
.cart-badge[hidden] { display: none; }
#cart-toggle.is-pulse, #cart-toggle-m.is-pulse { animation: cart-pulse .45s ease; }
@keyframes cart-pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* ---------- Cart drawer (off-canvas) ---------- */
html.no-scroll, html.no-scroll body { overflow: hidden; }
.cart-backdrop { position: fixed; inset: 0; background: rgba(20, 54, 90, .45); z-index: 300; }
.cart-backdrop[hidden] { display: none; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 380px; max-width: 92vw; background: #fff; z-index: 301;
  display: flex; flex-direction: column;
  box-shadow: -8px 0 30px rgba(0, 0, 0, .18);
  transform: translateX(100%); transition: transform .25s ease;
}
.cart-drawer.is-open { transform: translateX(0); }
.cart-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
}
.cart-drawer-title { font-size: 19px; }
.cart-close {
  border: 0; background: transparent; color: var(--muted);
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.cart-close:hover { background: var(--bg-soft); color: var(--brand-red); }
.cart-items { flex: 1; overflow-y: auto; padding: 12px 20px; }
.cart-empty { color: var(--muted); text-align: center; padding: 40px 0; font-size: 15px; }
.cart-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-row-thumb {
  flex: 0 0 auto; width: 56px; height: 56px; border-radius: 8px; overflow: hidden;
  background: var(--bg-soft); border: 1px #eee solid;
}
.cart-row-thumb img { width: 100%; height: 100%; object-fit: cover; background: var(--bg-soft); }
.cart-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cart-row-name { font-size: 14px; font-weight: 700; color: var(--brand-blue); line-height: 1.25; }
.cart-row-summary { font-size: 12px; color: var(--muted); line-height: 1.35; }
.cart-row-price { font-size: 13px; color: var(--muted); }
.cart-qty { display: inline-flex; align-items: center; gap: 10px; }
.cart-qty-btn {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--border); background: #fff; color: var(--brand-blue);
  font-size: 16px; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
}
.cart-qty-btn:hover { border-color: var(--brand-red); color: var(--brand-red); }
.cart-qty-val { min-width: 18px; text-align: center; font-weight: 700; font-size: 14px; }
.cart-row-remove {
  flex: 0 0 auto; align-self: flex-start;
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.cart-row-remove:hover { background: #fbeaeb; color: var(--brand-red); }
.cart-drawer-foot { border-top: 1px solid var(--border); padding: 16px 20px; }
.cart-subtotal-row { display: flex; justify-content: space-between; font-weight: 700; color: var(--brand-blue); margin-bottom: 12px; font-size: 16px; }
.cart-checkout.is-disabled { opacity: .5; pointer-events: none; }

/* ---------- Cart toast ---------- */
.cart-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--brand-blue); color: #fff; padding: 12px 20px; border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow-md); z-index: 400;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.cart-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==================================================================
   Checkout page
   ================================================================== */
.checkout-wrap { padding-top: 28px; padding-bottom: 60px; }
.checkout-title { margin-bottom: 20px; }
.checkout-grid { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
.checkout-main { display: flex; flex-direction: column; gap: 20px; }
.checkout-section {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; padding: 20px;
}
.checkout-section-title { font-size: 17px; margin-bottom: 14px; }
.checkout-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.checkout-section-head .checkout-section-title { margin-bottom: 0; }
.checkout-edit-btn { border: 0; background: transparent; color: var(--brand-red); font-weight: 700; cursor: pointer; font-size: 14px; }
.checkout-edit-btn:hover { text-decoration: underline; }
.checkout-copy-delivery-btn {
  border: 0; background: transparent; color: var(--brand-red); font-weight: 700; cursor: pointer; font-size: 13px;
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 6px;
  transition: background .15s;
}
.checkout-copy-delivery-btn:hover:not(:disabled) { background: #fbeaeb; }
.checkout-copy-delivery-btn:disabled { opacity: .4; cursor: not-allowed; }

.checkout-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.checkout-item:last-child { border-bottom: 0; }
.checkout-item-img {
  width: 48px; height: 48px; border-radius: 8px; object-fit: cover;
  background: var(--bg-soft); border: 1px #eee solid;
}
.checkout-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.checkout-item-name { font-size: 14px; font-weight: 700; color: var(--brand-blue); }
.checkout-item-summary { font-size: 12px; color: var(--muted); line-height: 1.35; }
.checkout-item-qty { font-size: 13px; color: var(--muted); }
.checkout-item-price { font-weight: 700; color: var(--brand-blue); }

.checkout-delivery-address { display: flex; align-items: flex-start; gap: 8px; color: var(--brand-blue); font-weight: 600; }
.checkout-delivery-copy { display: flex; flex-direction: column; gap: 2px; }
.checkout-delivery-label { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.checkout-delivery-main { color: var(--brand-blue); font-weight: 800; }
.checkout-delivery-detail { color: var(--muted); font-size: 14px; font-weight: 600; }
.checkout-delivery-time { color: var(--muted); font-size: 14px; margin-top: 6px; padding-left: 24px; }
.checkout-delivery-missing { color: var(--brand-red); font-size: 14px; }

.checkout-form { display: flex; flex-direction: column; gap: 14px; }
.checkout-form-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, .7fr) 120px; gap: 12px; }
.checkout-field { display: flex; flex-direction: column; gap: 6px; }
.checkout-field label { font-size: 13px; font-weight: 700; color: var(--brand-blue); }
.checkout-field input,
.checkout-field select {
  border: 1px solid var(--border); border-radius: 10px; padding: 11px 14px;
  font-size: 15px; color: var(--text); outline: 0; background: #fff;
  width: 100%;
}
.checkout-field select {
  appearance: none;
  padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.checkout-field input:focus,
.checkout-field select:focus { border-color: var(--brand-blue); }
.checkout-field input.is-error,
.checkout-field select.is-error,
input.is-error,
select.is-error {
  border-color: #e53935 !important;
  box-shadow: 0 0 0 3px rgba(229,57,53,0.15) !important;
  background-color: #fff5f5 !important;
}
.checkout-checkline {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 12px;
  color: var(--brand-blue); font-size: 14px; font-weight: 700; cursor: pointer;
}
.checkout-checkline[hidden] { display: none; }
.checkout-checkline input { width: 17px; height: 17px; accent-color: var(--brand-red); }
.checkout-billing-current {
  display: none;
  margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  color: var(--muted); font-size: 14px; font-weight: 600; line-height: 1.4; background: #fff;
}
.checkout-billing-current[hidden], .checkout-billing-form[hidden] { display: none; }

.tip-options { display: flex; gap: 10px; flex-wrap: wrap; }
.tip-btn {
  flex: 1; min-width: 64px; border: 1px solid var(--border); background: #fff;
  border-radius: var(--radius-pill); padding: 10px 12px; cursor: pointer;
  font-weight: 700; color: var(--brand-blue);
}
.tip-btn:hover { border-color: var(--brand-red); color: var(--brand-red); }
.tip-btn.is-active { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.tip-custom-wrap { display: flex; align-items: center; gap: 6px; margin-top: 12px; border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; }
.tip-custom-wrap[hidden] { display: none; }
.tip-custom-prefix { color: var(--muted); font-weight: 700; }
.tip-custom-input { flex: 1; border: 0; outline: 0; padding: 11px 4px; font-size: 15px; background: transparent; }

.checkout-aside { position: sticky; top: 92px; }
.checkout-summary { display: flex; flex-direction: column; }
.checkout-promo { border-bottom: 1px solid var(--border); padding-bottom: 14px; margin-bottom: 10px; }
.checkout-promo-label { display: block; font-size: 13px; font-weight: 800; color: var(--brand-blue); margin-bottom: 8px; }
.checkout-promo-form { display: flex; gap: 8px; }
.checkout-promo-input {
  flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; text-transform: uppercase; outline: 0;
}
.checkout-promo-input:focus { border-color: var(--brand-blue); }
.checkout-promo-apply {
  border: 1px solid var(--brand-red); background: #fff; color: var(--brand-red);
  border-radius: var(--radius-pill); padding: 0 14px; font-weight: 800; cursor: pointer;
}
.checkout-promo-apply:hover { background: var(--brand-red); color: #fff; }
.checkout-promo-applied {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: #f4f6f9;
  color: var(--brand-blue); font-size: 13px; font-weight: 800;
}
.checkout-promo-applied[hidden] { display: none; }
.checkout-promo-applied button { border: 0; background: transparent; color: var(--brand-red); font-weight: 800; cursor: pointer; }
.checkout-promo-status { min-height: 18px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.checkout-promo-status.is-error { color: var(--brand-red); }
.checkout-promo-status.is-success { color: #15803d; }
.summary-row { display: flex; justify-content: space-between; padding: 7px 0; color: var(--text); font-size: 15px; }
.summary-row--discount { color: #15803d; font-weight: 800; }
.summary-row--total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 12px; font-weight: 800; color: var(--brand-blue); font-size: 18px; }
.checkout-place-order { margin-top: 16px; }
.checkout-place-order:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Delivery edit bottom-sheet ---------- */
.delivery-overlay {
  position: fixed; inset: 0; z-index: 320; background: rgba(20, 54, 90, .45);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.delivery-overlay.is-open { display: flex; }
.delivery-modal {
  background: #fff; border-radius: var(--radius); width: 480px; max-width: 100%;
  max-height: 88vh; display: flex; flex-direction: column; box-shadow: var(--shadow-md);
}
.delivery-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.delivery-modal-head h2 { font-size: 18px; }
.delivery-modal-close { border: 0; background: transparent; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; }
.delivery-modal-close:hover { color: var(--brand-red); }
.delivery-modal-body { padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 20px; }
.delivery-field { display: flex; flex-direction: column; gap: 8px; }
.delivery-mode {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 3px; background: var(--bg-soft);
}
.delivery-mode-option { position: relative; min-width: 0; }
.delivery-mode-option input { position: absolute; opacity: 0; pointer-events: none; }
.delivery-mode-option span {
  display: flex; align-items: center; justify-content: center; min-height: 38px;
  border-radius: var(--radius-pill); color: var(--brand-blue); font-weight: 800; font-size: 14px;
}
.delivery-mode-option input:checked + span { background: var(--brand-red); color: #fff; box-shadow: var(--shadow-sm); }
.delivery-mode-option input:focus-visible + span { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.delivery-label { font-size: 13px; font-weight: 700; color: var(--brand-blue); }
.delivery-input { border: 1px solid var(--border); border-radius: 10px; padding: 11px 14px; font-size: 15px; outline: 0; }
.delivery-input:focus { border-color: var(--brand-blue); }
.delivery-helper { margin: -2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.35; }
.pickup-results { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.pickup-results[hidden] { display: none; }
.pickup-results-title { margin: 0; color: var(--brand-blue); font-size: 13px; font-weight: 800; }
.pickup-status { color: var(--muted); font-size: 13px; line-height: 1.35; padding: 8px 0; }
.pickup-result {
  width: 100%; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--brand-blue);
  padding: 10px 12px; text-align: left;
}
.pickup-result:hover { border-color: var(--brand-red); }
.pickup-result.is-selected { border-color: var(--brand-red); background: #fbeaeb; }
.pickup-result-radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); }
.pickup-result.is-selected .pickup-result-radio { border-color: var(--brand-red); background: var(--brand-red); box-shadow: inset 0 0 0 3px #fff; }
.pickup-result-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pickup-result-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pickup-result-address { color: var(--muted); font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pickup-result-distance { color: var(--muted); font-size: 12px; font-weight: 800; white-space: nowrap; }
.delivery-days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.delivery-day {
  flex: 0 0 auto; border: 1px solid var(--border); background: #fff; border-radius: 10px;
  padding: 8px 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 62px;
}
.delivery-day:hover { border-color: var(--brand-red); }
.delivery-day.is-active { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.delivery-day-label { font-weight: 700; font-size: 13px; }
.delivery-day-date { font-size: 12px; opacity: .85; }
.delivery-slots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; max-height: 240px; overflow-y: auto; }
.delivery-slot { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.delivery-slot:hover { border-color: var(--brand-red); }
.delivery-slot.is-selected { border-color: var(--brand-red); background: #fbeaeb; }
.delivery-slot-radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); flex: 0 0 auto; }
.delivery-slot.is-selected .delivery-slot-radio { border-color: var(--brand-red); background: var(--brand-red); box-shadow: inset 0 0 0 3px #fff; }
.delivery-slot-time { font-size: 14px; font-weight: 600; color: var(--brand-blue); }
.delivery-modal-foot { padding: 16px 20px; border-top: 1px solid var(--border); }
.delivery-confirm:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Checkout order modal ---------- */
.checkout-order-overlay {
  position: fixed; inset: 0; z-index: 390; display: none;
  align-items: center; justify-content: center; padding: 18px;
}
.checkout-order-overlay.is-open { display: flex; }
.checkout-order-overlay[hidden] { display: none; }
.checkout-order-backdrop {
  position: absolute; inset: 0; background: rgba(20, 54, 90, .42);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.checkout-order-modal {
  position: relative; z-index: 1; width: min(520px, 100%);
  height: min(660px, calc(100dvh - 36px)); max-height: calc(100dvh - 36px);
  background: #fff; border-radius: 18px; box-shadow: 0 24px 70px rgba(18, 37, 63, .28);
  overflow: hidden; display: flex; flex-direction: column;
}
.checkout-order-head {
  min-height: 52px; padding: 14px 16px 12px 18px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border); background: #fff;
}
.checkout-order-head h2 { margin: 0; color: var(--brand-blue); font-size: 17px; font-weight: 800; }
.checkout-order-close {
  border: 0; background: transparent; color: var(--muted); font-size: 28px; line-height: 1; cursor: pointer;
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
}
.checkout-order-close:hover { color: var(--brand-red); background: var(--bg-soft); }
.checkout-order-frame {
  flex: 1; width: 100%; min-height: 0; border: 0; background: #f4f6f8;
}

/* ---------- Temporary unavailable modal ---------- */
.unavailable-overlay {
  position: fixed; inset: 0; z-index: 360; display: none;
  align-items: center; justify-content: center; padding: 24px;
}
.unavailable-overlay.is-open { display: flex; }
.unavailable-overlay[hidden] { display: none; }
.unavailable-backdrop { position: absolute; inset: 0; background: rgba(20, 54, 90, .45); }
.unavailable-modal {
  position: relative; z-index: 1; width: 420px; max-width: 100%;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-md);
  padding: 24px; text-align: center;
}
.unavailable-modal h2 { font-size: 22px; color: var(--brand-blue); margin-bottom: 10px; }
.unavailable-modal p { color: var(--muted); line-height: 1.5; margin-bottom: 20px; }
.unavailable-close {
  position: absolute; top: 10px; right: 12px; border: 0; background: transparent;
  color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer;
}
.unavailable-close:hover { color: var(--brand-red); }
.unavailable-action { min-width: 110px; }

/* ==================================================================
   Order received (thank-you)
   ================================================================== */
.order-received { text-align: center; max-width: 460px; margin: 60px auto; padding: 0 16px; }
.order-received-check {
  width: 64px; height: 64px; border-radius: 50%; background: #22c55e; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 22px;
}
.order-received .menu-title { margin-bottom: 12px; }
.order-received-desc { color: var(--muted); font-size: 15px; line-height: 1.6; margin-bottom: 24px; }

/* ==================================================================
   Mobile tweaks
   ================================================================== */
@media (max-width: 1023px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-aside { position: static; }
  .cart-drawer { width: 90vw; }
  .delivery-overlay { align-items: flex-end; padding: 0; }
  .delivery-modal { width: 100%; max-width: 100%; border-radius: var(--radius) var(--radius) 0 0; max-height: 90vh; }
  .checkout-order-overlay { align-items: flex-end; padding: 10px; }
  .checkout-order-modal { width: 100%; height: min(620px, calc(100dvh - 20px)); max-height: calc(100dvh - 20px); border-radius: 18px; }
  .delivery-slots { grid-template-columns: 1fr; }
  .pickup-result { grid-template-columns: 18px minmax(0, 1fr); }
  .pickup-result-distance { grid-column: 2; }
  .tip-btn { min-width: 56px; padding: 12px; }
}

@media (max-width: 560px) {
  .checkout-form-row { grid-template-columns: minmax(0, 1fr); }
  .checkout-field--state,
  .checkout-field--zip { grid-column: 1 / -1; }
}
