/*
 * Fasto V3.2 targeted fixes.
 * Does not edit the main fasto-v2.css file.
 * Fixes Quick Browse full-width loop and single-bike Splide gallery visibility.
 */

/* ==========================================================
   QUICK BROWSE: real full-width 4-column bike loop
   ========================================================== */
.fasto-v25-browse,
.fasto-v2-home .fasto-v25-browse,
.fasto-v2-discovery-section,
.fasto-v25-page .fasto-v25-browse{
  width:100%;
  max-width:none;
  padding-left:0;
  padding-right:0;
  overflow:hidden;
}

.fasto-v25-browse .bike-home-randomize,
.fasto-v25-browse > .fasto-v25-section-head{
  padding-left:clamp(22px,4vw,72px);
  padding-right:clamp(22px,4vw,72px);
}

.fasto-v25-browse .bikes-cats-subcats-list,
.fasto-v25-browse .ajax-bikes-holder{
  width:100vw;
  max-width:none;
  margin-left:calc(50% - 50vw);
  margin-right:calc(50% - 50vw);
  padding-left:clamp(22px,4vw,72px);
  padding-right:clamp(22px,4vw,72px);
  box-sizing:border-box;
}

.fasto-v25-browse .ajax-bikes-holder{
  padding-top:0;
}

.fasto-v25-browse .ajax-bikes-holder ul.articles.bikes,
.fasto-v25-browse ul.articles.bikes,
.fasto-v25-browse .bikes-filter-data ul.articles.bikes,
.fasto-v2-discovery-section .ajax-bikes-holder ul.articles.bikes,
.fasto-v2-discovery-section ul.articles.bikes{
  width:100%;
  max-width:none;
  margin:26px 0 0 0;
  padding:0;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:0;
  border-left:1px solid #dde3ea;
  border-top:1px solid #dde3ea;
  box-sizing:border-box;
}

.fasto-v25-browse ul.articles.bikes > li,
.fasto-v25-browse .ajax-bikes-holder ul.articles.bikes > li,
.fasto-v2-discovery-section ul.articles.bikes > li,
.fasto-v2-discovery-section .ajax-bikes-holder ul.articles.bikes > li{
  width:auto;
  max-width:none;
  min-width:0;
  flex:none;
  padding:0;
  margin:0;
  grid-column:auto;
}

/* Hide loop ad placeholders inside homepage quick browse so they do not create empty grid columns. */
.fasto-v25-browse ul.articles.bikes > li.bike-model-aff,
.fasto-v25-browse ul.articles.bikes > li:has(.adsbygoogle),
.fasto-v25-browse ul.articles.bikes > li:has(bike_aff_cache),
.fasto-v25-browse .ajax-bikes-holder ul.articles.bikes > li.bike-model-aff,
.fasto-v25-browse .ajax-bikes-holder ul.articles.bikes > li:has(.adsbygoogle),
.fasto-v25-browse .ajax-bikes-holder ul.articles.bikes > li:has(bike_aff_cache){
  display:none;
}

/* Square bike loop cards everywhere in the bike loop. */
.fasto-v25-browse .fasto-v2-bike-card,
.fasto-v25-browse .fasto-v2-bike-card *,
ul.articles.bikes .fasto-v2-bike-card,
ul.articles.bikes .fasto-v2-bike-card *,
.ajax-bikes-holder ul.articles.bikes .fasto-v2-bike-card,
.ajax-bikes-holder ul.articles.bikes .fasto-v2-bike-card *{
  border-radius:0;
  box-shadow:none;
}

.fasto-v25-browse .fasto-v2-bike-card,
ul.articles.bikes .fasto-v2-bike-card{
  border:0;
  border-right:1px solid #dde3ea;
  border-bottom:1px solid #dde3ea;
  min-height:520px;
}

.fasto-v25-browse .fasto-v2-bike-card .post-thumb,
ul.articles.bikes .fasto-v2-bike-card .post-thumb{
  background:none ;
}

/* ==========================================================
   SINGLE BIKE GALLERY: visible big image + clean thumbs
   ========================================================== */
.fasto-v25-single-media,
.fasto-v25-single-media .post-thumb.bike{
  overflow:hidden;
}

