:root {
  --bg:          #0B1220;
  --card:        #111827;
  --card-2:      #1C2536;
  --card-3:      #141f31;
  --accent:      #4BA6FF;
  --accent-dim:  rgba(75,166,255,0.10);
  --accent-glow: rgba(75,166,255,0.18);
  --text:        #D9E2F2;
  --muted:       #8EA3C7;
  --silver:      #C0C7D6;
  --border:      rgba(255,255,255,0.07);
  --border-a:    rgba(75,166,255,0.22);
  --border-s:    rgba(192,199,214,0.13);
  --green:       #4ADE80;
  --app-w:       520px;
  --r:           20px;
  --r-sm:        12px;
  --nav-h:       64px;
}

*, *::before, *::after {
  box-sizing: border-box; margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html { background: #070d18; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  overflow-x: hidden;
}

/* ── App shell ─────────────────────────────────────────── */
.app-wrap {
  width: 100%;
  max-width: var(--app-w);
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
  position: relative;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04);
}

.screen {
  display: none;
  min-height: 100vh;
  /* extra bottom padding = nav height + safe area + content clearance */
  padding: 16px 18px calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 110px);
  background: var(--bg);
}
.screen.active { display: block; }
.bottom-spacer { height: 8px; }

/* ── Top bar ───────────────────────────────────────────── */
.top-bar {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 8px 0 4px; margin-bottom: 4px;
}
.top-logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(145deg, #182d4a 0%, #0c1420 100%);
  border: 1.5px solid rgba(75,166,255,0.45);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 14px rgba(75,166,255,0.16); flex-shrink: 0;
}
.logo-icon span { font-size: 13px; font-weight: 800; color: var(--accent); letter-spacing: -0.5px; }
.logo-text {
  font-size: 20px; font-weight: 800; letter-spacing: 3.5px;
  color: var(--text); text-transform: uppercase;
  display: flex; align-items: center; gap: 9px;
}
.badge-beta {
  font-size: 8.5px; font-weight: 700; letter-spacing: 1.2px;
  background: transparent; color: rgba(192,199,214,0.50);
  border: 1px solid rgba(192,199,214,0.14); border-radius: 5px;
  padding: 2px 7px; text-transform: uppercase;
}
.top-user { display: flex; align-items: center; gap: 8px; }
.tg-username {
  font-size: 12px; color: var(--muted);
  max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.avatar-circle {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--card-2); border: 1px solid var(--border-s);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--silver);
}
.personal-label { font-size: 11.5px; color: rgba(142,163,199,0.65); margin-bottom: 18px; }

