
/* =========================================================
   AutoMart Vehicle List View V17.1 COMPACT
   Correction for the live /vehicles List mode.
   Keeps the filter visible, uses the entire results column,
   and turns each result into a shorter premium horizontal card.
   ========================================================= */

body.site-page .premium-search-results-v15.view-mode-list-v17{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
}

body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-search-grid-v15{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:16px!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  align-items:stretch!important;
}

body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-auto-card{
  display:grid!important;
  grid-template-columns:minmax(300px,35%) minmax(0,1fr)!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  min-height:232px!important;
  height:auto!important;
  overflow:hidden!important;
  border:1px solid #dfe8e3!important;
  border-radius:18px!important;
  background:
    radial-gradient(circle at 100% 0,rgba(15,154,90,.035),transparent 23%),
    #fff!important;
  box-shadow:0 9px 24px rgba(15,44,32,.07)!important;
}

body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-auto-card:hover{
  transform:translateY(-2px)!important;
  border-color:#cfe2d8!important;
  box-shadow:0 15px 32px rgba(15,44,32,.10)!important;
}

/* LANDSCAPE MEDIA — this is the main V17.0 correction */
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-auto-media{
  position:relative!important;
  display:block!important;
  width:100%!important;
  height:232px!important;
  min-height:232px!important;
  max-height:232px!important;
  overflow:hidden!important;
  border-radius:0!important;
}

body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-auto-media img{
  display:block!important;
  width:100%!important;
  height:232px!important;
  min-height:232px!important;
  max-height:232px!important;
  object-fit:cover!important;
  object-position:center!important;
}

body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-media-shade{
  background:linear-gradient(180deg,rgba(2,18,12,.06) 30%,rgba(2,18,12,.68) 100%)!important;
}

body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-card-badges{
  top:13px!important;
  left:13px!important;
  gap:6px!important;
}
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-badge{
  min-height:26px!important;
  padding:0 9px!important;
  font-size:12px!important;
}
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-heart{
  top:13px!important;
  right:13px!important;
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  font-size:20px!important;
}
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-photo-meta{
  left:13px!important;
  right:13px!important;
  bottom:12px!important;
  gap:8px!important;
}
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-photo-meta em{
  max-width:55%!important;
  overflow:hidden!important;
  white-space:nowrap!important;
  text-overflow:ellipsis!important;
}

/* CONTENT + ACTION RAIL */
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-auto-body{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 188px!important;
  grid-template-areas:
    "title actions"
    "price actions"
    "monthly actions"
    "facts actions"
    "dealer actions"!important;
  column-gap:20px!important;
  row-gap:0!important;
  width:100%!important;
  min-width:0!important;
  min-height:232px!important;
  padding:17px 17px 15px 20px!important;
  box-sizing:border-box!important;
}

body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-title-row{
  grid-area:title!important;
  display:grid!important;
  grid-template-columns:42px minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:10px!important;
  min-width:0!important;
  margin:0 0 8px!important;
}
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-brandmark{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  border-radius:12px!important;
}
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-title-copy{
  min-width:0!important;
}
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-title-copy h3{
  margin:0!important;
  font-size:16px!important;
  line-height:1.18!important;
  letter-spacing:-.024em!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-title-copy p{
  margin:3px 0 0!important;
  font-size:12px!important;
  line-height:1.3!important;
  color:#6f7b90!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-condition{
  padding:6px 9px!important;
  border-radius:999px!important;
  background:#edf8f2!important;
  color:#17633f!important;
  font-size:12px!important;
  font-weight:750!important;
  white-space:nowrap!important;
}

body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-price{
  grid-area:price!important;
  margin:0!important;
  font-size:25px!important;
  line-height:1.05!important;
  letter-spacing:-.035em!important;
  color:#087a45!important;
  font-weight:850!important;
}

body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-monthly{
  grid-area:monthly!important;
  margin:4px 0 10px!important;
  font-size:12px!important;
  line-height:1.25!important;
  color:#657189!important;
}

body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-facts{
  grid-area:facts!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px 16px!important;
  margin:0!important;
  padding:0 0 10px!important;
  border-bottom:1px solid #e9eeeb!important;
}
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-facts span{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:12px!important;
  color:#5f6d82!important;
}
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-facts i{
  width:18px!important;
  margin-right:4px!important;
}

body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-dealer-row{
  grid-area:dealer!important;
  display:grid!important;
  grid-template-columns:38px minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:9px!important;
  min-width:0!important;
  margin:10px 0 0!important;
  padding:0!important;
  border:0!important;
}
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-dealer-avatar{
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  font-size:12px!important;
}
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-dealer-row>div:nth-child(2){
  min-width:0!important;
}
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-dealer-row strong{
  display:block!important;
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:12px!important;
}
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-dealer-row small{
  font-size:12px!important;
}
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-rating{
  padding-left:6px!important;
  text-align:right!important;
}
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-rating strong{
  font-size:12px!important;
}
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-rating small{
  display:block!important;
  margin-top:2px!important;
  font-size:12px!important;
}

/* CTA rail — premium but compact */
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-card-actions{
  grid-area:actions!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:center!important;
  gap:9px!important;
  align-self:stretch!important;
  min-width:0!important;
  margin:0!important;
  padding:10px 0 10px 18px!important;
  border-top:0!important;
  border-left:1px solid #e7edea!important;
}
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-detail-btn,
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-contact-btn{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-width:0!important;
  min-height:43px!important;
  padding:0 10px!important;
  border-radius:10px!important;
  font-size:12px!important;
  font-weight:800!important;
  text-align:center!important;
}
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-detail-btn{
  border:1px solid #0f9a5a!important;
  background:linear-gradient(135deg,#11a765,#07894e)!important;
  color:#fff!important;
  box-shadow:0 7px 16px rgba(15,154,90,.15)!important;
}
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-contact-btn{
  border:1px solid #0f9a5a!important;
  background:#fff!important;
  color:#087a45!important;
}

/* Make sure the results column itself never retains a grid-card max width. */
body.site-page .premium-listing-layout-v14-1 > .premium-results-v14-1{
  max-width:none!important;
  min-width:0!important;
}
body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-search-grid-v15 > .premium-auto-card{
  max-width:none!important;
  justify-self:stretch!important;
}

/* TABLET */
@media (max-width:1199px) and (min-width:850px){
  body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-auto-card{
    grid-template-columns:280px minmax(0,1fr)!important;
  }
  body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-auto-media,
  body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-auto-media img{
    height:225px!important;
    min-height:225px!important;
    max-height:225px!important;
  }
  body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-auto-body{
    grid-template-columns:minmax(0,1fr) 155px!important;
    min-height:225px!important;
    column-gap:14px!important;
    padding:14px!important;
  }
  body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-title-copy h3{
    font-size:14px!important;
  }
  body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-condition{
    display:none!important;
  }
  body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-price{
    font-size:21px!important;
  }
}

/* MOBILE: stack cleanly instead of squeezing the horizontal card. */
@media (max-width:849px){
  body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-auto-card{
    display:block!important;
    min-height:0!important;
  }
  body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-auto-media,
  body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-auto-media img{
    height:230px!important;
    min-height:230px!important;
    max-height:230px!important;
  }
  body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-auto-body{
    display:block!important;
    min-height:0!important;
    padding:15px!important;
  }
  body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-title-copy h3{
    white-space:normal!important;
  }
  body.site-page .premium-search-results-v15.view-mode-list-v17 .premium-card-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:9px!important;
    margin-top:13px!important;
    padding:13px 0 0!important;
    border-left:0!important;
    border-top:1px solid #e7edea!important;
  }
}
