:root {
  --naka-black: #111111;
  --naka-white: #ffffff;
  --naka-gray-text: #6b6b6b;
  --naka-gray-border: #e4e2de;
  --naka-gray-card: #faf9f7;
  --naka-green-bg: #eef6ef;
  --naka-green-text: #2e7d4f;
  --naka-radius: 14px;
  --naka-radius-sm: 10px;
  --naka-container: 550px;
  --naka-safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #eeeeee; /* the "outside the phone" backdrop on desktop/tablet */
  color: var(--naka-black);
}

body {
  min-height: 100vh;
}

.naka-app {
  max-width: var(--naka-container);
  margin: 0 auto;
  background: var(--naka-white);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

@media (min-width: 600px) {
  .naka-app {
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0,0,0,0.06);
  }
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

a { color: inherit; }

/* ---------- Header / Logo ---------- */
.naka-logo-block {
  text-align: center;
  padding: 32px 20px 20px;
}
.naka-logo-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border: 2px solid var(--naka-black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
}
.naka-logo-word {
  font-size: 30px;
  letter-spacing: 0.12em;
  font-weight: 700;
  margin: 4px 0 2px;
}
.naka-logo-tagline {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--naka-gray-text);
  text-transform: uppercase;
}

.naka-header-minimal {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--naka-gray-border);
  position: sticky;
  top: 0;
  background: var(--naka-white);
  z-index: 20;
}
.naka-header-minimal .naka-logo-word { font-size: 18px; margin: 0; }

