/* BM Traders v3.6.6 — portrait side-banner fit correction
   Designed for the admin-recommended 900 × 975 px artwork.
   Loaded after theme + mobile hotfix. No PHP layout/data changes. */

/* Desktop/tablet: give portrait artwork enough width and show the complete image. */
@media (min-width: 901px) {
  .bm-v350-showcase .showcase-row,
  .category-showcase .showcase-row {
    grid-template-columns: clamp(390px, 29vw, 470px) minmax(0, 1fr) !important;
    align-items:start !important;
    overflow:visible !important;
  }

  .bm-v350-showcase .showcase-sponsor-slider,
  .category-showcase .showcase-sponsor-slider {
    position:relative !important;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    aspect-ratio:12 / 13 !important; /* 900 × 975 */
    background:#ffffff !important;
    overflow:hidden !important;
  }

  .bm-v350-showcase .showcase-sponsor-slider .showcase-sponsor,
  .category-showcase .showcase-sponsor-slider .showcase-sponsor {
    position:absolute !important;
    inset:0 !important;
    width:100% !important;
    height:100% !important;
    min-height:0 !important;
    background:#ffffff !important;
  }

  .bm-v350-showcase .showcase-sponsor img,
  .category-showcase .showcase-sponsor img {
    width:100% !important;
    height:100% !important;
    max-width:100% !important;
    object-fit:contain !important;
    object-position:center center !important;
    background:#ffffff !important;
    transform:none !important;
  }

  .bm-v350-showcase .showcase-products,
  .category-showcase .showcase-products {
    min-width:0 !important;
    width:100% !important;
    padding:14px !important;
  }

  .bm-v350-showcase .showcase-products .omp-product-grid,
  .category-showcase .showcase-products .omp-product-grid {
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    gap:14px !important;
    align-items:stretch !important;
  }
}

/* Phones/tablets: 900 × 975 remains readable rather than being forced into 16:9. */
@media (max-width: 900px) {
  .bm-v350-showcase .showcase-sponsor-slider,
  .category-showcase .showcase-sponsor-slider,
  .showcase-sponsor-slider {
    aspect-ratio:12 / 13 !important;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    background:#ffffff !important;
  }

  .bm-v350-showcase .showcase-sponsor-slider .showcase-sponsor,
  .category-showcase .showcase-sponsor-slider .showcase-sponsor,
  .showcase-sponsor-slider .showcase-sponsor {
    position:absolute !important;
    inset:0 !important;
    width:100% !important;
    height:100% !important;
    min-height:0 !important;
    background:#ffffff !important;
  }

  .bm-v350-showcase .showcase-sponsor img,
  .category-showcase .showcase-sponsor img,
  .showcase-sponsor img {
    width:100% !important;
    height:100% !important;
    object-fit:contain !important;
    object-position:center center !important;
    background:#ffffff !important;
    transform:none !important;
  }
}

/* Very small phones: preserve full artwork but keep it visually contained. */
@media (max-width: 480px) {
  .bm-v350-showcase .showcase-row,
  .category-showcase .showcase-row {
    border-radius:14px !important;
    overflow:hidden !important;
  }
  .bm-v350-showcase .showcase-sponsor-slider,
  .category-showcase .showcase-sponsor-slider,
  .showcase-sponsor-slider {
    border-radius:14px 14px 0 0 !important;
  }
}
