:root {
  --red: #ed102b;
  --red-2: #ff4a5f;
  --navy: #07111f;
  --green: #16a34a;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #f0f4f8;
  --text: #0f172a;
  --muted: #667085;
  --line: #e3e8ef;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.1);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
}

.app-shell,
main {
  max-width: 100vw;
  overflow-x: hidden;
}

html[dir="rtl"] body {
  font-family: Tajawal, Inter, Arial, sans-serif;
}

body.dark {
  --bg: #0b1220;
  --surface: #111827;
  --surface-2: #182132;
  --text: #f9fafb;
  --muted: #aeb7c7;
  --line: #243145;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.25);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 112px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  padding: 10px clamp(14px, 4vw, 54px);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--red);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(237, 16, 43, 0.22);
}

.brand strong {
  display: block;
  font-size: 17px;
  line-height: 1;
}

.brand span:last-child {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.desktop-nav a,
.desktop-nav button,
.icon-button,
.chip-button {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 10px 13px;
  text-decoration: none;
  font-weight: 700;
}

.desktop-nav a:hover,
.desktop-nav button:hover,
.desktop-nav a.active,
.chip-button.active {
  border-color: color-mix(in srgb, var(--green) 35%, var(--line));
  background: color-mix(in srgb, var(--green) 11%, transparent);
  color: var(--green);
}

.desktop-nav button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 8px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.cart-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  padding: 11px 15px;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(7, 17, 31, 0.2);
}

.cart-pill b,
.floating-cart b {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: clamp(24px, 4vw, 58px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: clamp(24px, 5vw, 68px) clamp(14px, 4vw, 54px) 36px;
}

.hero-copy {
  display: grid;
  gap: 18px;
  align-content: center;
}

.eyebrow,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border: 1px solid color-mix(in srgb, var(--green) 28%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--green) 10%, var(--surface));
  color: var(--green);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
}

.status-pill.closed {
  border-color: color-mix(in srgb, var(--red) 28%, var(--line));
  background: color-mix(in srgb, var(--red) 10%, var(--surface));
  color: var(--red);
}

