/**
 * components.css — header, botões, cards, badges, tutorial
 */

/* ---------------- HEADER ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--uvtek-surface-light);
  border-bottom: 1px solid var(--uvtek-border-light);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: var(--space-md);
}

.site-header .logo img {
  height: 30px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.main-nav a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--uvtek-text-primary);
  padding: 8px 4px;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--uvtek-primary);
  border-color: var(--uvtek-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--uvtek-text-primary);
  margin: 5px 0;
  border-radius: 2px;
}

/* ---------------- BOTÕES ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--uvtek-primary), var(--uvtek-secondary));
  color: #fff;
  box-shadow: var(--shadow-card);
}
.btn-primary:hover { box-shadow: var(--shadow-card-hover); filter: brightness(1.05); }

.btn-secondary {
  background: var(--uvtek-surface-light);
  color: var(--uvtek-primary);
  border: 1.5px solid var(--uvtek-primary);
}
.btn-secondary:hover { background: #f2effe; }

.btn-ghost {
  background: transparent;
  color: var(--uvtek-text-primary);
  border: 1.5px solid var(--uvtek-border-light);
}
.btn-ghost:hover { border-color: var(--uvtek-primary); color: var(--uvtek-primary); }

.btn-sm { padding: 9px 16px; font-size: 0.85rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-group { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

/* ---------------- HERO ---------------- */
.hero {
  background: radial-gradient(circle at top right, var(--uvtek-violet-deep), var(--uvtek-background-dark) 70%);
  color: var(--uvtek-text-light);
  padding: var(--space-2xl) 0;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-xl);
  align-items: center;
}
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--uvtek-violet-light);
  margin-bottom: var(--space-sm);
}
.hero h1 { color: #fff; }
.hero p.lead { color: #d6d3e8; font-size: 1.05rem; max-width: 480px; }
.hero-visual {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 320px;
  position: relative;
  overflow: hidden;
}
.hero-visual img { max-height: 320px; }

.stl-viewer-loading::after {
  content: "Carregando modelo 3D...";
  color: var(--uvtek-text-muted);
  font-size: 0.85rem;
  font-family: var(--font-display);
}
.hero-visual canvas { cursor: grab; touch-action: none; }
.hero-visual canvas:active { cursor: grabbing; }
.stl-viewer-hint {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.72rem;
  color: var(--uvtek-text-muted);
  pointer-events: none;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

.search-box {
  display: flex;
  gap: 8px;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 6px;
  max-width: 460px;
  box-shadow: var(--shadow-card);
}
.search-box input {
  border: none;
  outline: none;
  flex: 1;
  padding: 10px 14px;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
}

/* ---------------- STEPS (3 ETAPAS) ---------------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}
.step-card {
  background: var(--uvtek-surface-light);
  border: 1px solid var(--uvtek-border-light);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
}
.step-number {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--uvtek-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

/* ---------------- CARDS DE IMPRESSORA/RESINA ---------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: var(--space-md);
}

.card-grid-center {
  grid-template-columns: repeat(auto-fit, minmax(230px, 250px));
  justify-content: center;
}

.item-card {
  background: var(--uvtek-surface-light);
  border: 1px solid var(--uvtek-border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.item-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.item-card.selected { border-color: var(--uvtek-primary); box-shadow: 0 0 0 3px rgba(94,49,255,0.15); }

.item-card-image {
  aspect-ratio: 1 / 1;
  background: var(--uvtek-background-light);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.item-card-image img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: var(--space-sm);
  loading: lazy;
}

.item-card-brand {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--uvtek-text-muted);
  font-weight: 600;
}
.item-card-title { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.item-card-meta { font-size: 0.85rem; color: var(--uvtek-text-muted); }

/* ---------------- LAYOUT DE SELEÇÃO (marca lateral) ---------------- */
.selection-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.brand-sidebar {
  background: var(--uvtek-surface-light);
  border: 1px solid var(--uvtek-border-light);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  position: sticky;
  top: 96px;
}
.brand-sidebar button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  font-family: var(--font-display);
  font-weight: 500;
  cursor: pointer;
  color: var(--uvtek-text-primary);
}
.brand-sidebar button:hover { background: var(--uvtek-background-light); }
.brand-sidebar button.active {
  background: var(--uvtek-primary);
  color: #fff;
}

.brand-select-mobile { display: none; }

.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  align-items: center;
}
.filters-bar input[type="search"],
.filters-bar select {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--uvtek-border-light);
  background: var(--uvtek-surface-light);
}

