/* ============================================================
   KADRI - MONTE SEU PC - BUILDER V3 (LIMPO + ORGANIZADO)
   
   ÍNDICE
   ----------------------------------------------------------
   1. Layout base
   2. Steps Progress (bolinhas de navegação)
   3. Mini Status (BUILD/CONSUMO)
   4. Step Content (área principal)
   5. Filtros (busca + botão Filtro)
   6. Categorias de Periféricos
   7. Product Cards (cards de produto)
   8. Botões e Controles
   9. Barra Inferior (total + finalizar)
   10. Painel Build Completa (expandível)
   11. Modais (Cooler + Descrição)
   12. Drawer de Filtros (lateral)
   13. Estados Especiais (sem resultados / sem imagem)
   14. Compatibilidade — Fase 3 (bolinha incompatível)
   15. Compatibilidade — Fase 4 (banner)
   16. Compatibilidade — Fase 5 (card incompatível)
   17. Animações
   18. Responsivo
   ============================================================ */


/* ============================================================
   1. LAYOUT BASE
   ============================================================ */

.builder-page-new {
  background: var(--black);
  min-height: calc(100vh - 64px);
  padding-bottom: 80px; /* espaço para a barra inferior fixa */
}


/* ============================================================
   2. STEPS PROGRESS (bolinhas de navegação)
   ============================================================ */

.steps-progress-container {
  display: flex;
  gap: 16px;
  max-width: var(--container-max-wide);
  margin: 0 auto;
  padding: 24px 24px 0;
  align-items: stretch;
}

.steps-progress {
  flex: 1;
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius-lg);
  padding: 16px;
  overflow: hidden;
  min-width: 0;
}

.steps-scroll {
  display: flex;
  align-items: center;
  /* Centraliza as etapas quando cabem na caixa; se estourarem
     (celular), o "safe" volta ao início para a rolagem funcionar. */
  justify-content: safe center;
  overflow-x: auto;
  scrollbar-width: thin;
}

.steps-scroll::-webkit-scrollbar { height: 4px; }
.steps-scroll::-webkit-scrollbar-thumb { background: var(--dark-4); border-radius: 4px; }

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  min-width: 72px;
  border-radius: var(--radius);
}

.step-item:hover .step-icon { border-color: var(--red); }

.step-icon {
  width: 40px;
  height: 40px;
  background: var(--dark-3);
  border: 2px solid var(--dark-4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--gray-light);
  transition: var(--transition);
  position: relative;
}

.step-item span {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--gray-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Etapa opcional (mesmo sem produto): laranja, sinaliza que dá pra clicar.
   Os estados active/completed/incompatible vêm depois e sobrescrevem. */
.step-item.optional .step-icon {
  background: rgba(255, 109, 0, 0.10);
  border-color: var(--orange);
  color: var(--orange);
}
.step-item.optional span { color: var(--orange); }

/* Badge "opcional": aparece desde o carregamento da página, em CINZA — apenas
   avisa o cliente que a etapa é opcional. Vira laranja depois que a etapa é
   visitada (pulando ou escolhendo) — ver regra logo abaixo. */
.step-item.optional-step .step-icon::after {
  content: 'opcional';
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray);
  color: var(--white-dim);
  font-size: 0.4375rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  line-height: 1.45;
}

/* Depois de visitada: badge laranja (comportamento de cor atual mantido). */
.step-item.optional .step-icon::after {
  background: var(--orange);
  color: #fff;
}

/* Estados do step */
.step-item.active .step-icon {
  background: var(--red);
  border-color: var(--red);
  color: white;
  box-shadow: 0 0 16px rgba(227,30,36,0.4);
}

.step-item.active span { color: var(--red); }

.step-item.completed .step-icon {
  background: rgba(0,200,83,0.15);
  border-color: var(--green);
  color: var(--green);
}

.step-item.completed span { color: var(--green); }

.step-connector {
  width: 24px;
  height: 2px;
  background: var(--dark-4);
  flex-shrink: 0;
  border-radius: 2px;
}


/* ============================================================
   3. MINI STATUS (BUILD/CONSUMO)
   ============================================================ */