/* ---------- Main image ---------- */
.naka-main-image {
  margin: 0 20px 24px;
  border-radius: var(--naka-radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.naka-main-image img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Program intro / Dine In (kept, per approved decision) ---------- */
.naka-program-title {
  text-align: center;
  padding: 0 24px;
}
.naka-program-title h1 {
  font-size: 22px;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
}
.naka-program-title p {
  font-size: 14px;
  color: var(--naka-gray-text);
  line-height: 1.5;
  margin: 0 0 20px;
}

.naka-dinein-badge {
  margin: 0 20px 24px;
  border: 1px solid var(--naka-gray-border);
  border-radius: 999px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.naka-dinein-badge .icon { font-size: 20px; }
.naka-dinein-badge strong { display: block; font-size: 13px; letter-spacing: 0.04em; }
.naka-dinein-badge span { display: block; font-size: 12px; color: var(--naka-gray-text); }

/* ---------- Section divider ---------- */
.naka-section {
  padding: 20px;
  border-top: 1px solid var(--naka-gray-border);
}
.naka-section-title { font-size: 17px; font-weight: 700; margin: 0 0 4px; letter-spacing: 0.02em; }
.naka-section-sub { font-size: 13px; color: var(--naka-gray-text); margin: 0 0 16px; }

/* ---------- Date chips ---------- */
.naka-date-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.naka-date-row::-webkit-scrollbar { display: none; }

.naka-date-chip {
  flex: 0 0 auto;
  min-width: 78px;
  border: 1px solid var(--naka-gray-border);
  border-radius: var(--naka-radius-sm);
  padding: 12px 8px;
  text-align: center;
  background: var(--naka-white);
  font-size: 13px;
}
.naka-date-chip .top-label { font-size: 11px; color: var(--naka-gray-text); margin-bottom: 4px; }
.naka-date-chip .day-month { font-size: 20px; font-weight: 700; margin: 2px 0; }
.naka-date-chip .weekday { font-size: 12px; color: var(--naka-gray-text); }

.naka-date-chip.is-selected {
  background: var(--naka-black);
  color: var(--naka-white);
  border-color: var(--naka-black);
}
.naka-date-chip.is-selected .top-label,
.naka-date-chip.is-selected .weekday { color: #cfcfcf; }

.naka-date-chip.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}
.naka-date-chip button {
  all: unset;
  display: block;
  width: 100%;
  min-height: 44px;
}

/* ---------- Availability status ---------- */
.naka-status-box {
  margin-top: 16px;
  border-radius: var(--naka-radius-sm);
  padding: 14px 16px;
  font-size: 13.5px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}
.naka-status-box.available { background: var(--naka-green-bg); color: var(--naka-green-text); }
.naka-status-box.full,
.naka-status-box.cutoff_passed { background: #fbecec; color: #a63a3a; }
.naka-status-note {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--naka-gray-text);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Primary button ---------- */
.naka-btn-primary {
  width: 100%;
  background: var(--naka-black);
  color: var(--naka-white);
  border: none;
  border-radius: 999px;
  padding: 16px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.naka-btn-primary:disabled {
  background: #d8d6d2;
  color: #9a9894;
  cursor: not-allowed;
}

/* ---------- Footer ---------- */
.naka-footer {
  background: var(--naka-black);
  color: #cfcfcf;
  text-align: center;
  padding: 22px 20px calc(22px + var(--naka-safe-bottom));
  font-size: 12px;
  margin-top: 12px;
}
.naka-footer .icons { margin-top: 10px; display: flex; justify-content: center; gap: 16px; font-size: 16px; }

/* ---------- Order page: date-as-info ---------- */
.naka-date-info {
  padding: 14px 20px;
  border-bottom: 1px solid var(--naka-gray-border);
  font-size: 13px;
}
.naka-date-info .label { color: var(--naka-gray-text); }
.naka-date-info .value { font-weight: 700; font-size: 15px; margin-top: 2px; }
.naka-date-info a { font-size: 12px; text-decoration: underline; color: var(--naka-gray-text); }

/* ---------- Dynamic status bar ---------- */
.naka-status-bar {
  margin: 16px 20px;
  background: #fff7ea;
  border: 1px solid #f0e0bd;
  border-radius: var(--naka-radius-sm);
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.45;
}
.naka-status-bar.min-met { background: var(--naka-green-bg); border-color: #cfe8d5; color: var(--naka-green-text); }
.naka-status-bar.discount-hit { background: #111111; color: #fff; border-color: #111111; }

/* ---------- Product slider ---------- */
.naka-slider-viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  display: flex;
  gap: 14px;
  padding: 4px 20px 8px;
}
.naka-slider-viewport::-webkit-scrollbar { display: none; }

.naka-slider-viewport.cards-per-view-2 .naka-product-card {
  flex: 0 0 calc(50% - 7px);
  scroll-snap-align: start;
}
.naka-slider-viewport.cards-per-view-1 .naka-product-card {
  flex: 0 0 calc(100% - 0px);
  scroll-snap-align: start;
}

.naka-product-card {
  border: 1px solid var(--naka-gray-border);
  border-radius: var(--naka-radius);
  overflow: hidden;
  background: var(--naka-white);
  display: flex;
  flex-direction: column;
}
.naka-product-card .photo {
  aspect-ratio: 1 / 1;
  background: var(--naka-gray-card);
  position: relative;
}
.naka-product-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.naka-product-card .badge-popular {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--naka-black);
  color: #fff;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}
.naka-product-card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.naka-product-card h3 { font-size: 15px; margin: 0; }
.naka-product-card .desc { font-size: 12px; color: var(--naka-gray-text); line-height: 1.4; margin: 0; }
.naka-product-card .contents { font-size: 11.5px; color: var(--naka-gray-text); margin: 2px 0 0; padding: 0; list-style: none; }
.naka-product-card .contents li { padding-left: 16px; position: relative; margin-bottom: 2px; }
.naka-product-card .contents li::before { content: "✓"; position: absolute; left: 0; }
.naka-product-card .price { font-size: 17px; font-weight: 700; margin-top: 4px; }
.naka-product-card .price-note { font-size: 10.5px; color: var(--naka-gray-text); margin: -4px 0 4px; }

.naka-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.naka-qty-control {
  display: flex;
  align-items: center;
  gap: 10px;
}
.naka-qty-control button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: none;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.naka-qty-control button::before {
  content: "";
  position: absolute;
  inset: 6px; /* visual circle stays ~32px while the tappable box is 44px */
  border-radius: 50%;
  border: 1px solid var(--naka-gray-border);
  background: var(--naka-gray-card);
  z-index: -1;
}
.naka-qty-control .qty-value { min-width: 18px; text-align: center; font-weight: 600; font-size: 14px; }

.naka-btn-choose {
  width: 100%;
  margin-top: 10px;
  background: var(--naka-black);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px;
  font-size: 13.5px;
  font-weight: 600;
  min-height: 44px;
}

/* ---------- Dot indicator ---------- */
.naka-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  padding: 4px 0 8px;
}
.naka-dots button {
  all: unset;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.naka-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--naka-gray-border);
}
.naka-dots button.is-active .dot {
  background: var(--naka-black);
  width: 16px;
  border-radius: 4px;
}

/* ---------- Add on ---------- */
.naka-addon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--naka-gray-border);
}
.naka-addon-row:last-child { border-bottom: none; }
.naka-addon-row .name { font-size: 14px; font-weight: 600; }
.naka-addon-row .price { font-size: 12.5px; color: var(--naka-gray-text); margin-top: 2px; }

/* ---------- Sticky cart / summary ---------- */
.naka-sticky-cart {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--naka-container);
  background: var(--naka-white);
  border-top: 1px solid var(--naka-gray-border);
  padding: 14px 20px calc(14px + var(--naka-safe-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  z-index: 30;
  box-sizing: border-box;
}
.naka-sticky-cart .qty-total .qty { font-size: 12.5px; color: var(--naka-gray-text); }
.naka-sticky-cart .qty-total .total { font-size: 17px; font-weight: 700; }
.naka-sticky-cart .naka-btn-primary { width: auto; padding: 14px 26px; min-height: 48px; }

/* Height-driven spacer (see order.js) keeps the last real content clear of the
   fixed bar on every viewport — no hard-coded pixel guess. */
#cartSpacer {
  height: calc(var(--naka-cart-height, 76px) + var(--naka-safe-bottom) + 16px);
}
