:root {
  --orange: #F7740F;
  --orange-600: #E0610A;
  --orange-100: #FFE6D2;
  --orange-50: #FFF5EC;
  --navy: #1F2433;
  --navy-700: #2C3245;
  --ink: #1F2433;
  --muted: #6B6F7B;
  --line: #EEE8E1;
  --bg: #FBF9F6;
  --card: #FFFFFF;
  --wa: #1FAF54;
  --wa-600: #178F44;
  --danger: #D93A2B;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(31,36,51,.06), 0 6px 18px rgba(31,36,51,.06);
  --shadow-lg: 0 20px 50px rgba(31,36,51,.18);
  --font: "Cairo", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --display: "Baloo Bhaijaan 2", "Cairo", system-ui, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 16px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--navy); color: #fff; font-size: 13px; }
.topbar__inner { display: flex; gap: 10px; justify-content: center; align-items: center; padding-block: 7px; white-space: nowrap; overflow: hidden; }
.topbar__dot { color: var(--orange); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; }
.brand__truck { height: 40px; width: auto; }
.brand__word { font-family: var(--display); font-size: 28px; font-weight: 800; letter-spacing: -.5px; line-height: 1; }
.brand__word b { color: var(--navy); font-weight: 800; }
.brand__word i { color: var(--orange); font-style: normal; }
.brand__word--light b { color: #fff; }

.search {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 0 14px; height: 44px; max-width: 520px; margin-inline: auto;
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-50); background: #fff; }
.search svg { width: 20px; height: 20px; fill: var(--muted); flex-shrink: 0; }
.search input { border: 0; outline: 0; background: transparent; width: 100%; height: 100%; font-size: 15px; }

.cart-btn {
  position: relative; display: flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 16px; border-radius: 999px; border: 0;
  background: var(--navy); color: #fff; font-weight: 700; flex-shrink: 0;
  transition: background .15s, transform .15s;
}
.cart-btn:hover { background: var(--navy-700); }
.cart-btn svg { width: 22px; height: 22px; fill: currentColor; }
.cart-btn__count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--orange); color: #fff; font-size: 13px; line-height: 22px; text-align: center;
}
.cart-btn.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.12); } }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, #fff 0%, var(--orange-50) 100%); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: center; padding-block: 48px 40px; }
.pill {
  display: inline-block; background: var(--orange-100); color: var(--orange-600);
  font-weight: 700; font-size: 14px; padding: 6px 14px; border-radius: 999px;
}
.hero h1 {
  font-family: var(--display); font-weight: 800; font-size: clamp(40px, 6vw, 68px);
  line-height: 1.1; margin: 14px 0 12px; color: var(--navy);
}
.hero h1 span { color: var(--orange); }
.hero p { font-size: 18px; color: var(--muted); margin: 0 0 24px; max-width: 520px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__img img { width: 100%; height: auto; mix-blend-mode: multiply; }
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 28px 0 0; }
.steps li { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.steps b {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy); color: #fff; font-size: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 24px; border-radius: 999px; border: 0;
  font-weight: 700; font-size: 16px; text-decoration: none;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 22px; height: 22px; fill: currentColor; }
