/* =====================================================
   B7 STORE — Visual Premium (Ereemby/Imperium style)
   SOMENTE visual. Funções 100% intactas.
   ===================================================== */

:root {
  --bg:       #08080f;
  --panel:    #0f0f1a;
  --panel2:   #14142a;
  --line:     rgba(130,80,255,.22);
  --line2:    rgba(130,80,255,.38);
  --text:     #f0eeff;
  --muted:    #8878aa;
  --purple:   #9b3fff;
  --purple2:  #c760ff;
  --blue:     #4d7bff;
  --blue2:    #6fa0ff;
  --green:    #1fe6a3;
  --danger:   #ff4d5e;
  --warn:     #ffb930;
  --r:        12px;
  --r2:       18px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 40% at 20% 0%, rgba(100,40,220,.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 30% at 90% 10%, rgba(70,100,255,.07) 0%, transparent 50%),
    linear-gradient(180deg, rgba(16,10,30,.82) 0%, var(--bg) 34%);
  background-attachment: fixed;
}

/* Subtle grid lines */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(130,80,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130,80,255,.022) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

button, input, textarea, select { font: inherit; }
button { border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.hidden { display: none !important; }

/* ───────── PARTICLES CANVAS ───────── */
#b7Particles {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: .82;
  mix-blend-mode: screen;
  filter: saturate(1.2);
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) { #b7Particles { opacity: .58; } }

/* ───────── AUTH MODAL ───────── */
.web-auth {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(8px);
}
.auth-card {
  width: min(420px, 100%);
  display: grid;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--line2);
  border-radius: var(--r2);
  background: rgba(15,10,30,.96);
  box-shadow: 0 0 60px rgba(130,80,255,.2), 0 24px 48px rgba(0,0,0,.5);
  position: relative;
}
.auth-card h1 { font-size: 22px; font-weight: 900; }
.auth-card form { display: grid; gap: 10px; }
.auth-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.auth-close:hover { background: rgba(255,255,255,.16); }
.auth-switch { width: 100%; min-height: 40px; border-radius: var(--r); background: transparent; border: 1px solid var(--line2); color: var(--purple2); font-weight: 700; }
.negative { color: var(--danger) !important; }
.positive { color: var(--green) !important; }
.warning  { color: var(--warn)  !important; }

/* ───────── INPUTS ───────── */
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line2);
  border-radius: var(--r);
  background: rgba(255,255,255,.05);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
  transition: border-color .2s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(155,63,255,.15);
}
::placeholder { color: var(--muted); }

/* ───────── APP WRAPPER ───────── */
.app {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px 60px;
  position: relative;
  z-index: 2;
}

/* ───────── HEADER / TOPBAR ───────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  margin: 0 -16px 20px;
  padding: 10px 16px;
  background: rgba(8,8,15,.88);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(130,80,255,.28);
  box-shadow: 0 4px 32px rgba(0,0,0,.4), 0 0 0 0 transparent;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  border: 0;
  padding: 0;
  min-height: 40px;
  order: 1;
}
.brand:hover { opacity: .85; }
.brand-logo {
  width: 36px; height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), #6020c0);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 0 18px rgba(155,63,255,.5);
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand b { display: block; font-size: 15px; font-weight: 900; letter-spacing: -.03em; }
.brand small { display: none; }

.header-search {
  order: 2;
  flex: 1;
  max-width: 520px;
  justify-self: center;
}
.header-search input {
  height: 38px;
  min-height: 38px;
  border-radius: 999px;
  padding: 0 16px;
  font-size: 13px;
  background: rgba(255,255,255,.06);
  border-color: rgba(130,80,255,.3);
}
.header-search input:focus { border-color: var(--purple); }

.header-stats {
  order: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}
.stat-balance, .stat-purchases {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: var(--r);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.stat-balance span::before { content: '💰 '; }
.stat-purchases span::before { content: '📦 '; }
.header-stats span { font-size: 11px; color: var(--muted); }
.header-stats strong { font-size: 12px; font-weight: 900; margin: 0; }

.top-actions {
  order: 4;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Cart pill — purple, glow */