.fasto-v25-single-media #bike-multi-slider,
#bike-multi-slider.post-thumb.bike.multi-images{
  display:block;
  position:relative;
  width:100%;
  min-height:0;
  height:auto;
  padding:0;
  margin:0;
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
  overflow:hidden;
}

#bike-multi-slider .compare-holder-main{
  position:absolute;
  top:0;
  left:0;
  right:auto;
  z-index:20;
}

#bike-big-thumbs{
  display:block;
  order:1;
  width:100%;
  min-width:0;
  height:540px;
  min-height:540px;
  margin:0;
  padding:0;
  background:#f3f5f8;
  border:0;
  border-radius:0;
  box-shadow:none;
  overflow:hidden;
}

#bike-big-thumbs .splide__track,
#bike-big-thumbs .splide__list,
#bike-big-thumbs .splide__slide,
#bike-big-thumbs .splide__slide a.image{
  width:100%;
  height:540px;
  min-height:540px;
  max-height:540px;
  display:block;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  overflow:hidden;
}

#bike-big-thumbs .splide__slide a.image{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  box-sizing:border-box;
}

#bike-big-thumbs img,
#bike-big-thumbs .splide__slide img,
.fasto-v25-single-media #bike-big-thumbs img{
  display:block;
  opacity:1;
  visibility:visible;
  width:auto;
  max-width:100%;
  height:auto;
  max-height:492px;
  object-fit:contain;
  mix-blend-mode:multiply;
  position:static;
  transform:none;
}

#bike-small-thumbs{
  display:block;
  order:2;
  width:100%;
  margin:0;
  padding:10px 20px;
  background:#fff;
  border-top:1px solid #dde3ea;
  border-bottom:1px solid #dde3ea;
  border-radius:0;
  box-shadow:none;
  overflow:hidden;
}

#bike-small-thumbs .splide__track,
#bike-small-thumbs .splide__list{
  height:60px;
  min-height:60px;
  border-radius:0;
  box-shadow:none;
}

#bike-small-thumbs .splide__slide,
#bike-small-thumbs .splide__slide a,
#bike-small-thumbs .splide__slide a.image{
  width:100px;
  height:60px;
  min-width:100px;
  min-height:60px;
  border-radius:0;
  box-shadow:none;
  background:#f3f5f8;
  overflow:hidden;
}

#bike-small-thumbs .splide__slide{
  border:1px solid #dde3ea;
}

#bike-small-thumbs .splide__slide.is-active{
  border-color:#ff3939;
  outline:0;
}

#bike-small-thumbs img,
#bike-small-thumbs .splide__slide img,
.fasto-v25-single-media #bike-small-thumbs img{
  display:block;
  opacity:1;
  visibility:visible;
  width:100%;
  height:100%;
  max-width:none;
  max-height:none;
  object-fit:cover;
  mix-blend-mode:normal;
  position:static;
  transform:none;
}

/* Geometry / sizing table square, including wrappers generated by table-scroll helpers. */
.fasto-v25-size-table,
.fasto-v25-size-table *,
.bike-geometry,
.bike-geometry *,
.fasto-v2-table-scroll,
.fasto-v2-table-scroll *{
  border-radius:0;
  box-shadow:none;
}

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

@media (max-width:680px){
  .fasto-v25-browse .bikes-cats-subcats-list,
  .fasto-v25-browse .ajax-bikes-holder{
    padding-left:0;
    padding-right:0;
  }
  .fasto-v25-browse .ajax-bikes-holder ul.articles.bikes,
  .fasto-v25-browse ul.articles.bikes,
  .fasto-v2-discovery-section .ajax-bikes-holder ul.articles.bikes,
  .fasto-v2-discovery-section ul.articles.bikes{
    grid-template-columns:1fr;
  }
  #bike-big-thumbs,
  #bike-big-thumbs .splide__track,
  #bike-big-thumbs .splide__list,
  #bike-big-thumbs .splide__slide,
  #bike-big-thumbs .splide__slide a.image{
    height:320px;
    min-height:320px;
    max-height:320px;
  }
  #bike-big-thumbs img,
  .fasto-v25-single-media #bike-big-thumbs img{
    max-height:280px;
  }
}