.status-pill.closed .status-dot {
  background: var(--red);
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-cta,
.secondary-cta,
.checkout-button,
.add-button,
.track-button,
.login-button {
  border: 0;
  border-radius: 15px;
  background: var(--red);
  color: #fff;
  padding: 13px 18px;
  text-decoration: none;
  font-weight: 850;
  box-shadow: 0 16px 34px rgba(237, 16, 43, 0.24);
}

.secondary-cta {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.hero-visual {
  min-width: 0;
}

.hero-board {
  position: relative;
  min-height: 520px;
}

.hero-photo {
  width: min(680px, 100%);
  height: 440px;
  margin-inline-start: auto;
  overflow: hidden;
  border-radius: 32px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-card-stack {
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: min(520px, 92%);
}

.mini-meal {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  padding: 10px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.mini-meal img {
  width: 72px;
  height: 72px;
  border-radius: 15px;
  object-fit: cover;
  background: var(--surface-2);
}

.mini-meal strong,
.product-card h3,
.cart-line strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-meal strong {
  display: block;
  font-size: 13px;
}

.mini-meal small {
  color: var(--muted);
  font-weight: 700;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.stat-card strong {
  display: block;
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1;
}

.stat-card span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.section {
  padding: 34px clamp(14px, 4vw, 54px);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.menu-shell {
  display: grid;
  gap: 16px;
}

.menu-toolbar {
  position: sticky;
  top: 72px;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  padding: 12px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.search-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-2);
  padding: 0 12px;
}

.search-control input,
.filter-panel input,
.filter-panel select,
.cart-drawer input,
.cart-drawer select,
.cart-drawer textarea,
.track-card input,
.account-login input,
.item-note {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  padding: 12px;
  outline: none;
}

.search-control input {
  border: 0;
  background: transparent;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
}

.filter-panel {
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  padding: 12px;
  box-shadow: var(--shadow-soft);
}

.filter-panel.open {
  display: grid;
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.filter-sheet-head {
  display: none;
}

.category-rail {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 4px 0 8px;
  scrollbar-width: thin;
}

.category-rail button {
  flex: 0 0 auto;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  position: relative;
  display: grid;
  grid-template-rows: 168px minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.product-image {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}

.product-card:hover .product-image img {
  transform: scale(1.035);
}

.badge-row {
  position: absolute;
  inset: 10px 10px auto;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.badge {
  border-radius: 999px;
  background: rgba(7, 17, 31, 0.76);
  color: #fff;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 800;
}

.discount-badge {
  background: var(--red);
}

.product-body {
  display: grid;
  gap: 9px;
  padding: 13px;
}

.product-body h3 {
  margin: 0;
  font-size: 16px;
}

.product-body p {
  display: -webkit-box;
  min-height: 38px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.macro-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.macro-row span {
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 7px 5px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}

.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 12px 13px;
}

.price {
  color: var(--red);
  font-size: 17px;
  font-weight: 900;
}

.old-price {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-decoration: line-through;
}

.add-button {
  min-width: 44px;
  height: 40px;
  padding: 0 13px;
  border-radius: 13px;
}

.quick-view {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--text);
  padding: 10px 12px;
  font-weight: 800;
}

.loyalty-band,
.plans-band,
.track-account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.feature-card,
.track-card,
.account-card,
.skeleton-card,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.feature-card {
  min-height: 190px;
  display: grid;
  align-content: space-between;
}

.feature-card strong {
  font-size: 28px;
}

.feature-card p,
.account-card p,
.track-card p {
  color: var(--muted);
  line-height: 1.55;
}

.track-card,
.account-card,
.account-login {
  display: grid;
  gap: 12px;
}

.tracking-steps {
  display: grid;
  gap: 10px;
}

.tracking-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
}

.tracking-step i {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--surface-2);
}

.tracking-step.done {
  border-color: color-mix(in srgb, var(--green) 42%, var(--line));
  background: color-mix(in srgb, var(--green) 8%, var(--surface));
}

.tracking-step.done i {
  background: var(--green);
}

.cart-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 60;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(440px, 100vw);
  background: var(--surface);
  box-shadow: -24px 0 70px rgba(7, 17, 31, 0.2);
  transform: translateX(110%);
  transition: transform 220ms ease;
}

html[dir="rtl"] .cart-drawer {
  inset: 0 auto 0 0;
  box-shadow: 24px 0 70px rgba(7, 17, 31, 0.2);
  transform: translateX(-110%);
}

.cart-drawer.open,
html[dir="rtl"] .cart-drawer.open {
  transform: translateX(0);
}

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 16px;
}

.cart-head h2 {
  margin: 0;
}

.drawer-close {
  border: 0;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  width: 42px;
  height: 42px;
  font-size: 22px;
}

.cart-scroll {
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px;
}

.cart-lines {
  display: grid;
  gap: 10px;
}

.cart-line {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-2);
  padding: 9px;
}

.cart-line img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
}

.cart-line-copy {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.cart-modifiers {
  color: var(--green);
  font-style: normal;
  font-size: 12px;
  line-height: 1.35;
}

.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 3px;
}

.qty-control button,
.remove-line {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  width: 30px;
  height: 30px;
  font-weight: 900;
}

.remove-line {
  color: var(--red);
}

.item-note {
  min-height: 34px;
  padding: 8px 10px;
  font-size: 12px;
}

.checkout-panel {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 14px 16px 16px;
}

.fulfillment-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  padding: 4px;
}

.fulfillment-tabs button {
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  padding: 10px 6px;
  font-weight: 800;
}

.fulfillment-tabs button.active {
  background: var(--red);
  color: #fff;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.checkout-grid .wide {
  grid-column: 1 / -1;
}

.test-mode {
  display: none;
  border: 1px solid color-mix(in srgb, #d9ad58 60%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, #d9ad58 12%, var(--surface));
  color: #9a6a16;
  padding: 10px;
  font-weight: 800;
}

.app-shell.show-test .test-mode {
  display: block;
}

.totals {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface-2);
  padding: 12px;
}

.totals div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.totals span {
  color: var(--muted);
}

.totals .grand {
  border-top: 1px solid var(--line);
  padding-top: 9px;
  color: var(--green);
  font-size: 22px;
  font-weight: 900;
}