/* ---------------- CONTEXTO SELECIONADO (impressora/resina no topo) ---------------- */
.context-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--uvtek-surface-light);
  border: 1px solid var(--uvtek-border-light);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-lg);
}
.context-bar img {
  width: 48px; height: 48px;
  object-fit: contain;
  background: var(--uvtek-background-light);
  border-radius: 10px;
}
.context-bar .context-info { flex: 1; }
.context-bar .context-info strong { display: block; font-family: var(--font-display); }

/* ---------------- BADGES DE STATUS ---------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-display);
}
.badge-validated { background: #e4f9ea; color: #1e8a45; }
.badge-testing { background: #fff4e0; color: #a86a00; }
.badge-example { background: #ece5ff; color: var(--uvtek-primary); }
.badge-archived { background: #f0f0f0; color: #777; }

/* ---------------- PARÂMETROS ---------------- */
.tabs-height {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}
.tab-btn {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--uvtek-border-light);
  background: var(--uvtek-surface-light);
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
}
.tab-btn.active {
  background: var(--uvtek-primary);
  border-color: var(--uvtek-primary);
  color: #fff;
}

.result-card {
  background: var(--uvtek-surface-light);
  border: 1px solid var(--uvtek-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--space-lg);
}

.result-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
  margin-bottom: var(--space-lg);
}
.result-visual-item {
  width: 160px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.result-visual-item img { max-width: 100%; max-height: 100%; object-fit: contain; }

.result-title {
  text-align: center;
  color: var(--uvtek-primary);
  font-size: 1.3rem;
  margin-bottom: var(--space-md);
}

.param-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: var(--space-lg);
}
.param-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  background: var(--uvtek-background-light);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
}
.param-row-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.param-row-value {
  background: var(--uvtek-primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 8px 22px;
  border-radius: 999px;
  min-width: 88px;
  text-align: center;
  flex-shrink: 0;
}

.result-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}
.result-link {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--uvtek-text-primary);
  text-decoration: underline;
  cursor: pointer;
}
.result-link:hover { color: var(--uvtek-primary); }

.result-disclaimer {
  font-size: 0.85rem;
  color: var(--uvtek-text-muted);
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.notice-box {
  background: #fff8ea;
  border: 1px solid #ffe4a8;
  border-radius: var(--radius-md);
  padding: var(--space-md);
  color: #8a5a00;
  font-size: 0.9rem;
}

/* ---------------- TUTORIAL ---------------- */
.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg) var(--space-md);
  margin-bottom: var(--space-2xl);
}
.tutorial-step {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: var(--space-md);
}
.tutorial-step .step-index {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--uvtek-violet-deep);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
}
.tutorial-step ul { padding-left: 20px; color: var(--uvtek-text-primary); }
.tutorial-step li { margin-bottom: 6px; }

/* ---------------- SEGURANÇA ---------------- */
.safety-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-sm);
}
.safety-list li {
  list-style: none;
  background: var(--uvtek-surface-light);
  border: 1px solid var(--uvtek-border-light);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.9rem;
}

/* ---------------- RODAPÉ ---------------- */
.site-footer {
  background: var(--uvtek-background-dark);
  color: #cfcbe0;
  padding: var(--space-xl) 0 var(--space-lg);
}
.site-footer .logo img { height: 26px; margin-bottom: var(--space-sm); }
.site-footer a { color: #cfcbe0; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-lg);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  font-size: 0.8rem;
  color: #86829c;
}

/* ---------------- PLACEHOLDER DE IMAGEM ---------------- */
.img-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--uvtek-background-light);
  color: var(--uvtek-text-muted);
  font-size: 0.8rem;
  text-align: center;
  height: 100%; width: 100%;
  border-radius: var(--radius-sm);
}

/* ---------------- ESTADOS ---------------- */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  background: var(--uvtek-text-primary);
  color: #fff;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  z-index: 999;
  box-shadow: var(--shadow-elevated);
}