.mini-status {
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-width: 180px;
  flex-shrink: 0;
}

.mini-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mini-status-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-light);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-status-label i {
  color: var(--orange);
  font-size: 0.75rem;
}

.mini-status-value {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--white);
}

.mini-power { color: var(--white); }


/* ============================================================
   4. STEP CONTENT (área principal)
   ============================================================ */

.step-content {
  max-width: var(--container-max-wide);
  margin: 0 auto;
  padding: 24px;
}

/* Header de cada etapa */
.step-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.step-title-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.step-title-icon {
  width: 56px;
  height: 56px;
  background: rgba(227,30,36,0.1);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--red);
  flex-shrink: 0;
}

.step-header h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: var(--white);
}

.step-header p {
  color: var(--gray-light);
  font-size: 0.875rem;
  margin: 0;
}

.step-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-skip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--gray-light);
  border: 1px solid var(--dark-4);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: var(--transition);
  white-space: nowrap;
}

.btn-skip:hover {
  border-color: var(--orange);
  color: var(--orange);
}

/* Navegação topo (botões Voltar / Próximo) */
.step-nav-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.btn-prev, .btn-next {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-prev {
  background: transparent;
  color: var(--gray-light);
  border: 1px solid var(--dark-4);
}

.btn-prev:hover {
  border-color: var(--gray);
  color: var(--white);
}

.btn-next {
  background: var(--red);
  color: white;
  border: 1px solid var(--red);
}

.btn-next:hover:not(:disabled) {
  background: var(--red-dark);
  box-shadow: var(--shadow-red);
}

.btn-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}


/* ============================================================
   5. FILTROS (busca + botão Filtro)
   ============================================================ */

.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  align-items: center;
  flex-wrap: wrap;
}

/* Barra de categorias de periféricos (chips horizontais) */
.peri-cat-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.peri-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--dark-3);
  border: 1px solid var(--dark-4);
  border-radius: 8px;
  color: var(--white-dim);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.peri-cat-chip i { font-size: 0.8125rem; opacity: 0.9; }
.peri-cat-chip:hover {
  border-color: var(--green);
  color: #fff;
}
.peri-cat-chip.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.peri-cat-chip.active i { opacity: 1; }

.search-wrapper {
  position: relative;
  flex: 0 0 280px;
  min-width: 200px;
}

.search-wrapper i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-light);
  font-size: 0.8125rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  color: var(--white);
  padding: 12px 14px 12px 40px;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-family: var(--font-body);
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--red);
}

.search-input::placeholder {
  color: var(--gray-light);
}

/* Botão "Filtro" que abre o drawer */
.btn-filter-open {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--dark-2);
  border: 1px solid var(--dark-4);
  color: var(--white);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
}

.btn-filter-open:hover {
  border-color: var(--red);
  color: var(--red);
}

.btn-filter-open .filter-count {
  background: var(--red);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 100px;
  margin-left: 4px;
}


/* ============================================================
   6. CATEGORIAS DE PERIFÉRICOS
   ============================================================ */


.peri-cat-chip {
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  color: var(--gray-light);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.peri-cat-chip:hover {
  border-color: var(--red);
  color: var(--red);
}

.peri-cat-chip.active {
  background: var(--red);
  border-color: var(--red);
  color: white;
}


/* ============================================================
   7. PRODUCT CARDS
   ============================================================ */

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.product-card {
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  border-color: var(--red);
  transform: translateY(-3px);
  box-shadow: var(--shadow-red);
}

.product-card.selected {
  border-color: var(--green);
  box-shadow: 0 0 20px rgba(0,200,83,0.2);
}

.product-card.selected::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,200,83,0.04);
  pointer-events: none;
}

/* Cards sem imagem (visual de erro) */
.product-card.no-image {
  border: 2px solid var(--red);
}

.product-card.no-image .product-card-image,
.product-card-image.no-image-bg {
  background: rgba(227, 30, 36, 0.08);
  border-bottom: 1px solid rgba(227, 30, 36, 0.3);
  position: relative;
}

.no-image-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--red);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.no-image-text i {
  font-size: 1.75rem;
  opacity: 0.6;
}

