/*
 * Fasto V4.6
 * One global horizontal rhythm for all main content and bike-card sections.
 * Normal cascade only.
 */
:root{
  --fasto-v46-page-gap:clamp(18px, 3.4vw, 72px);
  --fasto-v46-line:#e2e8f0;
  --fasto-v46-line-soft:#edf1f5;
  --fasto-v46-ink:#171c25;
  --fasto-v46-muted:#667085;
  --fasto-v46-accent:#ff3131;
  --fasto-v45-page-pad:var(--fasto-v46-page-gap);
  --fasto-v45-page-pad-mobile:var(--fasto-v46-page-gap);
}

/* Top-level pages should not introduce their own horizontal offset. */
.fasto-v25-page,
.fasto-v2-page,
.fasto-v35-bike-archive,
.bike-single,
body.archive,
body.tax-bike-category,
body.tax-bike-subcategory,
body.post-type-archive-bike{
  --fasto-page-gap:var(--fasto-v46-page-gap);
}

/* Main full-width sections: the section owns the global page gap. */
.fasto-v25-hero,
.fasto-v25-categories,
.fasto-v25-statement,
.fasto-v25-services-section,
.fasto-v25-process,
.fasto-v24-intro-section,
.bike-advisor-main-wrapper,
.fasto-v2-gearing-page > .fasto-v2-section,
.fasto-v2-filter-page > .fasto-v2-section{
  padding-left:var(--fasto-v46-page-gap);
  padding-right:var(--fasto-v46-page-gap);
  box-sizing:border-box;
}

/* Sections whose children are independently aligned to the same gutter. */
.fasto-v25-browse,
.fasto-v35-bike-archive,
.fasto-v2-advisor-page .fasto-v2-section.tight,
.fasto-v25-single-section,
.fasto-v25-single-related,
.bike-additional-data,
.bike-additional-data.cta,
.bike-additional-data.related{
  padding-left:0;
  padding-right:0;
  box-sizing:border-box;
}

/* Homepage / generic section inner blocks. */
.fasto-v25-categories > .fasto-v25-section-head,
.fasto-v25-categories > .fasto-v25-category-grid,
.fasto-v25-statement > .fasto-v25-statement-title,
.fasto-v25-statement > .fasto-v25-statement-copy,
.fasto-v25-services-section > .fasto-v25-section-head,
.fasto-v25-services-section > .fasto-v25-service-list,
.fasto-v25-process > .fasto-v25-section-head,
.fasto-v25-process > .fasto-v25-process-grid,
.fasto-v24-intro-section > .fasto-v2-container,
.bike-advisor-main-wrapper > .bike-advisor-holder,
.fasto-v2-gearing-page .fasto-v2-page-title,
.fasto-v2-gearing-page .bike-gear-calculator,
.fasto-v2-gearing-page .gear-calculator-results,
.fasto-v2-filter-page .fasto-v2-page-title{
  width:100%;
  max-width:none;
  margin-left:0;
  margin-right:0;
  padding-left:0;
  padding-right:0;
  box-sizing:border-box;
}

/* Browse heading, category controls and bike results share one identical edge. */
.fasto-v25-browse > .fasto-v25-section-head,
.fasto-v25-browse .bike-home-randomize,
.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{
  width:auto;
  max-width:none;
  margin-left:var(--fasto-v46-page-gap);
  margin-right:var(--fasto-v46-page-gap);
  padding-left:0;
  padding-right:0;
  box-sizing:border-box;
}

/* Archive/taxonomy/page headers use the same edge as their grids. */
.fasto-v35-archive-header,
.fasto-v35-bike-results,
.taxonomy-header,
.archive-header,
body.tax-bike-category h1.brand-name.tax,
body.tax-bike-subcategory h1.brand-name.tax,
body.post-type-archive-bike .fasto-v35-archive-header,
main > .fasto-v35-archive-header,
main > h1.brand-name.tax{
  width:auto;
  max-width:none;
  margin-left:var(--fasto-v46-page-gap);
  margin-right:var(--fasto-v46-page-gap);
  padding-left:0;
  padding-right:0;
  box-sizing:border-box;
}

/* Filter/advisor result pages: controls and grid have identical left/right alignment. */
.bikes-filter-container,
.bikes-filter-data,
.bike-advisor-results,
.bike-advisor-results-wrapper,
.fasto-v2-advisor-page .fasto-v2-section.tight > .container,
.advisor-price-main-wrapper,
.advisor-price-holder{
  width:auto;
  max-width:none;
  margin-left:var(--fasto-v46-page-gap);
  margin-right:var(--fasto-v46-page-gap);
  padding-left:0;
  padding-right:0;
  box-sizing:border-box;
}

