/**
 * Ürün kartı görsel boyutu — tüm tipler (1–4).
 * Değişkenler: product_card_image_dimension_style.php → --pc-card-img-* (html üzerinde, miras alınır).
 */

/* —— Tip 1 (.md-product-card) —— */
.md-product-img-box > a:first-child,
.md-product-card.pc-card-full-hit .md-product-img-box > a.pc-card-surface-link {
    width: var(--pc-card-img-w-d, 100%);
    height: var(--pc-card-img-h-d, auto);
    aspect-ratio: var(--pc-card-img-ar-d, 1 / 1);
    max-width: 100%;
    box-sizing: border-box;
    display: block;
}

@media (max-width: 991.98px) {
    .md-product-img-box > a:first-child,
    .md-product-card.pc-card-full-hit .md-product-img-box > a.pc-card-surface-link {
        width: var(--pc-card-img-w-m, 100%);
        height: var(--pc-card-img-h-m, auto);
        aspect-ratio: var(--pc-card-img-ar-m, 1 / 1);
    }
}

/* —— Tip 2 (.product-cart-wrap) —— */
.product-cart-wrap .product-img-action-wrap > .product-img,
.product-cart-wrap .product-img-action-wrap > .product-img a:first-child,
.product-cart-wrap.pc-card-full-hit .product-img.product-img-zoom > a.pc-card-surface-link {
    width: var(--pc-card-img-w-d, 100%);
    height: var(--pc-card-img-h-d, auto);
    aspect-ratio: var(--pc-card-img-ar-d, 286 / 215);
    max-width: 100%;
    box-sizing: border-box;
}

.product-cart-wrap .product-img-action-wrap > .product-img a:first-child,
.product-cart-wrap.pc-card-full-hit .product-img.product-img-zoom > a.pc-card-surface-link {
    display: block;
}

@media (max-width: 991.98px) {
    .product-cart-wrap .product-img-action-wrap > .product-img,
    .product-cart-wrap .product-img-action-wrap > .product-img a:first-child,
    .product-cart-wrap.pc-card-full-hit .product-img.product-img-zoom > a.pc-card-surface-link {
        width: var(--pc-card-img-w-m, 100%);
        height: var(--pc-card-img-h-m, auto);
        aspect-ratio: var(--pc-card-img-ar-m, 286 / 215);
    }
}

/* —— Tip 4 (.pc4-card) —— */
.pc4-card .pc4-image-area {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.pc4-card .pc4-image-area img {
    max-width: min(100%, var(--pc-card-img-w-d, 100%));
    max-height: min(100%, var(--pc-card-img-h-d, 100%));
    object-fit: contain;
}

@media (max-width: 991.98px) {
    .pc4-card .pc4-image-area img {
        max-width: min(100%, var(--pc-card-img-w-m, 100%));
        max-height: min(100%, var(--pc-card-img-h-m, 100%));
    }
}
