:root {
  --bg: #0c0c0d;
  --bg-elev: #161618;
  --bg-card: #1c1c1f;
  --line: rgba(255, 245, 230, 0.1);
  --text: #f5f0e8;
  --muted: #a89f93;
  --ember: #ff6b1a;
  --ember-deep: #c2410c;
  --cream: #f5f0e8;
  --green: #2a9d4a;
  --danger: #ef4444;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --header-h: 64px;
  --strip-h: 36px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: "DM Sans", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--ember); }
button, input, select { font: inherit; }
code {
  font-size: 0.85em;
  background: rgba(255,107,26,0.12);
  padding: 0.1em 0.35em;
  border-radius: 6px;
}

/* Unified RK demo strip (matches Premium Auto / tires) */
.demo-strip {
  position: static;
  top: auto;
  z-index: auto;
  background: #000;
  color: rgba(244, 239, 230, 0.85);
  font-size: 0.78rem;
  padding: 0.55rem 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-bottom: 1px solid rgba(198, 167, 94, 0.32);
  max-width: none;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  letter-spacing: normal;
}
.demo-strip strong { color: #C6A75E; }
.demo-strip a { color: inherit; }
.demo-strip-back {
  color: rgba(244, 239, 230, 0.55);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
  opacity: 1;
  border: 0;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}
.demo-strip-back:hover { color: #F4EFE6; text-decoration: none; }
.rk-builtby { margin: 0.75rem 0 0; font-size: 0.82rem; opacity: 0.85; }
.rk-builtby a { color: inherit; text-decoration: underline; }

.store-header {
  position: sticky;
  top: var(--strip-h);
  z-index: 40;
  background: rgba(12,12,13,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: var(--header-h);
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.logo-img {
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,107,26,0.35);
}
.logo-text { display: flex; flex-direction: column; min-width: 0; }
.logo-name {
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.logo-tag {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--ember);
  color: #1a0800;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(255,107,26,0.35);
}
.cart-btn:active { transform: scale(0.98); }
.cart-count {
  background: #1a0800;
  color: var(--cream);
  min-width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}
@media (max-width: 380px) {
  .cart-label { display: none; }
}

#app { max-width: 720px; margin: 0 auto; padding: 0 0 6rem; }

.hero {
  position: relative;
  margin: 0 1rem 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: #1a120c;
  border: 1px solid var(--line);
}
.hero img { width: 100%; height: 180px; object-fit: cover; }
.hero-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.1rem 1rem 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.88));
}
.hero-overlay h1 {
  margin: 0 0 0.25rem;
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 400;
}
.hero-overlay p { margin: 0; color: #e8ddd0; font-size: 0.9rem; }
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}
.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(255,107,26,0.18);
  color: #ffc9a3;
  border: 1px solid rgba(255,107,26,0.35);
}

.cat-bar {
  position: sticky;
  top: calc(var(--strip-h) + var(--header-h));
  z-index: 30;
  background: rgba(12,12,13,0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0;
  margin-bottom: 0.75rem;
}
.cat-scroll {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0 1rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-chip {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.cat-chip[aria-pressed="true"] {
  background: var(--cream);
  color: #1a0800;
  border-color: var(--cream);
}

.menu-section { padding: 0 1rem 1.25rem; }
.menu-section h2 {
  margin: 0.5rem 0 0.75rem;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
}
.menu-list { display: flex; flex-direction: column; gap: 0.65rem; }

.menu-item {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  cursor: pointer;
  text-align: left;
  color: inherit;
  width: 100%;
  transition: border-color 0.15s, transform 0.1s;
}
.menu-item:active { transform: scale(0.995); }
.menu-item:hover { border-color: rgba(255,107,26,0.45); }
.menu-item-body h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 650;
}
.menu-item-body p {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.price { font-weight: 700; color: #ffc9a3; font-size: 0.95rem; }
.menu-item-img {
  width: 92px;
  height: 92px;
  border-radius: 10px;
  object-fit: cover;
  background: #111;
}
.demo-art {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  background: #1a120e;
}
.modal-hero.demo-art {
  width: 100%;
  min-height: 160px;
}

.checkout-view, .success-view {
  padding: 1rem 1rem 2rem;
}
.checkout-view h1, .success-view h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.85rem;
  margin: 0.25rem 0 0.35rem;
}
.checkout-sub { color: var(--muted); margin: 0 0 1.1rem; font-size: 0.92rem; }

.panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.85rem;
}
.panel h2 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.field { margin-bottom: 0.75rem; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--muted);
}
.field input, .field select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  padding: 0.7rem 0.8rem;
}
.field input:focus, .field select:focus {
  outline: 2px solid rgba(255,107,26,0.45);
  border-color: var(--ember);
}
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.seg button {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  border-radius: 10px;
  padding: 0.7rem;
  font-weight: 650;
  cursor: pointer;
}
.seg button[aria-pressed="true"] {
  background: rgba(255,107,26,0.15);
  color: var(--cream);
  border-color: var(--ember);
}

