:root {
  --bg: #fdf7f0;
  --surface: #ffffff;
  --surface-soft: #f7ebdf;
  --ink: #2c1b14;
  --muted: #7a6258;
  --espresso: #3b241a;
  --accent: #9f4950;
  --accent-dark: #7d3339;
  --rose-soft: #f9e4e6;
  --green: #1b7f4b;
  --green-soft: #e6f6ed;
  --amber: #b76e00;
  --amber-soft: #fff4df;
  --red: #b83232;
  --red-soft: #fdeaea;
  --border: #ead9ca;
  --shadow: 0 10px 28px rgba(59, 36, 26, 0.1);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  padding-bottom: 96px;
}

.hidden {
  display: none !important;
}

.store-header {
  position: sticky;
  top: 0;
  z-index: 25;
  background: linear-gradient(135deg, var(--espresso), #553427);
  color: #fff;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
}

.brand-wrap {
  min-width: 0;
}

.brand-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: #f3d7c6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.open-pill {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.open-pill.open {
  background: #20a05f;
  color: #fff;
}

.open-pill.closed {
  background: #c93b3b;
  color: #fff;
}

.open-pill.teaser {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #fff;
}

.btn-my-orders {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-count {
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 800;
}

.container {
  max-width: 1020px;
  margin: 0 auto;
  padding: 14px 14px 20px;
}

.closed-banner {
  background: var(--red-soft);
  border: 1px solid #f5bcbc;
  color: var(--red);
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

.teaser-banner {
  background: linear-gradient(135deg, #fff4e0, #fde7ea);
  border: 1px solid #f2c29b;
  color: var(--espresso);
  padding: 13px 15px;
  border-radius: 16px;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(159, 73, 80, 0.12);
}

.teaser-banner strong {
  display: block;
  font-size: 14px;
  color: var(--accent-dark);
  margin-bottom: 3px;
}

.teaser-banner span {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}

.countdown-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.cd-box {
  background: var(--espresso);
  color: #fff;
  border-radius: 11px;
  padding: 7px 11px;
  min-width: 54px;
  text-align: center;
  box-shadow: 0 3px 8px rgba(59, 36, 26, 0.16);
}

.cd-box b {
  display: block;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.cd-box small {
  display: block;
  font-size: 10px;
  color: #f3d7c6;
  margin-top: 2px;
  text-transform: uppercase;
}

.cd-sep {
  font-size: 18px;
  font-weight: 900;
  color: var(--accent-dark);
}

.price-blur {
  display: inline-block;
  filter: blur(5px);
  -webkit-filter: blur(5px);
  user-select: none;
  opacity: 0.72;
  letter-spacing: 0.5px;
}

.teaser-pill {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff0d6, #fde2e4);
  color: var(--accent-dark);
  border: 1px solid #f2c9cd;
}

.btn-teaser {
  background: var(--surface-soft) !important;
  color: var(--espresso) !important;
  border: 1px dashed #d6b6a5 !important;
  cursor: default !important;
}

.active-order-strip {
  background: linear-gradient(135deg, #fff5eb, #fde8e9);
  border: 1px solid #f0c9cd;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.active-order-strip strong {
  font-size: 13px;
  display: block;
}

.active-order-strip span {
  font-size: 12px;
  color: var(--muted);
}

/* HERO BANNER */
.hero-banner {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 14px;
  min-height: 175px;
  box-shadow: var(--shadow);
  background: var(--espresso);
}

@media (min-width: 720px) {
  .hero-banner {
    min-height: 230px;
  }
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: relative;
  z-index: 1;
  min-height: inherit;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(90deg, rgba(35, 19, 13, 0.86) 0%, rgba(35, 19, 13, 0.62) 56%, rgba(35, 19, 13, 0.18) 100%);
  color: #fff;
}

.hero-tag {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.hero-headline {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

@media (min-width: 720px) {
  .hero-headline {
    font-size: 26px;
  }
}

.hero-desc {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: #f6dfd2;
  max-width: 520px;
  line-height: 1.4;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hero-badges span {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(4px);
}

/* SEARCH & CATEGORY TABS */
.search-row {
  margin-bottom: 10px;
}

.search-input {
  width: 100%;
  padding: 11px 15px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  box-shadow: 0 2px 8px rgba(59, 36, 26, 0.04);
}

.search-input:focus {
  border-color: var(--accent);
}

.cat-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  margin-bottom: 6px;
  scrollbar-width: none;
}

.cat-pills::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 5px 14px 5px 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 8px rgba(59, 36, 26, 0.04);
}

.cat-pill:active {
  transform: scale(0.97);
}

.cat-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-soft);
  font-size: 14px;
}

.cat-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(59, 36, 26, 0.1);
}

.cat-pill.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(159, 73, 80, 0.28);
}

.cat-pill.active .cat-thumb {
  background: rgba(255, 255, 255, 0.2);
}

/* SECTION HEADERS & MENU GRID */
.section-block {
  margin-bottom: 22px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 2px 10px;
}

.section-heading h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--espresso);
  display: flex;
  align-items: center;
  gap: 7px;
}

.section-heading span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

@media (min-width: 640px) {
  .menu-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 920px) {
  .menu-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }
}

.menu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(59, 36, 26, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

@media (hover: hover) {
  .menu-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(59, 36, 26, 0.11);
  }
  .menu-card:hover .menu-photo {
    transform: scale(1.04);
  }
}

.menu-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--surface-soft);
  overflow: hidden;
}

