/* Abu Namous v2.1.1 visual polish: fix homepage hero, prevent image cropping, and stabilize cards. */

body.home .anm-home-main .anm-hero-slider{
  min-height:0 !important;
}
body.home .anm-home-main .anm-hero-slider .anm-hero-grid{
  align-items:center !important;
  gap:clamp(22px,4vw,54px) !important;
}
body.home .anm-home-main .anm-hero-slider .anm-hero-visual{
  min-height:340px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:rgba(255,255,255,.98) !important;
  border-radius:22px !important;
  overflow:hidden !important;
  padding:16px !important;
  box-shadow:0 20px 56px rgba(0,14,29,.18) !important;
}
body.home .anm-home-main .anm-hero-slider .anm-hero-visual > img,
body.home .anm-home-main .anm-hero-slider .anm-hero-visual > picture img,
body.home .anm-home-main .anm-hero-slider .anm-hero-visual > .wp-post-image{
  display:block !important;
  width:100% !important;
  height:340px !important;
  max-height:340px !important;
  object-fit:contain !important;
  object-position:center center !important;
  background:#fff !important;
  border-radius:16px !important;
}
body.home .anm-home-main .anm-hero-slider .anm-hero-float{
  max-width:250px;
}

.anm-market-slide,
.anm-category-photo,
.anm-brand-photo,
.anm-service-photo,
.anm-intro-media,
.anm-promo-photo{
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f6fafb;
}

.anm-vehicle-card.anm-vehicle-card-vertical > .anm-vehicle-media,
.anm-home-main .anm-vehicle-grid > .anm-vehicle-card.anm-vehicle-card-vertical > .anm-vehicle-media,
.anm-home-main .anm-vehicle-grid.anm-grid-1 > .anm-vehicle-card.anm-vehicle-card-vertical > .anm-vehicle-media,
.anm-catalog-section .anm-vehicle-grid > .anm-vehicle-card.anm-vehicle-card-vertical > .anm-vehicle-media{
  background:#f6fafb !important;
}

.anm-vehicle-card.anm-vehicle-card-vertical > .anm-vehicle-media img,
.anm-home-main .anm-vehicle-grid > .anm-vehicle-card.anm-vehicle-card-vertical > .anm-vehicle-media img,
.anm-home-main .anm-vehicle-grid.anm-grid-1 > .anm-vehicle-card.anm-vehicle-card-vertical > .anm-vehicle-media img,
.anm-catalog-section .anm-vehicle-grid > .anm-vehicle-card.anm-vehicle-card-vertical > .anm-vehicle-media img,
.anm-category-photo img,
.anm-brand-photo img,
.anm-service-photo img,
.anm-intro-media > img,
.anm-promo-photo img{
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;
  object-position:center center !important;
  background:#fff !important;
}

.anm-vehicle-card.anm-vehicle-card-vertical > .anm-vehicle-media img,
.anm-home-main .anm-vehicle-grid > .anm-vehicle-card.anm-vehicle-card-vertical > .anm-vehicle-media img,
.anm-home-main .anm-vehicle-grid.anm-grid-1 > .anm-vehicle-card.anm-vehicle-card-vertical > .anm-vehicle-media img,
.anm-catalog-section .anm-vehicle-grid > .anm-vehicle-card.anm-vehicle-card-vertical > .anm-vehicle-media img{
  padding:8px;
}

.anm-service-card .anm-service-photo{
  height:220px;
  border-radius:14px;
  overflow:hidden;
  margin:0 0 20px;
}
.anm-service-card{
  min-height:unset;
}

.anm-intro-media,
.anm-promo-photo{
  overflow:hidden;
}
.anm-intro-media > img,
.anm-promo-photo img{
  padding:16px;
}

.anm-category-photo,
.anm-brand-photo{
  overflow:hidden;
}
.anm-category-photo img,
.anm-brand-photo img{
  padding:10px;
}

@media (max-width: 1024px){
  body.home .anm-home-main .anm-hero-slider .anm-hero-visual{
    min-height:310px !important;
  }
  body.home .anm-home-main .anm-hero-slider .anm-hero-visual > img,
  body.home .anm-home-main .anm-hero-slider .anm-hero-visual > picture img,
  body.home .anm-home-main .anm-hero-slider .anm-hero-visual > .wp-post-image{
    height:310px !important;
    max-height:310px !important;
  }
}

@media (max-width: 640px){
  body.home .anm-home-main .anm-hero-slider .anm-hero-visual{
    min-height:250px !important;
    padding:12px !important;
  }
  body.home .anm-home-main .anm-hero-slider .anm-hero-visual > img,
  body.home .anm-home-main .anm-hero-slider .anm-hero-visual > picture img,
  body.home .anm-home-main .anm-hero-slider .anm-hero-visual > .wp-post-image{
    height:250px !important;
    max-height:250px !important;
    border-radius:12px !important;
  }
  .anm-service-card .anm-service-photo{
    height:205px;
  }
}