/* ── Hero card ─────────────────────────────────────────── */
.hero-card {
  position: relative;
  background: linear-gradient(150deg, #0e1f3c 0%, #0f1c30 55%, #0c1422 100%);
  border-radius: 24px;
  padding: 28px 24px 26px;
  margin-bottom: 26px;
  overflow: hidden;
  border: 1px solid rgba(75,166,255,0.17);
  box-shadow:
    0 1px 0 0 rgba(192,199,214,0.16) inset,
    0 16px 56px rgba(0,0,0,0.50),
    inset 0 0 80px rgba(75,166,255,0.055);
}
.hero-card::before {
  content: '';
  position: absolute; top: 0; left: 8%; right: 8%; height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(192,199,214,0.30) 35%,
    rgba(75,166,255,0.25) 65%,
    transparent 100%);
}
.hero-glow {
  position: absolute; top: -90px; right: -70px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(75,166,255,0.10) 0%, transparent 58%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-tag {
  font-size: 9px; font-weight: 700; letter-spacing: 2px;
  color: rgba(192,199,214,0.50); text-transform: uppercase; margin-bottom: 12px;
}
.hero-title {
  font-size: 24px; font-weight: 800; line-height: 1.22;
  color: var(--text); margin-bottom: 10px; letter-spacing: -0.5px;
}
.hero-sub {
  font-size: 13.5px; color: rgba(142,163,199,0.82); line-height: 1.65; margin-bottom: 22px;
}
.hero-btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 14px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: none; transition: all 0.14s ease;
  font-family: inherit; letter-spacing: 0.15px;
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-accent {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 22px rgba(75,166,255,0.34);
  font-weight: 700;
}
.btn-accent:hover { background: #5cb2ff; box-shadow: 0 6px 28px rgba(75,166,255,0.40); }

.btn-ice {
  background: rgba(75,166,255,0.10);
  color: var(--text);
  border: 1px solid rgba(75,166,255,0.32);
}
.btn-ice:hover { background: rgba(75,166,255,0.17); border-color: rgba(75,166,255,0.45); }

.btn-ghost {
  background: transparent; color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.13); }

.btn-full  { width: 100%; }
.btn-sm    { padding: 10px 18px; font-size: 13px; border-radius: 11px; }
.btn-xs    { padding: 7px 14px;  font-size: 11.5px; border-radius: 12px; }

/* Card open buttons — premium secondary */
.btn-card-open {
  background: rgba(75,166,255,0.10);
  color: #D9E2F2;
  border: 1px solid rgba(75,166,255,0.45);
  font-weight: 600; letter-spacing: 0.15px;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}
.btn-card-open:hover  { background: rgba(75,166,255,0.18); border-color: rgba(75,166,255,0.60); color: #fff; }
.btn-card-open:active { background: rgba(75,166,255,0.24); }

/* ── Section label ─────────────────────────────────────── */
.section-label {
  font-size: 9.5px; font-weight: 700; letter-spacing: 1.6px;
  color: rgba(142,163,199,0.60); text-transform: uppercase; margin-bottom: 12px;
}

/* ── Quick grid ────────────────────────────────────────── */
.quick-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; margin-bottom: 22px;
}
.quick-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 18px; padding: 16px 6px 13px;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  cursor: pointer; transition: all 0.14s; font-family: inherit;
}
.quick-card:hover  { border-color: rgba(255,255,255,0.11); background: var(--card-2); }
.quick-card:active { transform: scale(0.94); }
.quick-ico {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(192,199,214,0.55);
}
.quick-ico svg { width: 22px; height: 22px; display: block; }
.quick-name { font-size: 9.5px; font-weight: 600; color: rgba(142,163,199,0.70); text-align: center; line-height: 1.3; }

/* ── Banner ────────────────────────────────────────────── */
.banner-card {
  background: var(--card-3); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px; padding: 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-bottom: 24px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.banner-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.banner-sub   { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.banner-text  { flex: 1; min-width: 0; }

/* ── Popular grid ──────────────────────────────────────── */
.popular-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.pop-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 18px; padding: 16px 10px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; transition: border-color 0.14s, box-shadow 0.14s;
}
.pop-card:hover  { border-color: rgba(255,255,255,0.11); box-shadow: 0 4px 24px rgba(0,0,0,0.22); }
.pop-card:active { transform: scale(0.96); }
.pop-thumb {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--card-3); border: 1px solid var(--border-s);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.pop-ico-svg { width: 24px; height: 24px; display: block; color: var(--silver); opacity: 0.52; }
.pop-name {
  font-size: 10.5px; font-weight: 600; color: var(--text);
  text-align: center; line-height: 1.3;
}
/* slightly more readable tag — #8EA3C7, 10px */
.pop-tag {
  font-size: 10px; font-weight: 500;
  color: var(--muted);           /* #8EA3C7 */
  text-transform: lowercase; letter-spacing: 0.2px; text-align: center;
}
.pop-btn { margin-top: 5px; width: 100%; justify-content: center; }

/* ── "How it works" block ──────────────────────────────── */
.how-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 16px 18px 2px;
  margin-bottom: 4px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.how-step {
  display: flex; align-items: flex-start; gap: 14px;
  padding-bottom: 12px;
}
.how-num {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  background: rgba(75,166,255,0.10); border: 1px solid rgba(75,166,255,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: var(--accent);
  margin-top: 1px;
}
.how-text { flex: 1; }
.how-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.how-sub   { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.how-divider {
  border-top: 1px solid rgba(255,255,255,0.05);
  margin: 0 0 18px;
}

/* ── Inner header ──────────────────────────────────────── */
.inner-header { display: flex; align-items: center; gap: 14px; padding: 4px 0 20px; }
.back-btn {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; color: var(--muted); transition: all 0.14s;
}
.back-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.13); }
.back-btn svg { width: 20px; height: 20px; display: block; }
.inner-title { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }

/* ── Form card ─────────────────────────────────────────── */
.form-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 20px 20px 22px;
  display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px;
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
  color: rgba(142,163,199,0.65); text-transform: uppercase;
}
.field input, .field textarea {
  background: var(--card-2); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-sm); color: var(--text);
  font-size: 15px; padding: 13px 14px; outline: none;
  transition: border 0.14s, box-shadow 0.14s; font-family: inherit; width: 100%;
}
.field input:focus, .field textarea:focus {
  border-color: rgba(75,166,255,0.38);
  box-shadow: 0 0 0 3px rgba(75,166,255,0.08);
}
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,0.15); }
.field textarea { resize: none; min-height: 84px; }

