/*
  AL-HIJRA OFFICIAL — Katalog Karpet Mobile V1.5.2
  Hotfix foto katalog 2 kolom.
  Pasang SETELAH stylesheet 2 kolom V1.5.1.
  Berlaku hanya untuk kartu katalog pada layar <=650px.
  Halaman detail produk tetap menampilkan foto utuh (contain).
  Hasil: bingkai persegi terisi foto tanpa distorsi; sisi foto
  yang melampaui bidang persegi dipotong pada thumbnail saja.
*/
@media screen and (max-width:650px) {
  .catalog-area .product-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .catalog-area .product-card .gallery-unit {
    width:100%;
    min-width:0;
  }

  .catalog-area .product-card .gallery.gallery-card {
    position:relative;
    display:block;
    width:100%;
    height:auto !important;
    aspect-ratio:1 / 1;
    overflow:hidden;
    border-radius:0;
    background:#e9eee9;
  }

  /* Position the sliding track against the entire square frame.
     Do not set transform: JS carousel controls horizontal sliding. */
  .catalog-area .product-card .gallery-card .gallery-track {
    position:absolute;
    inset:0;
    display:flex;
    width:100%;
    height:100%;
    min-height:0;
    align-items:stretch;
  }

  .catalog-area .product-card .gallery-card .gallery-slide {
    display:flex;
    flex:0 0 100%;
    width:100%;
    height:100%;
    min-width:0;
    min-height:0;
    margin:0;
    padding:0;
    align-items:center;
    justify-content:center;
    overflow:hidden;
  }

  .catalog-area .product-card .gallery-card .gallery-slide img {
    display:block;
    width:100%;
    height:100%;
    max-width:none;
    max-height:none;
    object-fit:cover;
    object-position:50% 50%;
    flex:0 0 auto;
  }

  .catalog-area .product-card .gallery-card .gallery-placeholder {
    display:grid;
    place-items:center;
    width:100%;
    height:100%;
    min-height:0;
    margin:0;
    padding:8px;
  }

  .catalog-area .product-card .gallery-card .gallery-arrow {
    z-index:3;
  }

  .catalog-area .product-card .gallery-card .gallery-counter {
    z-index:3;
  }
}
