/*
 * Fasto V4.5
 * One shared width system for every bike-card loop.
 * Loaded last; normal cascade only.
 */
:root{
  --fasto-v45-page-pad:clamp(18px,3.4vw,72px);
  --fasto-v45-page-pad-mobile:14px;
  --fasto-v45-line:#e1e6ee;
  --fasto-v45-line-soft:#edf1f5;
  --fasto-v45-ink:#171c25;
  --fasto-v45-muted:#647186;
  --fasto-v45-red:#ff3131;
  --fasto-v45-card-media:300px;
  --fasto-v45-card-copy:150px;
  --fasto-v45-card-footer:96px;
}

/* Use the same left/right rhythm everywhere bike loops appear. */
.fasto-v25-browse,
.fasto-v2-discovery-section,
.fasto-v35-bike-archive,
.fasto-v2-filter-page,
.fasto-v2-advisor-page .fasto-v2-section.tight,
.fasto-v25-single-related,
.bike-additional-data.cta,
.bike-additional-data.related{
  padding-left:0;
  padding-right:0;
}

.fasto-v25-browse .fasto-v25-section-head,
.fasto-v25-browse .bikes-cats-subcats-list,
.fasto-v25-browse .ajax-bikes-holder,
.fasto-v25-browse > ul.articles.bikes,
.fasto-v2-discovery-section .fasto-v2-container,
.fasto-v2-discovery-section .bikes-cats-subcats-list,
.fasto-v2-discovery-section .ajax-bikes-holder,
.fasto-v35-archive-header,
.fasto-v35-bike-results,
.bikes-filter-container,
.bikes-filter-data,
.bike-advisor-results,
.bike-advisor-results-wrapper,
.fasto-v2-advisor-page .fasto-v2-section.tight > .container,
.related-bikes-big-wrapper,
#all-bike-families,
.fasto-v24-single-related .related-bikes-big-wrapper,
.fasto-v24-single-related #all-bike-families,
.fasto-v25-single-related .related-bikes-big-wrapper,
.fasto-v25-single-related #all-bike-families{
  width:auto;
  max-width:none;
  margin-left:var(--fasto-v45-page-pad);
  margin-right:var(--fasto-v45-page-pad);
  padding-left:0;
  padding-right:0;
  box-sizing:border-box;
}

/* Avoid double margins when containers are nested inside the unified section container. */
.bikes-filter-data ul.articles.bikes,
.fasto-v35-bike-results > ul.articles.bikes,
.bike-advisor-results > ul.articles.bikes,
.fasto-v25-browse .ajax-bikes-holder > ul.articles.bikes,
.fasto-v2-discovery-section .ajax-bikes-holder > ul.articles.bikes{
  width:100%;
  max-width:none;
  margin:0;
  padding:0;
}

/* Shared bike-card grid. */
ul.articles.bikes,
.ajax-bikes-holder ul.articles.bikes,
.bikes-filter-data ul.articles.bikes,
.bike-advisor-results ul.articles.bikes,
.bike-advisor-holder ul.articles.bikes,
.fasto-v35-bike-results ul.articles.bikes,
.fasto-v25-browse ul.articles.bikes,
.fasto-v2-discovery-section ul.articles.bikes{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:0;
  align-items:stretch;
  list-style:none;
  border:0;
  background:transparent;
  box-sizing:border-box;
}

/* If a loop is printed without a known wrapper, still use the same page gutters. */
main > ul.articles.bikes,
.fasto-v2-page > ul.articles.bikes,
.fasto-v25-page > ul.articles.bikes{
  width:auto;
  max-width:none;
  margin-left:var(--fasto-v45-page-pad);
  margin-right:var(--fasto-v45-page-pad);
  padding:0;
}

ul.articles.bikes > li.bike-model,
.ajax-bikes-holder ul.articles.bikes > li.bike-model,
.bikes-filter-data ul.articles.bikes > li.bike-model,
.bike-advisor-results ul.articles.bikes > li.bike-model,
.fasto-v35-bike-results ul.articles.bikes > li.bike-model,
.fasto-v25-browse ul.articles.bikes > li.bike-model,
.fasto-v2-discovery-section ul.articles.bikes > li.bike-model{
  display:flex;
  width:auto;
  max-width:none;
  min-width:0;
  padding:0;
  margin:0;
  box-sizing:border-box;
}

