/*
 * Fasto V4.7
 * Final alignment pass: one page gutter, one bike grid width, one card layout.
 * No !important.
 */
:root{
  --fasto-v47-edge:clamp(18px, 3.4vw, 72px);
  --fasto-v47-edge-mobile:clamp(14px, 4.2vw, 24px);
  --fasto-v47-line:#dfe5ec;
  --fasto-v47-line-soft:#edf1f5;
  --fasto-v47-ink:#161b24;
  --fasto-v47-muted:#647084;
  --fasto-v47-accent:#ff3131;
  --fasto-v47-card-media:300px;
  --fasto-v47-card-copy:140px;
  --fasto-v47-card-footer:108px;
  --fasto-v45-page-pad:var(--fasto-v47-edge);
  --fasto-v46-page-gap:var(--fasto-v47-edge);
  --fasto-v25-red:var(--fasto-v47-accent);
  --fasto-v2-primary:var(--fasto-v47-accent);
  --fasto-v2-primary-dark:var(--fasto-v47-accent);
}

/* Make the page itself neutral; individual blocks own the page gutter. */
body .site-grid,
body .site-grid-inner,
body main#content{
  width:100%;
  max-width:none;
  margin-left:0;
  margin-right:0;
  padding-left:0;
  padding-right:0;
  box-sizing:border-box;
}

/* One canonical left/right edge for any block that visually contains bike cards or their title. */
body .fasto-v25-browse > .fasto-v25-section-head,
body .fasto-v25-browse .bike-home-randomize,
body .fasto-v25-browse .bikes-cats-subcats-list,
body .fasto-v35-bike-archive > .fasto-v35-archive-header,
body .fasto-v35-bike-archive > .fasto-v35-bike-results,
body .bikes-filter-container,
body .fasto-v2-filter-page .fasto-v2-page-title,
body .fasto-v2-advisor-page .bike-advisor-main-wrapper > .bike-advisor-holder,
body .fasto-v2-advisor-page .fasto-v2-section.tight > .container,
body .bike-advisor-results,
body .bike-advisor-results-wrapper,
body .advisor-price-main-wrapper,
body .fasto-v25-single-section > .fasto-v25-single-section-head,
body .fasto-v25-single-section > .bike-summary-wrapper,
body .fasto-v25-single-section > .fasto-v25-size-table,
body .fasto-v25-single-section > .bike-componentes-wrapper,
body .fasto-v25-single-section > .bike-geometry,
body .fasto-v25-single-related > .fasto-v25-single-section-head,
body .fasto-v25-single-related > .related-bikes-big-wrapper,
body .fasto-v25-single-related > #all-bike-families,
body .related-bikes-big-wrapper,
body #all-bike-families,
body main > ul.articles.bikes{
  width:auto;
  max-width:none;
  margin-left:var(--fasto-v47-edge);
  margin-right:var(--fasto-v47-edge);
  padding-left:0;
  padding-right:0;
  box-sizing:border-box;
}

/* When the card grid is nested inside a canonical wrapper, remove the second gutter. */
body .fasto-v25-browse .bikes-cats-subcats-list .ajax-bikes-holder,
body .fasto-v35-bike-results > ul.articles.bikes,
body .bikes-filter-container > .bikes-filter-data,
body .bikes-filter-data > ul.articles.bikes,
body .bike-advisor-results-wrapper > .bike-advisor-results,
body .bike-advisor-results > ul.articles.bikes,
body .related-bikes-big-wrapper > ul.articles.bikes,
body #all-bike-families > ul.articles.bikes{
  width:100%;
  max-width:none;
  margin-left:0;
  margin-right:0;
  padding-left:0;
  padding-right:0;
  box-sizing:border-box;
}

/* Homepage browse controls and heading line up with the first card, not with old nested offsets. */
body .fasto-v25-browse .bike-home-randomize{
  margin-top:0;
  margin-bottom:18px;
}
body .fasto-v25-browse .bike-home-randomize .bike-heading,
body .fasto-v25-browse .bike-home-randomize .bike-heading.dark{
  width:100%;
  max-width:none;
  margin:0;
  padding:0;
  text-align:left;
}
body .fasto-v25-browse .bike-home-randomize h2{
  margin:0 0 6px;
}
body .fasto-v25-browse .bike-home-randomize p{
  margin:0;
}
body .fasto-v25-browse .bikes-cats-subcats-list{
  margin-top:0;
}
body .fasto-v25-browse .bikes-cats-subcats-list .ajax-bikes-holder{
  margin-top:22px;
}

/* Category/archive header: no extra internal offset on top of the shared gutter. */
body .fasto-v35-archive-header{
  padding:clamp(26px, 4vw, 78px) 0 clamp(22px, 3.2vw, 58px);
}
body .fasto-v35-archive-header .brand-name.tax,
body .fasto-v35-archive-header h1{
  margin-left:0;
  padding-left:0;
}
body .fasto-v35-breadcrumbs,
body .fasto-v35-archive-description,
body .fasto-v35-archive-kicker{
  margin-left:0;
  padding-left:0;
}

/* Every bike-loop context uses the exact same grid. */
body ul.articles.bikes,
body .ajax-bikes-holder ul.articles.bikes,
body .fasto-v25-browse ul.articles.bikes,
body .fasto-v35-bike-results ul.articles.bikes,
body .bikes-filter-data ul.articles.bikes,
body .bike-advisor-results ul.articles.bikes,
body .bike-advisor-holder ul.articles.bikes,
body .related-bikes-big-wrapper ul.articles.bikes,
body #all-bike-families ul.articles.bikes{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:0;
  width:100%;
  max-width:none;
  margin:0;
  padding:0;
  list-style:none;
  align-items:stretch;
  background:transparent;
  border:0;
  box-sizing:border-box;
}

body ul.articles.bikes > li.bike-model,
body .ajax-bikes-holder ul.articles.bikes > li.bike-model,
body .fasto-v25-browse ul.articles.bikes > li.bike-model,
body .fasto-v35-bike-results ul.articles.bikes > li.bike-model,
body .bikes-filter-data ul.articles.bikes > li.bike-model,
body .bike-advisor-results ul.articles.bikes > li.bike-model,
body .related-bikes-big-wrapper ul.articles.bikes > li.bike-model,
body #all-bike-families ul.articles.bikes > li.bike-model{
  width:auto;
  max-width:none;
  min-width:0;
  display:flex;
  margin:0;
  padding:0;
  box-sizing:border-box;
}

/* Final card layout. This intentionally overrides earlier card CSS files loaded before it. */
body ul.articles.bikes > li.bike-model > article.fasto-v2-bike-card,
body .ajax-bikes-holder ul.articles.bikes > li.bike-model > article.fasto-v2-bike-card,
body .fasto-v25-browse ul.articles.bikes > li.bike-model > article.fasto-v2-bike-card,
body .fasto-v35-bike-results ul.articles.bikes > li.bike-model > article.fasto-v2-bike-card,
body .bikes-filter-data ul.articles.bikes > li.bike-model > article.fasto-v2-bike-card,
body .bike-advisor-results ul.articles.bikes > li.bike-model > article.fasto-v2-bike-card,
body .related-bikes-big-wrapper ul.articles.bikes > li.bike-model > article.fasto-v2-bike-card,
body #all-bike-families ul.articles.bikes > li.bike-model > article.fasto-v2-bike-card{
  position:relative;
  display:flex;
  flex-direction:column;
  width:100%;
  height:calc(var(--fasto-v47-card-media) + var(--fasto-v47-card-copy) + var(--fasto-v47-card-footer));
  min-height:calc(var(--fasto-v47-card-media) + var(--fasto-v47-card-copy) + var(--fasto-v47-card-footer));
  margin:0;
  padding:0;
  overflow:hidden;
  background:#fff;
  border:1px solid var(--fasto-v47-line);
  border-top:1px solid var(--fasto-v47-line);
  border-image:none;
  box-shadow:none;
  border-radius:0;
  box-sizing:border-box;
}
body .fasto-v2-bike-card::before,
body .fasto-v2-bike-card::after{
  content:none;
  display:none;
}
body .fasto-v2-bike-card .bike-year{
  position:absolute;
  top:24px;
  left:28px;
  z-index:3;
  display:block;
  margin:0;
  padding:0;
  color:var(--fasto-v47-accent);
  font-size:13px;
  line-height:1;
  font-weight:700;
  background:transparent;
  border:0;
}
body .fasto-v2-bike-card .compare-holder-main{
  position:absolute;
  top:18px;
  right:18px;
  z-index:4;
}
body .fasto-v2-bike-card .compare-holder a{
  width:38px;
  height:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  border:1px solid var(--fasto-v47-line);
  background:#fff;
  color:var(--fasto-v47-ink);
  border-radius:0;
  box-shadow:none;
}
body .fasto-v2-bike-card .compare-holder a span{display:none;}

body .fasto-v2-bike-card .fasto-v37-card-media{
  flex:0 0 var(--fasto-v47-card-media);
  height:var(--fasto-v47-card-media);
  min-height:var(--fasto-v47-card-media);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:42px 28px 24px;
  border-bottom:1px solid var(--fasto-v47-line);
  background:#fff;
  box-sizing:border-box;
}
body .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;
  border:0;
  background:#fff;
  overflow:hidden;
}
body .fasto-v2-bike-card .post-thumb a{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
}
body .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;
}

/* Text block is vertically centered as a unit, with the same left padding everywhere. */
body .fasto-v2-bike-card .fasto-v37-card-content{
  flex:0 0 var(--fasto-v47-card-copy);
  height:var(--fasto-v47-card-copy);
  min-height:var(--fasto-v47-card-copy);
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:14px;
  padding:0 28px;
  border-bottom:1px solid var(--fasto-v47-line);
  background:#fff;
  box-sizing:border-box;
}
body .fasto-v2-bike-card .bike-categories-wrapper{
  min-height:28px;
  display:flex;
  align-items:center;
  margin:0;
  padding:0;
  overflow:hidden;
}
body .fasto-v2-bike-card .bike-categories-wrapper ul,
body .fasto-v2-bike-card .bike-categories{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
  margin:0;
  padding:0;
  list-style:none;
}
body .fasto-v2-bike-card .bike-categories-wrapper li{
  display:inline-flex;
  align-items:center;
  margin:0;
  padding:0;
  border:0;
  line-height:1;
  background:transparent;
}
body .fasto-v2-bike-card .bike-categories-wrapper li:not(:last-child)::after{
  content:'/';
  margin-left:6px;
  color:var(--fasto-v47-muted);
}
body .fasto-v2-bike-card .bike-categories-wrapper a{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:0 10px;
  border:1px solid var(--fasto-v47-line);
  background:#fff;
  color:var(--fasto-v47-muted);
  font-size:12px;
  line-height:1;
  font-weight:700;
  text-decoration:none;
}
body .fasto-v2-bike-card .post-details{
  min-height:58px;
  display:flex;
  align-items:center;
  margin:0;
  padding:0;
}
body .fasto-v2-bike-card .post-title{
  display:-webkit-box;
  margin:0;
  padding:0;
  max-height:58px;
  overflow:hidden;
  color:var(--fasto-v47-ink);
  font-size:clamp(20px, 1.24vw, 25px);
  line-height:1.12;
  letter-spacing:-.02em;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
body .fasto-v2-bike-card .post-title a{
  color:inherit;
  text-decoration:none;
}

body .fasto-v2-bike-card .fasto-v37-card-footer{
  flex:0 0 var(--fasto-v47-card-footer);
  height:var(--fasto-v47-card-footer);
  min-height:var(--fasto-v47-card-footer);
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:0 28px;
  margin:0;
  background:#fff;
  box-sizing:border-box;
}
body .fasto-v2-bike-card .brand-price{
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:0;
  padding:0;
  border:0;
}
body .fasto-v2-bike-card .price,
body .fasto-v2-bike-card .bike-price,
body .fasto-v2-bike-card .brand-price > .price{
  color:var(--fasto-v47-accent);
  font-size:clamp(25px, 1.75vw, 34px);
  line-height:1;
  font-weight:700;
}
body .fasto-v2-bike-card .brand-price ul{
  margin:0;
  padding:0;
  list-style:none;
}
body .fasto-v2-bike-card .brand-price li,
body .fasto-v2-bike-card .brand-price a{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 12px;
  border:1px solid var(--fasto-v47-line);
  background:#fff;
  color:var(--fasto-v47-muted);
  font-size:12px;
  line-height:1;
  font-weight:700;
  text-decoration:none;
}
body .fasto-v2-bike-card .fasto-v2-admin-card-links{
  min-height:18px;
  display:flex;
  align-items:center;
  gap:8px;
  margin:6px 0 0;
  padding:0;
  color:var(--fasto-v47-muted);
  font-size:12px;
}

/* Desktop filter bar must remain a horizontal bar, never a tall column. */
@media (min-width:783px){
  body .bikes-filter-container{
    display:block;
  }
  body .bikes-filter-container .fasto-v2-filter-toggle,
  body .bikes-filter-container .fasto-v38-filter-drawer-head,
  body .bikes-filter-container .fasto-v39-filter-drawer-head{
    display:none;
  }
  body .bikes-filter-container .filters{
    width:100%;
    min-height:0;
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:8px;
    margin:0 0 28px;
    padding:16px;
    background:#fff;
    border:1px solid var(--fasto-v47-line);
    box-sizing:border-box;
  }
  body .bikes-filter-container .filter-main-holder,
  body .bikes-filter-container .filter_submit{
    position:relative;
    display:block;
    flex:0 0 auto;
    margin:0;
    padding:0;
    border:0;
  }
  body .bikes-filter-container .filter-main-btn,
  body .bikes-filter-container .apply_filter,
  body .bikes-filter-container .reset_filter{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:42px;
    width:auto;
    margin:0;
    padding:0 18px;
    border-radius:0;
    border:0;
    background:#f7f5f2;
    color:var(--fasto-v47-ink);
    font-weight:700;
    text-decoration:none;
  }
  body .bikes-filter-container .filter-main-holder.selected .filter-main-btn,
  body .bikes-filter-container .filter-main-btn.opened,
  body .bikes-filter-container .filter-main-btn.fasto-v39-open{
    color:var(--fasto-v47-accent);
    background:#fff3f3;
    border:1px solid var(--fasto-v47-line);
  }
  body .bikes-filter-container .apply_filter{
    background:var(--fasto-v47-accent);
    color:#fff;
  }
  body .bikes-filter-container .reset_filter{
    background:transparent;
    color:var(--fasto-v47-muted);
  }
  body .bikes-filter-container .filter-holder-holder{
    position:absolute;
    top:calc(100% + 8px);
    left:0;
    z-index:100;
    width:min(380px, 90vw);
    max-height:70vh;
    overflow:auto;
    padding:18px;
    background:#fff;
    border:1px solid var(--fasto-v47-line);
    box-shadow:none;
    border-radius:0;
  }
  body .bikes-filter-container .filter-main-holder:not(.pos-static) .filter-holder-holder{
    display:none;
  }
  body .bikes-filter-container .filter-main-holder.pos-static .filter-holder-holder,
  body .bikes-filter-container .filter-main-holder.selected.pos-static .filter-holder-holder{
    display:block;
  }
  body .bikes-filter-container > .bikes-filter-data{
    margin-top:0;
  }
}

@media (max-width:1180px){
  :root{
    --fasto-v47-card-media:280px;
    --fasto-v47-card-copy:142px;
    --fasto-v47-card-footer:104px;
  }
  body ul.articles.bikes,
  body .ajax-bikes-holder ul.articles.bikes,
  body .fasto-v25-browse ul.articles.bikes,
  body .fasto-v35-bike-results ul.articles.bikes,
  body .bikes-filter-data ul.articles.bikes,
  body .bike-advisor-results ul.articles.bikes,
  body .related-bikes-big-wrapper ul.articles.bikes,
  body #all-bike-families ul.articles.bikes{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }
}

@media (max-width:782px){
  :root{
    --fasto-v47-edge:var(--fasto-v47-edge-mobile);
    --fasto-v45-page-pad:var(--fasto-v47-edge-mobile);
    --fasto-v46-page-gap:var(--fasto-v47-edge-mobile);
    --fasto-v47-card-media:230px;
    --fasto-v47-card-copy:132px;
    --fasto-v47-card-footer:98px;
  }
  body ul.articles.bikes,
  body .ajax-bikes-holder ul.articles.bikes,
  body .fasto-v25-browse ul.articles.bikes,
  body .fasto-v35-bike-results ul.articles.bikes,
  body .bikes-filter-data ul.articles.bikes,
  body .bike-advisor-results ul.articles.bikes,
  body .related-bikes-big-wrapper ul.articles.bikes,
  body #all-bike-families ul.articles.bikes{
    grid-template-columns:1fr;
  }
  body .fasto-v2-bike-card .fasto-v37-card-media{
    padding:36px 18px 18px;
  }
  body .fasto-v2-bike-card .fasto-v37-card-content,
  body .fasto-v2-bike-card .fasto-v37-card-footer{
    padding-left:18px;
    padding-right:18px;
  }
  body .fasto-v2-bike-card .bike-year{left:18px;top:18px;}
  body .fasto-v2-bike-card .compare-holder-main{right:14px;top:14px;}
}
