/*
 * Fasto V3.1 targeted fixes.
 * Loaded after the V2.8/V2.9/V3.0 CSS so it does not rewrite the user's main CSS file.
 */

/* 1) Quick Browse: make the bike loop use the full viewport width and four equal columns. */
.fasto-v2-discovery-section,
.fasto-v2-home .fasto-v2-discovery-section{
  width:100%;
  max-width:none;
  padding-left:16px;
  padding-right:16px;
  overflow:hidden;
}
.fasto-v2-discovery-section > .fasto-v2-container,
.fasto-v2-discovery-section .fasto-v2-container,
.fasto-v2-discovery-section .bikes-cats-subcats-list,
.fasto-v2-discovery-section .ajax-bikes-holder,
.fasto-v2-discovery-section .bikes-holder,
.fasto-v2-discovery-section .bikes-list,
.fasto-v2-discovery-section ul.articles.bikes,
.fasto-v2-discovery-section .ajax-bikes-holder ul.articles.bikes,
.fasto-v2-discovery-section .bikes-filter-data ul.articles.bikes{
  width:100%;
  max-width:none;
  margin-left:0;
  margin-right:0;
}
.fasto-v2-discovery-section ul.articles.bikes,
.fasto-v2-discovery-section .ajax-bikes-holder ul.articles.bikes,
.fasto-v2-discovery-section .bikes-filter-data ul.articles.bikes{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:0;
  padding-left:0;
  padding-right:0;
  margin-top:0;
}
.fasto-v2-discovery-section li.bike-model{
  width:auto;
  max-width:none;
  flex:none;
  padding:0;
}

/* 2) Bike loop: square/flat cards, no rounded app-like UI. */
ul.articles.bikes .fasto-v2-bike-card,
.ajax-bikes-holder ul.articles.bikes .fasto-v2-bike-card,
.bikes-filter-data ul.articles.bikes .fasto-v2-bike-card,
.fasto-v2-bike-card,
.fasto-v2-bike-card:before,
.fasto-v2-bike-card:after,
.fasto-v2-bike-card .post-thumb,
.fasto-v2-bike-card .post-thumb img,
.fasto-v2-bike-card .bike-year,
.fasto-v2-bike-card .compare-holder a,
.fasto-v2-bike-card .bike-categories li,
.fasto-v2-bike-card .bike-categories-wrapper li,
.fasto-v2-bike-card .bike-categories a,
.fasto-v2-bike-card .brand-price li,
.fasto-v2-bike-card .brand-price a,
.fasto-v2-admin-card-links a{
  border-radius:0;
  box-shadow:none;
}
.fasto-v2-bike-card{
  border-left:1px solid #e1e5ea;
  border-right:1px solid #e1e5ea;
  border-top:1px solid #e1e5ea;
  border-bottom:1px solid #e1e5ea;
}
.fasto-v2-bike-card .post-thumb{
  background:#f6f7f9;
}
.fasto-v2-bike-card .compare-holder a{
  background:#fff;
}

/* 3) Single bike geometry/sizing table: no rounded corners anywhere. */
.bike-geometry,
#table-geometry-wrapper,
#table-geometry-scroll,
.bike-geometry table,
.bike-geometry thead,
.bike-geometry tbody,
.bike-geometry tr,
.bike-geometry th,
.bike-geometry td,
.bike-geometry tr:first-child th,
.bike-geometry tr:first-child th:first-child,
.bike-geometry tr:first-child th:last-child,
.bike-geometry tr:last-child td:first-child,
.bike-geometry tr:last-child td:last-child,
.bike-single .bike-geometry,
.bike-single .bike-geometry *{
  border-radius:0;
  box-shadow:none;
}
.bike-geometry{
  border-left:0;
  border-right:0;
}
.bike-geometry table{
  border-collapse:collapse;
  border-spacing:0;
}
.bike-geometry th,
.bike-geometry td{
  border-color:#dde2e8;
}

/* 4) Single bike gallery thumbs: flat thumbnails and allow inline background images to show. */
#bike-small-thumbs,
#bike-small-thumbs .splide__track,
#bike-small-thumbs .splide__list,
#bike-small-thumbs .splide__slide,
#bike-small-thumbs .splide__slide a,
#bike-small-thumbs .splide__slide a.image{
  border-radius:0;
  box-shadow:none;
}
#bike-small-thumbs .splide__slide{
  background-color:#f4f6f8;
  background-size:cover;
  background-position:center center;
  background-repeat:no-repeat;
  overflow:hidden;
}
#bike-small-thumbs .splide__slide.is-active{
  outline:2px solid #ff3939;
  outline-offset:-2px;
}
#bike-small-thumbs .splide__slide img,
#bike-small-thumbs .splide__slide a.image img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

@media (max-width:1180px){
  .fasto-v2-discovery-section ul.articles.bikes,
  .fasto-v2-discovery-section .ajax-bikes-holder ul.articles.bikes,
  .fasto-v2-discovery-section .bikes-filter-data ul.articles.bikes{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width:680px){
  .fasto-v2-discovery-section{padding-left:0;padding-right:0;}
  .fasto-v2-discovery-section ul.articles.bikes,
  .fasto-v2-discovery-section .ajax-bikes-holder ul.articles.bikes,
  .fasto-v2-discovery-section .bikes-filter-data ul.articles.bikes{
    grid-template-columns:1fr;
  }
}