/* Imagem do produto */
.product-card-image {
  background: var(--dark-3);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
}

.product-card-image img {
  max-height: 120px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-card:hover .product-card-image img {
  transform: scale(1.05);
}

/* Corpo do card */
.product-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-card-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


.product-card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.spec-badge {
  background: var(--dark-3);
  border: 1px solid var(--dark-4);
  color: var(--gray-light);
  font-size: 0.625rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* Rodapé do card */
.product-card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--dark-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 88px;
}

.product-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.price-main {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--red);
}

.price-pix-small {
  font-size: 0.6875rem;
  color: var(--green);
  font-weight: 600;
}

.price-unit {
  font-size: 0.625rem;
  color: var(--gray-light);
  margin-top: 2px;
}

/* Preço "de" (cheio) quando há promoção: vermelho, pequeno e cortado */
.price-de {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--red);
  text-decoration: line-through;
  opacity: 0.75;
  line-height: 1.1;
}

/* Preço promocional ("por"): azul, ocupa o lugar do preço principal */
.price-main.price-promo {
  color: #1F6FEB;
}

.product-card-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  flex-shrink: 0;
}

/* Código do produto (CODPROD) no canto superior ESQUERDO do card —
   o canto direito é do checkmark de selecionado. Visual em style.css. */
.product-card .cod-prod-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  pointer-events: none;
}

/* Checkmark verde no card selecionado */
.selected-check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
  opacity: 1;
  transition: var(--transition);
  z-index: 2;
}
.selected-check i { opacity: 0; transition: var(--transition); }

/* Hover no card → bolinha "acende" em verde (isca visual; o card todo é o clicável) */
.product-card:hover .selected-check {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.product-card:hover .selected-check i { opacity: 1; }

.product-card.selected .selected-check {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  opacity: 1;
}
.product-card.selected .selected-check i { opacity: 1; }


/* ============================================================
   8. BOTÕES E CONTROLES
   ============================================================ */

/* Botão "Descrição" nos cards */
.btn-desc {
  height: 36px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--gray-light);
  border: 1px solid var(--dark-4);
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: var(--transition);
  white-space: nowrap;
  box-sizing: border-box;
}

.btn-desc:hover {
  border-color: var(--red);
  color: var(--red);
}

/* Controle de quantidade (RAM/SSD/HDD) */
.ram-quantity-control {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--dark-3);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  padding: 4px 8px;
  height: 36px;
  box-sizing: border-box;
}

.ram-qty-btn {
  width: 24px;
  height: 24px;
  background: var(--dark-4);
  color: var(--white);
  border: none;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.ram-qty-btn:hover:not(:disabled) {
  background: var(--green);
  color: white;
}

.ram-qty-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.ram-qty-value {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--green);
  min-width: 18px;
  text-align: center;
}

.ram-qty-max {
  font-size: 0.5625rem;
  color: var(--gray-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}


/* ============================================================
   9. BARRA INFERIOR (total + finalizar)
   ============================================================ */

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--dark-2);
  border-top: 2px solid var(--red);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
}

.bottom-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--white);
  border: 1px solid var(--dark-4);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: var(--transition);
  white-space: nowrap;
}

.bottom-toggle:hover {
  border-color: var(--red);
  color: var(--red);
}

.bottom-toggle.expanded i { transform: rotate(180deg); }
.bottom-toggle i { transition: transform 0.3s ease; }

.bottom-prices {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
}

.bottom-price-pix,
.bottom-price-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bottom-price-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-light);
  font-weight: 600;
}

.bottom-price-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green);
}

.bottom-price-value-small {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--red);
}

.bottom-price-parcel {
  font-size: 0.6875rem;
  color: var(--gray-light);
}

.bottom-finalize {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--red);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.bottom-finalize:hover:not(:disabled) {
  background: var(--green);
  box-shadow: 0 4px 20px rgba(0,200,83,0.45);
}

.bottom-finalize:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Botão "Limpar tudo" */
.bottom-clear {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--gray-light);
  border: 1px solid var(--dark-4);
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: var(--transition);
  white-space: nowrap;
}

.bottom-clear:hover {
  background: rgba(227,30,36,0.1);
  border-color: var(--red);
  color: var(--red);
}