/* Avoid double gutters for nested loops. */
.fasto-v35-bike-results > ul.articles.bikes,
.bikes-filter-data > ul.articles.bikes,
.bikes-filter-data ul.articles.bikes,
.bike-advisor-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-left:0;
  margin-right:0;
  padding-left:0;
  padding-right:0;
}

/* Standalone loops still get the same edge. */
main > ul.articles.bikes,
.fasto-v2-page > ul.articles.bikes,
.fasto-v25-page > ul.articles.bikes,
#content.articles.bikes{
  width:auto;
  max-width:none;
  margin-left:var(--fasto-v46-page-gap);
  margin-right:var(--fasto-v46-page-gap);
  padding-left:0;
  padding-right:0;
  box-sizing:border-box;
}

/* Single bike sections use the same rhythm as archive/category pages. */
.fasto-v25-single-hero,
.fasto-v25-single-nav,
.fasto-v25-single-section > .fasto-v25-single-section-head,
.fasto-v25-single-section > .bike-summary-wrapper,
.fasto-v25-single-section > .fasto-v25-size-table,
.fasto-v25-single-section > .bike-componentes-wrapper,
.fasto-v25-single-section > .bike-geometry,
.fasto-v25-single-section > .single-description,
.fasto-v25-single-related > .fasto-v25-single-section-head,
.fasto-v25-single-related > .related-bikes-big-wrapper,
.fasto-v25-single-related > #all-bike-families,
.related-bikes-big-wrapper,
#all-bike-families,
.bike-additional-data > .container{
  width:auto;
  max-width:none;
  margin-left:var(--fasto-v46-page-gap);
  margin-right:var(--fasto-v46-page-gap);
  padding-left:0;
  padding-right:0;
  box-sizing:border-box;
}

/* If related grids contain direct cards, keep them on the same system. */
.related-bikes-big-wrapper ul.articles.bikes,
#all-bike-families ul.articles.bikes{
  margin-left:0;
  margin-right:0;
  width:100%;
}

/* Bike cards: remove colored borders from every context and keep the structure calm. */
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{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:0;
  width:100%;
  max-width:none;
  border:0;
  background:transparent;
  box-sizing:border-box;
}

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;
  margin:0;
  padding:0;
  box-sizing:border-box;
}

ul.articles.bikes > li.bike-model:nth-child(n) > article.fasto-v2-bike-card,
.ajax-bikes-holder ul.articles.bikes > li.bike-model:nth-child(n) > article.fasto-v2-bike-card,
.bikes-filter-data ul.articles.bikes > li.bike-model:nth-child(n) > article.fasto-v2-bike-card,
.bike-advisor-results ul.articles.bikes > li.bike-model:nth-child(n) > article.fasto-v2-bike-card,
.fasto-v35-bike-results ul.articles.bikes > li.bike-model:nth-child(n) > article.fasto-v2-bike-card,
.fasto-v25-browse ul.articles.bikes > li.bike-model:nth-child(n) > article.fasto-v2-bike-card,
.fasto-v2-discovery-section ul.articles.bikes > li.bike-model:nth-child(n) > article.fasto-v2-bike-card{
  border:1px solid var(--fasto-v46-line);
  border-top:1px solid var(--fasto-v46-line);
  border-image:none;
  background:#fff;
  box-shadow:none;
}

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

/* Card text block: consistent top/bottom rhythm. */
.fasto-v37-bike-card .fasto-v37-card-content,
.fasto-v2-bike-card .fasto-v37-card-content{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:12px;
  padding:0 clamp(18px,1.55vw,28px);
  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;
}

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

.fasto-v37-bike-card .post-title,
.fasto-v2-bike-card .post-title{
  min-height:auto;
  max-height:64px;
  margin:0;
  padding:0;
  line-height:1.12;
}

/* Filter controls align to the same grid width. */
.bikes-filter-container .filters,
.bikes-filter-container .filter-main-holder,
.bikes-filter-container .filter-holder-main,
.bikes-filter-container form{
  width:100%;
  max-width:none;
  box-sizing:border-box;
}

/* Remove accidental inherited offsets on generic containers inside aligned sections. */
.fasto-v25-browse .container,
.fasto-v35-bike-results .container,
.bikes-filter-data .container,
.bike-advisor-results .container,
.fasto-v25-single-section .container{
  width:100%;
  max-width:none;
  margin-left:0;
  margin-right:0;
  padding-left:0;
  padding-right:0;
}

@media (max-width:1180px){
  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){
  :root{
    --fasto-v46-page-gap:clamp(14px,4vw,22px);
    --fasto-v45-page-pad:var(--fasto-v46-page-gap);
    --fasto-v45-page-pad-mobile:var(--fasto-v46-page-gap);
  }

  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;
  }
}
