/* ============================================
   Modern ürün kartları (anasayfa + kategori)
   ============================================ */

.products .product-item .product {
    background: #fff;
    border: 1px solid #ececf0;
    border-radius: 14px;
    padding: 12px 12px 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}

.products .product-item .product:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .10);
    border-color: #dfdfe6;
}

/* Görsel alanı */
.products .product-item .product-thumb-info {
    border-radius: 10px;
    overflow: hidden;
    background: #f7f7f9;
    box-shadow: none;
}

/* Tema (theme-shop.css) display:block ile flex'i eziyor; yatay resimlerin
   dikeyde ortalanması için daha yüksek öncelikli kural */
.product .product-thumb-info .product-thumb-info-image.img-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.products .product-item .product-thumb-info-image img {
    transition: transform .35s ease;
}

.products .product-item .product:hover .product-thumb-info-image img {
    transform: scale(1.06);
}

/* Hover'da ikinci ürün resmi: ilk resmin üzerinde yumuşak geçişle görünür */
.products .product-item .img-container {
    position: relative;
}

.products .product-item .img-container .img-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f7f7f9;
    opacity: 0;
    transition: opacity .35s ease, transform .35s ease;
}

.products .product-item .product:hover .img-container .img-hover {
    opacity: 1;
}

/* Stok rozeti */
.stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}

.stock-badge.stock-high { background: rgba(25, 135, 84, .92); }
.stock-badge.stock-mid  { background: rgba(230, 145, 0, .95); }
.stock-badge.stock-low  { background: rgba(220, 53, 69, .92); }

/* Kod / koli satırı */
.products .product-item .product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .8rem;
    color: #8a8a94;
    margin-bottom: 2px;
}

.products .product-item .product-meta .meta-koli {
    background: #f2f2f6;
    border-radius: 6px;
    padding: 1px 8px;
    font-size: .72rem;
    color: #6c6c76;
}

/* Ürün adı */
.products .product-item h3 {
    min-height: 2.6em;
}

/* Fiyat */
.products .product-item .price {
    margin-top: auto;
}

/* Net fiyat (indirimli) kırmızı gösterilir; brüt fiyat .amount olarak üstü çizili kalır */
.price .sale.net-price {
    color: #dc3545 !important;
}

/* Miktar + Ekle satırı */
.products .product-item .add-row .form-control {
    border-radius: 8px;
    border-color: #e2e2e8;
    font-size: .85rem;
}

.products .product-item .add-row .form-control:focus {
    border-color: #b9b9c6;
    box-shadow: 0 0 0 .15rem rgba(0, 0, 0, .06);
}

.products .product-item .add-row .btn {
    border-radius: 8px;
    width: 100%;
    font-size: .8rem;
    letter-spacing: .3px;
}

/* Mobil/dar kartlarda miktar kutusu ve Ekle butonu alt alta geçer */
@media (max-width: 768px) {
    .products .product-item .add-row .col-6 {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }

    .products .product-item .add-row .form-control {
        font-size: 16px; /* iOS'ta odaklanınca otomatik zoom yapmasın */
        text-align: center;
    }

    .products .product-item .add-row .btn {
        padding-top: .55rem;
        padding-bottom: .55rem;
    }
}

@media (max-width: 576px) {
    .stock-badge {
        font-size: .65rem;
        padding: 3px 8px;
    }
}