.bottom-clear:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}


/* ============================================================
   10. PAINEL BUILD COMPLETA (expandível)
   ============================================================ */

.build-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 99;
}

.build-panel-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.build-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--dark);
  border-top: 2px solid var(--red);
  max-height: 80vh;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 101;
  display: flex;
  flex-direction: column;
  border-radius: 24px 24px 0 0;
}

.build-panel.show {
  transform: translateY(0);
  /* Posiciona ACIMA da barra inferior (que tem ~80px) */
  bottom: 80px;
}

.build-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--dark-3);
  flex-shrink: 0;
}

.build-panel-header h3 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
}

.build-panel-header h3 i {
  color: var(--red);
}

.build-panel-close {
  background: transparent;
  border: 1px solid var(--dark-4);
  color: var(--gray-light);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  transition: var(--transition);
}

.build-panel-close:hover {
  color: var(--white);
  border-color: var(--red);
  background: rgba(227,30,36,0.1);
}

.build-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

.build-panel-item {
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius);
  padding: 14px;
  padding-right: 32px; /* espaço para o botão X */
  display: flex;
  gap: 14px;
  align-items: flex-start;
  position: relative;
  transition: var(--transition);
}

.build-panel-item:hover {
  border-color: var(--red);
}

/* Imagem do componente (caixinha 80x80 à esquerda) */
.build-panel-item-image {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  background: var(--dark-3);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.build-panel-item-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Info do componente (à direita) */
.build-panel-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.build-panel-item-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--red);
  font-weight: 700;
}

.build-panel-item-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--white);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.build-panel-item-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.build-panel-item-specs .spec-badge {
  font-size: 0.5625rem;
  padding: 2px 6px;
}

.build-panel-item-price {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--red);
  margin-top: 4px;
}

/* Promoção no painel da build: "de" riscado logo acima do preço, que vai azul */
.build-panel-item-info .price-de {
  margin-top: 4px;
}

.build-panel-item-info .price-de + .build-panel-item-price {
  margin-top: 0;
}

.build-panel-item-price.price-promo {
  color: #1F6FEB;
}

/* Código do produto no painel da build: canto inferior direito — o
   superior direito é do botão X que remove o componente. */
.build-panel-item .cod-prod-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: var(--dark-3);
  pointer-events: none;
}

/* Estado vazio do painel */
.build-panel-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-light);
}

.build-panel-empty i {
  font-size: 3rem;
  margin-bottom: 16px;
  color: var(--dark-4);
}

/* Botão X de remover item do painel */
.build-panel-item-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: rgba(227, 30, 36, 0.15);
  border: 1px solid rgba(227, 30, 36, 0.4);
  color: var(--red);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  transition: var(--transition);
  z-index: 2;
}

.build-panel-item-remove:hover {
  background: var(--red);
  color: white;
  border-color: var(--red);
  transform: scale(1.1);
}


/* ============================================================
   11. MODAIS — Cooler e Descrição
   ============================================================ */

/* Overlay genérico (cooler) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

/* Box genérico (cooler) */
.modal-box {
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  position: relative;
}

.modal-box h3 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  margin-bottom: 12px;
  color: var(--white);
}

.modal-box h3 i {
  color: var(--orange);
  margin-right: 8px;
}

.modal-box p {
  color: var(--gray-light);
  line-height: 1.6;
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-modal-primary,
.btn-modal-secondary {
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: var(--transition);
}

.btn-modal-primary {
  background: var(--red);
  color: white;
  border: none;
}

.btn-modal-primary:hover { background: var(--red-dark); }

.btn-modal-secondary {
  background: transparent;
  color: var(--gray-light);
  border: 1px solid var(--dark-4);
}

.btn-modal-secondary:hover {
  border-color: var(--gray);
  color: var(--white);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--gray-light);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

/* Modal de descrição — container externo */
.desc-modal {
  max-width: 760px;
  width: 100%;
  max-height: 85vh;
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

/* Corpo do modal com scroll interno */
.desc-modal-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  padding: 24px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  box-sizing: border-box;
}

.desc-modal-image {
  width: 240px;
  height: 240px;
  background: var(--dark-3);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  padding: 12px;
  box-sizing: border-box;
}

.desc-modal-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.desc-modal-info {
  min-width: 0;
  overflow: hidden;
}

.desc-modal-info h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--white);
  line-height: 1.3;
  text-align: left;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.desc-marca {
  display: inline-block;
  background: rgba(227, 30, 36, 0.15);
  color: var(--red);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.desc-modal-specs {
  background: var(--dark-3);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 14px;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.desc-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--dark-4);
  font-size: 0.75rem;
  min-width: 0;
}