/* ── Success ───────────────────────────────────────────── */
.success-block {
  display: none; flex-direction: column; align-items: center; text-align: center;
  padding: 48px 24px; gap: 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; margin-bottom: 16px;
}
.success-block.visible { display: flex; }
.success-icon-wrap { width: 64px; height: 64px; }
.success-title { font-size: 22px; font-weight: 700; }
.success-sub { font-size: 14px; color: var(--muted); line-height: 1.65; max-width: 280px; }

/* ── Catalog grid ──────────────────────────────────────── */
.catalog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 18px 14px 14px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  transition: border-color 0.14s, box-shadow 0.14s; cursor: pointer;
}
.cat-card:hover  { border-color: rgba(255,255,255,0.11); box-shadow: 0 4px 28px rgba(0,0,0,0.22); }
.cat-card:active { transform: scale(0.97); }
.cat-thumb {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--card-3); border: 1px solid var(--border-s);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px; align-self: center; color: var(--silver); opacity: 0.60;
}
.cat-thumb svg { width: 28px; height: 28px; display: block; }
.cat-name { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; }
.cat-sub  { font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.cat-tag  {
  font-size: 9px; font-weight: 700; letter-spacing: 0.8px;
  background: rgba(255,255,255,0.04); color: rgba(142,163,199,0.60);
  border: 1px solid rgba(255,255,255,0.07); border-radius: 5px;
  padding: 3px 8px; text-transform: uppercase; margin-bottom: 10px;
}
.cat-btn { width: 100%; }

/* ── Price result ──────────────────────────────────────── */
.price-result-card {
  display: none;
  background: var(--card); border: 1px solid var(--border-a);
  border-radius: 20px; padding: 20px; margin-bottom: 16px;
  box-shadow: 0 0 36px rgba(75,166,255,0.05);
}
.price-result-card.visible { display: block; }
.pr-row  { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 14px; }
.pr-lbl  { color: var(--muted); }
.pr-val  { font-weight: 500; color: var(--text); }
.pr-green  { color: var(--green) !important; }
.pr-accent { color: var(--accent) !important; font-size: 20px; font-weight: 800; }
.pr-divider { border-top: 1px solid var(--border); margin: 6px 0; }
.pr-big .pr-lbl { font-weight: 700; font-size: 15px; color: var(--text); }
.pr-badge-wrap { margin-top: 12px; }
.pr-badge {
  display: inline-block; background: var(--accent-dim); color: var(--accent);
  border-radius: 8px; padding: 5px 12px; font-size: 13px; font-weight: 700;
}

/* ── Profile ───────────────────────────────────────────── */
.profile-hero {
  display: flex; flex-direction: column; align-items: center;
  padding: 32px 0 26px; gap: 10px;
}
.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(145deg, #16263e, #0d1828);
  border: 1.5px solid rgba(75,166,255,0.30);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; color: var(--silver);
  box-shadow: 0 0 28px rgba(75,166,255,0.12);
}
.profile-name   { font-size: 20px; font-weight: 700; color: var(--text); }
.profile-status {
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  color: rgba(192,199,214,0.50); text-transform: uppercase;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(192,199,214,0.13);
  border-radius: 6px; padding: 3px 11px;
}
.profile-actions { display: flex; flex-direction: column; gap: 10px; }
.profile-btn {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 16px 18px;
  color: var(--text); text-decoration: none;
  font-family: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all 0.14s;
}
.profile-btn:hover  { border-color: rgba(255,255,255,0.11); background: var(--card-2); }
.profile-btn:active { transform: scale(0.98); }
.pbtn-icon  { color: rgba(192,199,214,0.50); display: flex; align-items: center; flex-shrink: 0; }
.pbtn-label { flex: 1; }
.pbtn-arrow { color: rgba(142,163,199,0.32); display: flex; align-items: center; }

/* ══════════════════════════════════════════════════════════
   BOTTOM NAV — bulletproof for Telegram WebView
   Root cause: SVG without explicit w/h attrs → renders at
   300×150 default. <button> → gets system ButtonFace (white).
   Fix: explicit attrs in HTML + !important in CSS.
══════════════════════════════════════════════════════════ */
.bottom-nav {
  position: fixed !important;
  bottom: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 100% !important;
  max-width: var(--app-w) !important;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)) !important;
  padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  background: rgba(8, 14, 24, 0.97) !important;
  border-top: 1px solid rgba(255,255,255,0.08) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 9999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-around !important;
  box-sizing: border-box !important;
}

