/* =====================================================================
   Vitrine RQ Phones — layout de "perfil de loja" (foco em celular)
   ===================================================================== */
body { padding-bottom: env(safe-area-inset-bottom); }
[data-theme="dark"] body {
  background:
    radial-gradient(90% 420px at 50% -120px, rgba(109,135,176,.38) 0%, rgba(109,135,176,0) 100%) no-repeat,
    var(--bg);
}
[data-theme="dark"] .avatar { border-color: var(--bg); }
[data-theme="dark"] .pc { background: linear-gradient(180deg, var(--surface) 0%, #0F192B 100%); }
[data-theme="dark"] .pc-media, [data-theme="dark"] .gal { background: radial-gradient(80% 70% at 50% 45%, #22355A 0%, var(--surface-2) 75%); }
[data-theme="dark"] .pill-btn { background: var(--surface); border-color: var(--line); }
[data-theme="dark"] .pbar { background: color-mix(in srgb, var(--bg) 85%, transparent); }
.wrap { max-width: 980px; }
.page.hidden { display: none; }

/* ---------- Cabeçalho de perfil ---------- */
.profile { display: flex; align-items: center; gap: 14px; padding-top: 18px; padding-bottom: 6px; }
.avatar {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none;
  border: 2px solid var(--surface); box-shadow: 0 0 0 2px var(--accent), var(--shadow); background: #F4F6FA;
}
.avatar.sm { width: 44px; height: 44px; box-shadow: 0 0 0 1.5px var(--accent); }
.pinfo { flex: 1; min-width: 0; }
.pinfo h1 { margin: 0; font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; display: flex; align-items: center; gap: 6px; }
.verified { width: 20px; height: 20px; color: var(--accent); flex: none; }
.slogan { margin: 3px 0 0; font-size: .85rem; color: var(--muted); line-height: 1.3; }
.handle { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: .85rem; color: var(--muted); text-decoration: none; }
.handle svg { width: 15px; height: 15px; }
.pactions { display: flex; gap: 8px; align-self: flex-start; }
.pactions .icon-btn { width: 40px; height: 40px; }

/* ---------- Botões Instagram / Contato ---------- */
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 18px; }
.contact-row .pill-btn:only-child, .contact-row .hidden + .pill-btn { grid-column: 1 / -1; }
.pill-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-weight: 700; font-size: .95rem; text-decoration: none;
}
.pill-btn svg { width: 19px; height: 19px; }
.pill-btn .wa-ico { color: var(--wa); }

/* ---------- Categorias (bolinhas) ---------- */
.stories { display: flex; gap: 16px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 14px; }
.stories::-webkit-scrollbar { display: none; }
.story { flex: none; display: grid; justify-items: center; gap: 6px; background: none; border: 0; padding: 0; font-size: .8rem; font-weight: 600; color: var(--muted); }
.story .ring { width: 66px; height: 66px; border-radius: 50%; padding: 3px; background: var(--line); }
.story[aria-pressed="true"] .ring { background: linear-gradient(135deg, var(--accent), var(--accent-strong)); }
.story[aria-pressed="true"] { color: var(--text); }
.story .ring > div { width: 100%; height: 100%; border-radius: 50%; background: var(--surface); border: 2px solid var(--surface); overflow: hidden; display: grid; place-items: center; }
.story img, .story svg { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Busca, modos, filtros ---------- */
.searchbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.searchbar .search { flex: 1; }
.searchbar .input { border-radius: 999px; min-height: 46px; }
.viewtoggle { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); flex: none; }
.viewtoggle button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: none; color: var(--muted); display: grid; place-items: center; }
.viewtoggle button svg { width: 18px; height: 18px; }
.viewtoggle button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.filterbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.filterbar .chips { flex: 1; min-width: 0; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.sortbox select {
  min-height: 38px; max-width: 150px; padding: 0 30px 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235F6878' stroke-width='2'%3E%3Cpath d='m8 9 4-4 4 4M8 15l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
  font-weight: 600; font-size: .85rem; appearance: none; -webkit-appearance: none; text-overflow: ellipsis;
}
@media (max-width: 480px) { .sortbox select { max-width: 118px; } .filterbar .chip { padding: 0 12px; } }
.count { font-size: .85rem; color: var(--muted); margin: 6px 2px 12px; }
.demo { background: var(--accent-soft); color: var(--accent-strong); border-radius: 12px; padding: 10px 14px; font-size: .85rem; }

/* ---------- Cartões ---------- */
.grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.pc { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; }
.pc-media { position: relative; background: var(--surface-2); aspect-ratio: 1 / 1.05; }
.slides { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; position: relative; }
.slide > img, .slide > svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 10%; box-sizing: border-box; }
.slide > img.photo { object-fit: cover; padding: 0; }
.arrow {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 2; width: 30px; height: 30px; border-radius: 50%;
  border: 0; background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.15); display: grid; place-items: center;
}
.arrow svg { width: 15px; height: 15px; }
.arrow.prev { left: 8px; } .arrow.next { right: 8px; }
.dots { position: absolute; bottom: 8px; left: 50%; translate: -50% 0; display: flex; gap: 4px; padding: 3px 6px; border-radius: 99px; background: rgba(0,0,0,.28); }
.dots i { width: 5px; height: 5px; border-radius: 99px; background: rgba(255,255,255,.6); transition: width .2s; }
.dots i.on { width: 14px; background: #fff; }
.pc-body { padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pc-body h3 { margin: 0; font-size: .98rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.pc-sub { font-size: .8rem; color: var(--muted); }
.pc .badge { align-self: flex-start; margin: 4px 0 2px; }
.from { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.pc-price { font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.inst { font-size: .76rem; color: var(--muted); }
.inst b { color: var(--text); font-weight: 600; }
.cdots { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 4px; }
.cdot { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.18); padding: 0; box-shadow: 0 0 0 2px var(--surface); }
.cdot[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--accent); }
.pc .card-wa { margin-top: 8px; width: 100%; min-height: 40px; border-radius: 999px; font-size: .88rem; gap: 6px; padding: 0 10px; }
.pc .card-wa svg { width: 17px; height: 17px; }
.pc .details-btn { margin-top: auto; min-height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: .88rem; width: 100%; }

/* Lista */
.grid.list { grid-template-columns: 1fr; }
.grid.list .pc { flex-direction: row; border-radius: 18px; }
.grid.list .pc-media { width: 128px; flex: none; aspect-ratio: auto; }
.grid.list .arrow, .grid.list .dots { display: none; }
.grid.list .pc .details-btn { display: none; }
.grid.list .pc .card-wa { margin-top: 6px; min-height: 36px; }

/* ---------- Página do aparelho ---------- */
.pbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.pbar .back { display: flex; align-items: center; gap: 8px; border: 0; background: none; font-weight: 700; padding: 0; min-width: 0; }
.pbar .back img { width: 34px; height: 34px; border-radius: 50%; }
.pbar .back span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbar .spacer { flex: 1; }
.pd { max-width: 720px; margin: 0 auto; padding: 4px 16px 120px; }
.gal { position: relative; border-radius: 26px; overflow: hidden; background: var(--surface-2); height: min(420px, 92vw); }
.gal .slide > img, .gal .slide > svg { padding: 8%; }
.gal .slide > img.photo { padding: 0; }
.gal .arrow { width: 38px; height: 38px; }
.gal .counter { position: absolute; top: 12px; right: 12px; z-index: 2; font-size: .72rem; font-weight: 700; color: #fff; background: rgba(0,0,0,.45); padding: 3px 9px; border-radius: 99px; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: none; }
.thumbs button { flex: none; width: 60px; height: 60px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); padding: 4px; position: relative; overflow: hidden; }
.thumbs button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.thumbs img, .thumbs svg { width: 100%; height: 100%; object-fit: contain; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 6px; }
.tag-soft { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.pd h2 { margin: 4px 0 14px; font-size: 1.45rem; letter-spacing: -.02em; }
.pd h2 small { color: var(--muted); font-weight: 600; font-size: 1.15rem; }
.sec-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .85rem; color: var(--muted); margin: 14px 0 8px; }
.sec-h .hint { font-size: .72rem; }
.choice { display: flex; gap: 8px; flex-wrap: wrap; }
.choice button { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: 8px; }
.choice button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); box-shadow: inset 0 0 0 1px var(--accent); }
.choice .swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.18); }
.infobox { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: var(--surface-2); border-radius: 16px; padding: 12px 14px; margin-top: 10px; }
.infobox small { display: block; font-size: .75rem; color: var(--muted); }
.infobox b { font-size: .95rem; }
.infobox svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.obs { margin: 10px 2px 0; font-size: .92rem; color: var(--muted); }
.pricebox { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
.pricebox .lbl { font-size: .8rem; color: var(--muted); }
.pricebox .big { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.pricebox .inst { font-size: .88rem; margin-top: 2px; }
.linkbtn { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; border: 0; background: none; padding: 0; font-size: .88rem; font-weight: 600; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.linkbtn svg { width: 17px; height: 17px; }
.cta { margin-top: 18px; width: 100%; min-height: 56px; border-radius: 999px; font-size: 1.02rem; box-shadow: 0 8px 22px rgba(31,175,87,.3); }
.related { margin-top: 34px; }
.related h3 { margin: 0 0 12px; font-size: 1.1rem; }
.rel-row { display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
@media (min-width: 720px) { .rel-row { grid-auto-columns: 30%; } }

/* ---------- Simulador ---------- */
dialog.sheet { width: 100%; max-width: 520px; max-height: 88dvh; margin: auto auto 0; padding: 0; border: 0; border-radius: 26px 26px 0 0; background: var(--surface); color: var(--text); }
dialog.sheet[open] { display: flex; flex-direction: column; }
dialog.sheet::backdrop { background: rgba(10,12,16,.5); }
@media (min-width: 700px) { dialog.sheet { margin: auto; border-radius: 26px; } }
.sim-h { display: flex; justify-content: space-between; align-items: flex-start; padding: 18px 18px 12px; border-bottom: 1px solid var(--line); }
.sim-h h3 { margin: 0; font-size: 1.05rem; display: flex; gap: 8px; align-items: center; }
.sim-h h3 svg { width: 20px; height: 20px; }
.sim-h small { color: var(--muted); }
.sim-body { overflow-y: auto; padding: 14px 18px; display: grid; gap: 12px; }
.pixrow { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: 16px; padding: 14px; font-weight: 700; }
.pixrow .ok { font-size: .68rem; font-weight: 800; color: var(--ok); background: var(--ok-soft); padding: 2px 7px; border-radius: 6px; margin-left: 6px; }
.ptable { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.ptable .cap { font-size: .72rem; font-weight: 800; letter-spacing: .06em; color: var(--muted); padding: 12px 14px; background: var(--surface-2); }
.ptable table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ptable th { font-weight: 500; color: var(--muted); text-align: left; padding: 8px 14px; font-size: .78rem; }
.ptable td { padding: 11px 14px; border-top: 1px solid var(--line); }
.ptable td:nth-child(2) { color: var(--muted); font-size: .8rem; }
.ptable th:not(:first-child), .ptable td:not(:first-child) { text-align: right; }
.ptable td:last-child { font-weight: 800; }
.sim-foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); text-align: center; }

/* ---------- Rodapé ---------- */
.foot { display: grid; justify-items: center; gap: 14px; text-align: center; padding-top: 36px; padding-bottom: 110px; border-top: 1px solid var(--line); margin-top: 34px; }
.foot-brand { display: flex; align-items: center; gap: 10px; text-align: left; }
.foot-brand .handle { display: flex; margin: 0; }
.pay { display: grid; gap: 6px; }
.pay-h { font-size: .7rem; font-weight: 800; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.pay-list { display: flex; gap: 8px; justify-content: center; }
.pay-list span { padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line); font-size: .82rem; font-weight: 600; background: var(--surface); }
.legal { font-size: .75rem; color: var(--muted); margin: 0; max-width: 40ch; }

/* ---------- Botão flutuante ---------- */
.fab {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30;
  width: 58px; height: 58px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(31,175,87,.4);
}
.fab svg { width: 30px; height: 30px; }
body.on-product .fab { display: none; }

.skeleton { aspect-ratio: .62; border-radius: 22px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: sk 1.2s infinite linear; }
@keyframes sk { to { background-position: -200% 0; } }