.cart-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 62px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--purple), #7020d0);
  color: white;
  font-weight: 900;
  border: 0;
  box-shadow: 0 0 16px rgba(155,63,255,.55), 0 4px 12px rgba(0,0,0,.3);
  transition: box-shadow .2s, transform .15s;
}
.cart-pill:hover { transform: translateY(-1px); box-shadow: 0 0 24px rgba(155,63,255,.75); }
.cart-pill span { font-size: 18px; filter: drop-shadow(0 0 6px rgba(255,255,255,.8)); }
.cart-pill b { min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: white; color: #1a0040; font-size: 11px; font-weight: 900; }

#logoutBtn {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}
#logoutBtn:hover { background: rgba(155,63,255,.15); border-color: var(--purple); }

/* Hide blocks per spec */
.wallet, .main-nav, .trust-strip, .community-card, .catalog-head,
.site-notice, .removed-notice { display: none !important; }

/* ───────── CATEGORY NAV ───────── */
.category-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.category-nav::-webkit-scrollbar { display: none; }
.category-nav button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition: all .18s;
}
.category-nav button:hover { border-color: var(--purple); color: var(--text); }
.category-nav button.active {
  background: rgba(155,63,255,.2);
  border-color: var(--purple);
  color: white;
  box-shadow: 0 0 12px rgba(155,63,255,.3);
}

/* ───────── HERO CAROUSEL ───────── */
.hero-carousel-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 5;
  min-height: 140px;
  max-height: 280px;
  border-radius: var(--r2);
  overflow: hidden;
  margin-bottom: 24px;
  cursor: pointer;
  border: 1px solid var(--line2);
  box-shadow: 0 0 40px rgba(130,80,255,.15);
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity .5s ease;
}
.hero-slide.active { opacity: 1; }
.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8,8,15,.7) 0%, transparent 60%),
              linear-gradient(0deg, rgba(8,8,15,.8) 0%, transparent 50%);
}
.hero-copy {
  position: absolute;
  bottom: 18px;
  left: 24px;
  z-index: 2;
  max-width: 480px;
}
.hero-kicker {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(155,63,255,.6);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}
.hero-copy h1 {
  font-size: clamp(16px, 3vw, 26px);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}
.hero-copy p {
  font-size: 13px;
  color: rgba(255,255,255,.7);
  margin-bottom: 12px;
}
.hero-actions { display: flex; gap: 8px; }
.hero-actions button {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.hero-actions button:first-child {
  background: var(--purple);
  color: white;
  box-shadow: 0 0 16px rgba(155,63,255,.5);
}
.hero-actions button:last-child {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: white;
}
.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,.5);
  border: 1px solid rgba(255,255,255,.2);
  color: white;
  font-size: 18px;
  display: grid;
  place-items: center;
}
.hero-prev { left: 10px; }
.hero-next { right: 10px; }
.hero-dots {
  position: absolute;
  bottom: 10px;
  right: 14px;
  z-index: 3;
  display: flex;
  gap: 5px;
}
.hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  border: 0;
  padding: 0;
  transition: all .2s;
}
.hero-dot.active { width: 18px; border-radius: 3px; background: var(--purple); }

/* ───────── CATALOG GRID ───────── */
.catalog { display: grid; gap: 32px; }

.product-section > h2 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.product-section > h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 22px;
  border-radius: 99px;
  background: linear-gradient(var(--purple), var(--purple2));
  flex-shrink: 0;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

/* ───────── PRODUCT CARD ───────── */
.product-card {
  border-radius: var(--r2);
  background: var(--panel);
  border: 1px solid rgba(130,80,255,.2);
  overflow: hidden;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(155,63,255,.6);
  box-shadow: 0 8px 32px rgba(155,63,255,.2), 0 0 0 1px rgba(155,63,255,.15);
}

.product-open {
  width: 100%;
  background: transparent;
  color: inherit;
  text-align: left;
  border: 0;
  padding: 0;
  display: block;
}

/* Card image */
.cover {
  width: 100%;
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
  background: #0c0c18;
  display: block;
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s;
}
.product-card:hover .cover img { transform: none; }
.cover span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 900;
  color: rgba(255,255,255,.5);
}

/* Remove delivery badges per spec */
.cover em,
.cover::after,
.cover::before { display: none !important; }

/* Plans badge — small, bottom-right */
.cover .plans-badge {
  display: block !important;
  position: absolute;
  bottom: 7px;
  right: 7px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(155,63,255,.85);
  backdrop-filter: blur(4px);
  font-size: 10px;
  font-weight: 800;
  color: white;
  font-style: normal;
}