.checkout-status {
  display: none;
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 800;
}

.checkout-status.show {
  display: block;
}

.checkout-status.error {
  border: 1px solid color-mix(in srgb, var(--red) 45%, var(--line));
  background: color-mix(in srgb, var(--red) 9%, var(--surface));
  color: var(--red);
}

.checkout-status.ok {
  border: 1px solid color-mix(in srgb, var(--green) 45%, var(--line));
  background: color-mix(in srgb, var(--green) 9%, var(--surface));
  color: var(--green);
}

.floating-cart {
  position: fixed;
  right: 16px;
  bottom: 86px;
  z-index: 38;
  display: none;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  padding: 13px 16px;
  font-weight: 900;
  box-shadow: 0 16px 38px rgba(7, 17, 31, 0.25);
}

html[dir="rtl"] .floating-cart {
  right: auto;
  left: 16px;
}

.bottom-nav {
  position: fixed;
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 42;
  display: none;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  padding: 6px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.bottom-nav a,
.bottom-nav button {
  display: grid;
  place-items: center;
  min-height: 46px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.bottom-nav a.active,
.bottom-nav button.active {
  background: var(--red);
  color: #fff;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  place-items: center;
  background: rgba(7, 17, 31, 0.58);
  padding: 18px;
}

.modal-backdrop.open {
  display: grid;
}

.quick-modal {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  width: min(860px, 100%);
  max-height: min(760px, 92vh);
  overflow: hidden;
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.quick-modal img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.quick-modal-body {
  display: grid;
  align-content: start;
  gap: 14px;
  overflow-y: auto;
  padding: 22px;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.skeleton-card {
  min-height: 290px;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface-2) 70%, transparent), transparent),
    var(--surface);
  background-size: 180% 100%;
  animation: skeleton 1.2s infinite linear;
}

@keyframes skeleton {
  to {
    background-position: -180% 0;
  }
}

@media (max-width: 1180px) {
  .product-grid,
  .skeleton-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-board {
    min-height: 440px;
  }
}

@media (max-width: 820px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .desktop-nav {
    display: none;
  }

  .brand span:last-child,
  .cart-pill span {
    display: none;
  }

  .hero {
    padding-top: 22px;
  }

  .hero h1 {
    font-size: clamp(38px, 12vw, 58px);
  }

  .hero-photo {
    height: 310px;
    border-radius: 24px;
  }

  .hero-card-stack {
    position: relative;
    width: 100%;
    margin-top: -36px;
  }

  .quick-stats,
  .loyalty-band,
  .plans-band,
  .track-account-grid,
  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }

  .menu-toolbar {
    top: 68px;
    grid-template-columns: 1fr;
  }

  .product-grid,
  .skeleton-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .product-card {
    grid-template-rows: 132px minmax(0, 1fr) auto;
    border-radius: 18px;
  }

  .product-body {
    padding: 11px;
  }

  .product-body p {
    min-height: 0;
    -webkit-line-clamp: 1;
  }

  .macro-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-view {
    display: none;
  }

  .floating-cart,
  .bottom-nav {
    display: grid;
  }

  .floating-cart {
    display: flex;
  }

  .quick-modal {
    grid-template-columns: 1fr;
    max-height: 92vh;
    overflow-y: auto;
  }

  .quick-modal img {
    height: 280px;
    min-height: 0;
  }
}

