/* Additive layout only: existing typography, booking and gallery controls stay intact. */
.catalog-brands .avva-fx-brand img,.fleet-brand-links .avva-fx-brand img{width:100%;max-width:150px;height:55px;object-fit:contain}
.catalog-brands .avva-fx-brand[aria-label="Audi"] img,.fleet-brand-links .avva-fx-brand[aria-label="Audi"] img{max-width:128px}
.catalog-brands .avva-fx-brand[aria-label="Lamborghini"] img,.fleet-brand-links .avva-fx-brand[aria-label="Lamborghini"] img{max-width:44px;height:44px}
.brand-hero__content img[src*="lamborghini.svg"]{width:62px!important;height:62px!important;object-fit:contain}
.brand-hero__content img[src*="audi.svg"]{width:112px!important;height:76px!important;object-fit:contain}
.fleet-type-links{flex-wrap:wrap}
@media(min-width:901px){.catalog-brands{grid-template-columns:repeat(7,minmax(0,1fr))}.catalog-types{grid-template-columns:repeat(8,minmax(0,1fr))}.fleet-brand-links{grid-template-columns:repeat(7,minmax(0,1fr))}}
@media(max-width:900px){.catalog-brands .avva-fx-brand,.fleet-brand-links .avva-fx-brand{min-width:110px;flex-shrink:0}}
/* Seven brands need an explicit tablet layout. The base theme falls back to
   five columns between its mobile and desktop breakpoints, producing 5 + 2. */
@media(min-width:821px) and (max-width:900px){
  .home-v2-collection .catalog-brands,
  main.fleet-page .fleet-brand-links{
    display:grid!important;
    grid-template-columns:repeat(12,minmax(0,1fr))!important;
    grid-auto-flow:row!important;
    gap:0!important;
    width:100%;
    overflow:visible;
  }
  .home-v2-collection .catalog-brands>a,
  main.fleet-page .fleet-brand-links>a{
    grid-column:span 3;
    min-width:0!important;
    width:auto!important;
  }
  .home-v2-collection .catalog-brands>a:nth-child(n+5),
  main.fleet-page .fleet-brand-links>a:nth-child(n+5){grid-column:span 4}
  .home-v2-collection .catalog-brands>a:nth-child(4),
  .home-v2-collection .catalog-brands>a:last-child,
  main.fleet-page .fleet-brand-links>a:nth-child(4),
  main.fleet-page .fleet-brand-links>a:last-child{border-right:0}
}
@media(max-width:900px){.brand-hero__content img[src*="lamborghini.svg"]{width:54px!important;height:54px!important}.brand-hero__content img[src*="audi.svg"]{width:128px!important;height:84px!important}.brand-hero__content img[src*="mercedes.svg"]{width:180px!important;max-width:180px!important;height:auto!important;max-height:none!important}}

/* Keep the expanded vehicle-type navigation aligned after adding business class. */
main.home-v2 .home-v2-collection .catalog-types a:nth-child(8){
  --avva-type-canvas-scale:1.08170732;
  --avva-type-image-ratio:2;
  --avva-type-bottom:18.5%;
}
main.home-v2 .home-v2-collection .catalog-types .catalog-types__all span{
  color:rgba(243,240,232,.84);
}
main.home-v2 .home-v2-collection .catalog-types .catalog-types__all:hover span{
  color:var(--gold-light);
}
main.fleet-page .fleet-page__filters .fleet-type-links a:nth-child(7){
  --avva-type-canvas-scale:1.14496574;
  --avva-type-image-ratio:3;
  --avva-type-bottom:8.425414%;
}
main.fleet-page .fleet-page__filters .fleet-type-links a:nth-child(7)::before{
  background-image:url("https://avvacars.by/wp-content/themes/avva-luxury/assets/images/types-v3/family.png");
}
@media(min-width:1121px){
  main.fleet-page .fleet-page__filters .fleet-type-links{
    grid-template-columns:repeat(7,minmax(0,1fr));
    flex-wrap:nowrap;
  }
}
@media(max-width:1120px){
  main.fleet-page .fleet-page__filters .fleet-type-links{
    grid-template-columns:none;
    grid-auto-columns:132px;
    grid-auto-flow:column;
    gap:18px;
    overflow-x:auto;
    scroll-snap-type:x proximity;
    scrollbar-width:none;
  }
  main.fleet-page .fleet-page__filters .fleet-type-links::-webkit-scrollbar{display:none}
  main.fleet-page .fleet-page__filters .fleet-type-links a{scroll-snap-align:start}
}

/* Category pages now contain seven vehicle types. Keep one row on desktop;
   the existing responsive rule remains a horizontal strip on smaller screens. */
@media(min-width:1121px){
  main.category-page .category-nav{
    grid-template-columns:repeat(7,minmax(0,1fr));
    gap:clamp(14px,2vw,34px);
  }
}
@media(max-width:1120px){
  main.category-page .category-nav{
    grid-template-columns:none;
    grid-auto-columns:132px;
    grid-auto-flow:column;
    gap:18px;
    justify-content:start;
    overflow-x:auto;
    scroll-snap-type:x proximity;
  }
  main.category-page .category-nav a{scroll-snap-align:start}
  main.category-page .category-nav a[href] img{
    transform:translateY(var(--avva-type-bottom))!important;
  }
}

/* Match the calibrated vehicle artwork used on the main fleet page.
   Each source PNG has different transparent padding, so the canvas needs an
   individual scale and offset to produce one visible width and wheel line. */
main.category-page .category-nav a{
  --avva-type-car-width:min(160px,calc(100% - 12px));
}
main.category-page .category-nav a:nth-child(1){
  --avva-type-canvas-scale:1.16025641;
  --avva-type-image-ratio:3;
  --avva-type-bottom:12.983426%;
}
main.category-page .category-nav a:nth-child(2){
  --avva-type-canvas-scale:1.08170732;
  --avva-type-image-ratio:2;
  --avva-type-bottom:11.950395%;
}
main.category-page .category-nav a:nth-child(3){
  --avva-type-canvas-scale:1.03994584;
  --avva-type-image-ratio:1.5;
  --avva-type-bottom:19.628906%;
}
main.category-page .category-nav a:nth-child(4){
  --avva-type-canvas-scale:1.04970414;
  --avva-type-image-ratio:2;
  --avva-type-bottom:15.783540%;
}
main.category-page .category-nav a:nth-child(5),
main.category-page .category-nav a:nth-child(7){
  --avva-type-canvas-scale:1.14496574;
  --avva-type-image-ratio:3;
  --avva-type-bottom:8.425414%;
}
main.category-page .category-nav a:nth-child(6){
  --avva-type-canvas-scale:1.17723577;
  --avva-type-image-ratio:3;
  --avva-type-bottom:11.049724%;
}
main.category-page .category-nav a[href] img{
  justify-self:center;
  align-self:end;
  width:calc(var(--avva-type-car-width) * var(--avva-type-canvas-scale));
  height:auto;
  max-width:none;
  aspect-ratio:var(--avva-type-image-ratio);
  transform:translateY(var(--avva-type-bottom));
  transition:opacity .25s,filter .25s;
}
