/* =========================================================
   Carros Lagarto 10.32.296 — VISUAL APROVADO DOS CARDS
   Base visual: modelo aprovado em 02/10/2026.

   Objetivos:
   - manter 2 cards por linha no mobile;
   - aumentar a área útil da foto e reduzir o bloco preto inferior;
   - centralizar nome/modelo e preço;
   - preservar selo Patrocinado e coração sobre a imagem;
   - manter o padrão preto + verde #63E600;
   - não alterar regras comerciais, consultas ou funcionalidades.
   ========================================================= */

@media (max-width: 740px) {
  /* Grade pública: duas colunas, alinhadas e compactas. */
  html body.clc-home-v63 .clc-free-cascade-grid,
  html body.clc-home-premium .clc-free-cascade-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: auto !important;
    align-items: start !important;
    gap: 10px !important;
  }

  html body .clc-free-cascade-grid > .clc-free-category-carousel,
  html body .clc-free-cascade-grid > section:not(.clc-home-public-vehicle-card) {
    grid-column: 1 / -1 !important;
  }

  /* Estrutura geral do card conforme o modelo visual aprovado. */
  html body .clc-sponsored-section--vehicle-top .clc-sponsored-track > article.clc-home-sponsored-vehicle-card.clc-category-vehicle-card,
  html body .clc-free-cascade-grid > article.clc-home-public-vehicle-card.clc-category-vehicle-card,
  html body.clc-category-veiculos article.clc-category-vehicle-card {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid rgba(99, 230, 0, .38) !important;
    border-radius: 16px !important;
    background: #050807 !important;
    box-shadow: 0 0 0 1px rgba(99, 230, 0, .035), 0 10px 24px rgba(0, 0, 0, .18) !important;
    transform: none !important;
  }

  /* Patrocinados continuam lado a lado no carrossel. */
  html body .clc-sponsored-section--vehicle-top .clc-sponsored-track {
    gap: 10px !important;
    align-items: flex-start !important;
  }

  html body .clc-sponsored-section--vehicle-top .clc-sponsored-track > article.clc-home-sponsored-vehicle-card.clc-category-vehicle-card {
    flex: 0 0 calc((100% - 10px) / 2) !important;
    width: calc((100% - 10px) / 2) !important;
    scroll-snap-align: start !important;
  }

  /*
   * Foto dominante: 5:4 ocupa bem mais do card que o layout anterior.
   * O object-fit mantém o enquadramento cheio sem deformar a imagem.
   */
  html body .clc-sponsored-section--vehicle-top .clc-home-sponsored-vehicle-card .clc-category-vehicle-media,
  html body .clc-free-cascade-grid .clc-home-public-vehicle-card .clc-category-vehicle-media,
  html body.clc-category-veiculos .clc-category-vehicle-card .clc-category-vehicle-media {
    position: relative !important;
    display: block !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 5 / 4 !important;
    overflow: hidden !important;
    border-radius: 0 !important;
    background: #0a0d0b !important;
  }

  html body .clc-sponsored-section--vehicle-top .clc-home-sponsored-vehicle-card .clc-category-vehicle-media img,
  html body .clc-free-cascade-grid .clc-home-public-vehicle-card .clc-category-vehicle-media img,
  html body.clc-category-veiculos .clc-category-vehicle-card .clc-category-vehicle-media img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center !important;
  }

  /*
   * Informações centralizadas e sem bloco preto excessivo.
   * O card passa a terminar logo após preço, como no modelo aprovado.
   */
  html body .clc-sponsored-section--vehicle-top .clc-home-sponsored-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines,
  html body .clc-free-cascade-grid .clc-home-public-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines,
  html body.clc-category-veiculos .clc-category-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    min-height: 72px !important;
    height: auto !important;
    max-height: none !important;
    gap: 5px !important;
    margin: 0 !important;
    padding: 9px 8px 11px !important;
    background: #050807 !important;
    box-sizing: border-box !important;
  }

  html body .clc-sponsored-section--vehicle-top .clc-home-sponsored-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines h3,
  html body .clc-free-cascade-grid .clc-home-public-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines h3,
  html body.clc-category-veiculos .clc-category-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines h3 {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #f5f7f5 !important;
    font-size: 14px !important;
    line-height: 1.15 !important;
    font-weight: 850 !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  html body .clc-sponsored-section--vehicle-top .clc-home-sponsored-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines h3 a,
  html body .clc-free-cascade-grid .clc-home-public-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines h3 a,
  html body.clc-category-veiculos .clc-category-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines h3 a {
    display: block !important;
    width: 100% !important;
    color: #f5f7f5 !important;
    text-decoration: none !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  html body .clc-sponsored-section--vehicle-top .clc-home-sponsored-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines > strong,
  html body .clc-free-cascade-grid .clc-home-public-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines > strong,
  html body.clc-category-veiculos .clc-category-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines > strong {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #63E600 !important;
    font-size: 17px !important;
    line-height: 1.05 !important;
    font-weight: 900 !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Nenhum metadado legado pode voltar a reservar espaço no bloco inferior. */
  html body .clc-sponsored-section--vehicle-top .clc-home-sponsored-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines p,
  html body .clc-sponsored-section--vehicle-top .clc-home-sponsored-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines .clc-category-vehicle-open,
  html body .clc-free-cascade-grid .clc-home-public-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines p,
  html body .clc-free-cascade-grid .clc-home-public-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines .clc-category-vehicle-open,
  html body.clc-category-veiculos .clc-category-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines p,
  html body.clc-category-veiculos .clc-category-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines .clc-category-vehicle-open {
    display: none !important;
    min-height: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Coração: botão escuro sobre a foto, preservando destaque visual do veículo. */
  html body .clc-sponsored-section--vehicle-top .clc-home-sponsored-vehicle-card .clc-category-vehicle-favorite,
  html body .clc-free-cascade-grid .clc-home-public-vehicle-card .clc-category-vehicle-favorite,
  html body.clc-category-veiculos .clc-category-vehicle-card .clc-category-vehicle-favorite {
    top: 7px !important;
    right: 7px !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 50% !important;
  }

  /* Selo patrocinado compacto no canto da imagem. */
  html body .clc-sponsored-section--vehicle-top .clc-sponsored-badge {
    top: 7px !important;
    left: 7px !important;
    padding: 5px 8px !important;
    border-radius: 999px !important;
    background: #63E600 !important;
    color: #071000 !important;
    font-size: 8.5px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
    letter-spacing: .02em !important;
  }
}

@media (max-width: 390px) {
  html body .clc-sponsored-section--vehicle-top .clc-home-sponsored-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines,
  html body .clc-free-cascade-grid .clc-home-public-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines,
  html body.clc-category-veiculos .clc-category-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines {
    min-height: 68px !important;
    gap: 4px !important;
    padding: 8px 7px 10px !important;
  }

  html body .clc-sponsored-section--vehicle-top .clc-home-sponsored-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines h3,
  html body .clc-free-cascade-grid .clc-home-public-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines h3,
  html body.clc-category-veiculos .clc-category-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines h3 {
    font-size: 13px !important;
  }

  html body .clc-sponsored-section--vehicle-top .clc-home-sponsored-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines > strong,
  html body .clc-free-cascade-grid .clc-home-public-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines > strong,
  html body.clc-category-veiculos .clc-category-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines > strong {
    font-size: 16px !important;
  }
}