.btn--primary { background: var(--orange); color: #fff; box-shadow: 0 8px 20px rgba(247,116,15,.3); }
.btn--primary:hover { background: var(--orange-600); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: var(--wa-600); }
.btn--ghost { background: #fff; color: var(--navy); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--navy); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Catalog ---------- */
.catalog { padding-bottom: 40px; scroll-margin-top: 68px; }
.chips-bar { position: sticky; top: 68px; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-block: 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  height: 40px; padding: 0 16px; border-radius: 999px;
  background: #fff; border: 1.5px solid var(--line); font-weight: 600; font-size: 15px;
  transition: all .15s;
}
.chip:hover { border-color: var(--orange); }
.chip small { color: var(--muted); font-weight: 600; }
.chip[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip[aria-selected="true"] small { color: rgba(255,255,255,.7); }

.catalog__head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 24px 0 16px; flex-wrap: wrap; }
.catalog__head h2 { font-family: var(--display); font-size: 28px; margin: 0; line-height: 1.2; }
.catalog__count { color: var(--muted); font-size: 14px; }
.sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.sort select { height: 40px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: #fff; padding: 0 10px; color: var(--ink); }

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

.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line);
  transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(31,36,51,.06), 0 14px 30px rgba(31,36,51,.1); }
.card--skeleton { height: 360px; background: linear-gradient(90deg, #fff 25%, #f4efe9 50%, #fff 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.card__media {
  position: relative; aspect-ratio: 4 / 3; border: 0; padding: 0; width: 100%;
  background: radial-gradient(circle at 50% 40%, #fff 0%, var(--orange-50) 70%);
  display: grid; place-items: center; overflow: hidden;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__emoji { font-size: 72px; line-height: 1; filter: drop-shadow(0 6px 10px rgba(31,36,51,.12)); transition: transform .25s; }
.card:hover .card__emoji { transform: scale(1.08) rotate(-4deg); }
.tag {
  position: absolute; top: 10px; inset-inline-start: 10px;
  background: var(--orange); color: #fff; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
}
.tag--off { background: var(--navy); inset-inline-start: auto; inset-inline-end: 10px; }
.card--off .card__media > *:not(.tag) { opacity: .45; filter: grayscale(1); }

.card__body { padding: 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card__cat { font-size: 12px; color: var(--orange-600); font-weight: 700; }
.card__title { font-size: 16px; font-weight: 700; margin: 0; line-height: 1.45; cursor: pointer; }
.card__meta { font-size: 13px; color: var(--muted); }
.card__price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.card__price b { font-family: var(--display); font-size: 22px; color: var(--navy); }
.card__price s { color: var(--muted); font-size: 14px; }
.card__price small { color: var(--muted); font-size: 13px; }
.card__action { margin-top: 8px; }

.add-btn {
  width: 100%; height: 44px; border-radius: 12px; border: 0;
  background: var(--orange); color: #fff; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .15s;
}
.add-btn:hover { background: var(--orange-600); }
.add-btn[disabled] { background: #E9E5E0; color: var(--muted); cursor: not-allowed; }

.stepper {
  display: flex; align-items: center; justify-content: space-between;
  height: 44px; border-radius: 12px; border: 1.5px solid var(--orange); background: var(--orange-50);
  overflow: hidden;
}
.stepper button {
  width: 44px; height: 100%; border: 0; background: transparent;
  font-size: 22px; font-weight: 700; color: var(--orange-600);
}
.stepper button:hover { background: var(--orange-100); }
.stepper input {
  width: 60px; text-align: center; border: 0; background: transparent; font-weight: 700; font-size: 16px;
  -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper--sm { height: 36px; border-radius: 10px; }
.stepper--sm button { width: 36px; font-size: 18px; }
.stepper--sm input { width: 44px; font-size: 15px; }

.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty__icon { font-size: 48px; }

/* ---------- Features ---------- */
.features { background: #fff; border-top: 1px solid var(--line); padding-block: 40px; }
.features__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { text-align: center; padding: 20px; border-radius: var(--radius); background: var(--bg); }
.feature span { font-size: 36px; }
.feature h3 { font-family: var(--display); margin: 6px 0 2px; font-size: 20px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: rgba(255,255,255,.8); padding-block: 32px 96px; }
.footer__inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer p { margin: 8px 0 0; }
.footer__side { display: flex; flex-direction: column; gap: 6px; }
.footer__wa { color: #fff; font-weight: 700; text-decoration: none; }
.footer__wa:hover { color: var(--orange); }

/* ---------- Floating cart (mobile) ---------- */
.fab {
  position: fixed; z-index: 45; inset-inline: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  height: 56px; border-radius: 16px; border: 0; padding: 0 16px;
  background: var(--navy); color: #fff; font-weight: 700; font-size: 16px;
  display: none; align-items: center; gap: 10px; box-shadow: var(--shadow-lg);
}
.fab b { margin-inline-start: auto; font-family: var(--display); font-size: 18px; }
.fab__count {
  min-width: 28px; height: 28px; border-radius: 8px; background: var(--orange);
  display: grid; place-items: center; font-size: 14px; padding: 0 6px;
}

/* ---------- Drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(31,36,51,.45); z-index: 60; opacity: 0; transition: opacity .2s; }
.overlay.open { opacity: 1; }
.drawer {
  position: fixed; z-index: 61; top: 0; bottom: 0; left: 0;
  width: min(440px, 100%); background: #fff; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  transform: translateX(-105%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
}
.drawer.open { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); }
.drawer__head h3 { margin: 0; font-family: var(--display); font-size: 22px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bg); font-size: 18px; }
.icon-btn:hover { background: var(--line); }
.drawer__body { flex: 1; overflow-y: auto; padding: 8px 16px 16px; overscroll-behavior: contain; }
.drawer__foot { border-top: 1px solid var(--line); padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); background: #fff; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-weight: 700; }
.total-row b { font-family: var(--display); font-size: 26px; color: var(--navy); }
.min-warn { margin: -4px 0 10px; color: var(--danger); font-size: 14px; font-weight: 600; }
.foot-note { display: block; text-align: center; color: var(--muted); margin-top: 8px; font-size: 13px; }

.line { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line__thumb { width: 64px; height: 64px; border-radius: 12px; background: var(--orange-50); display: grid; place-items: center; font-size: 32px; overflow: hidden; }
.line__thumb img { width: 100%; height: 100%; object-fit: cover; }
.line__name { font-weight: 700; font-size: 15px; line-height: 1.4; }
.line__meta { font-size: 13px; color: var(--muted); }
.line__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.line__total { font-family: var(--display); font-weight: 700; font-size: 17px; }
.line__remove { border: 0; background: none; color: var(--muted); font-size: 13px; padding: 0; text-decoration: underline; }
.line__remove:hover { color: var(--danger); }
.line__warn { color: var(--danger); font-size: 12px; font-weight: 600; }

.cart-empty { text-align: center; padding: 56px 12px; color: var(--muted); }
.cart-empty div { font-size: 56px; }
.cart-empty p { margin: 8px 0 20px; font-size: 16px; }

.checkout { margin-top: 18px; }
.checkout h4 { font-family: var(--display); font-size: 18px; margin: 0 0 10px; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; flex: 1; min-width: 0; }
.field-row { display: flex; gap: 10px; }
.field label { font-size: 14px; font-weight: 600; }
.field em { color: var(--danger); font-style: normal; }
.field input, .field textarea {
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px;
  background: var(--bg); font-size: 15px; outline: 0; transition: border-color .15s, box-shadow .15s; resize: vertical;
}
.field input:focus, .field textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-50); background: #fff; }
.field input.invalid { border-color: var(--danger); }

/* ---------- Modals ---------- */
.modal {
  border: 0; padding: 0; border-radius: 20px; width: min(720px, calc(100% - 32px));
  box-shadow: var(--shadow-lg); color: var(--ink);
}
.modal::backdrop { background: rgba(31,36,51,.5); }
.modal--small { width: min(440px, calc(100% - 32px)); }
.pm { display: grid; grid-template-columns: 1fr 1fr; }
.pm__media { background: radial-gradient(circle at 50% 40%, #fff 0%, var(--orange-50) 70%); display: grid; place-items: center; min-height: 300px; position: relative; }
.pm__media img { width: 100%; height: 100%; object-fit: cover; }
.pm__media .card__emoji { font-size: 120px; }
.pm__body { padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.pm__body h3 { margin: 0; font-size: 22px; line-height: 1.4; }
.pm__body p { margin: 0; color: var(--muted); }
.pm__facts { display: flex; gap: 8px; flex-wrap: wrap; }
.pm__facts span { background: var(--bg); border-radius: 8px; padding: 4px 10px; font-size: 13px; font-weight: 600; }
.pm__close { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2; background: #fff; }

.sent { padding: 28px 24px 24px; text-align: center; }
.sent__icon { width: 72px; height: 72px; border-radius: 50%; background: #E3F7EA; color: var(--wa); display: grid; place-items: center; margin: 0 auto 12px; font-size: 36px; }
.sent h3 { font-family: var(--display); margin: 0 0 4px; font-size: 24px; }
.sent p { color: var(--muted); margin: 0 0 18px; }
.sent__id { display: inline-block; background: var(--bg); padding: 4px 12px; border-radius: 8px; font-weight: 700; color: var(--navy); direction: ltr; }
.sent__actions { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; z-index: 80; left: 50%; bottom: 90px; transform: translate(-50%, 20px);
  background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-weight: 600; font-size: 15px; opacity: 0; pointer-events: none; transition: all .25s;
  white-space: nowrap; box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; padding-block: 24px 32px; gap: 8px; }
  .hero__img { order: -1; max-width: 460px; margin-inline: auto; }
  .hero__text { text-align: center; }
  .hero p { margin-inline: auto; }
  .hero__cta, .steps { justify-content: center; }
}
@media (max-width: 720px) {
  .topbar__inner { justify-content: flex-start; font-size: 12px; }
  .header__inner { height: auto; flex-wrap: wrap; padding-block: 10px; gap: 10px; }
  .brand { order: 1; }
  .cart-btn { order: 2; margin-inline-start: auto; padding: 0 12px; }
  .search { order: 3; flex-basis: 100%; max-width: none; height: 42px; }
  .brand__word { font-size: 24px; }
  .brand__truck { height: 34px; }
  .chips-bar { top: 0; position: relative; }
  .catalog { scroll-margin-top: 124px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card__body { padding: 10px; }
  .card__title { font-size: 14px; }
  .card__price b { font-size: 18px; }
  .card__emoji { font-size: 56px; }
  .card__meta { font-size: 12px; }
  .add-btn, .stepper { height: 40px; }
  .stepper button { width: 36px; }
  .stepper input { width: 40px; }
  .features__grid { grid-template-columns: 1fr; }
  .fab:not([hidden]) { display: flex; }
  .pm { grid-template-columns: 1fr; }
  .pm__media { min-height: 220px; }
  .field-row { flex-direction: column; gap: 0; }
  .catalog__head h2 { font-size: 24px; }
}
@media (max-width: 360px) {
  .cart-btn__label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
