/* ================================
   BARRA COMPARADORA (FLUTUANTE)
   ================================ */
#compare-bar-root.compare-bar {
  position: fixed;                 /* flutuante e visível em qualquer página */
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;                    /* largura fixa desktop */
  max-width: calc(100% - 32px);    /* segura em telas menores */
  background: #ffffff;
  border-radius: 20px;
  padding: 12px 18px;
  z-index: 9999;                   /* acima de tudo */
  display: none;                   /* aparece quando há seleção */
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
@media (max-width: 640px){
  #compare-bar-root.compare-bar {
    width: 94%;
    left: 50%;
    transform: translateX(-50%);
  }
}
.compare-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Ícone (substitui o contador antigo) */
.compare-logo img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: block;
}

/* Área das miniaturas selecionadas */
.compare-thumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  flex-wrap: wrap;
  min-height: 56px;
}
.compare-thumbs .thumb-item { position: relative; }
.compare-thumbs img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 15px;            /* radius 15 nas thumbs */
}

/* === “X” VERMELHO — IGUAL AO DO CARD DA PÁGINA COMPARAR === */
.compare-thumbs .remove-thumb,
.btn-remover-card {
  background: #e74c3c;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;             /* 100% redondo */
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;        /* centraliza o “×” */
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.compare-thumbs .remove-thumb {
  position: absolute;
  top: -8px;
  right: -8px;
}
.compare-thumbs .remove-thumb:hover,
.btn-remover-card:hover { background: #c0392b; }

/* Novo contador (x/3) antes do botão */
.compare-qty {
  background: #030B40;
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

/* Botão Comparar (≥ 2 selecionados) */
#compare-btn {
  display: none;
  padding: 12px 18px;
  font-size: 15px;
  background: #030B40;
  color: #fff;
  border: none;
  border-radius: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
#compare-btn:hover { background: #020833; }

/* ================================
   CHECKBOX "COMPARAR" (Loop)
   ================================ */
.compare-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  cursor: pointer;
}
.compare-checkbox-label input { display: none; }
.compare-checkbox-ui {
  width: 18px; height: 18px;
  border: 2px solid #030B40;
  border-radius: 4px;
  position: relative;
}
.compare-checkbox-label input:checked + .compare-checkbox-ui {
  background: #030B40;
  border-color: #030B40;
}
.compare-checkbox-label input:checked + .compare-checkbox-ui::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.compare-checkbox-text {
  font-weight: 600;
  color: #030B40;
}

/* ================================
   PÁGINA /comparar
   ================================ */
.compare-header { text-align: center; margin: 20px 0 30px; }
.compare-title  { font-size: 24px; font-weight: 700; color: #000; margin-bottom: 8px; }
.compare-desc   { font-size: 15px; color: #444; }

.compare-top-actions { text-align: center; margin-bottom: 12px; }
.compare-back {
  display: inline-block;
  padding: 10px 14px;
  background: #f4f6f8;
  border-radius: 10px;
  color: #222;
  text-decoration: none;
  font-weight: bold;
}
.compare-back:hover { background: #e9eef2; }

/* Grid de cards */
.comparar-tabela {
  display: flex;
  gap: 24px;
  margin: 24px 0 50px;
  justify-content: center;
  flex-wrap: wrap;
}
.comparar-coluna {
  position: relative;
  flex: 1;
  min-width: 280px;
  max-width: 360px;
  background: #fff;
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  border: 1px solid #eaeaea;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.comparar-coluna:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

/* X vermelho no topo direito do card (mesmo estilo do da barra) */
.btn-remover-card {
  position: absolute;
  top: 10px;
  right: 10px;
}

/* Imagens com radius 15 */
.comparar-thumb img,
.cc-rounded,
.comparar-img {
  max-width: 100%;
  height: auto;
  border-radius: 15px !important;
  object-fit: cover;
}

/* Conteúdo do card do CARRO */
.comparar-modelo {
  font-size: 18px;
  font-weight: 700;
  margin: 6px 0 2px;
  color: #000000;
}
.comparar-atributos {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  text-align: left;
  font-size: 15px;
}
.comparar-atributos li {
  padding: 6px 0;
  border-bottom: 1px solid #f4f4f4;
}

/* Loja (acima do Ver mais) */
.comparar-loja {
  margin: 10px 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: #030B40;
  text-align: center;
}

/* Botão Ver mais (full width) */
.comparar-actions { margin-top: auto; }
.btn-vermais {
  display: inline-block;
  width: 100%;
  padding: 12px 0;
  background: #030B40;
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: background .2s;
}
.btn-vermais:hover { background: #020833; color: #fff; }

/* ================================
   CARD DA LOJA (aparece abaixo do card do carro)
   ================================ */
.loja-card {
  margin-top: 14px;
  border: 1px solid #eef0f3;
  border-radius: 14px;
  padding: 12px;
  background: #fafbfc;
}
.loja-card img {
  border-radius: 15px;
  width: 100%;
  height: auto;
}
.loja-endereco {
  font-size: 14px;
  margin: 8px 0 6px;
}
.loja-nome {
  font-size: 14px;
  font-weight: 700;
  color: #030B40;
  margin-bottom: 8px;
}
.loja-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.loja-actions a {
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}
.btn-maps { background: #0073aa; }
.btn-zap  { background: #25d366; }

/* ================================
   Animação "voando" a thumb até a barra
   ================================ */
.cc-fly {
  position: fixed;
  pointer-events: none;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 15px;
  z-index: 10000;
  transition: transform .45s cubic-bezier(.2,.6,.2,1), opacity .45s;
  opacity: .95;
}