.desc-spec-row:last-child {
  border-bottom: none;
}

.desc-spec-label {
  color: var(--gray-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.625rem;
  font-weight: 600;
  flex-shrink: 0;
}

.desc-spec-value {
  color: var(--white);
  font-weight: 600;
  font-size: 0.75rem;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60%;
}

.desc-modal-info h4 {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-light);
  margin: 12px 0 6px 0;
}

.desc-modal-info p {
  color: #ddd;
  font-size: 0.8125rem;
  line-height: 1.6;
  margin: 0 0 14px 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.desc-modal-price {
  background: var(--dark-3);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-top: 8px;
}

.desc-modal-price .price-main {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--red);
  display: block;
}

.desc-modal-price .price-pix-small {
  color: var(--green);
  font-size: 0.75rem;
  margin-top: 2px;
  display: block;
}


/* ============================================================
   12. DRAWER DE FILTROS (lateral)
   ============================================================ */

.filter-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 200;
}

.filter-drawer-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.filter-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: var(--dark) url('/images/circuit-bg-gray.svg') center / cover no-repeat;
  border-left: 2px solid var(--red);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 201;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(0,0,0,0.5);
}

.filter-drawer.show {
  transform: translateX(0);
}

.filter-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--dark-3);
}

.filter-drawer-header h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
}

.filter-drawer-header h3 i {
  color: var(--red);
}

.filter-drawer-close {
  background: transparent;
  border: none;
  color: var(--gray-light);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}

.filter-drawer-close:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}

.filter-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.filter-group {
  margin-bottom: 24px;
}

.filter-group-label {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #CCCCCC;
  margin-bottom: 12px;
  display: block;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(18, 18, 18, 0.55);
  border: 1px solid var(--red);
  border-radius: var(--radius);
  color: var(--red);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

/* Hover OU selecionada: invertido — caixa toda vermelha, texto branco */
.filter-option:hover,
.filter-option.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
  font-weight: 700;
}

.filter-option.active::after {
  content: '✓';
  margin-left: auto;
  color: var(--white);
  font-weight: 700;
}

.filter-option input[type="checkbox"],



.filter-drawer-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--dark-3);
  display: flex;
  gap: 10px;
}

.btn-filter-clear {
  flex: 1;
  background: transparent;
  border: 1px solid var(--dark-4);
  color: var(--gray-light);
  padding: 12px;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-filter-clear:hover {
  border-color: var(--red);
  color: var(--red);
}

.btn-filter-apply {
  flex: 1;
  background: var(--red);
  color: white;
  border: none;
  padding: 12px;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: var(--transition);
}

.btn-filter-apply:hover {
  background: var(--red-dark);
}


/* ---- Filtro de PREÇO (slider duplo + campos Mín/Máx) ---- */
.price-filter-group { margin-bottom: 8px; }

.price-filter-sub {
  display: block;
  font-size: 0.8125rem;
  color: var(--gray-light);
  margin: 2px 0 4px;
}

/* Trilho com dois <input type="range"> sobrepostos */
.price-slider {
  position: relative;
  height: 28px;
  margin: 10px 0 2px;
}

.price-slider-track,
.price-slider-fill {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  border-radius: 2px;
}

.price-slider-track {
  left: 0;
  right: 0;
  background: var(--dark-4);
}

.price-slider-fill {
  background: var(--red);   /* faixa entre os dois marcadores */
}

.price-slider input[type="range"] {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  width: 100%;
  height: 28px;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;     /* só os marcadores recebem clique */
}

.price-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto;
  width: 16px;
  height: 16px;
  border-radius: 4px;       /* marcador quadrado arredondado */
  background: var(--red);
  border: none;
  cursor: pointer;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.45);
}