@media (max-width: 520px) {
  .site-header {
    min-height: 64px;
    padding: 8px 12px;
  }

  .header-actions {
    gap: 5px;
  }

  .icon-button {
    min-width: 38px;
    height: 38px;
  }

  .hero,
  .section {
    padding-inline: 12px;
  }

  .hero-card-stack,
  .quick-stats,
  .loyalty-band,
  .plans-band,
  .track-account-grid,
  .checkout-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .mini-meal {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .mini-meal img {
    width: 58px;
    height: 58px;
  }

  .toolbar-actions {
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .toolbar-actions button {
    white-space: nowrap;
  }

  .cart-drawer {
    width: 100vw;
  }
}

/* Customer website premium WiSHOP replacement layer */
.premium-header {
  min-height: 68px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
}

.desktop-nav a,
.desktop-nav button {
  min-height: 38px;
}

.desktop-nav .track-link {
  border-color: color-mix(in srgb, var(--red) 30%, var(--line));
  background: color-mix(in srgb, var(--red) 8%, var(--surface));
  color: var(--red);
}

.theme-toggle {
  min-width: 58px;
  font-size: 12px;
}

.premium-hero {
  min-height: auto;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  padding-block: clamp(22px, 4vw, 48px);
}

.premium-hero .hero-copy {
  gap: 14px;
}

.premium-hero h1 {
  max-width: 680px;
  font-size: clamp(38px, 5.5vw, 72px);
  line-height: 0.98;
}

.premium-hero p {
  max-width: 560px;
  font-size: clamp(15px, 1.6vw, 18px);
}

.premium-hero .hero-board {
  min-height: 410px;
}

.premium-hero .hero-photo {
  position: relative;
  height: 360px;
  border-radius: 28px;
}

.premium-hero .hero-photo::after,
.product-image::after,
.quick-modal-image::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 17, 31, 0.04), rgba(7, 17, 31, 0.18));
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 0 clamp(14px, 4vw, 54px) 18px;
}

.trust-strip div {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 13px 14px;
  box-shadow: var(--shadow-soft);
}

.trust-strip i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--green) 12%, transparent);
}

.trust-strip strong {
  font-size: 13px;
}

.featured-section {
  padding-top: 16px;
}

.menu-title-row {
  margin-bottom: 10px;
}

.filter-open {
  min-width: 104px;
}

.premium-menu .menu-toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
  border-radius: 22px;
}

.premium-menu .filter-panel {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.premium-menu .category-rail {
  padding-bottom: 10px;
}

.premium-menu .category-rail .chip-button {
  min-height: 44px;
  padding-inline: 15px;
}

.premium-grid {
  gap: 18px;
}

.premium-product {
  grid-template-rows: 198px minmax(0, 1fr) auto;
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.09);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.premium-product:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 58px rgba(15, 23, 42, 0.14);
}

.product-click {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  text-align: inherit;
  background: var(--surface-2);
}

.tag-row {
  position: absolute;
  inset: auto 10px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy);
  padding: 6px 9px;
  font-size: 10px;
  font-weight: 850;
}

.product-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.icon-quick {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  width: 34px;
  height: 34px;
  overflow: hidden;
  text-indent: -999px;
  position: relative;
}

.icon-quick::after {
  content: "i";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--red);
  text-indent: 0;
  font-weight: 950;
}

.premium-macros span {
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  background: color-mix(in srgb, var(--surface-2) 78%, var(--surface));
  color: var(--text);
}

.plus-add {
  display: grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  border-radius: 14px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}

.premium-plans .feature-card {
  min-height: 230px;
}

.plan-card .primary-cta {
  width: fit-content;
  margin-top: auto;
}

.floating-cart-bar {
  position: fixed;
  inset: auto 18px 18px;
  z-index: 55;
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  max-width: 780px;
  margin: 0 auto;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 22px;
  background: color-mix(in srgb, var(--navy) 92%, #000);
  padding: 9px;
  box-shadow: 0 20px 58px rgba(7, 17, 31, 0.32);
}

.floating-cart-bar.show {
  display: grid;
}

.floating-cart-bar button {
  border: 0;
  border-radius: 16px;
  color: #fff;
  font-weight: 900;
}

.floating-cart-bar button:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: transparent;
  padding: 10px 12px;
}

.floating-cart-bar .checkout-mini {
  background: var(--red);
  padding: 0 18px;
}

.quick-modal-image {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  background: var(--surface-2);
}

.mobile-meal-slider {
  display: none;
}

.mobile-app-top {
  display: none;
}

.mobile-card-price {
  display: none;
}

.quick-modal-image img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
}

.premium-modal {
  width: min(920px, 100%);
}

.premium-modal h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
}

.ingredients-box {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-2);
  padding: 13px;
}

.ingredients-box span {
  color: var(--muted);
  line-height: 1.55;
}

.quick-note {
  min-height: 86px;
}

