/* Maltazon UX2027 unified Product Card — Product First candidate. */

:root {
  --mz-product-card-image-inset: 4px;
  --mz-product-card-badge-height: 20px;
}

/* One authoritative square media well for Homepage and native listing cards. */
body#index .mz-home-ux2 .ApProductCarousel .product-image,
body:is(#module-ambjolisearch-jolisearch, #category, #manufacturer) #js-product-list .product-image {
  position: relative;
  display: flex;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 1 / 1;
  flex: 0 0 auto !important;
  align-items: center;
  justify-content: center;
  padding: var(--mz-product-card-image-inset) !important;
  overflow: visible !important;
}

body#index .mz-home-ux2 .ApProductCarousel .product-miniature.mz-card-has-badges .product-image,
body:is(#module-ambjolisearch-jolisearch, #category, #manufacturer) #js-product-list .product-miniature.mz-card-has-badges .product-image {
  margin-top: calc(var(--mz-product-card-badge-height) + 6px);
}

body#index .mz-home-ux2 .ApProductCarousel .product-thumbnail,
body:is(#module-ambjolisearch-jolisearch, #category, #manufacturer) #js-product-list .product-thumbnail {
  display: flex;
  width: 100%;
  height: 100% !important;
  min-height: 0;
  align-items: center;
  justify-content: center;
}

