/* Farklı boyutlu ürün görselleri: kırpma (cover) yerine kutuya sığdırma (contain) */

/* Karşılaştırma — alt çubuk */
.tf-compare-list .tf-compare-offcanvas .tf-compare-item img {
    object-fit: contain;
    object-position: center;
    background-color: #fff;
}

.tf-compare-list .tf-compare-offcanvas .tf-compare-item.igx-compare-item-dynamic {
    height: auto;
    min-height: 180px;
    align-items: stretch;
}

.tf-compare-list .tf-compare-offcanvas .tf-compare-item.igx-compare-item-dynamic > a {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-height: 180px;
}

.tf-compare-list .tf-compare-offcanvas .tf-compare-item.igx-compare-item-dynamic .igx-compare-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    width: 100%;
    min-height: 140px;
    max-height: 160px;
    padding: 8px;
    background: #f8fafb;
    border-radius: 6px;
    overflow: hidden;
    box-sizing: border-box;
}

.tf-compare-list .tf-compare-offcanvas .tf-compare-item.igx-compare-item-dynamic .igx-compare-thumb img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Karşılaştırma — tablo sayfası */
.tf-table-compare .item_image {
    aspect-ratio: unset;
    min-height: 160px;
    max-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafb;
    border-radius: 8px;
    overflow: hidden;
}

.tf-table-compare .item_image img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
    object-position: center;
}

/* Ürün detay — küçük galeri */
.tf-product-media-thumbs .swiper-slide {
    height: auto !important;
    max-height: none;
}

.tf-product-media-thumbs .swiper-slide .item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 72px;
    max-height: 153px;
    padding: 6px;
    background: #fff;
    box-sizing: border-box;
}

.tf-product-media-thumbs .swiper-slide .item img {
    width: 100%;
    height: auto;
    max-height: 141px;
    aspect-ratio: unset !important;
    object-fit: contain;
    object-position: center;
}

@media (max-width: 1199px) {
    .tf-product-media-thumbs .swiper-slide {
        aspect-ratio: unset !important;
    }
}

/* Ürün detay — ana görsel */
.flat-wrap-media-product .tf-product-media-main .item {
    align-items: center;
    justify-content: center;
    background: #fff;
}

.flat-wrap-media-product .tf-product-media-main .item img {
    width: 100%;
    height: auto;
    max-height: inherit;
    object-fit: contain;
    object-position: center;
}

/* Hızlı bakış modal */
.modal-quick-view .tf-product-media-wrap .item,
.modal-quick-view .tf-product-media-wrap .swiper-slide img {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.modal-quick-view .tf-product-media-wrap img {
    object-fit: contain !important;
    max-height: 420px;
    width: auto;
    max-width: 100%;
    height: auto;
}

/* Ürün detay — görsel üzerinde etiketler (Yeni, Fırsat, indirim) */
.igx-product-detail-badges {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
    pointer-events: none;
}

.igx-product-detail-badges .product-badge_list {
    top: 12px;
    left: 12px;
}

@media (min-width: 768px) {
    .igx-product-detail-badges .product-badge_list {
        top: 16px;
        left: 16px;
    }
}

/* Ürün listesi / mağaza grid — görsel ile başlık arasındaki boşluk */
.wrapper-shop.tf-grid-layout .card-product,
#gridLayout .card-product {
    gap: 12px;
}

.wrapper-shop.tf-grid-layout .card-product_wrapper,
#gridLayout .card-product_wrapper {
    aspect-ratio: 1;
}

.wrapper-shop.tf-grid-layout .card-product_wrapper .product-img,
#gridLayout .card-product_wrapper .product-img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f8fafb;
}

.wrapper-shop.tf-grid-layout .card-product_wrapper .product-img img.img-product,
#gridLayout .card-product_wrapper .product-img img.img-product {
    position: relative;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

.wrapper-shop.tf-grid-layout .card-product_wrapper .product-img img.img-hover,
#gridLayout .card-product_wrapper .product-img img.img-hover {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

.wrapper-shop.tf-grid-layout .card-product_info .price-wrap,
#gridLayout .card-product_info .price-wrap {
    margin-bottom: 0;
}

/* Ürün detay — teknik tablo (okunabilir) */
.cms-content .igx-product-specs th {
    font-weight: 600;
    white-space: nowrap;
    padding-right: 16px;
    vertical-align: top;
    width: 38%;
}

.cms-content .igx-product-specs td {
    vertical-align: top;
}

/* Ürün detay — Benzer ürünler: mobil 2 sütun */
#related-products-wrapper.tf-grid-layout {
    column-gap: 10px;
    row-gap: 20px;
}

@media (min-width: 992px) {
    #related-products-wrapper.tf-grid-layout {
        column-gap: 30px;
        row-gap: 32px;
    }
}

#related-products-wrapper .card-product_wrapper {
    position: relative;
}

@media (max-width: 991px) {
    #related-products-wrapper .name-product {
        font-size: 13px;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    #related-products-wrapper .product-action_list .box-icon {
        width: 32px;
        height: 32px;
    }

    #related-products-wrapper .product-action_list .icon {
        font-size: 16px;
    }
}

/* Liste görünümü */
.product-style_list .card-product_wrapper .product-img {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafb;
}

.product-style_list .card-product_wrapper .product-img img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Stok rozetleri + stokta yok kaplaması */
.product-badge_item.out-of-stock {
    background-color: #6b7280;
}

.product-badge_item.low-stock {
    background-color: #ee7f00;
}

.product-badge_item.backorder {
    background-color: #4b5563;
}

.card-product.out-of-stock .card-product_wrapper::before {
    content: "Stokta yok";
    font-size: 15px;
    line-height: 1.2;
    width: 96px;
    height: 96px;
    padding: 8px;
}