.quick-options {
  display: grid;
  gap: 12px;
}

.quick-option-group {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-2);
  overflow: hidden;
}

.quick-option-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.quick-option-head div {
  display: grid;
  gap: 3px;
}

.quick-option-head strong {
  font-size: 15px;
}

.quick-option-head small {
  color: var(--muted);
  font-size: 12px;
}

.quick-option-head span {
  border-radius: 999px;
  background: rgba(237, 16, 43, 0.08);
  color: var(--red);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.quick-option-list {
  display: grid;
}

.quick-option {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 12px 14px;
  text-align: start;
  cursor: pointer;
}

.quick-option:last-child {
  border-bottom: 0;
}

.quick-option.active {
  background: rgba(22, 163, 74, 0.08);
}

.option-plus {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(237, 16, 43, 0.12);
  color: var(--red);
  font-weight: 900;
}

.quick-option.active .option-plus {
  background: var(--green);
  color: #fff;
}

.option-name {
  font-weight: 750;
}

.quick-option small {
  color: var(--muted);
  font-weight: 800;
}

.quick-note-wrap {
  display: grid;
  gap: 7px;
}

.quick-note-wrap > span,
.quick-note-wrap > small {
  font-weight: 800;
}

.quick-note-wrap > small {
  justify-self: end;
  color: var(--muted);
}

.quick-buy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-add {
  width: 100%;
  min-height: 52px;
}

body.dark .tag-row span {
  background: rgba(17, 24, 39, 0.9);
  color: var(--text);
}

@media (max-width: 1180px) {
  .premium-product {
    grid-template-rows: 184px minmax(0, 1fr) auto;
  }

  .premium-menu .filter-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .mobile-app-top {
    display: grid;
    gap: 12px;
    max-width: 100vw;
    overflow: hidden;
    padding: 12px 12px 0;
  }

  .mobile-status {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2px 10px;
    align-items: center;
    border: 1px solid color-mix(in srgb, var(--green) 24%, var(--line));
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    padding: 12px;
    box-shadow: var(--shadow-soft);
  }

  .mobile-status.closed {
    border-color: color-mix(in srgb, var(--red) 26%, var(--line));
  }

  .mobile-status i {
    grid-row: span 2;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--green);
    box-shadow: 0 0 0 7px color-mix(in srgb, var(--green) 12%, transparent);
  }

  .mobile-status.closed i {
    background: var(--red);
    box-shadow: 0 0 0 7px color-mix(in srgb, var(--red) 12%, transparent);
  }

  .mobile-status span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
    font-weight: 900;
  }

  .mobile-status small {
    color: var(--muted);
    font-weight: 700;
  }

  .mobile-search {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    padding: 12px 14px;
    box-shadow: var(--shadow-soft);
  }

  .mobile-search span {
    color: var(--text);
    font-weight: 900;
  }

  .mobile-search input {
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    outline: 0;
    text-align: inherit;
  }

  .mobile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .mobile-actions button,
  .mobile-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 54px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    font-weight: 950;
    box-shadow: var(--shadow-soft);
  }

  .mobile-actions button {
    background: var(--navy);
    color: #fff;
  }

  .mobile-actions b {
    display: grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: 12px;
  }

  .premium-hero {
    grid-template-columns: 1fr;
  }

  .premium-hero .hero-copy {
    order: 1;
  }

  .premium-hero .hero-visual {
    display: none;
  }

  .premium-hero {
    gap: 18px;
    padding-top: 14px;
  }

  .premium-hero .status-pill {
    display: none;
  }

  .premium-hero .hero-board {
    min-height: 330px;
  }

  .premium-hero .hero-photo {
    width: 100%;
    margin: 0;
    height: 270px;
  }

  .premium-hero .hero-card-stack {
    position: relative;
    inset: auto;
    width: 100%;
    margin-top: -28px;
  }

  .mobile-meal-slider {
    display: block;
    width: calc(100vw - 24px);
    max-width: 100%;
    overflow: hidden;
    border-radius: 24px;
    padding: 4px;
  }

  .mobile-meal-track {
    display: flex;
    gap: 12px;
    width: max-content;
    animation: mobileMealSlide 18s steps(4, end) infinite;
  }

  .mobile-meal-slide {
    flex: 0 0 calc((100vw - 48px) / 2);
    display: grid;
    grid-template-rows: 132px auto;
    min-width: calc((100vw - 48px) / 2);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    color: var(--text);
    padding: 0;
    text-align: start;
    box-shadow: var(--shadow-soft);
  }

  .mobile-meal-slide img {
    width: 100%;
    height: 132px;
    object-fit: cover;
  }

  .mobile-meal-slide span {
    display: grid;
    gap: 4px;
    padding: 10px;
  }

  .mobile-meal-slide strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
  }

  .mobile-meal-slide small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
  }

  .premium-hero .hero-photo,
  .premium-hero .hero-card-stack {
    display: none;
  }

  @keyframes mobileMealSlide {
    0%,
    22% {
      transform: translateX(0);
    }

    25%,
    47% {
      transform: translateX(calc(-1 * (100vw - 24px)));
    }

    50%,
    72% {
      transform: translateX(calc(-2 * (100vw - 24px)));
    }

    75%,
    97% {
      transform: translateX(calc(-3 * (100vw - 24px)));
    }

    100% {
      transform: translateX(0);
    }
  }

  .trust-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .premium-menu .filter-panel {
    position: fixed;
    inset: auto 10px 86px;
    z-index: 58;
    grid-template-columns: 1fr;
    max-height: min(70vh, 540px);
    overflow-y: auto;
    transform: translateY(16px);
    border-radius: 24px;
    padding: 14px;
    box-shadow: var(--shadow);
  }

  .premium-menu .filter-panel.open {
    display: grid;
  }

  .filter-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 4px;
  }

  .filter-sheet-head strong {
    color: var(--text);
    font-size: 18px;
  }

  .filter-sheet-head button {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 14px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 22px;
    font-weight: 900;
  }

  .premium-menu .filter-panel label {
    gap: 8px;
    color: var(--text);
  }

  .premium-menu .filter-panel input,
  .premium-menu .filter-panel select {
    min-height: 48px;
  }

  .premium-product {
    grid-template-rows: 170px minmax(0, 1fr) auto;
  }

  .quick-view {
    display: inline-grid;
  }

  .quick-modal-image img {
    height: 280px;
    min-height: 0;
  }

  .floating-cart {
    display: none;
  }
}