/* Final card geometry: one exact internal structure everywhere. */
ul.articles.bikes > li.bike-model > article.fasto-v2-bike-card,
.ajax-bikes-holder ul.articles.bikes > li.bike-model > article.fasto-v2-bike-card,
.bikes-filter-data ul.articles.bikes > li.bike-model > article.fasto-v2-bike-card,
.bike-advisor-results ul.articles.bikes > li.bike-model > article.fasto-v2-bike-card,
.fasto-v35-bike-results ul.articles.bikes > li.bike-model > article.fasto-v2-bike-card,
.fasto-v25-browse ul.articles.bikes > li.bike-model > article.fasto-v2-bike-card,
.fasto-v2-discovery-section ul.articles.bikes > li.bike-model > article.fasto-v2-bike-card{
  position:relative;
  display:flex;
  flex-direction:column;
  width:100%;
  height:calc(var(--fasto-v45-card-media) + var(--fasto-v45-card-copy) + var(--fasto-v45-card-footer));
  min-height:calc(var(--fasto-v45-card-media) + var(--fasto-v45-card-copy) + var(--fasto-v45-card-footer));
  margin:0;
  padding:0;
  overflow:hidden;
  background:#fff;
  border:1px solid var(--fasto-v45-line);
  border-top:1px solid var(--fasto-v45-line);
  border-left:1px solid var(--fasto-v45-line);
  border-image:none;
  box-shadow:none;
}

.fasto-v2-bike-card::before,
.fasto-v2-bike-card::after{
  content:none;
}

.fasto-v2-bike-card .bike-year{
  position:absolute;
  top:22px;
  left:28px;
  z-index:3;
  display:block;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  color:var(--fasto-v45-red);
  font-size:13px;
  line-height:1;
  font-weight:700;
}

.fasto-v2-bike-card .compare-holder-main{
  position:absolute;
  top:18px;
  right:18px;
  z-index:4;
}

.fasto-v2-bike-card .compare-holder a{
  width:36px;
  height:36px;
  border:1px solid var(--fasto-v45-line);
  background:#fff;
  color:var(--fasto-v45-ink);
  box-shadow:none;
}

.fasto-v2-bike-card .compare-holder a span{display:none;}

.fasto-v37-bike-card .fasto-v37-card-media,
.fasto-v2-bike-card .fasto-v37-card-media{
  flex:0 0 var(--fasto-v45-card-media);
  height:var(--fasto-v45-card-media);
  min-height:var(--fasto-v45-card-media);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:38px 28px 20px;
  border-bottom:1px solid var(--fasto-v45-line);
  background:#fff;
  box-sizing:border-box;
}

.fasto-v37-bike-card .post-thumb,
.fasto-v2-bike-card .post-thumb{
  width:100%;
  height:100%;
  min-height:0;
  margin:0;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  border:0;
}

.fasto-v37-bike-card .post-thumb a,
.fasto-v2-bike-card .post-thumb a{
  width:100%;
  height:100%;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
}

.fasto-v37-bike-card .post-thumb img,
.fasto-v2-bike-card .post-thumb img{
  display:block;
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  transform:none;
  filter:none;
  mix-blend-mode:normal;
}

.fasto-v37-bike-card .fasto-v37-card-content,
.fasto-v2-bike-card .fasto-v37-card-content{
  flex:0 0 var(--fasto-v45-card-copy);
  height:var(--fasto-v45-card-copy);
  min-height:var(--fasto-v45-card-copy);
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:12px;
  padding:0 28px;
  border-bottom:1px solid var(--fasto-v45-line);
  background:#fff;
  box-sizing:border-box;
}

.fasto-v37-bike-card .bike-categories-wrapper,
.fasto-v2-bike-card .bike-categories-wrapper{
  min-height:28px;
  margin:0;
  padding:0;
  display:flex;
  align-items:center;
  overflow:visible;
}

.fasto-v37-bike-card .bike-categories-wrapper ul,
.fasto-v37-bike-card .bike-categories,
.fasto-v2-bike-card .bike-categories-wrapper ul,
.fasto-v2-bike-card .bike-categories{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
  margin:0;
  padding:0;
  list-style:none;
}

.fasto-v37-bike-card .bike-categories-wrapper li,
.fasto-v2-bike-card .bike-categories-wrapper li{
  display:inline-flex;
  align-items:center;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  color:var(--fasto-v45-muted);
  line-height:1;
}

.fasto-v37-bike-card .bike-categories-wrapper a,
.fasto-v2-bike-card .bike-categories-wrapper a{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:0 9px;
  border:1px solid var(--fasto-v45-line);
  background:#fff;
  color:var(--fasto-v45-muted);
  font-size:12px;
  line-height:1;
  text-decoration:none;
}

.fasto-v37-bike-card .post-details,
.fasto-v2-bike-card .post-details{
  display:flex;
  align-items:flex-start;
  min-height:58px;
  margin:0;
  padding:0;
}

.fasto-v37-bike-card .post-title,
.fasto-v2-bike-card .post-title{
  display:-webkit-box;
  margin:0;
  padding:0;
  min-height:58px;
  max-height:58px;
  overflow:hidden;
  color:var(--fasto-v45-ink);
  font-size:clamp(20px,1.25vw,26px);
  line-height:1.08;
  letter-spacing:-.02em;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}

.fasto-v37-bike-card .post-title a,
.fasto-v2-bike-card .post-title a{
  color:inherit;
  text-decoration:none;
}

