/* VapeTime — Mini App theme. Ink + Lime. */

:root {
  --vt-ink: #0B0D10;
  --vt-surface: #14171D;
  --vt-surface-2: #1B1F27;
  --vt-lime: #C6FF3D;
  --vt-lime-dark: #A8E02A;
  --vt-white: #FFFFFF;
  --vt-muted: #9CA3AF;
  --vt-line: #262B35;
  --vt-danger: #FF4D4D;

  --vt-radius: 16px;
  --vt-radius-sm: 14px;
  --vt-gap: 16px;
  --vt-font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--vt-ink);
  color: var(--vt-white);
  font-family: var(--vt-font);
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; overflow-x: hidden; }
.hidden { display: none !important; }

.vt-page {
  width: 100%;
  padding: 16px 16px 120px;
  max-width: 560px;
  margin: 0 auto;
}

.vt-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0 18px;
}

.vt-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--vt-lime);
  color: var(--vt-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 900 19px/1 var(--vt-font);
  letter-spacing: -0.5px;
}

.vt-title { font-size: 20px; font-weight: 700; margin: 0; }
.vt-muted { color: var(--vt-muted); font-size: 13px; }

.vt-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--vt-muted);
  margin-top: 3px;
}

.vt-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--vt-lime);
  flex: 0 0 auto;
}

.vt-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 16px;
  scrollbar-width: none;
}
.vt-filters::-webkit-scrollbar { display: none; }

.vt-chip {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--vt-line);
  background: transparent;
  color: var(--vt-muted);
  font: 500 13px/1 var(--vt-font);
  white-space: nowrap;
  cursor: pointer;
}

.vt-chip.is-active {
  background: var(--vt-lime);
  border-color: var(--vt-lime);
  color: var(--vt-ink);
  font-weight: 700;
}

.vt-card {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: var(--vt-surface);
  border: 1px solid var(--vt-line);
  border-radius: var(--vt-radius);
  padding: 12px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.vt-card + .vt-card { margin-top: 10px; }
.vt-card.is-out { opacity: 0.5; }

.vt-thumb {
  width: 72px;
  height: 72px;
  grid-row: 1;
  border-radius: 14px;
  background: var(--vt-surface-2);
  border: 1px solid var(--vt-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  flex: 0 0 auto;
}

.vt-info { grid-column: 2; min-width: 0; overflow: hidden; }

.vt-name {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vt-meta { font-size: 12px; color: var(--vt-muted); margin-top: 3px; }

.vt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.vt-price {
  color: var(--vt-lime);
  font-weight: 700;
  font-size: 17px;
}

.vt-plus {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 0;
  background: var(--vt-lime);
  color: var(--vt-ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.vt-plus:disabled {
  background: var(--vt-surface-2);
  color: var(--vt-muted);
  cursor: default;
}

.vt-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--vt-ink);
  border-top: 1px solid var(--vt-line);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  z-index: 10;
}

.vt-bar-inner {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.vt-bar-info { flex: 1; }

.vt-bar-btn {
  background: var(--vt-lime);
  color: var(--vt-ink);
  border: 0;
  border-radius: var(--vt-radius-sm);
  padding: 14px 20px;
  font: 700 15px/1 var(--vt-font);
  cursor: pointer;
}

.vt-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 20;
}

.vt-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 21;
  background: var(--vt-surface);
  border-radius: 24px 24px 0 0;
  border-top: 1px solid var(--vt-line);
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  max-width: 560px;
  margin: 0 auto;
  transform: translateY(110%);
  transition: transform 0.25s ease;
}
.vt-sheet.is-open { transform: translateY(0); }

.vt-sheet-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 8px;
}
.vt-sheet .vt-thumb { width: 88px; height: 88px; font-size: 38px; }

.vt-qty {
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: center;
  margin: 20px 0;
}
.vt-qty button {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--vt-surface-2);
  border: 1px solid var(--vt-line);
  color: var(--vt-white);
  font-size: 22px;
  cursor: pointer;
}
.vt-qty span {
  min-width: 32px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
}

.vt-field { margin-bottom: 14px; }
.vt-label {
  display: block;
  font-size: 13px;
  color: var(--vt-muted);
  margin-bottom: 6px;
}

.vt-input {
  width: 100%;
  background: var(--vt-ink);
  border: 1px solid var(--vt-line);
  border-radius: 12px;
  padding: 14px;
  color: var(--vt-white);
  font: 400 16px var(--vt-font);
  outline: none;
}
.vt-input:focus { border-color: var(--vt-lime); }
.vt-input::placeholder { color: #5B6472; }

.vt-pay { display: flex; gap: 8px; }
.vt-pay .vt-chip { flex: 1; text-align: center; padding: 13px 10px; }

.vt-summary {
  background: var(--vt-ink);
  border: 1px solid var(--vt-line);
  border-radius: 14px;
  padding: 14px;
  margin: 16px 0;
}
.vt-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  margin: 6px 0;
  color: var(--vt-muted);
}
.vt-summary-row.total {
  font-size: 16px;
  font-weight: 700;
  color: var(--vt-white);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--vt-line);
}
.vt-summary-row.total span:last-child { color: var(--vt-lime); }

