/**
 * Catalog product grid — reliable 3-column layout + fill row when filters return few items.
 */

.ahlmall-catalog-product-grid {
    display: flex;
    flex-wrap: wrap;
    margin-left: -12px;
    margin-right: -12px;
}

.ahlmall-catalog-product-grid > [class*='col-'] {
    padding-left: 12px;
    padding-right: 12px;
    margin-bottom: 24px;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
    float: none !important;
}

.ahlmall-catalog-product-grid > .col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

@media (min-width: 768px) {
    .ahlmall-catalog-product-grid > .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

@media (min-width: 992px) {
    .ahlmall-catalog-product-grid > .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

/* Do not let mobile “full width col-6” rule collapse the desktop grid */
@media (min-width: 768px) {
    .ahlmall-catalog-product-grid > .col-6 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

@media (max-width: 575px) {
    .ahlmall-catalog-product-grid > .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Override theme rule: .shop_container .col-6 { width: 100% } on very small screens */
@media (max-width: 480px) {
    .ahlmall-catalog-product-grid.shop_container > .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

.ahlmall-catalog-product-grid .product {
    height: 100%;
}

.ahlmall-catalog-product-grid__supplement .product {
    opacity: 0.96;
}