.price-slider input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--red);
  border: none;
  cursor: pointer;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.45);
}

.price-slider input[type="range"]::-moz-range-track { background: transparent; }

/* O handle do máximo fica por cima quando os dois se encontram */
#priceRangeMin { z-index: 3; }
#priceRangeMax { z-index: 4; }

/* Rótulos R$ mín — R$ máx abaixo do trilho (acompanham os marcadores) */
.price-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--gray-light);
  margin-bottom: 12px;
}

/* Caixas "Mínimo" / "Máximo" */
.price-inputs {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.price-input-box {
  flex: 1;
  border: 1px solid var(--dark-4);
  border-radius: 6px;
  background: var(--dark-2);
  padding: 6px 10px 8px;
}

.price-input-label {
  display: block;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-light);
  margin-bottom: 2px;
}

.price-input-line {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--white);
  font-size: 0.875rem;
}

.price-input-box input[type="number"] {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--white);
  font-size: 0.875rem;
  font-family: var(--font-body);
  -moz-appearance: textfield;
  appearance: textfield;
}

.price-input-box input[type="number"]::-webkit-outer-spin-button,
.price-input-box input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.price-dash {
  align-self: center;
  color: var(--gray-light);
}

/* ============================================================
   13. ESTADOS ESPECIAIS
   ============================================================ */

/* Loading */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 80px 20px;
  color: var(--gray-light);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--dark-4);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Sem resultados */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-light);
}

.no-results i {
  font-size: 2.5rem;
  margin-bottom: 16px;
  color: var(--dark-4);
}


/* ============================================================
   14. COMPATIBILIDADE — FASE 3 (bolinha incompatível)
   ============================================================ */

.step-item.incompatible .step-icon {
  background: rgba(255, 214, 0, 0.18);
  border-color: #FFD600;
  color: #FFD600;
  animation: incompat-pulse 2s ease-in-out infinite;
}

.step-item.incompatible span {
  color: #FFD600;
  font-weight: 700;
}

/* Badge de exclamação no canto superior direito da bolinha */
.step-item.incompatible .step-icon::after {
  content: '\f071'; /* fa-exclamation-triangle */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  background: #FFD600;
  color: white;
  border-radius: 50%;
  font-size: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--dark-1, #0a0a0a);
  box-shadow: 0 0 8px rgba(255, 214, 0, 0.6);
  z-index: 2;
}

/* Esconde o badge "opcional" quando a etapa estiver incompatível (visual confuso) */
.step-item.incompatible.optional-step .step-icon::after {
  display: none;
}

/* Hover na bolinha incompatível */
.step-item.incompatible:hover .step-icon {
  background: rgba(255, 214, 0, 0.28);
  transform: scale(1.05);
}

.step-item.incompatible:hover span {
  color: #FFE34D;
}

/* Prioridade: se for ativo E incompatível, mantém vermelho */
.step-item.active.incompatible .step-icon {
  background: rgba(255, 214, 0, 0.28);
  border-color: #FFD600;
  color: #FFD600;
}

.step-item.active.incompatible span {
  color: #FFD600;
}


/* ============================================================
   15. COMPATIBILIDADE — FASE 4 (banner)
   ============================================================ */

.incompat-banner {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background: linear-gradient(135deg, rgba(255, 214, 0, 0.12), rgba(255, 214, 0, 0.05));
  border: 1px solid rgba(255, 214, 0, 0.35);
  border-left: 4px solid #FFD600;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  animation: incompat-banner-slide-in 0.4s ease-out;
  box-shadow: 0 4px 16px rgba(255, 214, 0, 0.15);
}

.incompat-banner-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 214, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFD600;
  font-size: 1.25rem;
  animation: incompat-icon-pulse 2.4s ease-in-out infinite;
}

.incompat-banner-content {
  flex: 1;
  min-width: 0;
}

.incompat-banner-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: #FFD600;
  margin: 0 0 6px 0;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.incompat-banner-text {
  color: #ddd;
  font-size: 0.875rem;
  line-height: 1.55;
  margin: 0 0 10px 0;
}

