:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --ink: #0d0d0d;
  --muted: #525252;
  --border: #0d0d0d;
  --accent: #0d0d0d;
  --accent-light: #ffe600;
}

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

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  border-bottom: 3px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand-logo {
  height: 48px;
  width: auto;
  image-rendering: pixelated;
}

.brand-text { display: flex; flex-direction: column; }
.pixel-title { font-family: 'Press Start 2P', monospace; font-size: 16px; letter-spacing: 1px; }
.sub-title { font-size: 11px; font-weight: 700; letter-spacing: 3px; }

.nav-links { display: flex; gap: 24px; }
.nav-links a { text-decoration: none; color: var(--ink); font-weight: 600; }
.nav-links a:hover { text-decoration: underline; text-underline-offset: 4px; }

.btn-pixel, .btn-primary, .btn-outline {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid var(--border);
  padding: 10px 18px;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-pixel {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  background: var(--accent-light);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--border);
}

.btn-primary { background: var(--ink); color: #fff; box-shadow: 4px 4px 0 var(--accent-light); }
.btn-outline { background: #fff; color: var(--ink); box-shadow: 4px 4px 0 var(--border); }

.btn-pixel:active, .btn-primary:active, .btn-outline:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--border);
}

.hero { padding: 64px 0; border-bottom: 3px solid var(--border); }
.hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }

.badge-pixel {
  display: inline-block;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  background: var(--accent-light);
  border: 2px solid var(--border);
  padding: 6px 10px;
  margin-bottom: 18px;
}

.hero h1 { font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.12; margin-bottom: 16px; }
.hero p { color: var(--muted); font-size: 1.1rem; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.pixel-frame {
  border: 3px solid var(--border);
  padding: 24px;
  background: #fff;
  box-shadow: 8px 8px 0 var(--border);
  text-align: center;
}

.pixel-frame img { max-width: 240px; width: 100%; height: auto; image-rendering: pixelated; }
.frame-caption {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 2px dashed var(--border);
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
}

.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); border-top: 3px solid var(--border); }

.section-header { margin-bottom: 36px; }
.pixel-heading { font-family: 'Press Start 2P', monospace; font-size: 18px; margin-bottom: 10px; }
.pixel-heading-sm { font-family: 'Press Start 2P', monospace; font-size: 13px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 24px;
}

.product-card {
  border: 3px solid var(--border);
  background: #fff;
  box-shadow: 6px 6px 0 var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
}

/* Visualizador 3D nos cards */
.viewer-wrap {
  position: relative;
  height: 220px;
  background: radial-gradient(circle at center, #ffffff 0%, #eaeaea 100%);
  border: 2px solid var(--border);
  margin-bottom: 14px;
  overflow: hidden;
}

model-viewer {
  width: 100%;
  height: 100%;
  --poster-color: transparent;
}

.viewer-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent-light);
  border: 1.5px solid var(--border);
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  padding: 4px 6px;
  pointer-events: none;
  z-index: 2;
}

.product-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.product-desc { font-size: 0.9rem; color: var(--muted); margin-bottom: 12px; }
.product-meta { font-size: 0.8rem; font-weight: 600; margin-bottom: 12px; }

.variant-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

select, input {
  width: 100%;
  padding: 9px 10px;
  border: 2px solid var(--border);
  font-family: inherit;
  font-size: 0.9rem;
  background: #fff;
}

.price-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.price { font-size: 1.25rem; font-weight: 700; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.feature-card { border: 3px solid var(--border); background: #fff; padding: 24px; box-shadow: 5px 5px 0 var(--border); }
.step-num {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  background: var(--accent-light);
  padding: 4px 8px;
  border: 2px solid var(--border);
  display: inline-block;
  margin-bottom: 12px;
}

/* Cart Drawer */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100vh;
  background: #fff;
  border-left: 3px solid var(--border);
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.cart-drawer.hidden, .backdrop.hidden { display: none; }
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 50; }

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
}

.btn-close { background: none; border: 2px solid var(--border); font-weight: 700; padding: 4px 10px; cursor: pointer; }

.cart-items { flex: 1; overflow-y: auto; padding: 14px 0; display: flex; flex-direction: column; gap: 12px; }
.cart-item { border: 2px solid var(--border); padding: 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.cart-footer { border-top: 2px solid var(--border); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.shipping-row { display: flex; gap: 8px; margin-top: 4px; }
.shipping-options { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; }
.shipping-option { display: flex; justify-content: space-between; align-items: center; border: 2px solid var(--border); padding: 6px 10px; cursor: pointer; }

.totals { border-top: 2px dashed var(--border); padding-top: 8px; }
.total-row { display: flex; justify-content: space-between; font-size: 0.95rem; margin-bottom: 4px; }
.grand-total { font-weight: 700; font-size: 1.15rem; }
.full-width { width: 100%; text-align: center; }
.feedback-msg { font-size: 0.85rem; font-weight: 600; min-height: 20px; }

.footer { border-top: 3px solid var(--border); padding: 24px 0; font-size: 0.9rem; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
