/* ApoloInfo Promo — tema branco + azul royal, visual tecnológico */
:root {
  --royal: #1f45d6;
  --royal-600: #1a3ab8;
  --royal-700: #142d8f;
  --royal-50: #eef2ff;
  --royal-100: #dde5ff;
  --cyan: #18b6ff;
  --ink: #0d1733;
  --muted: #5b6684;
  --line: #e3e8f5;
  --bg: #ffffff;
  --soft: #f6f8fe;
  --green: #0f9f6e;
  --red: #e5374f;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(13, 23, 51, .05), 0 8px 24px -12px rgba(31, 69, 214, .25);
  --mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; position: relative; z-index: 1; }
img { max-width: 100%; display: block; }
a { color: var(--royal); }
.mono { font-family: var(--mono); }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* Grade de fundo "blueprint" */
.bg-grid { position: fixed; inset: 0 0 auto 0; height: 560px; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(31, 69, 214, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 69, 214, .07) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
}

/* Topo */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.logo-mark { width: 36px; height: 36px; color: var(--royal); }
.brand-text { font-weight: 800; font-size: 1.08rem; letter-spacing: -.01em; display: flex; flex-direction: column; line-height: 1.1; }
.brand-text small { font-family: var(--mono); font-weight: 500; font-size: .7rem; color: var(--royal); letter-spacing: .02em; }
.search { margin-left: auto; position: relative; flex: 0 1 380px; }
.search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); }
.search input { width: 100%; height: 44px; padding: 0 16px 0 42px; border: 1.5px solid var(--line); border-radius: 999px; font: inherit; background: var(--soft); color: var(--ink); transition: border-color .15s, box-shadow .15s, background .15s; }
.search input:focus { outline: none; border-color: var(--royal); background: #fff; box-shadow: 0 0 0 4px var(--royal-100); }

/* Hero */
.hero { padding: 56px 0 28px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--royal-700); background: var(--royal-50); border: 1px solid var(--royal-100); padding: 6px 12px; border-radius: 999px; margin: 0 0 18px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(15, 159, 110, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(15, 159, 110, 0); } 100% { box-shadow: 0 0 0 0 rgba(15, 159, 110, 0); } }
.hero h1 { font-size: clamp(2rem, 5vw, 3.3rem); line-height: 1.08; letter-spacing: -.035em; margin: 0 0 14px; font-weight: 850; }
.hl { color: var(--royal); background: linear-gradient(90deg, var(--royal), var(--cyan)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 560px; margin: 0; }

/* Categorias */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-top: 8px; padding-bottom: 18px; scrollbar-width: none; position: relative; z-index: 1; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; text-decoration: none; color: var(--ink); background: #fff; border: 1.5px solid var(--line); padding: 8px 14px; border-radius: 999px; font-size: .9rem; font-weight: 600; white-space: nowrap; transition: all .15s; }
.chip small { font-family: var(--mono); color: var(--muted); font-weight: 500; margin-left: 2px; }
.chip:hover { border-color: var(--royal); color: var(--royal); }
.chip.on { background: var(--royal); border-color: var(--royal); color: #fff; box-shadow: 0 6px 16px -6px rgba(31, 69, 214, .6); }
.chip.on small { color: rgba(255, 255, 255, .75); }
.result-info { color: var(--muted); font-size: .85rem; margin: 0 0 16px; }

/* Grade de produtos */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; padding-bottom: 56px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, border-color .2s; position: relative; }
.card:hover { transform: translateY(-3px); border-color: var(--royal-100); box-shadow: 0 2px 4px rgba(13, 23, 51, .05), 0 18px 36px -16px rgba(31, 69, 214, .45); }
.card.is-featured { border-color: rgba(31, 69, 214, .45); }
.card.is-featured::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--royal), var(--cyan)); z-index: 3; }