.incompat-banner-action {
  color: #FFE34D;
  font-size: 0.8125rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.incompat-banner-action i {
  animation: incompat-arrow-bounce 1.6s ease-in-out infinite;
}


/* ============================================================
   16. COMPATIBILIDADE — FASE 5 (card incompatível)
   ============================================================
   
   ESTRATÉGIA:
   Quando o card está incompatível, MUDAMOS o layout do
   .product-card-footer para coluna (preço em cima, ações em
   baixo full-width). Isso resolve o problema de transbordo
   sem precisar de !important agressivos.
   ============================================================ */

/* Card destacado em vermelho */
.product-card.incompatible-selected {
  background: linear-gradient(135deg, rgba(255, 214, 0, 0.08), rgba(255, 214, 0, 0.03));
  border: 2px solid #FFD600;
  cursor: default;
  box-shadow: 0 4px 20px rgba(255, 214, 0, 0.25);
  animation: incompat-card-fade-in 0.4s ease-out;
  padding-top: 38px; /* espaço para o badge */
}

/* Remove hover effect */
.product-card.incompatible-selected:hover {
  transform: none;
  border-color: #FFD600;
}

/* Esconde checkmark verde no card incompatível */
.product-card.incompatible-selected .selected-check {
  display: none;
}

/* Badge "ATUALMENTE SELECIONADO · INCOMPATÍVEL" */
.incompat-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  background: #FFD600;
  color: #1A1A1A;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(255, 214, 0, 0.4);
  z-index: 3;
  text-align: center;
  line-height: 1.3;
  box-sizing: border-box;
}

.incompat-card-badge i {
  font-size: 0.625rem;
  flex-shrink: 0;
}

/* MUDANÇA CRÍTICA: footer vira coluna no card incompatível */
.product-card.incompatible-selected .product-card-footer {
  flex-direction: column;
  align-items: stretch; /* sobrescreve o align-items:center */
  gap: 10px;
}

/* Ações ocupam largura total */
.product-card.incompatible-selected .product-card-actions {
  flex-direction: column;
  align-items: stretch; /* sobrescreve o flex-end */
  width: 100%;
  gap: 6px;
}

/* Botão Descrição full-width no card incompatível */
.product-card.incompatible-selected .btn-desc {
  width: 100%;
  justify-content: center;
}

/* Botão REMOVER — vermelho, full-width */
.btn-remove-incompat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  background: var(--red);
  color: white;
  border: 1px solid var(--red);
  padding: 9px 12px;
  border-radius: var(--radius);
  font-size: 0.6875rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
  white-space: nowrap;
  box-sizing: border-box;
  height: 36px;
}

.btn-remove-incompat:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(227, 30, 36, 0.4);
}

.btn-remove-incompat:active {
  transform: translateY(0);
}

.btn-remove-incompat i {
  font-size: 0.6875rem;
  flex-shrink: 0;
}


/* ============================================================
   17. ANIMAÇÕES (consolidadas)
   ============================================================ */

@keyframes incompat-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 214, 0, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(255, 214, 0, 0); }
}

@keyframes incompat-icon-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 109, 0, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(255, 109, 0, 0); }
}

@keyframes incompat-banner-slide-in {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes incompat-arrow-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

@keyframes incompat-card-fade-in {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}


/* ============================================================
   18. RESPONSIVO (todas as media queries consolidadas)
   ============================================================ */

/* ---- Categorias no celular: botão + painel lateral (esquerda) ---- */
.btn-cat-open {
  display: none;               /* só aparece no celular (media abaixo) */
  align-items: center;
  gap: 8px;
  background: var(--dark-2);
  border: 1px solid var(--dark-4);
  color: var(--white);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
  transition: var(--transition);
}

.btn-cat-open:hover { border-color: var(--red); }

.cat-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 200;
}

.cat-drawer-overlay.show { opacity: 1; pointer-events: auto; }

.cat-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background: var(--dark);
  border-right: 2px solid var(--red);
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 201;
  display: flex;
  flex-direction: column;
  box-shadow: 8px 0 30px rgba(0,0,0,0.5);
}