.fasto-v37-bike-card .fasto-v37-card-footer,
.fasto-v2-bike-card .fasto-v37-card-footer{
  flex:0 0 var(--fasto-v45-card-footer);
  height:var(--fasto-v45-card-footer);
  min-height:var(--fasto-v45-card-footer);
  display:flex;
  flex-direction:column;
  justify-content:center;
  margin:0;
  padding:0 28px;
  background:#fff;
  box-sizing:border-box;
}

.fasto-v37-bike-card .brand-price,
.fasto-v2-bike-card .brand-price{
  min-height:44px;
  margin:0;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  border:0;
}

.fasto-v37-bike-card .price,
.fasto-v2-bike-card .price,
.fasto-v37-bike-card .bike-price,
.fasto-v2-bike-card .bike-price{
  color:var(--fasto-v45-red);
  font-size:clamp(25px,1.75vw,34px);
  line-height:1;
  font-weight:700;
}

.fasto-v37-bike-card .brand-price ul,
.fasto-v2-bike-card .brand-price ul{
  margin:0;
  padding:0;
  list-style:none;
}

.fasto-v37-bike-card .brand-price a,
.fasto-v37-bike-card .brand-price li,
.fasto-v2-bike-card .brand-price a,
.fasto-v2-bike-card .brand-price li{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 12px;
  border:1px solid var(--fasto-v45-line);
  background:#fff;
  color:var(--fasto-v45-muted);
  font-size:12px;
  line-height:1;
  font-weight:700;
  text-decoration:none;
}

.fasto-v37-bike-card .fasto-v2-admin-card-links,
.fasto-v2-bike-card .fasto-v2-admin-card-links{
  margin:6px 0 0;
  padding:0;
  min-height:18px;
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--fasto-v45-muted);
  font-size:12px;
}

/* Filter controls should align exactly with the bike-card grid. */
.bikes-filter-container .filters,
.bikes-filter-container .filter-main-holder,
.bikes-filter-container .filter-holder-main,
.bikes-filter-container .filter-holder,
.bikes-filter-container form{
  max-width:none;
}

/* Related sections and AJAX lists on single pages. */
.related-bikes-big-wrapper,
#all-bike-families{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:0;
  border:0;
}

/* Responsive: same gutters, fewer columns. */
@media (max-width:1180px){
  :root{--fasto-v45-card-media:280px;--fasto-v45-card-copy:148px;--fasto-v45-card-footer:94px;}
  ul.articles.bikes,
  .ajax-bikes-holder ul.articles.bikes,
  .bikes-filter-data ul.articles.bikes,
  .bike-advisor-results ul.articles.bikes,
  .fasto-v35-bike-results ul.articles.bikes,
  .fasto-v25-browse ul.articles.bikes,
  .fasto-v2-discovery-section ul.articles.bikes,
  .related-bikes-big-wrapper,
  #all-bike-families{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media (max-width:782px){
  .fasto-v25-browse .fasto-v25-section-head,
  .fasto-v25-browse .bikes-cats-subcats-list,
  .fasto-v25-browse .ajax-bikes-holder,
  .fasto-v2-discovery-section .fasto-v2-container,
  .fasto-v2-discovery-section .bikes-cats-subcats-list,
  .fasto-v2-discovery-section .ajax-bikes-holder,
  .fasto-v35-archive-header,
  .fasto-v35-bike-results,
  .bikes-filter-container,
  .bikes-filter-data,
  .bike-advisor-results,
  .bike-advisor-results-wrapper,
  .fasto-v2-advisor-page .fasto-v2-section.tight > .container,
  .related-bikes-big-wrapper,
  #all-bike-families,
  main > ul.articles.bikes,
  .fasto-v2-page > ul.articles.bikes,
  .fasto-v25-page > ul.articles.bikes{
    margin-left:var(--fasto-v45-page-pad-mobile);
    margin-right:var(--fasto-v45-page-pad-mobile);
  }

  ul.articles.bikes,
  .ajax-bikes-holder ul.articles.bikes,
  .bikes-filter-data ul.articles.bikes,
  .bike-advisor-results ul.articles.bikes,
  .fasto-v35-bike-results ul.articles.bikes,
  .fasto-v25-browse ul.articles.bikes,
  .fasto-v2-discovery-section ul.articles.bikes,
  .related-bikes-big-wrapper,
  #all-bike-families{
    grid-template-columns:1fr;
  }

  :root{--fasto-v45-card-media:260px;--fasto-v45-card-copy:136px;--fasto-v45-card-footer:88px;}
  .fasto-v37-bike-card .fasto-v37-card-media,
  .fasto-v2-bike-card .fasto-v37-card-media{padding:34px 18px 16px;}
  .fasto-v37-bike-card .fasto-v37-card-content,
  .fasto-v2-bike-card .fasto-v37-card-content,
  .fasto-v37-bike-card .fasto-v37-card-footer,
  .fasto-v2-bike-card .fasto-v37-card-footer{padding-left:18px;padding-right:18px;}
}
