/*
 * Fasto V4.4
 * Clean card spacing + geometry helper modal.
 */

:root{
  --fasto-v44-line:#dfe5ec;
  --fasto-v44-line-soft:#eef1f5;
  --fasto-v44-ink:#161b24;
  --fasto-v44-muted:#667386;
  --fasto-v44-red:#ff3131;
}

/* Bike cards: remove colored borders and make the internal text block balanced. */
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-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{
  border:1px solid var(--fasto-v44-line);
  border-top:1px solid var(--fasto-v44-line);
  border-left:1px solid var(--fasto-v44-line);
  border-image:none;
  box-shadow:none;
  background:#fff;
}

ul.articles.bikes > li.bike-model:nth-child(4n+1) > article.fasto-v2-bike-card,
.ajax-bikes-holder ul.articles.bikes > li.bike-model:nth-child(4n+1) > article.fasto-v2-bike-card,
.bikes-filter-data ul.articles.bikes > li.bike-model:nth-child(4n+1) > article.fasto-v2-bike-card,
.bike-advisor-results ul.articles.bikes > li.bike-model:nth-child(4n+1) > article.fasto-v2-bike-card,
.fasto-v25-browse ul.articles.bikes > li.bike-model:nth-child(4n+1) > article.fasto-v2-bike-card{
  border-left:1px solid var(--fasto-v44-line);
}

.fasto-v37-bike-card .fasto-v37-card-media{
  border-bottom:1px solid var(--fasto-v44-line);
}

.fasto-v37-bike-card .fasto-v37-card-media .post-thumb{
  border-bottom:0;
}

.fasto-v37-bike-card .fasto-v37-card-content{
  flex:0 0 128px;
  min-height:128px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:12px;
  padding:0 28px;
  border-bottom:1px solid var(--fasto-v44-line);
  box-sizing:border-box;
}

.fasto-v37-bike-card .fasto-v37-card-content .bike-categories-wrapper,
.fasto-v37-bike-card .bike-categories-wrapper{
  flex:0 0 auto;
  min-height:0;
  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{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
  margin:0;
  padding:0;
  list-style:none;
}

.fasto-v37-bike-card .bike-categories-wrapper li{
  display:inline-flex;
  align-items:center;
  margin:0;
  padding:0;
  line-height:1;
  border:0;
  background:transparent;
}

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

.fasto-v37-bike-card .fasto-v37-card-content .post-details,
.fasto-v37-bike-card .post-details{
  flex:0 0 auto;
  min-width:0;
  min-height:0;
  margin:0;
  padding:0;
}

.fasto-v37-bike-card .fasto-v37-card-content .post-title,
.fasto-v37-bike-card .post-title{
  min-height:0;
  max-height:58px;
  margin:0;
  padding:0;
  display:-webkit-box;
  overflow:hidden;
  color:var(--fasto-v44-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{
  color:inherit;
  text-decoration:none;
}

.fasto-v37-bike-card .fasto-v37-card-footer{
  flex:0 0 86px;
  min-height:86px;
  margin:0;
  padding:12px 28px;
  border-top:0;
  box-sizing:border-box;
}

.fasto-v37-bike-card .fasto-v37-card-footer .brand-price,
.fasto-v37-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 .fasto-v37-card-footer .fasto-v2-admin-card-links{
  margin:0;
  padding:0;
}

/* Geometry helper modal: keep it inside a real overlay instead of above the site. */
body > #helper-image,
.fasto-v44-geometry-modal{
  position:fixed;
  inset:0;
  z-index:999999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:32px;
  background:rgba(11,16,24,.68);
  box-sizing:border-box;
}

body > #helper-image img,
.fasto-v44-geometry-modal img{
  display:block;
  width:auto;
  max-width:min(980px, calc(100vw - 96px));
  max-height:calc(100vh - 120px);
  object-fit:contain;
  background:#fff;
}

body > #helper-image .close_helper,
.fasto-v44-geometry-modal .close_helper{
  position:fixed;
  top:22px;
  right:22px;
  z-index:1000000;
  width:44px;
  height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(255,255,255,.26);
  background:#fff;
  color:#111827;
  text-decoration:none;
  cursor:pointer;
}

body > #helper-image .close_helper svg,
.fasto-v44-geometry-modal .close_helper svg{
  width:22px;
  height:22px;
  fill:currentColor;
}

body.fasto-v44-helper-open{
  overflow:hidden;
}

.bike-geometry .helper,
#table-geometry-wrapper .helper{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-left:8px;
  vertical-align:middle;
}

.bike-geometry .helper a,
#table-geometry-wrapper .helper a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:20px;
  height:20px;
  color:var(--fasto-v44-muted);
  border:1px solid var(--fasto-v44-line);
  background:#fff;
}

.bike-geometry .helper a:hover,
#table-geometry-wrapper .helper a:hover{
  color:var(--fasto-v44-red);
  border-color:var(--fasto-v44-red);
}

.bike-geometry .helper svg,
#table-geometry-wrapper .helper svg{
  width:14px;
  height:14px;
  fill:currentColor;
}

@media (max-width:900px){
  .fasto-v37-bike-card .fasto-v37-card-content{
    min-height:118px;
    flex-basis:118px;
    padding:0 18px;
    gap:10px;
  }

  .fasto-v37-bike-card .fasto-v37-card-footer{
    min-height:82px;
    flex-basis:82px;
    padding:10px 18px;
  }

  body > #helper-image,
  .fasto-v44-geometry-modal{
    padding:18px;
  }

  body > #helper-image img,
  .fasto-v44-geometry-modal img{
    max-width:calc(100vw - 36px);
    max-height:calc(100vh - 100px);
  }
}