.cat-drawer.show { transform: translateX(0); }

.cat-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--dark-3);
}

.cat-drawer-header h3 {
  font-size: 1rem;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 10px;
}

.cat-drawer-close {
  background: transparent;
  border: none;
  color: var(--gray-light);
  font-size: 1.125rem;
  cursor: pointer;
  padding: 4px 8px;
}

.cat-drawer-body {
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cat-drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--dark-2);
  border: 1px solid var(--dark-4);
  color: var(--gray-light);
  padding: 12px 14px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.cat-drawer-item:hover { border-color: var(--red); color: var(--white); }

.cat-drawer-item.active {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

@media (max-width: 900px) {
  .steps-progress-container {
    flex-direction: column;
  }
  
  .mini-status {
    min-width: 100%;
  }
}

@media (max-width: 720px) {
  /* Modal de descrição em coluna */
  .desc-modal-body {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
  
  .desc-modal-image {
    width: 100%;
    height: 200px;
  }
  
  .desc-modal {
    max-height: 90vh;
  }
}

@media (max-width: 700px) {
  /* Banner em coluna */
  .incompat-banner {
    flex-direction: column;
    padding: 16px;
    gap: 12px;
  }
  
  .incompat-banner-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  
  .incompat-banner-title {
    font-size: 1rem;
  }
  
  .incompat-banner-text {
    font-size: 0.8125rem;
  }
  
  /* Esconde label do botão "Limpar tudo" */
  .bottom-clear span {
    display: none;
  }
  
  .bottom-clear {
    padding: 12px;
  }
  
  /* (2) Build/Consumo ficam para a tela de resumo no celular */
  .mini-status { display: none; }

  /* Cabeçalho da etapa: título menor, tudo alinhado, "Pular" compacto */
  .step-header { gap: 12px; }
  .step-title-group { gap: 12px; }
  .step-title-group h2 { font-size: 1.1875rem; line-height: 1.25; }
  .step-title-group p { font-size: 0.75rem; }
  .btn-skip { padding: 8px 12px; font-size: 0.6875rem; white-space: nowrap; }

  /* Categorias de periféricos: os chips dão lugar a um botão que
     abre o painel lateral pela esquerda */
  .peri-cat-bar { display: none; }
  .btn-cat-open { display: inline-flex; }

  /* (3) Busca compacta: lupa no canto ESQUERDO, Filtro no canto DIREITO.
     Ao tocar na lupa, expande (classe .expanded via JS + :focus-within). */
  .filter-bar { justify-content: space-between; }

  .filter-bar .search-wrapper {
    flex: 0 0 44px;
    min-width: 44px;
    transition: flex 0.25s ease;
  }

  .filter-bar .search-wrapper:not(.expanded) .search-input {
    color: transparent;      /* colapsada: nada de texto, só a lupa */
    cursor: pointer;
  }

  .filter-bar .search-wrapper:not(.expanded) .search-input::placeholder {
    color: transparent;
  }

  .filter-bar .search-wrapper.expanded,
  .filter-bar .search-wrapper:focus-within {
    flex: 1 1 auto;
  }

  /* (4) Barra inferior em DUAS linhas: botões em cima, preços embaixo */
  .bottom-bar {
    flex-wrap: wrap;
    padding: 10px 14px 12px;
    gap: 10px;
    row-gap: 10px;
  }

  .bottom-toggle {
    order: 1;
    flex: 1 1 auto;
    justify-content: center;
    padding: 9px 10px;
    font-size: 0.75rem;
  }

  .bottom-clear { order: 2; flex-shrink: 0; }

  .bottom-finalize {
    order: 3;
    flex-shrink: 0;          /* o Finalizar NUNCA é espremido pra fora */
    padding: 10px 14px;
    font-size: 0.8125rem;
  }

  .bottom-prices {
    order: 4;
    flex: 1 1 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .bottom-price-card {
    align-items: flex-end;   /* cartão alinhado à direita */
    text-align: right;
  }

  .bottom-price-value { font-size: 1.25rem; }

  /* A barra em duas linhas é mais alta: reserva mais espaço no fim */
  .builder-page-new { padding-bottom: 150px; }
}