.media { position: relative; aspect-ratio: 1 / 1; background: var(--soft); }
.slides { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; padding: 18px; background: #fff; }
.slide img { width: 100%; height: 100%; object-fit: contain; }
.nav { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .92); color: var(--royal); font-size: 1.4rem; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .2s; display: flex; align-items: center; justify-content: center; padding-bottom: 3px; }
.nav.prev { left: 8px; } .nav.next { right: 8px; }
.card:hover .nav, .nav:focus-visible { opacity: 1; }
.dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.dots span { width: 6px; height: 6px; border-radius: 3px; background: #c9d2ec; transition: all .2s; }
.dots span.on { width: 18px; background: var(--royal); }
.badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 2; }
.badge { font-family: var(--mono); font-size: .75rem; font-weight: 700; padding: 4px 8px; border-radius: 8px; }
.badge.off { background: var(--royal); color: #fff; }
.badge.hot { background: #fff; color: var(--royal-700); border: 1px solid var(--royal-100); }
.badge.big { position: absolute; top: 14px; left: 14px; font-size: .95rem; padding: 6px 10px; }

.body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; border-top: 1px solid var(--line); }
.cat { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--royal); }
.cat::before { content: "#"; opacity: .6; }
.title { font-size: .98rem; line-height: 1.35; margin: 0; font-weight: 650; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.title a { color: var(--ink); text-decoration: none; }
.title a:hover { color: var(--royal); }
.prices { display: flex; flex-direction: column; gap: 0; }
.old { color: var(--muted); text-decoration: line-through; font-size: .85rem; }
.now { font-size: 1.45rem; font-weight: 850; letter-spacing: -.02em; color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; }
.tag { font-size: .76rem; font-weight: 600; padding: 4px 9px; border-radius: 8px; border: 0; font-family: inherit; }
.tag.ship { background: #e6f7f0; color: var(--green); }
.tag.coupon { background: var(--royal-50); color: var(--royal-700); border: 1px dashed var(--royal); cursor: pointer; }
.tag.coupon b { font-family: var(--mono); }
.btn-cta { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; background: var(--royal); color: #fff; font-weight: 700; font-size: .92rem; padding: 12px 14px; border-radius: 12px; transition: background .15s, transform .1s, box-shadow .15s; box-shadow: 0 8px 18px -10px rgba(31, 69, 214, .9); }
.btn-cta svg { width: 17px; height: 17px; }
.btn-cta:hover { background: var(--royal-600); }
.btn-cta:active { transform: scale(.98); }
.btn-cta.big { font-size: 1.05rem; padding: 16px 20px; margin-top: 8px; }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; background: #fff; color: var(--royal); border: 1.5px solid var(--royal-100); padding: 11px 18px; border-radius: 12px; font-weight: 700; font: inherit; font-weight: 700; cursor: pointer; transition: all .15s; }
.btn-ghost:hover { border-color: var(--royal); background: var(--royal-50); }

/* Vazio */
.empty { text-align: center; padding: 64px 20px 80px; }
.empty-icon { font-size: 2.4rem; color: var(--royal); font-weight: 700; margin-bottom: 8px; }
.empty h2 { margin: 0 0 6px; }
.empty p { color: var(--muted); margin: 0 0 20px; }

/* Página do produto */
.product { padding-top: 24px; padding-bottom: 64px; }
.back { display: inline-block; text-decoration: none; font-size: .85rem; margin-bottom: 18px; }
.product-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.gallery-main { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 20px; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; padding: 28px; box-shadow: var(--shadow); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; }
.thumb { width: 78px; height: 78px; padding: 6px; background: #fff; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb.on, .thumb:hover { border-color: var(--royal); }
.info { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 92px; }
.info h1 { font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.2; letter-spacing: -.02em; margin: 0; }
.prices.big .now { font-size: 2.3rem; }
.prices.big .old { font-size: 1rem; }
.desc { color: #34405f; white-space: pre-line; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.share { width: 100%; }
.note { font-size: .75rem; color: var(--muted); margin: 0; }

/* Rodapé */
.footer { border-top: 1px solid var(--line); background: var(--soft); padding: 32px 0 calc(28px + env(safe-area-inset-bottom)); position: relative; z-index: 1; }
.footer-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.footer-brand .logo-mark { width: 26px; height: 26px; }
.disclaimer { color: var(--muted); font-size: .85rem; max-width: 760px; margin: 0 0 12px; }
.copy { font-size: .75rem; color: var(--muted); margin: 0; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: .9rem; opacity: 0; pointer-events: none; transition: all .25s; z-index: 50; font-family: var(--mono); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Responsivo */
@media (max-width: 860px) {
  .product-grid { grid-template-columns: 1fr; gap: 24px; }
  .info { position: static; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 14px; }
  .topbar-inner { height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; gap: 10px; }
  .search { flex: 1 1 100%; margin-left: 0; }
  .hero { padding: 28px 0 18px; }
  .lead { font-size: 1rem; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .slide { padding: 10px; }
  .body { padding: 10px 10px 12px; gap: 6px; }
  .title { font-size: .86rem; }
  .now { font-size: 1.15rem; }
  .btn-cta { font-size: .8rem; padding: 10px 8px; }
  .btn-cta svg, .cta-long { display: none; }
  .nav { display: none; }
  .tag { font-size: .7rem; }
  .thumb { width: 64px; height: 64px; }
}
@media (max-width: 360px) {
  .grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