/* side borders on desktop */
@media (min-width: 521px) {
  .bottom-nav {
    border-left:  1px solid rgba(255,255,255,0.05) !important;
    border-right: 1px solid rgba(255,255,255,0.05) !important;
  }
}

/* Strip all browser/WebView defaults from nav buttons */
.bottom-nav button,
.bottom-nav a {
  background: transparent !important;
  background-color: transparent !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  box-shadow: none !important;
}

.nav-item {
  flex: 1 1 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 0 !important;
  height: var(--nav-h) !important;
  min-width: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  outline: none !important;
  color: #8EA3C7 !important;
  cursor: pointer;
  font-family: inherit !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.2px !important;
  border-radius: 12px !important;
  position: relative !important;
  text-decoration: none !important;
  transition: color 0.14s;
}
.nav-item:active { opacity: 0.7; }

/* Active: icy blue + soft pill */
.nav-item.active {
  color: #4BA6FF !important;
  font-weight: 600 !important;
}
.nav-item.active::before {
  content: '';
  position: absolute; top: 8px;
  width: 40px; height: 26px; border-radius: 9px;
  background: rgba(75,166,255,0.12);
  border: 1px solid rgba(75,166,255,0.16);
  pointer-events: none;
}

/* SVG icons: explicit sizing, transparent bg, correct colours */
.nav-ico,
.bottom-nav svg {
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  flex-shrink: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  overflow: visible !important;
  position: relative !important;
  z-index: 1 !important;
}

/* Force fill:none on every SVG child (rect defaults to fill:black) */
.bottom-nav svg path,
.bottom-nav svg polyline,
.bottom-nav svg line,
.bottom-nav svg rect,
.bottom-nav svg circle {
  fill: none !important;
}

/* Label span */
.nav-item span {
  display: block !important;
  background: transparent !important;
  position: relative !important;
  z-index: 1 !important;
  line-height: 1 !important;
}