@media (max-width: 520px) {
  .premium-hero,
  .trust-strip,
  .featured-section {
    display: none;
  }

  .premium-header .brand span:last-child {
    display: block;
  }

  .premium-header .brand strong {
    font-size: 14px;
  }

  .premium-hero h1 {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: clamp(28px, 8.4vw, 38px);
    line-height: 1.05;
  }

  .premium-hero p {
    font-size: 14px;
    line-height: 1.5;
  }

  .premium-hero .hero-actions {
    gap: 8px;
  }

  .premium-hero .primary-cta,
  .premium-hero .secondary-cta {
    min-height: 44px;
    padding: 11px 14px;
  }

  .premium-hero .quick-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trust-strip {
    grid-template-columns: 1fr;
  }

  .premium-menu .menu-toolbar {
    grid-template-columns: 1fr;
  }

  .toolbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .premium-grid,
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .premium-menu {
    padding-top: 16px;
  }

  .premium-menu .menu-toolbar {
    display: none;
  }

  .premium-menu .menu-title-row {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 8px;
  }

  .premium-menu .filter-open {
    min-width: 74px;
    padding: 10px 12px;
    justify-self: start;
  }

  .premium-menu .section-head {
    margin-bottom: 10px;
  }

  .premium-menu .section-head h2 {
    font-size: 28px;
  }

  .premium-menu .section-head p {
    font-size: 13px;
    max-width: 290px;
  }

  .premium-menu .category-rail {
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .premium-menu .category-rail::-webkit-scrollbar {
    display: none;
  }

  .mobile-meal-slider {
    width: calc(100vw - 24px);
    padding: 4px 0;
  }

  .mobile-meal-slide {
    flex: 0 0 calc((100vw - 42px) / 2);
    width: calc((100vw - 42px) / 2);
    min-width: calc((100vw - 42px) / 2);
    max-width: calc((100vw - 42px) / 2);
  }

  .premium-product {
    grid-template-rows: 188px auto;
    border-radius: 18px;
  }

  .premium-product .product-body {
    gap: 5px;
    padding: 10px 10px 11px;
  }

  .premium-product .product-body h3 {
    font-size: 13px;
    line-height: 1.25;
    display: -webkit-box;
    min-height: 31px;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .premium-product .mobile-card-price {
    display: block;
    color: var(--red);
    font-size: 13px;
    font-weight: 950;
  }

  .premium-product .product-body p {
    display: none;
  }

  .premium-product .badge {
    padding: 5px 7px;
    font-size: 10px;
  }

  .premium-product .tag-row {
    inset: auto 52px 8px 8px;
    gap: 4px;
  }

  html[dir="rtl"] .premium-product .tag-row {
    inset: auto 8px 8px 52px;
  }

  .premium-product .tag-row span {
    padding: 4px 7px;
    font-size: 9px;
  }

  .premium-product .premium-macros {
    display: none;
  }

  .premium-product .product-foot {
    position: absolute;
    inset: 0 0 auto;
    height: 188px;
    pointer-events: none;
    border: 0;
    padding: 0;
  }

  .premium-product .product-foot > div {
    display: none;
  }

  .premium-product .plus-add {
    position: absolute;
    bottom: 10px;
    right: 10px;
    left: auto;
    width: 40px;
    min-width: 40px;
    height: 40px;
    border-radius: 14px;
    pointer-events: auto;
    z-index: 5;
  }

  html[dir="rtl"] .premium-product .plus-add {
    right: auto;
    left: 10px;
  }

  .premium-product .icon-quick {
    width: 30px;
    height: 30px;
  }

  .floating-cart-bar {
    inset: auto 10px 74px;
  }

  .floating-cart-bar .checkout-mini {
    padding-inline: 12px;
  }

  .bottom-nav {
    gap: 2px;
    padding: 5px;
  }

  .bottom-nav a,
  .bottom-nav button {
    min-height: 42px;
    border-radius: 14px;
    font-size: 9px;
  }

  .premium-modal {
    width: min(100%, 390px);
    border-radius: 24px 24px 0 0;
  }

  .quick-modal {
    align-self: end;
    max-height: 88vh;
  }

  .quick-modal-image img {
    height: 250px;
    min-height: 0;
  }

  .quick-modal-body {
    gap: 11px;
    padding: 16px;
  }

  .quick-modal-body .drawer-close {
    position: sticky;
    top: 0;
    justify-self: end;
    z-index: 3;
    box-shadow: var(--shadow-soft);
  }

  .premium-modal h2 {
    font-size: 24px;
    line-height: 1.15;
  }

  .quick-modal-body .premium-macros {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .quick-note {
    min-height: 72px;
  }

  .quick-buy-row {
    position: sticky;
    bottom: 66px;
    z-index: 2;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    padding: 8px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
  }

  .modal-add {
    position: sticky;
    bottom: 0;
    z-index: 2;
    box-shadow: 0 16px 34px rgba(237, 16, 43, 0.24);
  }

  .cart-drawer {
    border-radius: 24px 24px 0 0;
    height: 92vh;
    inset: auto 0 0;
    width: 100vw;
    transform: translateY(110%);
  }

  html[dir="rtl"] .cart-drawer {
    inset: auto 0 0;
    transform: translateY(110%);
    box-shadow: 0 -24px 70px rgba(7, 17, 31, 0.2);
  }

  .cart-line {
    grid-template-columns: 58px minmax(0, 1fr);
    border-radius: 16px;
  }

  .cart-line img {
    width: 58px;
    height: 58px;
  }

  .checkout-panel {
    padding-bottom: 92px;
  }

  .cart-head {
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--surface);
  }

  .cart-head .drawer-close {
    background: var(--red);
    color: #fff;
  }

  .checkout-button {
    position: sticky;
    bottom: 76px;
    z-index: 2;
    min-height: 52px;
  }

  .fulfillment-tabs button,
  .checkout-grid input,
  .cart-drawer textarea {
    min-height: 46px;
  }
}
