:root {
  --ink: #18222f;
  --muted: #667085;
  --paper: #ffffff;
  --soft: #f3f6f8;
  --line: #d9e1e8;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--accent-dark);
  font-family: Inter, Segoe UI, Arial, sans-serif;
  overflow-x: hidden;
}

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

button,
.primary-link {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

button:hover,
.primary-link:hover {
  background: var(--accent-dark);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: white;
  color: var(--ink);
}

textarea {
  min-height: 76px;
  resize: vertical;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.landing {
  min-height: 92vh;
  display: grid;
  grid-template-rows: auto 1fr;
  color: white;
  background:
    linear-gradient(90deg, rgba(10, 22, 31, 0.86), rgba(10, 22, 31, 0.38)),
    url("assets/Banner/breakfast-2-VL.png") center / cover;
}

.public-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 56px);
}

.public-nav img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.public-nav div {
  display: flex;
  gap: 14px;
}

.public-nav a {
  color: white;
  text-decoration: none;
  font-weight: 800;
}

.landing-inner {
  align-self: center;
  max-width: 760px;
  padding: 0 clamp(18px, 7vw, 96px) 8vh;
}

.eyebrow {
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0;
}

.landing h1 {
  margin-bottom: 18px;
  font-size: clamp(42px, 8vw, 86px);
  line-height: 0.98;
  letter-spacing: 0;
}

.landing p {
  max-width: 560px;
  font-size: 18px;
  line-height: 1.55;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.landing-actions a,
.landing-actions button {
  min-height: 46px;
  padding: 12px 18px;
}

.landing-actions button {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: transparent;
}

.special-band,
.menu-layout {
  padding: 24px clamp(14px, 4vw, 48px);
}

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

.featured-items button {
  min-height: 200px;
  display: grid;
  align-content: end;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
}

.featured-items img {
  width: 100%;
  height: 118px;
  object-fit: cover;
}

.featured-items span {
  padding: 10px;
  text-align: left;
}

.menu-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.category-panel,
.items-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.category-panel {
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.category-list {
  display: grid;
  gap: 10px;
}

.category-list button {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 6px;
  color: var(--ink);
  text-align: left;
  background: #edf3f5;
}

.category-list button:first-child {
  grid-template-columns: 1fr;
  padding: 13px;
}

.category-list button.active {
  color: white;
  background: var(--accent);
}

.category-list img {
  width: 54px;
  height: 46px;
  object-fit: cover;
  border-radius: 6px;
}

.section-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.section-title p,
.muted {
  color: var(--muted);
}

.menu-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}

.menu-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  min-height: 120px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.menu-card img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 6px;
  grid-row: 1 / 2;
}

.menu-card > div {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 112px;
}

.menu-card h3 {
  margin-bottom: 4px;
}

.menu-card p {
  color: var(--muted);
  line-height: 1.35;
  flex: 1;
}

.menu-card button {
  align-self: flex-end;
  padding: 5px 14px;
  min-height: unset;
  font-size: 0.8rem;
  border-radius: 6px;
}

.co-hidden { display: none !important; }

/* ── Cart drawer shell ── */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 20;
  width: min(420px, 100vw);
  height: 100vh;
  overflow: hidden;
  background: white;
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 40px rgba(24, 34, 47, 0.18);
  transform: translateX(105%);
  transition: transform 0.22s ease;
}

.cart-drawer.open { transform: translateX(0); }

/* Steps fill the full drawer height */
#cart-step-1,
#cart-step-2 {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 16px;
  gap: 12px;
  overflow: hidden;
}

/* ── Step 1 ── */
.cart-lines {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.05rem;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}

.btn-checkout {
  min-height: 52px;
  font-size: 1rem;
  border-radius: 10px;
  letter-spacing: 0.02em;
}

/* ── Step 2 ── */
.checkout-form {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 8px;
}

.field-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 4px 0 0;
}

/* Service picker — 2×2 grid */
.service-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.service-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 68px;
  padding: 10px 6px;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: var(--soft);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.service-btn .svc-icon { font-size: 1.5rem; line-height: 1; }
.service-btn:hover { border-color: var(--accent); }
.service-btn.active { border-color: var(--accent); background: var(--accent); color: white; }

/* Payment picker */
.payment-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pay-btn {
  min-height: 44px;
  padding: 8px 4px;
  border-radius: 8px;
  border: 2px solid var(--line);
  background: var(--soft);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.pay-btn:hover { border-color: var(--accent); }
.pay-btn.active { border-color: var(--accent); background: var(--accent); color: white; }

/* Shared header */
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.cart-header button,
.qty-controls button {
  min-height: 34px;
  padding: 7px 10px;
}

.btn-back {
  background: transparent;
  color: var(--accent);
  font-size: 0.88rem;
  padding: 6px 10px;
  border: 1px solid var(--line) !important;
}

.cart-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Order success modal ─────────────────────────────────── */
.success-modal {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.7);
  align-items: center; justify-content: center;
  padding: 20px;
}
.success-modal.open { display: flex; }