/* ── Logo image ────────────────────────────────────────── */
.logo-img {
  height: 30px;
  width: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}
.top-logo { display: flex; align-items: center; gap: 10px; }

/* ── Hero background image ─────────────────────────────── */
.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  border-radius: 22px;
  z-index: 0;
  opacity: 0.72;
  pointer-events: none;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  background: linear-gradient(
    105deg,
    rgba(9,15,28,0.92) 0%,
    rgba(9,15,28,0.78) 45%,
    rgba(9,15,28,0.28) 100%
  );
  z-index: 1;
  pointer-events: none;
}
.hero-card::before { z-index: 4; }
.hero-glow         { z-index: 2; }
.hero-content      { position: relative; z-index: 3; }

/* ── Popular grid — real product photos ────────────────── */
.pop-thumb {
  width: 100%;
  height: 84px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card-3);
  border: 1px solid var(--border-s);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  flex-shrink: 0;
  position: relative;
}
.pop-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 13px;
  background: linear-gradient(180deg, transparent 55%, rgba(8,13,24,0.38) 100%);
  pointer-events: none;
  z-index: 1;
}
.pop-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 13px;
}

/* ── Catalog grid — real product photos ────────────────── */
.cat-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card-3);
  border: 1px solid var(--border-s);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  align-self: stretch;
  opacity: 1;
}
.cat-thumb svg { width: 28px; height: 28px; display: block; opacity: 0.50; }
.cat-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 13px;
}

/* ── Packaging block ───────────────────────────────────── */
.packaging-block {
  margin-top: 16px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  background: var(--card);
  border: 1px solid rgba(75,166,255,0.20);
  box-shadow:
    0 0 32px rgba(75,166,255,0.07),
    inset 0 1px 0 rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
}
.packaging-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  border-radius: 19px 19px 0 0;
}
.packaging-text {
  padding: 16px 18px 18px;
}
.packaging-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 5px;
}
.packaging-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 430px) {
  :root { --app-w: 430px; }
  .screen        { padding-left: 14px; padding-right: 14px; }
  .hero-card     { padding: 22px 18px 20px; }
  .hero-title    { font-size: 22px; }
  .quick-grid    { gap: 8px; }
  .quick-card    { padding: 13px 4px 11px; }
  .popular-grid  { gap: 8px; }
  .pop-card      { padding: 14px 8px 12px; }
  .catalog-grid  { gap: 10px; }
  .cat-card      { padding: 16px 12px 12px; }
  .form-card     { padding: 16px; }
  .packaging-img { height: 150px; }
}

/* ══════════════════════════════════════════════════════════
   NEW SCREENS — Welcome · Product · Cart · Favorites
══════════════════════════════════════════════════════════ */

/* ── Welcome screen ──────────────────────────────────────── */
.screen-welcome {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100dvh;
  padding: env(safe-area-inset-top, 24px) 0 calc(env(safe-area-inset-bottom, 0px) + 36px) !important;
}
.screen-welcome.active { display: flex !important; }

.wlc-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
}
.wlc-crystal-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 36px;
}
.wlc-hex {
  position: absolute;
  border-radius: 28px;
  transform: rotate(45deg);
}
.wlc-hex.outer {
  width: 100px; height: 100px;
  background: linear-gradient(135deg, rgba(75,166,255,0.10) 0%, transparent 100%);
  border: 1px solid rgba(75,166,255,0.22);
  animation: wlc-spin 14s linear infinite;
}
.wlc-hex.inner {
  width: 68px; height: 68px;
  background: linear-gradient(135deg, rgba(75,166,255,0.07) 0%, transparent 100%);
  border: 1px solid rgba(75,166,255,0.16);
  animation: wlc-spin 9s linear infinite reverse;
}
@keyframes wlc-spin { from { transform: rotate(45deg); } to { transform: rotate(405deg); } }