/* Card info */
.product-info {
  padding: 10px 12px 6px;
  flex: 1;
}
.product-info h2 {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 0;
  min-height: 36px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Hide category / stock text on cards */
.product-info span,
.product-info p,
.product-info small { display: none !important; }

/* Card footer */
.product-footer {
  padding: 6px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.price-old {
  font-size: 11px;
  color: var(--muted);
  text-decoration: line-through;
}
.price-discount {
  font-size: 10px;
  font-weight: 800;
  color: var(--green);
  background: rgba(31,230,163,.12);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
}
.product-footer > strong {
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}
.price-pix {
  font-size: 10px;
  color: var(--muted);
  margin-top: -2px;
}
.card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  margin-top: 4px;
}
/* Buy button on card */
.details-only, .card-buy-btn {
  min-height: 34px;
  border-radius: var(--r);
  background: linear-gradient(135deg, var(--purple), #7020d0);
  color: white;
  font-size: 12px;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  transition: opacity .15s, box-shadow .2s;
}
.details-only:hover, .card-buy-btn:hover {
  opacity: .9;
  box-shadow: 0 0 14px rgba(155,63,255,.5);
}
/* Cart icon button */
.add-cart-btn {
  min-height: 34px;
  min-width: 34px;
  width: 34px;
  border-radius: var(--r);
  background: rgba(155,63,255,.15);
  border: 1px solid rgba(155,63,255,.35);
  color: var(--purple2);
  font-size: 16px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s;
}
.add-cart-btn:hover { background: rgba(155,63,255,.28); }
.add-cart-btn span { filter: none; }
.add-cart-btn b { display: none; }

/* ───────── PRODUCT DETAIL PAGE ───────── */
.back-btn, .floating-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.back-btn:hover, .floating-back:hover { border-color: var(--purple); color: var(--text); }

.detail-breadcrumb {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

.premium-detail {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--line2);
  border-radius: var(--r2);
  background: var(--panel);
  box-shadow: 0 0 60px rgba(130,80,255,.08);
}

.detail-main { min-width: 0; }

.detail-sold {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 8px;
}
.detail-sold::before { content: '🔥'; font-size: 14px; }

.premium-detail h1 {
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -.03em;
}

.premium-cover {
  aspect-ratio: 16/9;
  border-radius: var(--r2);
  overflow: hidden;
  position: relative;
  background: #0c0c18;
  margin-bottom: 20px;
}
.premium-cover img { width: 100%; height: 100%; object-fit: cover; }
.premium-cover span {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 56px; font-weight: 900;
  color: rgba(255,255,255,.3);
}
/* Remove delivery badge in detail too */
.premium-cover em,
.detail-cover em { display: none !important; }

/* ─── VARIATIONS ─── */
.variations-section {
  margin: 16px 0 20px;
  padding: 18px;
  border: 1px solid var(--line2);
  border-radius: var(--r2);
  background: rgba(155,63,255,.04);
}
.variations-section h3 {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--purple2);
  margin-bottom: 12px;
}
.variations-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.var-btn {
  padding: 8px 14px;
  border-radius: var(--r);
  border: 1px solid var(--line2);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s;
  text-align: left;
  line-height: 1.3;
}
.var-btn:hover { border-color: var(--purple); color: var(--text); }
.var-btn.active {
  border-color: var(--purple);
  background: rgba(155,63,255,.18);
  color: white;
  box-shadow: 0 0 10px rgba(155,63,255,.3);
}
.var-btn .var-name { display: block; font-weight: 800; }
.var-btn .var-price { display: block; font-size: 11px; color: var(--purple2); margin-top: 2px; }
.var-btn.active .var-price { color: #c890ff; }
.var-btn .var-stock { display: block; font-size: 10px; color: var(--muted); margin-top: 1px; }

/* Price row */
.detail-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.detail-price {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  letter-spacing: -.04em;
}
.detail-pix-label {
  font-size: 13px;
  color: var(--muted);
}
.auto-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(31,230,163,.12);
  border: 1px solid rgba(31,230,163,.25);
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}

.safe-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(31,230,163,.2);
  border-radius: var(--r);
  background: rgba(31,230,163,.05);
  margin-bottom: 16px;
  font-size: 13px;
}
.safe-card strong { display: block; font-size: 13px; font-weight: 800; }
.safe-card span { font-size: 12px; color: var(--muted); }

.premium-detail h3 {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: 8px;
}
.premium-description {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(0,0,0,.2);
  color: rgba(255,255,255,.75);
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-line;
}

