/* ============ Design tokens ============ */
:root {
  --bg-dark: #14140f;
  --bg-dark-2: #1d1c15;
  --gold: #b7aa6a;
  --gold-light: #d8cf9f;
  --cream: #faf7f0;
  --surface: #ffffff;
  --text: #2b2820;
  --text-muted: #8a8474;
  --border: #ece6d6;
  --danger: #b5573f;

  --font-display: "Cormorant Garamond", serif;
  --font-body: "Jost", sans-serif;

  --radius: 14px;
  --nav-height: 64px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

button,
input,
textarea {
  font-family: inherit;
  font-size: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  margin: 0;
}

p {
  margin: 0;
}

/* ============ Screens ============ */
.screen {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-height) + 12px);
}

.screen.active {
  display: block;
}

/* ============ Home / splash ============ */
.screen-home {
  background: radial-gradient(circle at 50% 20%, var(--bg-dark-2), var(--bg-dark) 70%);
  color: var(--cream);
  padding: 32px 24px;
}

.screen-home.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-inner {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 36px;
}

.brand-logo {
  width: 100%;
  max-width: 260px;
  height: auto;
}

.home-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--cream);
}

.home-text {
  font-weight: 300;
  color: #c9c4b6;
  line-height: 1.5;
  font-size: 0.95rem;
}

.home-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* ============ Buttons ============ */
.btn {
  border: none;
  border-radius: 999px;
  padding: 15px 28px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--gold);
  color: var(--bg-dark);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-add {
  background: var(--bg-dark);
  color: var(--gold-light);
  padding: 8px 18px;
  font-size: 0.85rem;
  border-radius: 999px;
}

/* ============ Top bar ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--cream);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 10px;
}

.topbar-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

.icon-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text);
  cursor: pointer;
  padding: 4px 8px 4px 0;
  line-height: 1;
}

/* ============ Category tabs ============ */
.category-tabs {
  position: sticky;
  top: 62px;
  z-index: 9;
  background: var(--cream);
  display: flex;
  gap: 8px;
  padding: 6px 20px 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.tab {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.tab.active {
  background: var(--bg-dark);
  border-color: var(--bg-dark);
  color: var(--gold-light);
}

/* ============ Item list ============ */
.item-list {
  padding: 4px 20px 90px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ============ Menu basket bar (live total) ============ */
.menu-basket-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--nav-height);
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-dark);
  color: var(--cream);
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.menu-basket-bar.hidden {
  display: none;
}

.menu-basket-bar #menu-basket-summary {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gold-light);
}

.menu-basket-bar .btn {
  padding: 10px 18px;
  font-size: 0.85rem;
}

.item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.item-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.item-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.item-price {
  font-size: 0.9rem;
  color: var(--gold);
  font-weight: 600;
  margin-top: 2px;
}

.item-action {
  flex: 0 0 auto;
}

/* ============ Stepper ============ */
.stepper {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-dark);
  border-radius: 999px;
  padding: 6px 12px;
}

.stepper-btn {
  background: none;
  border: none;
  color: var(--gold-light);
  font-size: 1.1rem;
  width: 22px;
  height: 22px;
  line-height: 1;
  cursor: pointer;
}

.stepper-qty {
  color: var(--cream);
  font-weight: 600;
  min-width: 14px;
  text-align: center;
  font-size: 0.9rem;
}

/* ============ Basket screen ============ */
.basket-body {
  padding: 8px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.basket-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.basket-row-name {
  font-weight: 600;
  font-size: 0.98rem;
}

.basket-row-price {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  color: var(--text-muted);
}

.basket-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--nav-height);
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
}

.basket-footer.hidden {
  display: none;
}

.basket-total-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 12px;
}

/* ============ Checkout screen ============ */
.checkout-form {
  padding: 8px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.order-recap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recap-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.field-optional {
  color: var(--text-muted);
  font-weight: 300;
}

.field input,
.field textarea {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 14px;
  background: var(--surface);
  color: var(--text);
  resize: none;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.checkout-total-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  padding-top: 4px;
}

.checkout-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: -6px;
}

.checkout-error {
  text-align: center;
  font-size: 0.85rem;
  color: var(--danger);
  background: #fbeae5;
  border-radius: 10px;
  padding: 10px 14px;
}

.checkout-error.hidden {
  display: none;
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ============ Availability / specials ============ */
.station-notice {
  margin: 0 20px 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fbeae5;
  color: var(--danger);
  font-size: 0.85rem;
  text-align: center;
}

.station-notice.hidden {
  display: none;
}

.item-off .item-name,
.item-off .item-desc,
.item-off .item-price,
.item-off .basket-row-name {
  opacity: 0.5;
}

.soldout {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--danger);
  white-space: nowrap;
}

.badge-special {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--bg-dark);
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stepper-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

/* Honeypot: invisible to guests, filled in by bots. */
.field-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ============ Confirmation ============ */
.screen-confirmation {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  padding: 24px;
}

.screen-confirmation.active {
  display: flex;
}

.confirmation-inner {
  max-width: 360px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.confirmation-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-dark);
  color: var(--gold);
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.confirmation-inner h2 {
  font-size: 1.6rem;
  color: var(--text);
}

.confirmation-inner p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 10px;
}

/* ============ Bottom nav ============ */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--nav-height);
  background: var(--bg-dark);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 20;
}

.bottom-nav.hidden {
  display: none;
}

.nav-btn {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #8d8874;
  cursor: pointer;
}

.nav-btn.active {
  color: var(--gold-light);
}

.nav-icon {
  font-size: 1.15rem;
  position: relative;
}

.nav-label {
  font-size: 0.68rem;
  letter-spacing: 0.03em;
}

.nav-icon-cart {
  position: relative;
}

.nav-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: var(--gold);
  color: var(--bg-dark);
  font-size: 0.62rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.nav-badge.hidden {
  display: none;
}

/* ============ Larger screens (tablet/desktop preview) ============ */
@media (min-width: 640px) {
  .screen:not(.screen-home):not(.screen-confirmation) {
    max-width: 480px;
    margin: 0 auto;
  }

  .bottom-nav,
  .basket-footer,
  .menu-basket-bar {
    max-width: 480px;
    margin: 0 auto;
    left: 0;
    right: 0;
  }
}