.logo-icon-xl {
  width: 54px; height: 54px;
  border-radius: 16px;
  background: linear-gradient(145deg, #1a3150 0%, #0d1828 100%);
  border: 1.5px solid rgba(75,166,255,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 28px rgba(75,166,255,0.25), inset 0 1px 0 rgba(255,255,255,0.08);
  position: relative; z-index: 2;
}
.logo-icon-xl span {
  font-size: 19px; font-weight: 800; color: var(--accent); letter-spacing: -0.5px;
}

.wlc-brand {
  font-size: 34px; font-weight: 900; letter-spacing: 7px;
  color: var(--text); text-transform: uppercase; margin-bottom: 16px;
}
.wlc-tagline {
  font-size: 12.5px; font-weight: 500; letter-spacing: 1.8px;
  color: var(--muted); text-transform: uppercase; line-height: 2;
}
.wlc-actions {
  padding: 0 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.wlc-terms {
  font-size: 10.5px; color: rgba(142,163,199,0.38);
  text-align: center; line-height: 1.7; margin-top: 4px;
}

/* ── Ghost button (for welcome) ──────────────────────────── */
.btn-ghost {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.12);
  color: var(--silver);
}
.btn-ghost:hover { border-color: rgba(75,166,255,0.35); color: var(--accent); }

/* ── Top-bar cart + favorites icons ──────────────────────── */
.top-ico-btn {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--silver);
  flex-shrink: 0;
  transition: background .14s, border-color .14s, color .14s;
  font-family: inherit;
}
.top-ico-btn:hover  { background: rgba(75,166,255,0.10); border-color: rgba(75,166,255,0.28); color: var(--accent); }
.top-ico-btn:active { transform: scale(0.92); }

.top-cart-wrap { position: relative; }

.cart-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 17px; height: 17px; border-radius: 9px;
  background: var(--accent); color: #fff;
  font-size: 9px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  pointer-events: none;
  border: 2px solid var(--bg);
  line-height: 1;
}

/* ── Product screen ──────────────────────────────────────── */
.screen-product {
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-top: 16px !important;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 90px) !important;
}
.prod-header {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 18px 14px;
}
.prod-header .back-btn { flex-shrink: 0; }
.prod-header-right {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
}
.prod-title-small {
  font-size: 15px; font-weight: 700;
  color: var(--text);
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.icon-btn-sq {
  width: 36px; height: 36px;
  border-radius: 11px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--silver);
  transition: all .14s; font-family: inherit;
}
.icon-btn-sq:hover  { background: rgba(75,166,255,0.12); border-color: rgba(75,166,255,0.32); }
.icon-btn-sq:active { transform: scale(0.93); }

.prod-img-wrap {
  width: 100%; aspect-ratio: 1 / 1;
  max-height: 320px;
  position: relative; overflow: hidden;
  background: var(--card);
}
.prod-img { width: 100%; height: 100%; object-fit: cover; display: block; }

.prod-original-badge {
  position: absolute; bottom: 14px; right: 14px;
  background: rgba(9,15,28,0.78); backdrop-filter: blur(8px);
  border: 1px solid rgba(75,166,255,0.30); border-radius: 9px;
  padding: 5px 11px;
  font-size: 10.5px; font-weight: 700; color: var(--accent); letter-spacing: 0.2px;
}

.prod-body { padding: 20px 18px 0; }