.success-modal-inner {
  background: white;
  border-radius: 20px;
  padding: 28px 20px;
  max-width: 420px; width: 100%;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  box-shadow: 0 24px 64px rgba(0,0,0,.3);
  animation: pop-in .25s ease;
}

@keyframes pop-in {
  from { transform: scale(.85); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.success-check {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--accent); color: white;
  font-size: 36px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}

.success-thankyou {
  font-size: 1.4rem; font-weight: 800;
  color: var(--ink); margin: 0;
}

.success-sub {
  font-size: 1rem; color: var(--muted); margin: 0;
}

.success-order-info {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 24px;
  background: var(--soft); border-radius: 10px; width: 100%;
}

.success-ticket {
  font-size: 0.85rem; color: var(--muted); letter-spacing: .04em;
}

.success-total {
  font-size: 2rem; color: var(--accent); font-weight: 900;
}

.success-qr-section {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  margin-top: 4px;
}

.success-qr-title {
  font-size: 0.9rem; font-weight: 700; color: var(--ink); margin: 0;
}

.success-qr-img {
  width: min(260px, 80vw); height: min(260px, 80vw); object-fit: contain;
  border: 2px solid var(--line); border-radius: 12px; padding: 8px;
}

.success-qr-hint {
  font-size: 0.8rem; color: var(--muted); margin: 0;
}

.success-close-btn {
  margin-top: 6px;
  padding: 12px 32px;
  border-radius: 10px;
  background: var(--accent); color: white;
  font-size: 1rem; font-weight: 700;
  border: 0; cursor: pointer; width: 100%;
}
.success-close-btn:hover { background: var(--accent-dark); }

/* ── Discount code row ───────────────────────────────────── */
.discount-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.discount-row input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  font: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}
.discount-row button {
  padding: 9px 16px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.discount-row button:hover { background: var(--line); }

#discount-message { font-size: 0.82rem; margin: 0; }

.checkout-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

#checkout-message,
.error { color: var(--danger); font-size: 0.88rem; }

.mini-cart {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 12;
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 52px;
  padding: 12px 18px;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.3);
}

.mini-cart.is-hidden {
  display: none;
}

@media (max-width: 820px) {
  body {
    padding-bottom: 74px;
  }

  .landing {
    min-height: 76svh;
    background-position: center top;
  }

  .public-nav {
    gap: 12px;
    padding: 12px 16px;
  }

  .public-nav img {
    width: 48px;
    height: 48px;
  }

  .public-nav div {
    gap: 8px;
    font-size: 13px;
  }

  .landing-inner {
    padding: 4vh 20px 7vh;
  }

  .landing h1 {
    max-width: 360px;
    font-size: 36px;
    line-height: 1.08;
  }

  .landing p {
    max-width: 330px;
    font-size: 16px;
  }

  .landing-actions {
    gap: 10px;
    margin-top: 20px;
  }

  .landing-actions a,
  .landing-actions button {
    min-height: 44px;
    padding: 11px 14px;
  }

  .special-band,
  .menu-layout {
    padding: 10px 6px;
  }

  .featured-items {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .featured-items button {
    min-height: 110px;
  }

  .featured-items img {
    height: 72px;
  }

  /* Keep sidebar left + items right on mobile */
  .menu-layout {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 10px 6px;
  }

  .section-title {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  /* Sticky sidebar on mobile */
  .category-panel {
    position: sticky;
    top: 8px;
    padding: 6px 4px;
    border-radius: 8px;
  }

  .category-panel h2 {
    display: none; /* hide "Categories" title to save space */
  }

  /* Vertical scrollable category list */
  .category-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 75vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
  }

  .category-list::-webkit-scrollbar {
    display: none;
  }

  /* Icon-only category buttons */
  .category-list button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: unset;
    min-height: unset;
    width: 60px;
    padding: 6px 4px;
    grid-template-columns: unset;
    border-radius: 8px;
  }

  .category-list button:first-child {
    grid-template-columns: unset;
    padding: 8px 4px;
    font-size: 11px;
  }

  .category-list img {
    width: 36px;
    height: 30px;
    border-radius: 4px;
  }

  .category-list span {
    font-size: 9px;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 58px;
  }

  .items-panel {
    padding: 8px 6px;
  }

  /* 2-column item grid */
  .menu-items {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  /* Vertical card layout for 2-column grid */
  .menu-card {
    display: flex;
    flex-direction: column;
    min-height: unset;
    padding: 0;
    gap: 0;
    overflow: hidden;
  }

  .menu-card img {
    width: 100%;
    height: 90px;
    border-radius: 6px 6px 0 0;
  }

  .menu-card > div {
    padding: 6px 7px 4px;
    flex: 1;
  }

  .menu-card h3 {
    margin-bottom: 2px;
    font-size: 13px;
    line-height: 1.2;
  }

  .menu-card p {
    margin-bottom: 4px;
    font-size: 11px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .menu-card strong {
    font-size: 13px;
  }

  .menu-card button {
    min-height: unset;
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 6px;
  }

  .cart-drawer {
    width: 100vw;
  }

  .mini-cart {
    left: 12px;
    right: 12px;
    bottom: 10px;
    justify-content: space-between;
    min-height: 54px;
    border-radius: 8px;
  }
}