.menu-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.menu-badge-tl {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(44, 27, 20, 0.72);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.menu-badge-tr {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 245, 235, 0.94);
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.menu-badge-out {
  position: absolute;
  inset: 0;
  background: rgba(30, 18, 13, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.6px;
}

.menu-body {
  padding: 10px 11px 11px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  gap: 8px;
}

.menu-name {
  margin: 0;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--ink);
}

.menu-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.menu-hours {
  margin-top: 6px;
  padding: 5px 7px;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid #efe0d4;
  font-size: 10px;
  line-height: 1.38;
  color: var(--espresso);
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.menu-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.menu-price {
  font-size: 14.5px;
  font-weight: 900;
  color: var(--accent-dark);
}

.stock-tag {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--amber-soft);
  color: var(--amber);
  font-weight: 700;
}

.stock-tag.out {
  background: var(--red-soft);
  color: var(--red);
}

.btn-add {
  width: 100%;
  border: none;
  border-radius: 11px;
  padding: 9px 10px;
  background: linear-gradient(135deg, #fce8ea, #f7d6d9);
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}

.btn-add:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
}

.btn-add:disabled {
  background: #eee;
  color: #999;
  cursor: not-allowed;
}

.qty-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border-radius: 11px;
  padding: 4px;
}

.qty-inline button {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.qty-inline span {
  font-size: 13px;
  font-weight: 800;
}

.floating-cart {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  width: calc(100% - 24px);
  max-width: 690px;
  z-index: 30;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 26px rgba(125, 51, 57, 0.38);
  cursor: pointer;
}

.floating-cart .fc-left {
  display: flex;
  flex-direction: column;
}

.floating-cart .fc-items {
  font-size: 12px;
  opacity: 0.92;
}

.floating-cart .fc-total {
  font-size: 16px;
  font-weight: 800;
}

.floating-cart .fc-cta {
  background: #fff;
  color: var(--accent-dark);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
}

/* MODALS */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(28, 16, 11, 0.56);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 600px) {
  .modal-backdrop {
    align-items: center;
  }
}

.modal-sheet {
  width: 100%;
  max-width: 540px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  padding: 18px 16px 24px;
  box-shadow: var(--shadow);
}

@media (min-width: 600px) {
  .modal-sheet {
    border-radius: 20px;
  }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.btn-close {
  border: none;
  background: var(--surface-soft);
  color: var(--ink);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 5px;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  font-family: inherit;
}

.seg-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.seg-btn {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink);
  border-radius: 10px;
  padding: 9px 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.seg-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.cart-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
}

.cart-line-info {
  min-width: 0;
  flex: 1;
}

.cart-line-title {
  font-size: 13px;
  font-weight: 700;
}

.cart-line-sub {
  font-size: 11px;
  color: var(--muted);
}

.cart-line-ctrl {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.payment-box {
  background: var(--amber-soft);
  border: 1px solid #f0d39a;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  white-space: pre-wrap;
  line-height: 1.45;
  margin-top: 8px;
}

.btn-primary {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 13px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-wa {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 12px;
  padding: 12px;
  background: #1b8c4e;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin-top: 10px;
  cursor: pointer;
}

/* TRACKING TIMELINE */
.status-banner {
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-weight: 700;
  font-size: 14px;
}

.status-waiting {
  background: var(--amber-soft);
  color: var(--amber);
}

.status-preparing {
  background: #e8f1ff;
  color: #1956b4;
}

.status-ready {
  background: var(--green-soft);
  color: var(--green);
}

.status-completed {
  background: var(--green-soft);
  color: var(--green);
}

.status-cancelled {
  background: var(--red-soft);
  color: var(--red);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0;
}

.tl-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.tl-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #fff;
  flex-shrink: 0;
}

.tl-step.done {
  color: var(--ink);
  font-weight: 600;
}

.tl-step.done .tl-dot {
  background: var(--green);
  border-color: var(--green);
}

.tl-step.active {
  color: var(--accent-dark);
  font-weight: 800;
}

.tl-step.active .tl-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(159, 73, 80, 0.2);
}

.order-summary-card {
  background: var(--surface-soft);
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
}

.saved-order-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.saved-order-card:hover {
  background: var(--surface-soft);
}

.pill-mini {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.store-footer {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 20px 12px 8px;
}

.qris-pay-card {
  background: linear-gradient(180deg, #fff9fa, #ffffff);
  border: 1.5px solid #f2ced3;
  border-radius: 16px;
  padding: 16px 14px;
  margin-bottom: 12px;
  text-align: center;
}

.qris-pay-card.qris-paid {
  background: #edf9f1;
  border-color: #9be0b5;
  color: #166534;
}

.qris-pay-card.qris-expired {
  background: #fff5f5;
  border-color: #feb2b2;
  color: #9b2c2c;
}

.qris-qr-img {
  display: block;
  margin: 10px auto;
  width: 220px;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  background: #fff;
  padding: 10px;
  border: 1px solid var(--border);
  box-shadow: 0 6px 20px rgba(59, 36, 26, 0.08);
}

.qris-amount {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-dark);
  margin: 4px 0 2px;
}

.qris-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.promo-banner {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff5f6, #fffdf9);
  border: 1.5px dashed #dc8f98;
  color: var(--ink);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}
.promo-tag {
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
}

.voucher-box {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 10px 0 4px;
}
.voucher-box label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.voucher-row {
  display: flex;
  gap: 8px;
}
.voucher-row .form-control {
  flex: 1;
  text-transform: uppercase;
}
.btn-voucher {
  border: none;
  border-radius: 10px;
  padding: 0 14px;
  font-weight: 800;
  font-size: 13px;
  background: var(--accent-dark);
  color: #fff;
  cursor: pointer;
}
.voucher-msg {
  font-size: 12px;
  font-weight: 700;
  margin-top: 6px;
}
.voucher-msg.ok { color: #166534; }
.voucher-msg.err { color: #b83232; }