/* v2.1.2 — desktop hero spacing and viewport composition. */
body.home .anm-header{
  position:sticky !important;
  inset-block-start:0 !important;
  background:var(--night) !important;
  border-bottom:1px solid rgba(255,255,255,.09) !important;
  box-shadow:0 8px 26px rgba(5,27,44,.10) !important;
}
body.home.admin-bar .anm-header{top:32px !important}

body.home .anm-home-main .anm-hero-slider,
body.home .anm-home-main .anm-hero-slider .anm-slider-track,
body.home .anm-home-main .anm-hero-slider .anm-slide,
body.home .anm-home-main .anm-hero-slider .anm-slide.is-current{
  height:clamp(500px,calc(100dvh - var(--anm-header-height) - 32px),620px) !important;
  min-height:500px !important;
  max-height:620px !important;
}
body.home:not(.admin-bar) .anm-home-main .anm-hero-slider,
body.home:not(.admin-bar) .anm-home-main .anm-hero-slider .anm-slider-track,
body.home:not(.admin-bar) .anm-home-main .anm-hero-slider .anm-slide,
body.home:not(.admin-bar) .anm-home-main .anm-hero-slider .anm-slide.is-current{
  height:clamp(500px,calc(100dvh - var(--anm-header-height)),620px) !important;
}
body.home .anm-home-main .anm-hero-slider .anm-hero-grid{
  height:100% !important;
  min-height:0 !important;
  max-height:none !important;
  padding-block:46px 66px !important;
  grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr) !important;
  align-items:center !important;
}
body.home .anm-home-main .anm-hero-copy{
  align-self:center;
  padding-block:8px;
}
body.home .anm-home-main .anm-hero-copy h1,
body.home .anm-home-main .anm-hero-copy h2{
  font-size:clamp(38px,4vw,58px) !important;
  line-height:1.25 !important;
  margin-bottom:18px !important;
}
body.home .anm-home-main .anm-hero-copy > p:not(.anm-hero-caption){
  font-size:17px !important;
  line-height:1.9 !important;
  margin-bottom:22px !important;
}
body.home .anm-home-main .anm-hero-caption{
  margin-top:24px !important;
}
body.home .anm-home-main .anm-hero-slider .anm-hero-visual{
  min-height:0 !important;
  height:min(400px,calc(100% - 80px)) !important;
  max-height:400px !important;
  padding:14px !important;
  margin-block:0 !important;
  align-self:center !important;
}
body.home .anm-home-main .anm-hero-slider .anm-hero-visual > img,
body.home .anm-home-main .anm-hero-slider .anm-hero-visual > picture img,
body.home .anm-home-main .anm-hero-slider .anm-hero-visual > .wp-post-image{
  height:100% !important;
  max-height:100% !important;
  object-fit:contain !important;
}
body.home .anm-home-main .anm-hero-float{
  inset-inline-start:24px !important;
  inset-block-end:22px !important;
  max-width:245px !important;
  padding:12px 15px !important;
  border-radius:12px !important;
  z-index:4 !important;
}
body.home .anm-home-main .anm-hero-float strong{font-size:13px !important}
body.home .anm-home-main .anm-hero-float small{font-size:11px !important}
body.home .anm-home-main .anm-hero-slider .anm-slider-controls{
  inset-block-end:18px !important;
  align-items:center !important;
}
body.home .anm-home-main .anm-slider-arrows button{
  background:rgba(255,255,255,.08) !important;
  border-color:rgba(255,255,255,.24) !important;
  color:#fff !important;
}

@media (max-width:920px){
  body.home .anm-header{
    position:sticky !important;
    top:0 !important;
  }
  body.home.admin-bar .anm-header{top:32px !important}
  body.home .anm-home-main .anm-hero-slider,
  body.home .anm-home-main .anm-hero-slider .anm-slider-track,
  body.home .anm-home-main .anm-hero-slider .anm-slide,
  body.home .anm-home-main .anm-hero-slider .anm-slide.is-current{
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
  }
  body.home .anm-home-main .anm-hero-slider .anm-hero-grid{
    height:auto !important;
    grid-template-columns:1fr !important;
    padding-block:44px 74px !important;
    gap:28px !important;
  }
  body.home .anm-home-main .anm-hero-slider .anm-hero-visual{
    height:360px !important;
    max-height:360px !important;
    width:100% !important;
    max-width:760px !important;
    margin-inline:auto !important;
  }
}

@media (max-width:640px){
  body.home.admin-bar .anm-header{top:0 !important}
  body.home .anm-home-main .anm-hero-slider .anm-hero-grid{
    padding-block:34px 68px !important;
    gap:22px !important;
  }
  body.home .anm-home-main .anm-hero-copy h1,
  body.home .anm-home-main .anm-hero-copy h2{
    font-size:clamp(30px,9vw,40px) !important;
  }
  body.home .anm-home-main .anm-hero-slider .anm-hero-visual{
    height:285px !important;
    max-height:285px !important;
    padding:10px !important;
  }
  body.home .anm-home-main .anm-hero-float{
    inset-inline-start:14px !important;
    inset-block-end:14px !important;
    max-width:210px !important;
  }
}