.vt-btn {
  width: 100%;
  border: 0;
  border-radius: var(--vt-radius-sm);
  padding: 16px;
  font: 700 16px/1 var(--vt-font);
  cursor: pointer;
}
.vt-btn-primary { background: var(--vt-lime); color: var(--vt-ink); }
.vt-btn-primary:active { background: var(--vt-lime-dark); }
.vt-btn-ghost {
  background: transparent;
  color: var(--vt-white);
  border: 1px solid var(--vt-line);
}
.vt-btn:disabled { opacity: 0.5; }

.vt-success { text-align: center; padding-top: 32px; }

.vt-check {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--vt-lime);
  color: var(--vt-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 900;
  margin: 0 auto 18px;
}

.vt-order { font-size: 30px; font-weight: 900; margin: 6px 0; }
.vt-note { font-size: 13px; color: var(--vt-muted); line-height: 1.7; }

.vt-back {
  background: none;
  border: 0;
  color: var(--vt-muted);
  font: 400 14px var(--vt-font);
  padding: 8px 0;
  margin-bottom: 8px;
  cursor: pointer;
}

.vt-toast {
  position: fixed;
  left: 50%;
  bottom: 110px;
  transform: translateX(-50%) translateY(20px);
  background: var(--vt-surface-2);
  border: 1px solid var(--vt-line);
  color: var(--vt-white);
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 30;
  white-space: nowrap;
}
.vt-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- аккаунт и профиль ---------- */

.vt-header-main { flex: 1; min-width: 0; }

.vt-avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid var(--vt-line);
  background: var(--vt-surface-2);
  color: var(--vt-lime);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 800 15px/1 var(--vt-font);
  overflow: hidden;
  padding: 0;
  cursor: pointer;
}

.vt-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vt-avatar-lg { width: 64px; height: 64px; font-size: 21px; }
.vt-avatar-sm { width: 38px; height: 38px; font-size: 13px; }

.vt-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--vt-surface);
  border: 1px solid var(--vt-line);
  border-radius: var(--vt-radius);
  padding: 16px;
}

.vt-profile-name { font-size: 19px; font-weight: 800; }

.vt-verified {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(198, 255, 61, 0.1);
  color: var(--vt-lime);
  font-size: 11px;
  font-weight: 600;
}

.vt-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.vt-stat {
  background: var(--vt-surface);
  border: 1px solid var(--vt-line);
  border-radius: var(--vt-radius-sm);
  padding: 12px 10px;
  min-width: 0;
}

.vt-stat b {
  display: block;
  font-size: 17px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vt-stat span {
  display: block;
  color: var(--vt-muted);
  font-size: 11px;
  margin-top: 4px;
}

.vt-h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 24px 0 10px;
}

.vt-account-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--vt-surface);
  border: 1px solid var(--vt-line);
  border-radius: var(--vt-radius-sm);
  padding: 10px 12px;
  margin-bottom: 16px;
}

.vt-account-strip b { font-size: 14px; }

.vt-order-card {
  background: var(--vt-surface);
  border: 1px solid var(--vt-line);
  border-radius: var(--vt-radius-sm);
  padding: 14px;
  margin-bottom: 10px;
}

.vt-order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.vt-order-top b { font-size: 15px; }

.vt-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--vt-surface-2);
  color: var(--vt-muted);
}
.vt-badge.is-new { background: rgba(198, 255, 61, 0.12); color: var(--vt-lime); }
.vt-badge.is-packed { background: rgba(77, 208, 255, 0.12); color: #4DD0FF; }
.vt-badge.is-issued { background: rgba(198, 255, 61, 0.12); color: var(--vt-lime); }
.vt-badge.is-cancelled { background: rgba(255, 77, 77, 0.12); color: var(--vt-danger); }

.vt-order-items {
  font-size: 13px;
  line-height: 1.55;
  margin: 8px 0;
  color: var(--vt-white);
}

.vt-empty {
  background: var(--vt-surface);
  border: 1px dashed var(--vt-line);
  border-radius: var(--vt-radius-sm);
  padding: 22px 16px;
  text-align: center;
  font-size: 14px;
}

.vt-empty-icon { font-size: 26px; margin-bottom: 6px; }

.vt-demo-reset { margin-top: 18px; }

/* ---------- фото и группы каталога ---------- */

.vt-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 2px 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.vt-section-head:first-child { margin-top: 0; }

.vt-brand {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--vt-lime);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.vt-thumb {
  position: relative;
  overflow: hidden;
}

.vt-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 13px;
}

.vt-thumb-fallback {
  font-size: 30px;
  line-height: 1;
}

.vt-stock { font-weight: 600; color: var(--vt-muted); }
.vt-stock.is-last { color: #FFB020; }
.vt-stock.is-out { color: var(--vt-danger); }

.vt-card { cursor: pointer; }

.vt-card.is-out .vt-thumb img { filter: grayscale(1); }

@media (max-width: 360px) {
  .vt-stat b { font-size: 15px; }
  .vt-card { grid-template-columns: 64px minmax(0, 1fr); }
  .vt-thumb { width: 64px; height: 64px; }
}
