/* JBA v16.20.52 — homepage product cards: full-image, no-crop responsive ownership.
 * Loaded only on the homepage and after the legacy inline mobile rules.
 */

/* The actual product image must always remain complete. */
html body [data-jba-dk-origin="home"] .jba-one-product-card .jba-tpd-luxe__thumb img:not(.deluxe-javaherat):not(.haraj-javaherat),
html body [data-jba-dk-origin="home"] .jba-one-product-card .jba-dk-card__image img:not(.deluxe-javaherat):not(.haraj-javaherat),
html body .jba-tpd-luxe-shell .jba-tpd-luxe__card .jba-tpd-luxe__thumb img:not(.deluxe-javaherat):not(.haraj-javaherat){
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:100%!important;
  margin:auto!important;
  padding:0!important;
  object-fit:contain!important;
  object-position:center!important;
  transform:none!important;
  border:0!important;
  box-sizing:border-box!important;
}

html body [data-jba-dk-origin="home"] .jba-one-product-card:hover .jba-tpd-luxe__thumb img:not(.deluxe-javaherat):not(.haraj-javaherat),
html body .jba-tpd-luxe-shell .jba-tpd-luxe__card:hover .jba-tpd-luxe__thumb img:not(.deluxe-javaherat):not(.haraj-javaherat){
  transform:none!important;
}

@media (max-width:899px){
  /* Remove all historical fixed 286px carousel/card ownership. */
  html body [data-jba-dk-origin="home"].jba-dk-shell.jba-v196-shell{
    --jba-v162052-card-width:clamp(142px,44vw,210px);
    --jba190-card-width:var(--jba-v162052-card-width)!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    padding-top:8px!important;
    padding-bottom:10px!important;
    overflow:hidden!important;
  }

  html body [data-jba-dk-origin="home"] .jba-dk-viewport,
  html body [data-jba-dk-origin="home"] .jba-dk-track{
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
  }

  html body [data-jba-dk-origin="home"] .jba-dk-track{
    align-items:stretch!important;
  }

  html body [data-jba-dk-origin="home"] .jba-dk-card.jba-v196-card.jba-one-product-card{
    container-type:inline-size!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto 44px 30px minmax(48px,auto)!important;
    grid-template-areas:
      "image"
      "title"
      "code"
      "price"!important;
    align-content:start!important;
    align-self:stretch!important;
    row-gap:6px!important;
    flex:0 0 var(--jba-v162052-card-width)!important;
    width:var(--jba-v162052-card-width)!important;
    min-width:var(--jba-v162052-card-width)!important;
    max-width:var(--jba-v162052-card-width)!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    padding:8px 9px 10px!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }

  /* Square area follows the real card width. It grows/shrinks without cropping. */
  html body [data-jba-dk-origin="home"] .jba-one-product-card .jba-tpd-luxe__thumb,
  html body [data-jba-dk-origin="home"] .jba-one-product-card .jba-dk-card__image{
    grid-area:image!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    aspect-ratio:1 / 1!important;
    margin:0!important;
    padding:clamp(2px,1.5cqi,5px)!important;
    overflow:hidden!important;
    background:#fff!important;
    border-radius:9px!important;
    box-sizing:border-box!important;
  }

  html body [data-jba-dk-origin="home"] .jba-one-product-card .jba-tpd-luxe__thumb picture,
  html body [data-jba-dk-origin="home"] .jba-one-product-card .jba-tpd-luxe__thumb .jba-optimized-picture,
  html body [data-jba-dk-origin="home"] .jba-one-product-card .jba-dk-card__image picture,
  html body [data-jba-dk-origin="home"] .jba-one-product-card .jba-dk-card__image .jba-optimized-picture{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    height:100%!important;
    min-width:0!important;
    min-height:0!important;
    max-width:100%!important;
    max-height:100%!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
    box-sizing:border-box!important;
  }

  html body [data-jba-dk-origin="home"] .jba-one-product-card .jba-tpd-luxe__name{
    grid-area:title!important;
    display:-webkit-box!important;
    width:100%!important;
    height:44px!important;
    min-height:44px!important;
    max-height:44px!important;
    margin:0!important;
    padding:0 2px!important;
    overflow:hidden!important;
    font-size:clamp(9px,5.7cqi,11px)!important;
    line-height:21px!important;
    -webkit-line-clamp:2!important;
    -webkit-box-orient:vertical!important;
    box-sizing:border-box!important;
  }

  html body [data-jba-dk-origin="home"] .jba-one-product-card .jba-tpd-luxe__code{
    grid-area:code!important;
    height:30px!important;
    min-height:30px!important;
    max-height:30px!important;
    margin:0!important;
    box-sizing:border-box!important;
  }

  html body [data-jba-dk-origin="home"] .jba-one-product-card .jba-tpd-luxe__prices{
    grid-area:price!important;
    width:100%!important;
    height:auto!important;
    min-height:48px!important;
    max-height:none!important;
    margin:0!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }

  html body [data-jba-dk-origin="home"] .jba-dk-view-all{
    align-self:stretch!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
  }

  /* Timed-discount cards on the homepage use the same no-crop rule. */
  html body .jba-tpd-luxe-shell .jba-tpd-luxe__card .jba-tpd-luxe__thumb{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    aspect-ratio:1 / 1!important;
    padding:clamp(2px,1vw,5px)!important;
    background:#fff!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }
}

@media (max-width:360px){
  html body [data-jba-dk-origin="home"].jba-dk-shell.jba-v196-shell{
    --jba-v162052-card-width:43.5vw;
    padding-right:30px!important;
    padding-left:30px!important;
  }

  html body [data-jba-dk-origin="home"] .jba-dk-card.jba-v196-card.jba-one-product-card{
    padding:7px!important;
    row-gap:5px!important;
  }
}