.prod-brand-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.prod-brand {
  font-size: 11px; font-weight: 700; letter-spacing: 1.6px;
  color: var(--accent); text-transform: uppercase;
}
.prod-category {
  font-size: 10.5px; color: var(--muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 5px; padding: 2px 8px;
}
.prod-name {
  font-size: 22px; font-weight: 800; color: var(--text);
  line-height: 1.2; letter-spacing: -0.4px; margin-bottom: 10px;
}
.prod-price {
  font-size: 26px; font-weight: 800; color: var(--text);
  letter-spacing: -0.5px; margin-bottom: 24px;
}
.prod-section-label {
  font-size: 9px; font-weight: 700; letter-spacing: 1.5px;
  color: rgba(142,163,199,0.55); text-transform: uppercase;
  margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.prod-size-link {
  font-size: 10px; font-weight: 500; color: var(--accent);
  text-transform: none; letter-spacing: 0; cursor: pointer;
}
.prod-sizes {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px;
}
.size-chip {
  height: 40px; min-width: 50px;
  border-radius: 12px;
  background: var(--card);
  border: 1.5px solid rgba(255,255,255,0.10);
  color: var(--text); font-size: 13.5px; font-weight: 600;
  cursor: pointer; font-family: inherit; padding: 0 14px;
  transition: all .14s;
}
.size-chip:hover  { border-color: rgba(75,166,255,0.38); }
.size-chip.active {
  background: rgba(75,166,255,0.13);
  border-color: var(--accent); color: var(--accent);
  box-shadow: 0 0 0 3px rgba(75,166,255,0.12);
}
.prod-sizes.shake { animation: shake-x .4s ease; }
@keyframes shake-x {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-7px); }
  40%     { transform: translateX(7px); }
  60%     { transform: translateX(-4px); }
  80%     { transform: translateX(4px); }
}
.prod-desc {
  font-size: 13.5px; color: rgba(142,163,199,0.82); line-height: 1.75;
}

.prod-action-bar {
  position: fixed;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--app-w);
  padding: 13px 18px 14px;
  background: rgba(9,15,28,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.07);
  z-index: 200; box-sizing: border-box;
}
.prod-cart-btn {
  width: 100%; display: flex; align-items: center;
  justify-content: center; gap: 10px;
  font-size: 15px; font-weight: 700;
  padding: 15px 24px; border-radius: 16px;
  transition: background .2s, box-shadow .2s;
}

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  padding: 60px 24px 40px; gap: 10px;
}
.empty-ico   { color: rgba(142,163,199,0.28); margin-bottom: 8px; }
.empty-title { font-size: 18px; font-weight: 700; color: var(--text); }
.empty-sub   { font-size: 13.5px; color: var(--muted); line-height: 1.65; max-width: 260px; }

/* ── Cart items ──────────────────────────────────────────── */
.cart-items-list {
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px;
}
.cart-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 18px; padding: 14px;
}
.cart-item-img-wrap {
  width: 72px; height: 72px;
  border-radius: 12px; overflow: hidden;
  flex-shrink: 0; background: var(--card-3);
}
.cart-item-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-item-img-ph { width: 100%; height: 100%; background: var(--card-3); }
.cart-item-info  { flex: 1; min-width: 0; }
.cart-item-name  { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 4px; line-height: 1.3; }
.cart-item-meta  { font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.cart-item-price { font-size: 15px; font-weight: 700; color: var(--text); }
.cart-item-remove {
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: rgba(142,163,199,0.55);
  flex-shrink: 0; transition: all .14s; font-family: inherit;
}
.cart-item-remove:hover {
  background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.32); color: #ef4444;
}

/* ── Cart summary ────────────────────────────────────────── */
.cart-summary {
  background: var(--card);
  border: 1px solid rgba(75,166,255,0.18);
  border-radius: 20px; padding: 18px 18px 20px;
  box-shadow: 0 0 28px rgba(75,166,255,0.06);
}
.cart-summary-row {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 16px;
}
.cart-sum-lbl { font-size: 15px; color: var(--muted); font-weight: 500; }
.cart-sum-val { font-size: 22px; font-weight: 800; color: var(--text); }

.clear-btn {
  margin-left: auto;
  font-size: 11.5px; font-weight: 600;
  color: rgba(239,68,68,0.65);
  background: transparent; border: none;
  cursor: pointer; font-family: inherit;
  padding: 4px 0; transition: color .14s;
}
.clear-btn:hover { color: #ef4444; }

.bottom-spacer { height: 24px; }
