:root {
  --bg: #071018;
  --card: #121c26;
  --card2: #16222d;
  --line: #1e2c38;
  --green: #22c55e;
  --green2: #16a34a;
  --text: #f4f7fb;
  --muted: #8b9aaa;
  --danger: #f43f5e;
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
body { padding-bottom: env(safe-area-inset-bottom); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
#app { max-width: 520px; margin: 0 auto; min-height: 100dvh; position: relative; padding-bottom: 86px; }
@media (min-width: 768px) {
  #app { max-width: 1100px; }
}
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 40px 1fr 40px 40px auto;
  gap: 6px; align-items: center;
  padding: 10px 12px 8px;
  background: linear-gradient(#071018, #071018ee);
  backdrop-filter: blur(10px);
}
.icon-btn {
  width: 40px; height: 40px; border: 0; border-radius: 12px;
  background: transparent; color: var(--text); font-size: 18px; cursor: pointer;
}
.brand { display: flex; gap: 8px; align-items: center; min-width: 0; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: #12321f; border-radius: 10px; color: var(--green);
}
.brand strong { display: block; color: var(--green); font-size: 20px; line-height: 1; }
.brand small { display: block; color: var(--muted); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wallet {
  display: flex; align-items: center; gap: 8px;
  background: #10261a; border: 1px solid #1d5c38; color: var(--green);
  border-radius: 999px; padding: 6px 8px 6px 12px; font-weight: 700; font-size: 13px;
}
.wallet b {
  width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #06210f;
  display: grid; place-items: center;
}
.search-bar { padding: 0 12px 8px; }
.search-bar input {
  width: 100%; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; outline: none;
}
#view { padding: 8px 12px 20px; }
.hero {
  position: relative; overflow: hidden; border-radius: 22px;
  background: radial-gradient(120% 80% at 90% 20%, #1b8f4a55, transparent 50%),
              linear-gradient(135deg, #0c1a14, #10241c 55%, #0a141c);
  min-height: 168px; padding: 18px 16px;
  border: 1px solid #1a3d2c;
}
.hero h2 { margin: 8px 0 6px; font-size: 26px; line-height: .95; letter-spacing: -0.4px; }
.hero p { margin: 0; color: #c5d5c9; font-size: 12px; max-width: 54%; }
.hero .kicker { color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: .8px; }
.hero-art { position: absolute; right: 6px; top: 18px; display: flex; gap: 4px; align-items: end; }
.gadget {
  width: 42px; height: 52px; border-radius: 8px;
  background: linear-gradient(#2a3340, #111820); border: 1px solid #3a4654;
}
.gadget.wide { width: 58px; height: 38px; }
.gadget.tall { height: 64px; width: 30px; background: linear-gradient(#e8eef5, #9aa7b8); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--green); color: #06210f; border: 0; border-radius: 999px;
  padding: 10px 14px; font-weight: 800; cursor: pointer;
}
.btn.ghost { background: #163225; color: #d7ffe7; border: 1px solid #245c3e; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.section-h { display: flex; justify-content: space-between; align-items: center; margin: 18px 2px 10px; }
.section-h h3 { margin: 0; font-size: 18px; }
.section-h a { color: var(--green); font-size: 13px; font-weight: 700; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.cat {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  min-height: 92px; padding: 8px 4px 10px; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
}
.cat .pic { width: 46px; height: 42px; border-radius: 10px; margin-top: 4px; }
.cat span { font-size: 10px; color: #d5dee6; }
.prod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 700px) { .prod-grid, .prod-grid.featured { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .prod-grid, .prod-grid.featured { grid-template-columns: repeat(4, 1fr); } }
.prod {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 10px;
  display: flex; flex-direction: column; min-width: 0;
}
.badge {
  align-self: flex-start; font-size: 10px; font-weight: 800; padding: 4px 8px;
  border-radius: 999px; background: #1d3d2a; color: #b7f7cc;
}
.badge.hot { background: #3a2a12; color: #ffd79a; }
.badge.new { background: #1a3348; color: #9ad4ff; }
.badge.sale { background: #3a1230; color: #ffb4e0; }
.prod .pic { height: auto; border-radius: 12px; margin: 8px 0; }
.prod h4 { margin: 8px 0 4px; font-size: 13px; line-height: 1.25; min-height: 32px; }
.prod-meta { margin: 0 0 6px; color: var(--muted); font-size: 11px; min-height: 14px; }
.prod-actions { display: grid; gap: 6px; margin-top: 4px; }
.prod-actions .btn { padding: 8px 10px; font-size: 12px; }
.price-old { color: var(--muted); font-size: 12px; text-decoration: line-through; margin-top: auto; }
.filters {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px;
}
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); }
.filters input, .filters select { background: #0c151c; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.filters button { grid-column: 1 / -1; }
@media (min-width: 800px) {
  .filters { grid-template-columns: 1.5fr 1fr 1fr .7fr .7fr auto; align-items: end; }
  .filters button { grid-column: auto; }
}
.chip-row { display: flex; gap: 6px; overflow: auto; padding-bottom: 10px; }
.stars { color: #f5c542; font-size: 11px; }
.stars b { color: var(--muted); font-weight: 500; }
.price { color: var(--green); font-size: 16px; font-weight: 800; margin-top: auto; }
.inst { color: var(--muted); font-size: 11px; margin-bottom: 8px; }
.freight {
  margin-top: 14px; background: linear-gradient(90deg, #10291c, #0e221c);
  border: 1px solid #1d5c38; border-radius: 18px; padding: 12px 14px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.freight strong { color: var(--green); }
.freight small { color: #b7c9bc; }
.tabbar {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(1100px, 100%); display: grid; grid-template-columns: repeat(5, 1fr);
  background: #0b151c; border-top: 1px solid var(--line);
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  z-index: 30;
}
.tabbar a {
  text-align: center; color: #7f8d99; font-size: 10px; position: relative;
  display: flex; flex-direction: column; gap: 2px; align-items: center;
}
.tabbar a.on { color: var(--green); }
.tabbar i {
  position: absolute; top: -4px; right: 18px; background: var(--green); color: #06210f;
  min-width: 16px; height: 16px; border-radius: 99px; font-style: normal; font-size: 10px; font-weight: 800;
  display: grid; place-items: center; padding: 0 4px;
}
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; margin-bottom: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.field span { font-size: 12px; color: var(--muted); }
.field input, .field select, .field textarea {
  background: #0c151c; border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  outline: none;
}
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }
.muted { color: var(--muted); }
.list-item { display: flex; gap: 10px; align-items: center; }
.list-item .pic { width: 56px; height: 56px; border-radius: 12px; flex: none; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: var(--card2); }
.pix { word-break: break-all; background: #0c151c; border-radius: 12px; padding: 10px; font-size: 12px; }
#toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  background: #12321f; color: #d9ffe8; border: 1px solid #1d5c38;
  padding: 10px 14px; border-radius: 12px; display: none; z-index: 50; max-width: 90%;
}
.thumb { background-size: cover; background-position: center; background-repeat: no-repeat; }
.thumb.phone { background: linear-gradient(#3a3f4a, #1a1d24); box-shadow: inset 0 0 0 2px #6a7380; }
.thumb.laptop { background: linear-gradient(180deg, #2d6bff 0 55%, #1a1d24 56%); }
.thumb.tablet { background: linear-gradient(135deg, #7c3aed, #2563eb); }
.thumb.console { background: linear-gradient(#e8eef5, #9aa3ad); }
.thumb.watch { background: radial-gradient(circle at 50% 40%, #222, #111 70%); }
.thumb.tv { background: linear-gradient(180deg, #0ea5e9, #111827); }
.thumb.headphone { background: radial-gradient(circle, #222 30%, #16a34a); }
.thumb.airfryer { background: linear-gradient(#1f2937, #111827); }
.thumb.scooter { background: linear-gradient(#111827, #22c55e); }
.thumb.cable { background: linear-gradient(#334155, #0f172a); }
.thumb.buds { background: radial-gradient(circle at 50% 40%, #fff, #94a3b8 40%, #0f172a 41%); }
.thumb.box { background: linear-gradient(#1e293b, #0f172a); }
.thumb.perfume { background: radial-gradient(circle at 50% 30%, #d4af37 0 8%, #1b1520 9%, #0d1118 100%); }
.perfume-hero {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin: 8px 0 14px; padding: 18px 16px; border-radius: 22px;
  background: radial-gradient(120% 90% at 90% 10%, #d4af3726, transparent 46%),
              linear-gradient(135deg, #161018, #1c1420 55%, #0c1218);
  border: 1px solid #3d2d1c;
}
.perfume-hero .kicker { color: #e8c36a; font-size: 11px; font-weight: 800; letter-spacing: .8px; }
.perfume-hero h2 { margin: 6px 0 6px; font-size: 28px; letter-spacing: .4px; }
.perfume-hero p { margin: 0; color: #d7cbb6; font-size: 13px; max-width: 70%; }
.perfume-hero.inpage { margin-top: 0; }
.gender-tag {
  align-self: flex-start; font-size: 10px; font-weight: 800; padding: 3px 8px;
  border-radius: 999px; margin-bottom: 6px; background: #1d3d2a; color: #b7f7cc;
}
.gender-tag.masculino { background: #16324a; color: #9ad4ff; }
.gender-tag.feminino { background: #3a1630; color: #ffb4e0; }
.gender-tag.unissex { background: #3a2a12; color: #ffd79a; }
.prod-perfume .pic-wrap { box-shadow: inset 0 0 0 1px #2b2418; }
@media (min-width: 800px) {
  .filters.perfume-filters { grid-template-columns: 1.4fr .9fr 1fr .6fr .6fr 1fr auto; }
}
.pic-wrap, .zoom-wrap { display:block; background:#0b1218; border-radius:14px; overflow:hidden; aspect-ratio:1 / 1; width:100%; }
.zoom-wrap { max-width: 420px; margin: 0 auto; }
.pic-img { width:100%; height:100%; object-fit:contain; object-position:center; display:block; background:#0b1218; }
.pic-empty {
  width:100%; height:100%; min-height:140px; display:grid; place-items:center; text-align:center;
  background:#0b1218; color:#8b9aaa; font-size:12px; font-weight:700; padding:12px; border-radius:14px;
}
.pic-empty.tall { min-height:220px; }
.gal-stage { position:relative; }
.gal-arrow {
  position:absolute; top:50%; transform:translateY(-50%); z-index:2;
  width:36px; height:36px; border:0; border-radius:50%; cursor:pointer;
  background:#12321fcc; color:#d7ffe7; font-size:22px; line-height:1;
}
.gal-arrow.prev { left:8px; }
.gal-arrow.next { right:8px; }
.cat-img { height:46px; width:46px; border-radius:10px; margin-top:4px; object-fit:cover; }
.cart-img { width:64px; height:64px; object-fit:contain; object-position:center; border-radius:12px; background:#0b1218; flex:none; }
.gal-main { width:100%; height:100%; object-fit:contain; object-position:center; display:block; cursor:zoom-in; background:#0b1218; }
.gal-row { display:flex; gap:8px; overflow:auto; margin:8px 0 12px; }
.gal-th { border:1px solid var(--line); background:#0b1218; border-radius:10px; padding:0; width:58px; height:58px; overflow:hidden; cursor:pointer; }
.gal-th.on { border-color: var(--green); }
.gal-th-img { width:58px; height:58px; object-fit:contain; object-position:center; background:#0b1218; }
.gal-stage { touch-action: pan-y; user-select: none; }
.zoom-ov { position:fixed; inset:0; background:#000d; z-index:80; display:grid; place-items:center; padding:12px; }
.zoom-ov img { max-width:100%; max-height:100%; object-fit:contain; }
.ship-opt { display:flex; gap:10px; align-items:center; padding:10px 0; border-bottom:1px solid var(--line); }
.tot-card .tot-line { font-size:18px; color:var(--green); }
.cep-busy { color: var(--green); }
.okbox { background: #10291c; border: 1px solid #1d5c38; color: #c8ffd8; border-radius: 12px; padding: 10px; font-size: 13px; }
.drawer {
  position: fixed; inset: 0; background: #0008; z-index: 40; display: none;
}
.drawer .panel { width: min(280px, 86%); height: 100%; background: #0d171f; padding: 18px; }
.hello-card {
  background: linear-gradient(135deg, #0c1a14, #10241c 55%, #0a141c);
  border: 1px solid #1a3d2c; border-radius: 22px; padding: 18px 16px; margin-bottom: 12px;
}
.hello-card h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -0.3px; }
.hello-card p { margin: 0; color: #c5d5c9; font-size: 13px; }
.shortcut-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.shortcut-row a {
  background: #163225; border: 1px solid #245c3e; color: #d7ffe7; border-radius: 14px;
  padding: 10px 6px; text-align: center; font-size: 11px; font-weight: 700;
}
.pass-wrap { display: flex; gap: 8px; }
.pass-wrap input { flex: 1; background: #0c151c; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.eye { background: #163225; color: #d7ffe7; border: 1px solid #245c3e; border-radius: 12px; padding: 0 10px; font-size: 12px; font-weight: 700; }
.pass-meter { height: 6px; background: #0c151c; border-radius: 99px; overflow: hidden; margin-top: 6px; }
.pass-meter i { display: block; height: 100%; width: 0; background: var(--green); transition: width .2s; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 8px 0 12px; }
.check a { color: var(--green); text-decoration: underline; }
.err { color: var(--danger); font-size: 12px; min-height: 0; display: block; }
.steps { display: flex; gap: 4px; list-style: none; padding: 0; margin: 0 0 12px; overflow: auto; }
.steps li { flex: none; font-size: 11px; color: var(--muted); padding: 6px 10px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); }
.steps li.on { color: #06210f; background: var(--green); border-color: var(--green); font-weight: 800; }
.steps li.done { color: #b7f7cc; border-color: #1d5c38; }
.track { list-style: none; padding: 0; margin: 0 0 12px; }
.track li { position: relative; padding: 0 0 14px 22px; color: var(--muted); border-left: 2px solid var(--line); margin-left: 8px; }
.track li:last-child { border-left-color: transparent; padding-bottom: 0; }
.track li.done { color: var(--text); }
.track li.done::before { background: var(--green); }
.track li::before { content: ""; position: absolute; left: -7px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.track small { display: block; color: var(--muted); font-size: 11px; }
.sticky-buy { position: sticky; bottom: 88px; z-index: 15; background: #071018ee; padding: 8px 0; }
.link-btn { background: none; border: 0; color: var(--danger); font-size: 12px; padding: 0; }
.unread { border-color: #1d5c38; }
.pix-qr { width: 180px; height: 180px; object-fit: contain; display: block; margin: 10px auto; background: #fff; border-radius: 12px; padding: 8px; }
.warn { background: #2a1518; border: 1px solid #5c1d2a; color: #ffd0d8; border-radius: 12px; padding: 10px; font-size: 13px; }
#btnBell[data-unread]:not([data-unread=""]) { position: relative; }
#btnBell[data-unread]:not([data-unread=""])::after {
  content: attr(data-unread); position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px; border-radius: 99px; background: var(--green); color: #06210f;
  font-size: 10px; font-weight: 800; display: grid; place-items: center; padding: 0 4px;
}