/* Buy panel */
.buy-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line2);
  border-radius: var(--r2);
  background: rgba(155,63,255,.04);
  align-self: start;
  position: sticky;
  top: 80px;
}
.buy-panel h2 {
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.buy-price {
  font-size: 32px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -.04em;
}
.buy-panel > span { font-size: 12px; color: var(--muted); }
.buy-panel .payment-box {
  padding: 10px 12px;
  border-radius: var(--r);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  font-size: 12px;
}
.buy-panel .payment-box strong { display: block; font-weight: 800; margin-bottom: 3px; }

.qty-control {
  display: inline-grid;
  grid-template-columns: 34px 44px 34px;
  align-items: center;
  border: 1px solid var(--line2);
  border-radius: var(--r);
  overflow: hidden;
}
.qty-control button {
  min-height: 36px;
  background: rgba(255,255,255,.06);
  color: white;
  font-size: 18px;
  font-weight: 900;
  border-radius: 0;
}
.qty-control button:disabled { opacity: .3; cursor: default; }
.qty-control span { display: grid; place-items: center; height: 36px; font-size: 14px; font-weight: 900; }

.static-qty button { cursor: default; }

/* Buttons */
.primary {
  min-height: 46px;
  border-radius: var(--r);
  background: linear-gradient(135deg, var(--purple), #7020d0);
  color: white;
  font-weight: 900;
  font-size: 15px;
  border: 0;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(155,63,255,.4);
  transition: opacity .15s, box-shadow .2s;
  width: 100%;
}
.primary:hover { opacity: .9; box-shadow: 0 4px 28px rgba(155,63,255,.6); }

.secondary {
  min-height: 42px;
  border-radius: var(--r);
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line2);
  color: var(--text);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
  transition: background .15s;
}
.secondary:hover { background: rgba(155,63,255,.12); border-color: var(--purple); }

.ghost {
  min-height: 38px;
  border-radius: var(--r);
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  width: 100%;
}
.ghost:hover { border-color: var(--line2); color: var(--text); }

/* ───────── REVIEWS & SIMILAR ───────── */
.reviews-section, .similar-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.reviews-section h2, .similar-section h2 { font-size: 18px; font-weight: 800; margin-bottom: 16px; }

.reviews-row, .similar-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--purple) transparent;
}
.review-card {
  flex: 0 0 200px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  overflow: hidden;
  transition: border-color .2s;
}
.review-card:hover { border-color: rgba(155,63,255,.4); }
.review-card img { width: 100%; height: 110px; object-fit: cover; }
.review-card div { padding: 10px 12px; }
.review-card b { display: block; font-size: 13px; font-weight: 800; }
.review-card strong { display: block; color: #ffd447; letter-spacing: 1px; margin: 5px 0; font-size: 13px; }
.review-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.similar-row .product-card { flex: 0 0 170px; }

/* ───────── CART ───────── */
.page-title { margin-bottom: 18px; }
.page-title p { font-size: 12px; color: var(--muted); }
.page-title h1 { font-size: 26px; font-weight: 900; margin-top: 4px; }

.cart-list { display: grid; gap: 10px; margin-bottom: 14px; }
.cart-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
}
.cart-item h3 { font-size: 15px; font-weight: 800; margin-bottom: 6px; }
.cart-item p { font-size: 12px; color: var(--muted); line-height: 1.4; margin-bottom: 8px; }
.cart-item strong { font-size: 18px; font-weight: 900; }
.cart-item > button { min-height: 34px; padding: 0 12px; border-radius: var(--r); background: rgba(255,77,94,.15); border: 1px solid rgba(255,77,94,.3); color: var(--danger); font-size: 12px; font-weight: 700; }

.checkout-box, .form-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line2);
  border-radius: var(--r2);
  background: var(--panel);
}
.checkout-box div { display: flex; align-items: center; justify-content: space-between; }
.checkout-box span { color: var(--muted); font-size: 13px; }
.checkout-box strong { font-size: 26px; font-weight: 900; }

/* ───────── DELIVERY ───────── */
.delivery {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 18px;
  border: 1px solid rgba(31,230,163,.3);
  border-radius: var(--r2);
  background: rgba(31,230,163,.04);
}
.delivery h2 { font-size: 20px; color: var(--green); }
.delivery p { color: rgba(255,255,255,.7); font-size: 13px; }

.delivered {
  padding: 14px;
  border: 1px solid rgba(31,230,163,.2);
  border-radius: var(--r);
  background: rgba(0,20,15,.5);
  display: grid;
  gap: 8px;
}
.delivered h3 { font-size: 15px; font-weight: 800; }
.delivered div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid rgba(255,255,255,.06);
  align-items: center;
}
.delivered span { color: var(--green); font-size: 12px; font-weight: 800; }
.delivered b { word-break: break-word; font-size: 14px; }
.delivered div button { min-height: 30px; padding: 0 10px; border-radius: 8px; background: rgba(31,230,163,.15); border: 1px solid rgba(31,230,163,.3); color: var(--green); font-size: 12px; font-weight: 700; }
.copy-all { min-height: 36px; border-radius: var(--r); background: rgba(31,230,163,.1); border: 1px solid rgba(31,230,163,.3); color: #9ffde0; font-weight: 800; font-size: 13px; width: 100%; margin-top: 4px; }

.delivered-info {
  margin-top: 8px;
  padding: 12px;
  border-top: 1px solid rgba(31,230,163,.2);
  border-radius: var(--r);
  background: rgba(8,20,38,.6);
  color: rgba(255,255,255,.7);
  line-height: 1.5;
}
.delivered-info h4 { color: var(--green); font-size: 12px; text-transform: uppercase; margin-bottom: 6px; }
.delivered-info p { margin: 0; white-space: pre-line; font-size: 13px; }

/* ───────── PURCHASES ───────── */
.purchases { display: grid; gap: 14px; }
.purchase-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--panel);
}
.purchase-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.purchase-head span { color: var(--muted); font-size: 12px; }
.purchase-head h2 { font-size: 16px; font-weight: 800; margin: 3px 0 0; }
.desc { font-size: 12px; color: var(--muted); margin: 2px 0 !important; }
.purchase-delivery { display: grid; gap: 8px; }

/* ───────── PIX ───────── */
.pix-card { display: grid; gap: 10px; margin-top: 12px; padding: 16px; border: 1px solid rgba(31,230,163,.25); border-radius: var(--r2); background: rgba(31,230,163,.04); }
.pix-card b { font-size: 18px; font-weight: 900; }
.pix-card p, .pix-card small { margin: 0; color: rgba(255,255,255,.7); font-size: 13px; }
.pix-qr { width: 200px; height: 200px; justify-self: center; padding: 10px; border-radius: var(--r); background: white; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.pix-card textarea { min-height: 100px; resize: vertical; font-size: 12px; }

/* ───────── MODAL ───────── */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px; background: rgba(0,0,0,.7); backdrop-filter: blur(6px); }
.modal-box { width: min(440px, 100%); padding: 22px; border: 1px solid var(--line2); border-radius: var(--r2); background: rgba(15,10,30,.97); box-shadow: 0 0 60px rgba(130,80,255,.2); }
.modal-box h2 { font-size: 20px; font-weight: 900; margin-bottom: 8px; }
.modal-box p { color: rgba(255,255,255,.7); margin-bottom: 12px; }

.confirm-summary { display: grid; gap: 8px; margin-top: 12px; }
.confirm-summary div { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: var(--r); background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.confirm-summary span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.confirm-summary b { font-size: 15px; font-weight: 900; }
.confirm-summary .negative b { color: var(--danger); }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 14px; }

/* ───────── TOAST ───────── */
.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20px;
  z-index: 80;
  min-width: 260px;
  max-width: min(480px, calc(100vw - 32px));
  padding: 12px 16px;
  border: 1px solid var(--line2);
  border-radius: 999px;
  background: rgba(15,10,30,.95);
  backdrop-filter: blur(12px);
  color: white;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 32px rgba(0,0,0,.4), 0 0 20px rgba(155,63,255,.2);
}
.toast button { margin-left: 10px; min-height: 28px; padding: 0 10px; border-radius: 999px; background: var(--purple); color: white; font-weight: 800; font-size: 12px; }

/* ───────── RECHARGE ───────── */
.form-card label { font-size: 13px; font-weight: 700; color: var(--muted); }

/* ───────── SUPPORT FAB ───────── */
.support-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1fcf7a, #15a85f);
  border: 2px solid rgba(255,255,255,.15);
  color: white;
  font-size: 22px;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 20px rgba(31,207,122,.4);
  transition: transform .2s;
}
.support-fab:hover { transform: scale(1.1); }

/* ───────── FOOTER ───────── */
.store-footer {
  display: none !important;
}

/* ───────── UTILS ───────── */
.loading, .empty {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: var(--r);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

/* ───────── TELEGRAM MODE ───────── */
.telegram-mode .app { width: 100% !important; max-width: 100% !important; }
.telegram-mode .ghost { display: none !important; }
.telegram-mode .header-stats { display: flex !important; }
.telegram-mode .buy-panel { position: static !important; }
.telegram-mode .store-footer { display: none !important; }

/* ───────── SITE MODE AUTH ───────── */
.site-mode:not(.authenticated) .header-stats { display: none !important; }
.site-mode.authenticated .header-stats,
.telegram-mode .header-stats { display: flex !important; }

/* ───────── RESPONSIVE: TABLET ───────── */
@media (max-width: 1024px) {
  .section-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .premium-detail { grid-template-columns: 1fr 300px; }
}

@media (max-width: 860px) {
  .section-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .premium-detail { grid-template-columns: 1fr; padding: 16px; }
  .buy-panel { position: static !important; }
  .modal-actions { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .app { padding: 0 12px 60px; }

  .topbar {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin: 0 -12px 16px;
    padding: 10px 12px;
    min-height: 54px;
  }
  .brand { order: 1; flex: 0 0 auto; }
  .top-actions { order: 2; margin-left: auto; }
  .header-stats { order: 3; flex: 0 1 auto; }
  .header-search { order: 4; flex: 1 0 100%; max-width: none; }
  .header-search input { height: 40px; border-radius: var(--r); }

  .section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cover { aspect-ratio: 16/9; }
  .product-info h2 { font-size: 12px; min-height: 30px; }
  .product-footer > strong { font-size: 15px; }
  .details-only, .card-buy-btn { min-height: 30px; font-size: 11px; }
  .add-cart-btn { min-height: 30px; min-width: 30px; width: 30px; font-size: 14px; }

  .premium-detail h1 { font-size: 22px; }
  .detail-price { font-size: 30px; }
  .hero-copy { display: none; }
  .hero-carousel-wrap { aspect-ratio: 16/6; min-height: 110px; }

  .cart-item { grid-template-columns: 1fr; }
  .cart-item strong, .cart-item > button { justify-self: start; }
}

@media (max-width: 480px) {
  .section-grid { gap: 8px; }
  .brand-logo { width: 30px; height: 30px; min-width: 30px; }
  .brand b { font-size: 13px; }
  .cover { aspect-ratio: 16/9; }
  .product-info h2 { font-size: 11px; }
  .cart-pill { min-width: 52px; min-height: 32px; }
  .reviews-row .review-card { flex-basis: 170px; }
  .similar-row .product-card { flex-basis: 145px; }
  .var-btn { padding: 7px 10px; font-size: 11px; }
}

@media (min-width: 1200px) {
  .section-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}


/* =====================================================
   ETAPA 1 — CORREÇÕES OBRIGATÓRIAS DE LAYOUT/RESPONSIVIDADE
   ===================================================== */
html {
  width: 100%;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}
body {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
}
body::before,
#b7Particles {
  pointer-events: none !important;
  position: fixed !important;
  z-index: 0 !important;
}
.app,
.store-footer {
  position: relative;
  z-index: 1;
}
.app { padding-bottom: 112px; }
.view,
.product-section,
.section-grid,
.product-card,
.product-open,
.product-info,
.product-footer,
.card-actions,
.cart-item,
.checkout-box,
.premium-detail,
.detail-main,
.buy-panel {
  min-width: 0;
  max-width: 100%;
}
img, svg, canvas { max-width: 100%; }
button { -webkit-tap-highlight-color: transparent; }

/* Faixa superior contínua, espaçada e sem quebra de linha. */
.top-ticker {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 32px;
  overflow: hidden;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(130,80,255,.14);
  background: rgba(8,8,15,.82);
  color: rgba(240,238,255,.82);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
  contain: layout paint;
}
.ticker-track {
  display: flex;
  width: max-content;
  min-width: 200%;
  align-items: center;
  will-change: transform;
  animation: b7Ticker 32s linear infinite;
}
.ticker-group {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 22px;
  min-width: 50%;
  padding: 0 18px;
  white-space: nowrap;
}
.ticker-group span,
.ticker-group i { flex: none; white-space: nowrap; }
.ticker-group i { color: rgba(199,96,255,.72); font-style: normal; }
@keyframes b7Ticker { to { transform: translate3d(-50%,0,0); } }

/* Header: blocos previsíveis e carrinho sem overflow. */
.topbar { width: auto; }
.brand,
.header-search,
.header-stats,
.top-actions { min-width: 0; }
.brand > span:last-child { min-width: 0; }
.brand b { white-space: nowrap; }
.top-actions { flex: 0 0 auto; }
#logoutBtn {
  flex: 0 0 auto;
  width: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-pill {
  position: relative;
  flex: 0 0 auto;
  width: auto;
  min-width: 62px;
  max-width: 88px;
  padding: 0 10px;
  overflow: hidden;
  white-space: nowrap;
}
.cart-pill span { flex: 0 0 auto; line-height: 1; }
.cart-pill b {
  position: static;
  flex: 0 0 auto;
  min-width: 20px;
  width: auto;
  max-width: 36px;
  padding: 0 5px;
  line-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Carrossel: controles sempre dentro do banner. */
.hero-carousel-wrap {
  isolation: isolate;
  max-width: 100%;
  touch-action: pan-y;
}
.hero-slide { max-width: 100%; }
.hero-nav { flex: none; line-height: 1; }
.hero-dots { max-width: calc(100% - 88px); }

/* Cards: conteúdo completo, sem título/preço/botão sobrepostos. */
.product-card { height: 100%; }
.product-open {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}
.product-info { flex: 1 0 auto; }
.product-info h2 {
  min-height: 0;
  display: block;
  overflow: visible;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.product-footer { margin-top: auto; }
.product-footer > div:first-child { min-height: 17px; }
.product-footer > strong {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.card-actions { align-items: stretch; }
.details-only,
.card-buy-btn {
  min-width: 0;
  max-width: 100%;
  padding: 0 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.add-cart-btn { flex: 0 0 auto; }

/* Botões voltar visíveis em todas as telas internas. */
.back-btn {
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
}
.checkout-back { white-space: normal; }

/* Suporte respeita bordas e safe-area; conteúdo ganha folga inferior. */
.support-fab {
  right: max(14px, env(safe-area-inset-right));
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 14px));
  margin: 0;
}

/* Nenhum texto longo pode criar scroll horizontal. */
.page-title,
.purchase-card,
.delivery,
.delivered,
.pix-card,
.modal-box,
.confirm-summary,
.premium-description {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 768px) {
  .app {
    width: 100%;
    max-width: 100%;
    padding: 0 12px 120px;
  }

  .topbar {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto;
    grid-template-areas:
      "brand actions"
      "stats stats"
      "search search";
    align-items: center;
    justify-content: stretch;
    column-gap: 10px;
    row-gap: 9px;
    width: auto;
    min-width: 0;
    margin: 0 -12px 16px;
    padding: 10px 12px;
  }
  .brand {
    grid-area: brand;
    width: auto;
    max-width: 100%;
    overflow: hidden;
  }
  .brand > span:last-child { overflow: hidden; }
  .brand b { overflow: hidden; text-overflow: ellipsis; }
  .top-actions {
    grid-area: actions;
    display: flex;
    justify-self: end;
    margin: 0;
    gap: 7px;
    max-width: 100%;
  }
  .header-stats {
    grid-area: stats;
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    width: 100%;
    gap: 8px;
  }
  .stat-balance,
  .stat-purchases {
    width: 100%;
    min-width: 0;
    justify-content: center;
    overflow: hidden;
  }
  .stat-balance span,
  .stat-purchases span,
  .header-stats strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .header-search {
    grid-area: search;
    width: 100%;
    max-width: none;
    justify-self: stretch;
  }
  .header-search input { min-width: 0; }
  #logoutBtn {
    max-width: 78px;
    min-height: 36px;
    padding: 0 12px;
  }
  .cart-pill {
    min-width: 60px;
    min-height: 36px;
    max-width: 86px;
    padding: 0 9px;
  }

  .hero-carousel-wrap {
    aspect-ratio: 16 / 6.5;
    min-height: 118px;
    max-height: 210px;
    margin-bottom: 18px;
  }
  .hero-nav {
    width: 34px;
    height: 34px;
    font-size: 22px;
    background: rgba(0,0,0,.58);
  }
  .hero-prev { left: 8px; }
  .hero-next { right: 8px; }
  .hero-dots {
    right: 50%;
    bottom: 9px;
    transform: translateX(50%);
    justify-content: center;
  }

  .section-grid { align-items: stretch; }
  .product-info { padding: 9px 9px 5px; }
  .product-info h2 { font-size: 12px; line-height: 1.32; }
  .product-footer { padding: 6px 9px 9px; gap: 5px; }
  .product-footer > strong {
    font-size: clamp(14px,4.2vw,17px);
    line-height: 1.1;
  }
  .price-old { font-size: 10px; }
  .price-discount { font-size: 9px; padding: 1px 4px; }
  .card-actions { gap: 5px; }
  .details-only,
  .card-buy-btn,
  .add-cart-btn { min-height: 34px; }

  .premium-detail { overflow: hidden; }
  .variations-grid { display: grid; grid-template-columns: 1fr; }
  .var-btn { width: 100%; }
  .detail-price-row { align-items: center; }
  .buy-panel { width: 100%; }

  .cart-item { overflow: hidden; }
  .cart-item > strong,
  .cart-item > button { max-width: 100%; }
  .checkout-box div { gap: 12px; }
  .checkout-box strong { min-width: 0; text-align: right; overflow-wrap: anywhere; }
  .modal { align-items: end; padding: 12px; }
  .modal-box {
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
  .modal-actions { grid-template-columns: 1fr; }

  .support-fab {
    width: 44px;
    height: 44px;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(16px, calc(env(safe-area-inset-bottom) + 12px));
    font-size: 19px;
    opacity: .92;
  }
  .toast { bottom: calc(72px + env(safe-area-inset-bottom)); }
}

@media (max-width: 380px) {
  .brand { gap: 7px; }
  .brand-logo { width: 29px; height: 29px; min-width: 29px; }
  .brand b { font-size: 12px; }
  #logoutBtn { max-width: 68px; padding: 0 9px; }
  .cart-pill { min-width: 56px; padding: 0 7px; gap: 4px; }
  .cart-pill span { font-size: 16px; }
  .cart-pill b { min-width: 19px; height: 19px; line-height: 19px; }
  .section-grid { gap: 7px; }
  .product-info,
  .product-footer { padding-left: 8px; padding-right: 8px; }
  .details-only,
  .card-buy-btn { font-size: 10px; padding: 0 4px; }
  .add-cart-btn { width: 32px; min-width: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; transform: none; }
  .ticker-group[aria-hidden="true"] { display: none; }
  .ticker-track { min-width: 100%; width: 100%; }
  .ticker-group { min-width: 100%; justify-content: center; overflow: hidden; }
}

/* Ajustes finais de validação: ticker realmente contínuo e suporte atrás dos cards no mobile. */
.ticker-track {
  width: max-content;
  min-width: 0;
}
.ticker-group {
  width: max-content;
  min-width: 100vw;
}

@media (max-width: 768px) {
  .app { z-index: 2; }
  .support-fab { z-index: 1; }
}

/* O trilho não pode encolher: garante repetição contínua sem salto. */
.ticker-track { flex: none; }

@media (max-width: 768px) {
  /* Mantém o suporte visível, compacto e afastado das bordas/área segura. */
  .app { z-index: 1; }
  .support-fab {
    z-index: 40;
    width: 42px;
    height: 42px;
    right: max(14px, env(safe-area-inset-right));
    bottom: max(20px, calc(env(safe-area-inset-bottom) + 16px));
  }
}



/* =====================================================
   ETAPA 1.1 — CENTRALIZAÇÃO MOBILE, IMAGENS E PARTÍCULAS
   ===================================================== */
.site-mode .app,
.telegram-mode .app {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* As artes atuais são 6000x3375 (16:9). Mantém a logo inteira. */
.cover,
.premium-cover {
  aspect-ratio: 16 / 9 !important;
  background: #0c0c18;
}
.cover img,
.premium-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  object-position: center center !important;
  padding: 0 !important;
}
.product-card:hover .cover img { transform: none !important; }

/* Canvas fica visível sobre o fundo, sempre atrás da interface. */
#b7Particles {
  display: block !important;
  visibility: visible !important;
  opacity: .82 !important;
  z-index: 0 !important;
}
body::before { z-index: 0 !important; }
.top-ticker,
.app,
.store-footer { position: relative; z-index: 1; }
.web-auth,
.modal,
.toast,
.support-fab { z-index: 40; }

@media (max-width: 768px) {
  .app {
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: auto !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    padding-bottom: calc(118px + env(safe-area-inset-bottom)) !important;
  }
  .topbar {
    width: auto !important;
    margin-left: -14px !important;
    margin-right: -14px !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
  .view,
  #homeView,
  #detailView,
  #cartView,
  #purchasesView,
  #rechargeView,
  .catalog,
  .product-section,
  .section-grid,
  .hero-carousel-wrap,
  .premium-detail {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-right: 0;
  }
  .section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: center;
  }
  .product-card { width: 100%; }
  .cover { aspect-ratio: 16 / 9 !important; }
  .premium-cover { aspect-ratio: 16 / 9 !important; }
  .hero-carousel-wrap { overflow: hidden; }

  /* Não desloca o catálogo; o suporte fica numa área inferior própria. */
  .support-fab {
    position: fixed !important;
    right: max(14px, env(safe-area-inset-right)) !important;
    bottom: max(86px, calc(72px + env(safe-area-inset-bottom))) !important;
    width: 44px !important;
    height: 44px !important;
  }

  .web-auth { padding: 16px; }
  .auth-card {
    width: min(100%, 420px);
    margin-inline: auto;
    padding: 24px;
  }
  .auth-card > p:first-of-type { padding-right: 28px; }
}

@media (max-width: 380px) {
  .app { padding-left: 11px !important; padding-right: 11px !important; }
  .topbar { margin-left: -11px !important; margin-right: -11px !important; padding-left: 11px !important; padding-right: 11px !important; }
  .section-grid { gap: 8px; }
}

/* Camadas finais: o modal de login sempre cobre o suporte flutuante. */
.web-auth { z-index: 100 !important; }
.modal { z-index: 90 !important; }
.toast { z-index: 110 !important; }
.support-fab { z-index: 40 !important; }


/* =====================================================
   ETAPA 1.2 — CONFIRMAÇÃO E SUPORTE MOBILE
   ===================================================== */
.header-support {
  display: none;
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.16);
  background: linear-gradient(135deg, #20d27d, #119c58);
  color: #fff;
  place-items: center;
  box-shadow: 0 4px 16px rgba(31,207,122,.32);
}
.header-support svg,
.support-fab svg {
  width: 21px;
  height: 21px;
  display: block;
  fill: currentColor;
}
.checkout-back {
  min-height: 44px;
  font-weight: 800;
}

@media (max-width: 768px) {
  /* No celular o suporte fica no cabeçalho e não cobre cards, badges ou botões. */
  .header-support { display: grid !important; }
  .support-fab { display: none !important; }
  .top-actions { gap: 6px !important; }
  .header-support { width: 34px; height: 34px; min-width: 34px; }
  .header-support svg { width: 19px; height: 19px; }
}

@media (min-width: 769px) {
  .header-support { display: none !important; }
  .support-fab { display: grid !important; }
}
