/*
 * ZooMag r110.12i1 — desktop home proportions.
 * Loaded ONLY by common/home.php.
 * Product mobile repair remains inside the product safe-mode stylesheet.
 */

/* ---------- Desktop main banner: calmer footprint ---------- */
@media (min-width: 1100px) {
  :is(
    [id^="carousel-banner-"],
    .zm-banner-shell,
    .zm-banner-wrap,
    .zm-banner-hero,
    .zoomag-banner-hero
  ) {
    width: min(100%, 1040px) !important;
    max-width: 1040px !important;
    margin-inline: auto !important;
  }

  :is(
    [id^="carousel-banner-"],
    .zm-banner-shell,
    .zm-banner-wrap,
    .zm-banner-hero,
    .zoomag-banner-hero
  ) :is(
    .carousel-inner,
    .carousel-item,
    .zm-banner-frame,
    .zm-banner-slide
  ) {
    max-height: 350px !important;
  }

  :is(
    [id^="carousel-banner-"],
    .zm-banner-shell,
    .zm-banner-wrap,
    .zm-banner-hero,
    .zoomag-banner-hero
  ) img {
    width: 100% !important;
    height: auto !important;
    max-height: 350px !important;
    object-fit: contain !important;
    object-position: center !important;
  }
}

@media (min-width: 1600px) {
  :is(
    [id^="carousel-banner-"],
    .zm-banner-shell,
    .zm-banner-wrap,
    .zm-banner-hero,
    .zoomag-banner-hero
  ) {
    width: min(100%, 1000px) !important;
    max-width: 1000px !important;
  }

  :is(
    [id^="carousel-banner-"],
    .zm-banner-shell,
    .zm-banner-wrap,
    .zm-banner-hero,
    .zoomag-banner-hero
  ) :is(
    .carousel-inner,
    .carousel-item,
    .zm-banner-frame,
    .zm-banner-slide
  ),
  :is(
    [id^="carousel-banner-"],
    .zm-banner-shell,
    .zm-banner-wrap,
    .zm-banner-hero,
    .zoomag-banner-hero
  ) img {
    max-height: 334px !important;
  }
}

/* ---------- Home specials: products stay visually primary ---------- */
@media (min-width: 1100px) {
  :is(
    .zm-home-specials,
    [class^="zm-home-specials"],
    [class*=" zm-home-specials"]
  ) :is(
    .product-thumb,
    .product,
    [class*="product-card"],
    [class*="special-card"],
    [class*="specials-card"]
  ) {
    min-height: 0 !important;
  }

  :is(
    .zm-home-specials,
    [class^="zm-home-specials"],
    [class*=" zm-home-specials"]
  ) :is(
    .product-thumb .image,
    .product .image,
    [class*="product-card"] [class*="image"],
    [class*="special-card"] [class*="image"],
    [class*="specials-card"] [class*="image"]
  ) {
    min-height: 205px !important;
    height: 205px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  :is(
    .zm-home-specials,
    [class^="zm-home-specials"],
    [class*=" zm-home-specials"]
  ) :is(
    .product-thumb .image img,
    .product .image img,
    [class*="product-card"] img,
    [class*="special-card"] img,
    [class*="specials-card"] img
  ) {
    width: 100% !important;
    height: 100% !important;
    max-width: 230px !important;
    max-height: 205px !important;
    object-fit: contain !important;
    object-position: center !important;
  }
}

@media (min-width: 1500px) {
  :is(
    .zm-home-specials,
    [class^="zm-home-specials"],
    [class*=" zm-home-specials"]
  ) :is(
    .product-thumb .image,
    .product .image,
    [class*="product-card"] [class*="image"],
    [class*="special-card"] [class*="image"],
    [class*="specials-card"] [class*="image"]
  ) {
    min-height: 225px !important;
    height: 225px !important;
  }

  :is(
    .zm-home-specials,
    [class^="zm-home-specials"],
    [class*=" zm-home-specials"]
  ) :is(
    .product-thumb .image img,
    .product .image img,
    [class*="product-card"] img,
    [class*="special-card"] img,
    [class*="specials-card"] img
  ) {
    max-width: 250px !important;
    max-height: 225px !important;
  }
}

/* Do not disturb the compact mobile horizontal rail. */
@media (max-width: 1099px) {
  :is(
    .zm-home-specials,
    [class^="zm-home-specials"],
    [class*=" zm-home-specials"]
  ) img {
    object-fit: contain;
  }
}
