@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;700;800&display=swap');

:root {
  --bg: #12132a;
  --bg-elevated: #191b3c;
  --surface: #1e2148;
  --surface-hover: #262a5c;
  --line: rgba(255, 255, 255, 0.08);
  --ink: #f1f3ff;
  --ink-dim: #9195c4;
  --accent: #5fe8d5;
  --accent-soft: rgba(95, 232, 213, 0.14);
  --warm: #ffb27a;
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
body {
  background-image:
    radial-gradient(circle at 12% 8%, rgba(95, 232, 213, 0.08), transparent 40%),
    radial-gradient(circle at 88% 0%, rgba(143, 217, 255, 0.07), transparent 35%);
  padding-bottom: 260px; padding-top: env(safe-area-inset-top, 0px);
}
button { font-family: inherit; cursor: pointer; }

.preview-badge {
  text-align: center; font-size: 11px; font-weight: 700; color: var(--ink-dim);
  background: var(--surface); padding: 6px; border-bottom: 1px solid var(--line); letter-spacing: 0.02em;
}

.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: rgba(18, 19, 42, 0.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand__mark { width: 30px; height: 30px; }
.brand__name { font-weight: 800; font-size: 18px; letter-spacing: 0.01em; }
.topbar__actions { display: flex; gap: 8px; }
.icon-btn {
  position: relative; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); display: flex; align-items: center; justify-content: center;
}
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.cart-count {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px; background: var(--accent); color: #0b1a2e; font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

.hero {
  padding: 24px 20px 18px;
  background: radial-gradient(circle at 100% 0%, rgba(95, 232, 213, 0.12), transparent 55%), var(--bg-elevated);
  border-bottom: 1px solid var(--line);
}
.hero__eyebrow { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--accent); }
.hero__title { margin: 0 0 8px; font-size: 26px; line-height: 1.15; font-weight: 800; }
.hero__sub { margin: 0; color: var(--ink-dim); font-size: 13.5px; }

.chips { display: flex; gap: 8px; padding: 16px 18px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-dim); font-weight: 700; font-size: 13.5px; white-space: nowrap;
}
.chip--active { background: var(--accent); border-color: var(--accent); color: #0b1a2e; }

.subtag {
  display: inline-block; font-size: 10.5px; font-weight: 700; color: var(--ink-dim);
  background: var(--surface-hover); padding: 2px 7px; border-radius: 6px; margin-bottom: 4px;
}

.section-head { padding: 18px 18px 4px; }
.section-head h2 { margin: 0; font-size: 15.5px; font-weight: 800; }
.section-head span { font-size: 12px; color: var(--ink-dim); font-weight: 700; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 4px 18px 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card__image {
  aspect-ratio: 1 / 1;
  background: radial-gradient(circle at 30% 20%, rgba(95, 232, 213, 0.18), transparent 60%), var(--bg-elevated);
  display: flex; align-items: center; justify-content: center; font-size: 34px; overflow: hidden;
}
.card__image img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 11px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__brand { font-size: 10.5px; font-weight: 700; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.03em; }
.card__name { font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.card__puffs { font-size: 11.5px; color: var(--accent); font-weight: 700; }
.card__price { font-weight: 800; font-size: 15px; margin-top: 2px; }
.card__flavor {
  width: 100%; border: 1px solid var(--line); background: var(--bg-elevated); color: var(--ink);
  border-radius: 9px; padding: 7px 26px 7px 9px; font-size: 11.5px; font-family: inherit; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239195c4' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}
.card__flavor:focus { outline: none; border-color: var(--accent); }
.card__add {
  margin-top: auto;
  width: 100%; border: none; border-radius: 10px; background: var(--accent-soft);
  color: var(--accent); font-size: 12.5px; font-weight: 800; padding: 9px 0;
}
.card__add:active { background: var(--accent); color: #0b1a2e; }

.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-around;
  padding: 10px 6px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(18, 19, 42, 0.92); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
}
.bottombar__item {
  border: none; background: none; display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--ink-dim); font-size: 10.5px; font-weight: 700; padding: 4px 8px;
}
.bottombar__item svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.bottombar__item--active { color: var(--accent); }

.sheet {
  position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end;
  background: rgba(6, 7, 18, 0.6); opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.sheet--open { opacity: 1; pointer-events: auto; }
.sheet__panel {
  width: 100%; max-height: 86vh; overflow-y: auto; background: var(--bg-elevated);
  border-radius: 22px 22px 0 0; border: 1px solid var(--line); border-bottom: none;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateY(16px); transition: transform 0.22s ease;
}
.sheet--open .sheet__panel { transform: translateY(0); }
.sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet__head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.sheet__close { width: 30px; height: 30px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-dim); }
.sheet__body { display: flex; flex-direction: column; gap: 10px; }

.cart-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-row__info { flex: 1; min-width: 0; }
.cart-row__name { font-size: 13.5px; font-weight: 700; }
.cart-row__flavor { font-size: 11.5px; color: var(--accent); font-weight: 700; }
.cart-row__price { font-size: 12.5px; color: var(--ink-dim); }
.qty { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 10px; padding: 4px 8px; }
.qty button { background: none; border: none; color: var(--accent); font-size: 16px; font-weight: 800; width: 20px; }
.qty span { min-width: 16px; text-align: center; font-weight: 700; font-size: 13px; }

.sheet__footer { margin-top: 16px; }
.sheet__total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 15px; }
.sheet__total strong { color: var(--accent); font-size: 18px; }
.empty-state { padding: 30px 0; text-align: center; color: var(--ink-dim); font-size: 13.5px; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-dim); font-weight: 700; }
.field input, .field select {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 12px;
  padding: 12px 14px; font-size: 15px; font-family: inherit; width: 100%; appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239195c4' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); }
.hint { font-size: 12px; color: var(--ink-dim); margin: 10px 2px 0; }

.btn { border: none; border-radius: 14px; padding: 14px 18px; font-weight: 800; font-size: 15px; }
.btn--primary { background: var(--accent); color: #0b1a2e; }
.btn--primary:disabled { background: var(--surface); color: var(--ink-dim); }
.btn--block { width: 100%; }

.pd__image {
  aspect-ratio: 1.3 / 1; border-radius: var(--radius); overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(95, 232, 213, 0.18), transparent 60%), var(--bg-elevated);
  display: flex; align-items: center; justify-content: center; font-size: 54px; margin-bottom: 14px;
}
.pd__image img { width: 100%; height: 100%; object-fit: cover; }
.pd__brand { font-size: 11.5px; font-weight: 700; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 2px; }
.pd__name { font-size: 19px; font-weight: 800; margin: 0 0 4px; }
.pd__puffs { font-size: 12.5px; color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.pd__price { font-size: 18px; font-weight: 800; color: var(--accent); margin: 0 0 14px; }

.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(12px);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  padding: 11px 18px; border-radius: 12px; font-size: 13.5px; font-weight: 700; z-index: 60;
  opacity: 0; pointer-events: none; transition: all 0.25s ease;
}
.toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }
