/*
 * Fasto V4.9
 * Canonical bike-grid spacing and filter dropdown recovery.
 * One edge value across home, archives, filters, advisor and related loops.
 */
:root{
  --fasto-v49-edge:clamp(18px, 3.4vw, 72px);
  --fasto-v49-line:#dfe5ec;
  --fasto-v49-line-soft:#edf1f5;
  --fasto-v49-ink:#171c25;
  --fasto-v49-muted:#607086;
  --fasto-v49-accent:#ff3131;
  --fasto-v49-card-media:300px;
  --fasto-v49-card-copy:150px;
  --fasto-v49-card-footer:108px;
  --fasto-v2-primary:#ff3131;
  --fasto-v2-primary-dark:#ff3131;
  --fasto-v25-red:#ff3131;
}

html body .site-grid,
html body .site-grid-inner,
html body main#content,
html body .fasto-v25-home,
html body .fasto-v25-browse,
html body .fasto-v35-bike-archive,
html body .fasto-v2-filter-page,
html body .fasto-v2-advisor-page{
  width:100%;
  max-width:none;
  margin-left:0;
  margin-right:0;
  padding-left:0;
  padding-right:0;
  box-sizing:border-box;
}

/* Canonical page edge. These are the visual blocks that must line up. */
html body main#content .fasto-v25-browse > .fasto-v25-section-head,
html body main#content .fasto-v25-browse > .bike-home-randomize,
html body main#content .fasto-v25-browse > .bikes-cats-subcats-list,
html body main#content .fasto-v25-browse .bikes-cats-subcats-list,
html body main#content .fasto-v35-bike-archive > .fasto-v35-archive-header,
html body main#content .fasto-v35-bike-archive > .fasto-v35-bike-results,
html body main#content .bikes-filter-container,
html body main#content .bike-advisor-results,
html body main#content .bike-advisor-results-wrapper,
html body main#content .fasto-v48-advisor-results-section,
html body main#content .related-bikes-big-wrapper,
html body main#content #all-bike-families,
html body main#content .bike-single .related-bikes-big-wrapper,
html body main#content .bike-single #all-bike-families{
  width:auto;
  max-width:none;
  margin-left:var(--fasto-v49-edge);
  margin-right:var(--fasto-v49-edge);
  padding-left:0;
  padding-right:0;
  box-sizing:border-box;
}

/* Remove nested offsets so child grids start at the same x-coordinate as the wrapper. */
html body main#content .fasto-v25-browse .bikes-cats-subcats-list > .ajax-bikes-holder,
html body main#content .fasto-v25-browse .ajax-bikes-holder,
html body main#content .fasto-v25-browse .ajax-bikes-holder > ul.articles.bikes,
html body main#content .fasto-v25-browse .bikes-cats-subcats-list > ul.articles.bikes,
html body main#content .fasto-v35-bike-results > ul.articles.bikes,
html body main#content .bikes-filter-container > .bikes-filter-data,
html body main#content .bikes-filter-container .bikes-filter-data,
html body main#content .bikes-filter-container .bikes-filter-data > ul.articles.bikes,
html body main#content .bike-advisor-results-wrapper > .bike-advisor-results,
html body main#content .bike-advisor-results > ul.articles.bikes,
html body main#content .related-bikes-big-wrapper > ul.articles.bikes,
html body main#content #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 heading and category tabs align to the same page edge as the cards. */
html body main#content .fasto-v25-browse{
  padding-top:clamp(38px, 4.5vw, 82px);
  padding-bottom:clamp(42px, 5vw, 92px);
}
html body main#content .fasto-v25-browse > .fasto-v25-section-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:24px;
  align-items:end;
  margin-bottom:clamp(16px, 2vw, 30px);
}
html body main#content .fasto-v25-browse > .fasto-v25-section-head .fasto-v25-faded{
  display:none;
}
html body main#content .fasto-v25-browse > .fasto-v25-section-head h2,
html body main#content .fasto-v25-browse .bike-home-randomize h2{
  margin:0;
}
html body main#content .fasto-v25-browse > .fasto-v25-section-head .fasto-v25-kicker,
html body main#content .fasto-v25-browse .bike-heading .top{
  display:block;
  margin:0 0 8px;
}
html body main#content .fasto-v25-browse .bike-home-randomize{
  margin-top:0;
  margin-bottom:18px;
  padding:0;
}
html body main#content .fasto-v25-browse .bike-home-randomize .bike-heading,
html body main#content .fasto-v25-browse .bike-home-randomize .bike-heading.dark{
  width:100%;
  max-width:none;
  margin:0;
  padding:0;
  text-align:left;
}
html body main#content .fasto-v25-browse .bike-home-randomize p{
  margin:6px 0 0;
}
html body main#content .fasto-v25-browse .bikes-cats-subcats-list{
  margin-top:0;
  margin-bottom:0;
}
html body main#content .fasto-v25-browse .bikes-cats-subcats-list > ul.bikes-categories{
  width:100%;
  max-width:none;
  margin:0 0 24px;
  padding:0;
  display:grid;
  grid-template-columns:repeat(6, minmax(0, 1fr));
  gap:0;
  list-style:none;
}
html body main#content .fasto-v25-browse .bikes-cats-subcats-list > ul.bikes-categories > li{
  min-width:0;
  margin:0;
  padding:0;
  border:1px solid var(--fasto-v49-line);
  border-right:0;
  background:#fff;
  box-sizing:border-box;
}
html body main#content .fasto-v25-browse .bikes-cats-subcats-list > ul.bikes-categories > li:last-child{
  border-right:1px solid var(--fasto-v49-line);
}
html body main#content .fasto-v25-browse .bikes-cats-subcats-list h3,
html body main#content .fasto-v25-browse .bikes-cats-subcats-list h4{
  margin:0;
  padding:0;
  line-height:1;
}
html body main#content .fasto-v25-browse .bikes-cats-subcats-list .choose-category{
  width:100%;
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0;
  padding:0 14px;
  border:0;
  border-radius:0;
  background:#fff;
  color:#000;
  font-weight:700;
  text-decoration:none;
}
html body main#content .fasto-v25-browse .bikes-cats-subcats-list > ul.bikes-categories > li.active .choose-category,
html body main#content .fasto-v25-browse .bikes-cats-subcats-list .choose-category:hover{
  background:var(--fasto-v49-accent);
  color:#fff;
}
html body main#content .fasto-v25-browse .bikes-cats-subcats-list .bikes-subcategories{
  grid-column:1 / -1;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:0;
  margin:0;
  padding:0;
  list-style:none;
  border-top:1px solid var(--fasto-v49-line);
}
html body main#content .fasto-v25-browse .bikes-cats-subcats-list > ul.bikes-categories > li:not(.active) .bikes-subcategories{
  display:none;
}
html body main#content .fasto-v25-browse .bikes-cats-subcats-list .bikes-subcategories li{
  margin:0;
  padding:0;
  border-right:1px solid var(--fasto-v49-line);
}
html body main#content .fasto-v25-browse .bikes-cats-subcats-list .choose-subcategory{
  min-height:34px;
  display:flex;
  align-items:center;
  padding:0 14px;
  border:0;
  border-radius:0;
  background:#fff;
  color:var(--fasto-v49-muted);
  font-size:13px;
  font-weight:700;
  text-decoration:none;
}
html body main#content .fasto-v25-browse .bikes-cats-subcats-list .bikes-subcategories li.active .choose-subcategory,
html body main#content .fasto-v25-browse .bikes-cats-subcats-list .choose-subcategory:hover{
  background:#111;
  color:#fff;
}

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

/* Card reset. Same internal rhythm on every page. */
html body main#content ul.articles.bikes > li.bike-model > article.fasto-v2-bike-card,
html body main#content .ajax-bikes-holder ul.articles.bikes > li.bike-model > article.fasto-v2-bike-card,
html body main#content .fasto-v25-browse ul.articles.bikes > li.bike-model > article.fasto-v2-bike-card,
html body main#content .fasto-v35-bike-results ul.articles.bikes > li.bike-model > article.fasto-v2-bike-card,
html body main#content .bikes-filter-data ul.articles.bikes > li.bike-model > article.fasto-v2-bike-card,
html body main#content .bike-advisor-results ul.articles.bikes > li.bike-model > article.fasto-v2-bike-card,
html body main#content .related-bikes-big-wrapper ul.articles.bikes > li.bike-model > article.fasto-v2-bike-card,
html body main#content #all-bike-families ul.articles.bikes > li.bike-model > article.fasto-v2-bike-card{
  width:100%;
  height:calc(var(--fasto-v49-card-media) + var(--fasto-v49-card-copy) + var(--fasto-v49-card-footer));
  min-height:calc(var(--fasto-v49-card-media) + var(--fasto-v49-card-copy) + var(--fasto-v49-card-footer));
  display:flex;
  flex-direction:column;
  position:relative;
  margin:0;
  padding:0;
  overflow:hidden;
  background:#fff;
  border:1px solid var(--fasto-v49-line);
  border-top:1px solid var(--fasto-v49-line);
  border-radius:0;
  box-shadow:none;
  box-sizing:border-box;
}
html body main#content .fasto-v2-bike-card::before,
html body main#content .fasto-v2-bike-card::after{
  content:none;
  display:none;
}
html body main#content .fasto-v2-bike-card .bike-year{
  position:absolute;
  top:22px;
  left:28px;
  z-index:3;
  margin:0;
  padding:0;
  background:transparent;
  border:0;
  color:var(--fasto-v49-accent);
  font-size:13px;
  line-height:1;
  font-weight:700;
}
html body main#content .fasto-v2-bike-card .compare-holder-main{
  position:absolute;
  top:16px;
  right:16px;
  z-index:4;
}
html body main#content .fasto-v2-bike-card .compare-holder a{
  width:38px;
  height:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0;
  padding:0;
  background:#fff;
  border:1px solid var(--fasto-v49-line);
  border-radius:0;
  box-shadow:none;
}
html body main#content .fasto-v2-bike-card .compare-holder a span{display:none;}
html body main#content .fasto-v2-bike-card .fasto-v37-card-media,
html body main#content .fasto-v2-bike-card .fasto-v48-card-media{
  flex:0 0 var(--fasto-v49-card-media);
  height:var(--fasto-v49-card-media);
  min-height:var(--fasto-v49-card-media);
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0;
  padding:42px 28px 24px;
  background:#fff;
  border:0;
  border-bottom:1px solid var(--fasto-v49-line);
  box-sizing:border-box;
}
html body main#content .fasto-v2-bike-card .post-thumb,
html body main#content .fasto-v2-bike-card .post-thumb a{
  width:100%;
  height:100%;
  min-height:0;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0;
  padding:0;
  background:#fff;
  border:0;
  overflow:hidden;
}
html body main#content .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;
}
html body main#content .fasto-v2-bike-card .fasto-v37-card-content,
html body main#content .fasto-v2-bike-card .fasto-v48-card-content{
  flex:0 0 var(--fasto-v49-card-copy);
  height:var(--fasto-v49-card-copy);
  min-height:var(--fasto-v49-card-copy);
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:14px;
  margin:0;
  padding:0 28px;
  background:#fff;
  border-bottom:1px solid var(--fasto-v49-line);
  box-sizing:border-box;
}
html body main#content .fasto-v2-bike-card .bike-categories-wrapper{
  min-height:28px;
  display:flex;
  align-items:center;
  margin:0;
  padding:0;
  overflow:hidden;
}
html body main#content .fasto-v2-bike-card .bike-categories-wrapper ul,
html body main#content .fasto-v2-bike-card .bike-categories{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
  margin:0;
  padding:0;
  list-style:none;
}
html body main#content .fasto-v2-bike-card .bike-categories-wrapper li{
  display:inline-flex;
  align-items:center;
  margin:0;
  padding:0;
  line-height:1;
  background:transparent;
  border:0;
}
html body main#content .fasto-v2-bike-card .bike-categories-wrapper li:not(:last-child)::after{
  content:none;
  margin-left:6px;
  color:var(--fasto-v49-muted);
}
html body main#content .fasto-v2-bike-card .bike-categories-wrapper a{
  min-height:26px;
  display:inline-flex;
  align-items:center;
  margin:0;
  padding:0 10px;
  border:1px solid var(--fasto-v49-line);
  border-radius:0;
  background:#fff;
  color:var(--fasto-v49-muted);
  font-size:12px;
  line-height:1;
  font-weight:700;
  text-decoration:none;
}
html body main#content .fasto-v2-bike-card .post-details{
  min-height:62px;
  display:flex;
  align-items:center;
  margin:0;
  padding:0;
}
html body main#content .fasto-v2-bike-card .post-title{
  display:-webkit-box;
  max-height:62px;
  margin:0;
  padding:0;
  overflow:hidden;
  color:var(--fasto-v49-ink);
  font-size:clamp(20px, 1.22vw, 25px);
  line-height:1.15;
  letter-spacing:-.02em;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
html body main#content .fasto-v2-bike-card .post-title a{
  color:inherit;
  text-decoration:none;
}
html body main#content .fasto-v2-bike-card .fasto-v37-card-footer,
html body main#content .fasto-v2-bike-card .fasto-v48-card-footer{
  flex:0 0 var(--fasto-v49-card-footer);
  height:var(--fasto-v49-card-footer);
  min-height:var(--fasto-v49-card-footer);
  display:flex;
  flex-direction:column;
  justify-content:center;
  margin:0;
  padding:0 28px;
  background:#fff;
  box-sizing:border-box;
}
html body main#content .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;
}
html body main#content .fasto-v2-bike-card .price,
html body main#content .fasto-v2-bike-card .bike-price,
html body main#content .fasto-v2-bike-card .brand-price > .price{
  color:var(--fasto-v49-accent);
  font-size:clamp(25px, 1.75vw, 34px);
  line-height:1;
  font-weight:700;
}
html body main#content .fasto-v2-bike-card .brand-price ul{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  margin:0;
  padding:0;
  list-style:none;
}
html body main#content .fasto-v2-bike-card .brand-price li,
html body main#content .fasto-v2-bike-card .brand-price a{
  min-height:28px;
  display:inline-flex;
  align-items:center;
  margin:0;
  padding:0 12px;
  border:1px solid var(--fasto-v49-line);
  border-radius:0;
  background:#fff;
  color:var(--fasto-v49-muted);
  font-size:12px;
  line-height:1;
  font-weight:700;
  text-decoration:none;
}
html body main#content .fasto-v2-bike-card .brand-price a{
    border:none;
}
html body main#content .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-v49-muted);
  font-size:12px;
}

/* Bike filter page: same edge as taxonomy grid, horizontal controls on desktop. */
html body main#content .bikes-filter-container{
  display:block;
  margin-top:clamp(22px, 3vw, 48px);
  margin-bottom:clamp(42px, 5vw, 90px);
}
html body main#content .bikes-filter-container > .bikes-filter-data{
  margin-top:28px;
}
@media (min-width:783px){
  html body main#content .bikes-filter-container .fasto-v2-filter-toggle,
  html body main#content .bikes-filter-container .fasto-v38-filter-drawer-head,
  html body main#content .bikes-filter-container .fasto-v39-filter-drawer-head{
    display:none;
  }
  html body main#content .bikes-filter-container #fasto-bike-filters.filters,
  html body main#content .bikes-filter-container .filters{
    width:100%;
    max-width:none;
    height:auto;
    min-height:0;
    max-height:none;
    display:flex;
    flex-direction:row;
    flex-wrap:wrap;
    align-items:center;
    justify-content:flex-start;
    gap:8px;
    margin:0;
    padding:16px;
    overflow:visible;
    background:#fff;
    border:1px solid var(--fasto-v49-line);
    border-radius:0;
    box-shadow:none;
    box-sizing:border-box;
  }
  html body main#content .bikes-filter-container .filter-main-holder,
  html body main#content .bikes-filter-container .filter_submit{
    position:relative;
    display:block;
    flex:0 0 auto;
    width:auto;
    max-width:none;
    margin:0;
    padding:0;
    border:0;
    background:transparent;
    box-sizing:border-box;
  }
  html body main#content .bikes-filter-container .filter-main-btn,
  html body main#content .bikes-filter-container .apply_filter,
  html body main#content .bikes-filter-container .reset_filter{
    width:auto;
    min-width:0;
    min-height:42px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin:0;
    padding:0 18px;
    background:#f7f5f2;
    border:1px solid transparent;
    border-radius:0;
    color:var(--fasto-v49-ink);
    box-shadow:none;
    font-weight:700;
    line-height:1;
    white-space:nowrap;
    text-decoration:none;
    cursor:pointer;
  }
  html body main#content .bikes-filter-container .filter-main-holder.fasto-v49-open .filter-main-btn,
  html body main#content .bikes-filter-container .filter-main-btn:hover{
    background:#fff3f3;
    border-color:var(--fasto-v49-line);
    color:var(--fasto-v49-accent);
  }
  html body main#content .bikes-filter-container .apply_filter{
    background:var(--fasto-v49-accent);
    border-color:var(--fasto-v49-accent);
    color:#fff;
  }
  html body main#content .bikes-filter-container .reset_filter{
    background:transparent;
    color:var(--fasto-v49-muted);
  }
  html body main#content .bikes-filter-container .filter-main-holder > .filter-holder-holder{
    position:absolute;
    top:calc(100% + 8px);
    left:0;
    right:auto;
    z-index:9999;
    width:min(420px, calc(100vw - (var(--fasto-v49-edge) * 2)));
    max-height:68vh;
    display:none;
    margin:0;
    padding:18px;
    overflow:auto;
    background:#fff;
    border:1px solid var(--fasto-v49-line);
    border-radius:0;
    box-shadow:0 18px 42px rgba(15,23,42,.09);
    box-sizing:border-box;
  }
  html body main#content .bikes-filter-container .filter-main-holder.fasto-v49-open > .filter-holder-holder{
    display:block;
  }
  html body main#content .bikes-filter-container .filter-holder-holder .filter-holder,
  html body main#content .bikes-filter-container .filter-holder-holder .filter-ul,
  html body main#content .bikes-filter-container .filter-holder-holder ul,
  html body main#content .bikes-filter-container .filter-holder-holder li{
    display:block;
    visibility:visible;
    opacity:1;
  }
}

/* Mobile: preserve drawer, but use the same opening class and visible contents. */
@media (max-width:782px){
  :root{
    --fasto-v49-edge:clamp(14px, 4.2vw, 24px);
    --fasto-v49-card-media:230px;
    --fasto-v49-card-copy:140px;
    --fasto-v49-card-footer:100px;
  }
  html body main#content .fasto-v25-browse > .fasto-v25-section-head{
    grid-template-columns:1fr;
  }
  html body main#content .fasto-v25-browse .bikes-cats-subcats-list > ul.bikes-categories,
  html body main#content ul.articles.bikes,
  html body main#content .ajax-bikes-holder ul.articles.bikes,
  html body main#content .fasto-v25-browse ul.articles.bikes,
  html body main#content .fasto-v35-bike-results ul.articles.bikes,
  html body main#content .bikes-filter-data ul.articles.bikes,
  html body main#content .bike-advisor-results ul.articles.bikes,
  html body main#content .related-bikes-big-wrapper ul.articles.bikes,
  html body main#content #all-bike-families ul.articles.bikes{
    grid-template-columns:1fr;
  }
  html body main#content .fasto-v25-browse .bikes-cats-subcats-list > ul.bikes-categories > li,
  html body main#content .fasto-v25-browse .bikes-cats-subcats-list > ul.bikes-categories > li:last-child{
    border-right:1px solid var(--fasto-v49-line);
  }
  html body main#content .bikes-filter-container .fasto-v2-filter-toggle{
    display:inline-flex;
  }
  html body main#content .bikes-filter-container .filter-main-holder > .filter-holder-holder{
    display:none;
    position:static;
    width:100%;
    max-height:none;
    margin:0;
    padding:12px 0 16px;
    border:0;
    background:#fff;
    box-shadow:none;
  }
  html body main#content .bikes-filter-container .filter-main-holder.fasto-v49-open > .filter-holder-holder{
    display:block;
  }
  html body main#content .fasto-v2-bike-card .fasto-v37-card-media,
  html body main#content .fasto-v2-bike-card .fasto-v48-card-media{
    padding:34px 18px 18px;
  }
  html body main#content .fasto-v2-bike-card .fasto-v37-card-content,
  html body main#content .fasto-v2-bike-card .fasto-v48-card-content,
  html body main#content .fasto-v2-bike-card .fasto-v37-card-footer,
  html body main#content .fasto-v2-bike-card .fasto-v48-card-footer{
    padding-left:18px;
    padding-right:18px;
  }
}