.line-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.92rem;
  padding: 0.35rem 0;
}
.line-row.total {
  font-size: 1.1rem;
  font-weight: 700;
  border-top: 1px solid var(--line);
  margin-top: 0.45rem;
  padding-top: 0.65rem;
}
.muted { color: var(--muted); }

.primary-btn, .ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: 0;
}
.primary-btn {
  background: var(--ember);
  color: #1a0800;
  box-shadow: 0 6px 20px rgba(255,107,26,0.3);
}
.primary-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}
.ghost-btn {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--line);
  margin-top: 0.55rem;
}
.btn-row { margin-top: 0.85rem; }
.tip-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.tip-row button {
  flex: 1;
  min-width: 3.5rem;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  border-radius: 10px;
  padding: 0.55rem;
  font-weight: 650;
  cursor: pointer;
}
.tip-row button[aria-pressed="true"] {
  background: var(--cream);
  color: #1a0800;
  border-color: var(--cream);
}

.cart-scrim, .modal-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 60;
}
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(100%, 400px);
  height: 100%;
  background: var(--bg-elev);
  z-index: 70;
  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  transition: transform 0.28s ease;
  box-shadow: var(--shadow);
  border-left: 1px solid var(--line);
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer-head, .cart-drawer-foot {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.cart-drawer-foot {
  border-bottom: 0;
  border-top: 1px solid var(--line);
  flex-direction: column;
  align-items: stretch;
  padding-bottom: calc(1rem + var(--safe-b));
}
.cart-drawer-head h2 {
  margin: 0;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
}
.icon-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.45rem;
}
.demo-pill {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255,107,26,0.2);
  color: #ffc9a3;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}
.cart-empty {
  text-align: center;
  color: var(--muted);
  padding: 2rem 1rem;
}
.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.cart-line-name { font-weight: 650; font-size: 0.95rem; }
.cart-line-meta { font-size: 0.78rem; color: var(--muted); grid-column: 1 / -1; }
.qty-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
}
.qty-ctrl button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.item-modal {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 520px);
  max-height: min(92dvh, 720px);
  overflow-y: auto;
  background: var(--bg-elev);
  z-index: 80;
  border-radius: 20px 20px 0 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  box-shadow: var(--shadow);
  padding-bottom: calc(1rem + var(--safe-b));
}
.item-modal img.modal-hero {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.modal-pad { padding: 1rem 1.1rem; }
.modal-pad h2 {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 400;
}
.opt-group { margin: 0.9rem 0; }
.opt-group legend {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.45rem;
}
.opt-choice {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 0.35rem;
  cursor: pointer;
  background: var(--bg);
}
.opt-choice:has(input:checked) {
  border-color: var(--ember);
  background: rgba(255,107,26,0.1);
}
.opt-choice span:last-child { margin-left: auto; color: var(--muted); font-size: 0.85rem; }
.modal-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: center;
  margin-top: 0.75rem;
}

.store-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 1rem 7rem;
  color: var(--muted);
  font-size: 0.82rem;
}
.footer-inner { max-width: 720px; margin: 0 auto; }
.footer-inner p { margin: 0 0 0.55rem; }
.mock-banner {
  background: rgba(255, 193, 7, 0.12);
  border: 1px solid rgba(255, 193, 7, 0.35);
  color: #ffe8a3;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font-size: 0.88rem;
  margin-bottom: 0.85rem;
}
.success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(42,157,74,0.2);
  color: #4ade80;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .hero img { height: 240px; }
  .menu-item { grid-template-columns: 1fr 110px; }
  .menu-item-img { width: 110px; height: 110px; }
}