body#index .mz-home-ux2 .ApProductCarousel .product-image img.img-fluid,
body:is(#module-ambjolisearch-jolisearch, #category, #manufacturer) #js-product-list .product-thumbnail img,
body:is(#module-ambjolisearch-jolisearch, #category, #manufacturer) #js-product-list .product-image img.img-fluid {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100% !important;
  max-height: none !important;
  object-fit: contain;
  object-position: 50% 50%;
}

/* Remove non-product chrome without altering title typography or line count. */
:is(
  body#index .ApProductCarousel,
  body#module-ambjolisearch-jolisearch #js-product-list,
  body#category #js-product-list,
  body#manufacturer #js-product-list
) .product-miniature.mz-product-card-ux2027 .wishlist,
:is(
  body#index .ApProductCarousel,
  body#module-ambjolisearch-jolisearch #js-product-list,
  body#category #js-product-list,
  body#manufacturer #js-product-list
) .product-miniature.mz-product-card-ux2027 .category-default {
  display: none !important;
}

/* Existing commercial truth stays authoritative; presentation is compact. */
:is(
  body#index .ApProductCarousel,
  body#module-ambjolisearch-jolisearch #js-product-list,
  body#category #js-product-list,
  body#manufacturer #js-product-list
) .product-miniature.mz-product-card-ux2027 :is(.fmm_title_text_sticker, .fmm_sticker_base_span) {
  top: -22px !important;
  z-index: 7 !important;
  display: inline-flex !important;
  width: auto !important;
  max-width: calc(62% - 7px) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  transform: none !important;
}

:is(
  body#index .ApProductCarousel,
  body#module-ambjolisearch-jolisearch #js-product-list,
  body#category #js-product-list,
  body#manufacturer #js-product-list
) .product-miniature.mz-product-card-ux2027 :is(.fmm_title_text_sticker, .fmm_sticker_base_span)[style*="left"] {
  right: auto !important;
  left: 6px !important;
}

:is(
  body#index .ApProductCarousel,
  body#module-ambjolisearch-jolisearch #js-product-list,
  body#category #js-product-list,
  body#manufacturer #js-product-list
) .product-miniature.mz-product-card-ux2027 :is(.fmm_title_text_sticker, .fmm_sticker_base_span)[style*="right"] {
  right: 6px !important;
  left: auto !important;
}

:is(
  body#index .ApProductCarousel,
  body#module-ambjolisearch-jolisearch #js-product-list,
  body#category #js-product-list,
  body#manufacturer #js-product-list
) .product-miniature.mz-product-card-ux2027 :is(.fmm_title_text_sticker, .fmm_sticker_base_span) .sticker-text,
:is(
  body#index .ApProductCarousel,
  body#module-ambjolisearch-jolisearch #js-product-list,
  body#category #js-product-list,
  body#manufacturer #js-product-list
) .product-miniature.mz-product-card-ux2027 .mz-card-availability-label {
  display: inline-flex !important;
  min-height: var(--mz-product-card-badge-height);
  align-items: center;
  padding: 4px 7px !important;
  overflow: hidden;
  color: #fff !important;
  background: #25282c !important;
  border-radius: 999px !important;
  font-family: inherit !important;
  font-size: 8px !important;
  font-style: normal !important;
  font-weight: 800 !important;
  letter-spacing: .025em;
  line-height: 1 !important;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

:is(
  body#index .ApProductCarousel,
  body#module-ambjolisearch-jolisearch #js-product-list,
  body#category #js-product-list,
  body#manufacturer #js-product-list
) .product-miniature.mz-product-card-ux2027 .ticons_showIcons.mz-card-availability-strip {
  position: absolute !important;
  z-index: 8 !important;
  top: -22px !important;
  right: auto !important;
  bottom: auto !important;
  left: 6px !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

:is(
  body#index .ApProductCarousel,
  body#module-ambjolisearch-jolisearch #js-product-list,
  body#category #js-product-list,
  body#manufacturer #js-product-list
) .product-miniature.mz-product-card-ux2027 .mz-card-availability-strip :is(.ticons, .ticons li, .ticons a, .mz-availability-badge) {
  display: flex !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: center;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

@media (max-width: 767.98px) {
  :root {
    --mz-product-card-image-inset: 3px;
  }

  body#index .mz-home-ux2 .ApProductCarousel .product-image,
  body:is(#module-ambjolisearch-jolisearch, #category, #manufacturer) #js-product-list .product-image {
    position: static;
  }

  :is(
    body#index .ApProductCarousel,
    body#module-ambjolisearch-jolisearch #js-product-list,
    body#category #js-product-list,
    body#manufacturer #js-product-list
  ) .product-miniature.mz-product-card-ux2027 :is(.fmm_title_text_sticker, .fmm_sticker_base_span),
  :is(
    body#index .ApProductCarousel,
    body#module-ambjolisearch-jolisearch #js-product-list,
    body#category #js-product-list,
    body#manufacturer #js-product-list
  ) .product-miniature.mz-product-card-ux2027 .ticons_showIcons.mz-card-availability-strip {
    top: 4px !important;
  }
}

@media (max-width: 360px) {
  /* Keep the native lower-right cart untouched while long prices remain legible. */
  :is(
    body#index .ApProductCarousel,
    body#module-ambjolisearch-jolisearch #js-product-list,
    body#category #js-product-list,
    body#manufacturer #js-product-list
  ) .product-miniature.mz-product-card-ux2027.mz-card-price-four-digits .product-price-and-shipping .price {
    font-size: 14px !important;
  }

  :is(
    body#index .ApProductCarousel,
    body#module-ambjolisearch-jolisearch #js-product-list,
    body#category #js-product-list,
    body#manufacturer #js-product-list
  ) .product-miniature.mz-product-card-ux2027.mz-card-price-five-digits .product-price-and-shipping .price {
    font-size: 13px !important;
  }

  :is(
    body#index .ApProductCarousel,
    body#module-ambjolisearch-jolisearch #js-product-list,
    body#category #js-product-list,
    body#manufacturer #js-product-list
  ) .product-miniature.mz-product-card-ux2027 :is(.fmm_title_text_sticker, .fmm_sticker_base_span) .sticker-text,
  :is(
    body#index .ApProductCarousel,
    body#module-ambjolisearch-jolisearch #js-product-list,
    body#category #js-product-list,
    body#manufacturer #js-product-list
  ) .product-miniature.mz-product-card-ux2027 .mz-card-availability-label {
    padding: 3px 5px !important;
    font-size: 6.5px !important;
  }
}
