/* =========================================================
   Carros Lagarto 10.32.299 — HOME REALMENTE IGUAL A VEÍCULOS

   A 10.32.298 igualava o card, mas a Home ainda mantinha contexto próprio
   (largura útil, trilho patrocinado, wrapper, favorito e selo). Esta camada
   transforma o card de veículo em um único componente visual compartilhado.
   ========================================================= */

@media (max-width: 740px) {
  /* Mesma largura útil da página Veículos. */
  html body.clc-home-premium .clc-63-vehicles > .clc-62-container {
    width: calc(100% - 20px) !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Grades públicas: mesma quantidade de colunas e mesmo espaçamento. */
  html body.clc-home-v63 .clc-free-cascade-grid,
  html body.clc-category-veiculos .clc-category-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: auto !important;
    align-items: start !important;
    gap: 9px !important;
  }

  /* Na Home, os carrosséis intercalados seguem largura total sem alterar os cards. */
  html body.clc-home-v63 .clc-free-cascade-grid > .clc-free-category-carousel,
  html body.clc-home-v63 .clc-free-cascade-grid > section:not(.clc-home-public-vehicle-card) {
    grid-column: 1 / -1 !important;
  }

  /* Patrocinados da Home passam a ter a mesma moldura da página Veículos. */
  html body.clc-home-premium .clc-sponsored-section--vehicle-top.clc-category-sponsored-sticky {
    position: relative !important;
    top: auto !important;
    z-index: auto !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 10px !important;
    padding: 6px !important;
    box-sizing: border-box !important;
    border: 1px solid rgba(99,230,0,.24) !important;
    border-radius: 15px !important;
    background: rgba(5,8,6,.96) !important;
    box-shadow: 0 10px 28px rgba(0,0,0,.32) !important;
    overflow: hidden !important;
    backdrop-filter: blur(10px) !important;
  }

  html body.clc-home-premium .clc-sponsored-section--vehicle-top .clc-sponsored-track,
  html body.clc-category-veiculos .clc-category-sponsored-track {
    display: flex !important;
    width: 100% !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    align-items: flex-start !important;
    scroll-snap-type: x mandatory !important;
    scroll-behavior: smooth !important;
    scrollbar-width: none !important;
  }
  html body.clc-home-premium .clc-sponsored-section--vehicle-top .clc-sponsored-track::-webkit-scrollbar,
  html body.clc-category-veiculos .clc-category-sponsored-track::-webkit-scrollbar { display: none !important; }

  html body.clc-home-premium .clc-sponsored-section--vehicle-top .clc-category-sponsored-card,
  html body.clc-category-veiculos .clc-category-sponsored-card {
    flex: 0 0 calc((100% - 8px) / 2) !important;
    width: calc((100% - 8px) / 2) !important;
    max-width: calc((100% - 8px) / 2) !important;
    min-width: 0 !important;
    scroll-snap-align: start !important;
  }

  /* ÚNICO componente visual para qualquer card de veículo. */
  html body article.clc-category-vehicle-card {
    position: relative !important;
    display: flex !important;
    flex-direction: column !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,.48) !important;
    border-radius: 17px !important;
    background: #040706 !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.22) !important;
    transform: none !important;
  }

  html body article.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: 4 / 3 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 0 !important;
    background: #080c09 !important;
  }

  html body article.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;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: cover !important;
    object-position: center center !important;
  }

  html body article.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;
    width: 100% !important;
    min-height: 78px !important;
    height: auto !important;
    max-height: none !important;
    gap: 5px !important;
    margin: 0 !important;
    padding: 10px 8px 12px !important;
    box-sizing: border-box !important;
    background: #040706 !important;
    text-align: center !important;
  }

  html body article.clc-category-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines h3,
  html body article.clc-category-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines h3 a {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #fff !important;
    font-size: 14.5px !important;
    line-height: 1.15 !important;
    font-weight: 900 !important;
    text-align: center !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  html body article.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: 18px !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;
  }

  html body article.clc-category-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines p,
  html body article.clc-category-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines .clc-category-vehicle-open,
  html body article.clc-category-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines .clc-home-vehicle-open {
    display: none !important;
    min-height: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Favorito exatamente igual em Home e Veículos. */
  html body article.clc-category-vehicle-card .clc-category-vehicle-favorite {
    position: absolute !important;
    z-index: 20 !important;
    top: 8px !important;
    right: 8px !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 50% !important;
    background: rgba(5,8,7,.82) !important;
    border: 1px solid rgba(255,255,255,.30) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,.28) !important;
    color: #fff !important;
  }
  html body article.clc-category-vehicle-card .clc-category-vehicle-favorite svg {
    width: 22px !important;
    height: 22px !important;
    display: block !important;
  }
  html body article.clc-category-vehicle-card .clc-category-vehicle-favorite path {
    fill: transparent !important;
    stroke: currentColor !important;
    stroke-width: 1.9 !important;
  }
  html body article.clc-category-vehicle-card .clc-category-vehicle-favorite.is-favorite {
    background: #63E600 !important;
    border-color: #63E600 !important;
    color: #050807 !important;
  }
  html body article.clc-category-vehicle-card .clc-category-vehicle-favorite.is-favorite path {
    fill: #050807 !important;
    stroke: #050807 !important;
  }

  /* Mesmo selo patrocinado: a Home agora também usa a classe da página Veículos. */
  html body article.clc-category-vehicle-card .clc-category-sponsored-badge,
  html body article.clc-category-vehicle-card .clc-sponsored-badge {
    position: absolute !important;
    z-index: 21 !important;
    top: 9px !important;
    left: 9px !important;
    display: inline-flex !important;
    width: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 4px 8px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #63E600 !important;
    color: #071007 !important;
    font-size: 9px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
    box-shadow: none !important;
  }
}

@media (max-width: 390px) {
  html body.clc-home-v63 .clc-free-cascade-grid,
  html body.clc-category-veiculos .clc-category-grid { gap: 8px !important; }

  html body article.clc-category-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines {
    min-height: 73px !important;
    gap: 4px !important;
    padding: 9px 7px 10px !important;
  }
  html body article.clc-category-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines h3,
  html body article.clc-category-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines h3 a { font-size: 13.5px !important; }
  html body article.clc-category-vehicle-card .clc-category-vehicle-content.clc-vehicle-card-two-lines > strong { font-size: 17px !important; }
}
