/**
 * Ürün Kartı - Merkezi Stil (v19)
 * Menü, Anasayfa Popüler Ürünler, Ürün Detay Yanında İyi Gider bölümlerinde kullanılır.
 * Görünümü değiştirmek için sadece bu dosyayı düzenleyin.
 * Kartlara .product-card-unified class'ı eklenir.
 */

/* Kartın tamamı tıklanabilir olsun (stretched link) */
.product-card-unified {
    position: relative;
    cursor: pointer;
}
.product-card-unified > .catagory-product-image > a {
    position: static;
}
.product-card-unified > .catagory-product-image > a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 20;
}





.product-card-unified .catagory-product-image a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

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

/* İçerik bloğu: normal durumda aşağıda (ortada), hover'da yukarı kayar */
.product-card-unified .catagory-product-content {
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: relative;
    z-index: 9;
    transform: translateY(20px);
    transition: transform 0.35s ease;
}
.product-card-unified:hover .catagory-product-content {
    transform: translateY(0);
}

/* Sıra: 1. Ürün adı, 2. Fiyat, 3. Sepete Ekle */
.product-card-unified .catagory-product-content h4 {
    order: 1;
    font-weight: 700;
}
.product-card-unified .catagory-product-content .info-price {
    order: 2;
    margin-top: 8px;
    margin-bottom: 8px;
}
.product-card-unified .catagory-product-content .menu-add-btn-wrapper,
.product-card-unified .catagory-product-content .catagory-button {
    order: 3;
    margin-top: 12px;
}

/* Ürünü İncele butonu: normal durumda gizli, hover'da alttan animasyonla gelir */
.product-card-unified .catagory-product-content .catagory-button {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.3s ease 0.05s, transform 0.3s ease 0.05s;
}
.product-card-unified:hover .catagory-product-content .catagory-button {
    opacity: 1;
    transform: translateY(0);
}

/* Web: Ürünü İncele butonu */
a.add-to-cart-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
    top: 32px;
}

.product-card-unified .catagory-product-content .info-price span,
.product-card-unified .catagory-product-content .info-price h6 {
    font-size: 1.15rem;
    font-weight: 600;
}
/* İndirim: orijinal üstte çizili, altında indirimli fiyat */
.product-card-unified .catagory-product-content .info-price {
    gap: 2px;
}
.product-card-unified .catagory-product-content .info-price .info-price-compare {
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    text-decoration: line-through;
    color: #6b7280;
}
.product-card-unified .catagory-product-content .info-price .info-price-current {
    color: #16a34a !important;
    font-size: 1.95rem !important;
    font-weight: 800 !important;
}

/* Menü sayfası - beyaz kart + catagory-card-shape arka plan (popüler ürünler gibi) */
.food-category-section .product-card-unified,
.food-category-section .catagory-product-card-2 {
    padding: 30px;
    background-color: #fff;
    background-image: url('/theme/img/shape/catagory-card-shape.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}
/* Menü sayfası - fotoğraf kutusu sabit yükseklik (ürün adı/fiyat taşmasın, anasayfa gibi) */
.food-category-section .product-card-unified .catagory-product-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 245px;
    border-radius: 15px;
    overflow: hidden;
    flex-shrink: 0;
}
.food-category-section .product-card-unified .catagory-product-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    border-radius: 12px;
}
/* Menü sayfası - içerik padding ve fiyat */
.food-category-section .product-card-unified .catagory-product-content {
    display: flex !important;
    flex-direction: column !important;
    padding: 20px !important;
}
.food-category-section .product-card-unified .info-price span,
.food-category-section .product-card-unified .info-price h6 {
    font-size: 1.70rem !important;
}

/* Anasayfa Popüler Ürünler - beyaz kart + catagory-card-shape arka plan (popüler kategoriler gibi) */
.popular-products-section .product-card-unified {
    margin-top: 30px;
    padding: 30px;
    position: relative;
    background-color: #fff;
    background-image: url('/theme/img/shape/catagory-card-shape.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}
/* Popüler Ürünler: hover'da turuncu/renkli arka plan gelmesin */
.popular-products-section .product-card-unified::before,
.popular-products-section .product-card-unified:hover::before {
    background-color: transparent !important;
    background-image: none !important;
    height: 0 !important;
}
/* Popüler Ürünler: arka plan beyaz kaldığı için hover'da yazı rengi koyu kalsın */
.popular-products-section .product-card-unified:hover .catagory-product-content h4 a,
.popular-products-section .product-card-unified:hover .catagory-product-content h4,
.popular-products-section .product-card-unified:hover .catagory-product-content span,
.popular-products-section .product-card-unified:hover .catagory-product-content p {
    color: var(--header, #1E1D1D) !important;
    opacity: 1 !important;
    visibility: visible !important;
}
/* Popüler Ürünler: fiyat yok, içerik daha aşağıda (ortada) olsun */
.popular-products-section .product-card-unified .catagory-product-content {
    margin-top: auto;
    position: relative;
    z-index: 9;
    transform: translateY(53px);
}
.popular-products-section .product-card-unified:hover .catagory-product-content {
    transform: translateY(0);
}
.popular-products-section .product-card-unified .catagory-product-content h4 {
    margin-top: 0;
    margin-bottom: 0.35em;
    position: relative;
    z-index: 9;
}
.popular-products-section .product-card-unified .info-price span,
.popular-products-section .product-card-unified .info-price .info-price-compare,
.popular-products-section .product-card-unified .info-price .info-price-current {
    font-size: 1.70rem !important;
}
@media (max-width: 575px) {
    .popular-products-section .product-card-unified {
        padding: 30px;
    }
    .popular-products-section .product-card-unified .catagory-product-content {
        margin-top: 0;
    }
}

/* active state kaldırıldı – tıklayınca direkt gidiyor */

/* Mobil/Touch: Buton gizli, tap ile göster */
@media (max-width: 767px),
       (hover: none) {
    /* Mobilde içerik zaten ortada, dokunununca yukarı kayar */
    .product-card-unified .catagory-product-content .catagory-button {
        opacity: 0 !important;
        transform: translateY(15px);
        pointer-events: none;
    }
    .product-card-unified:hover .catagory-product-content .catagory-button {
        opacity: 1 !important;
        transform: translateY(0);
        pointer-events: auto;
        border-radius: 12px !important;
    }
}

/* Responsive - Tablet */
@media (max-width: 991px) {
    .product-card-unified .catagory-product-image {
        height: 220px;
        border-radius: 12px !important;
    }
    .food-category-section .product-card-unified .catagory-product-image {
        height: 220px;
    }
    /* Menü: içerik görselin üstüne taşmasın, her zaman altında kalsın */
    .food-category-section .product-card-unified .catagory-product-content {
        margin-top: 16px !important;
        transform: none !important;
    }
    .food-category-section .product-card-unified:hover .catagory-product-content {
        transform: none !important;
    }
}

/* Responsive - Mobil */
@media (max-width: 767px) {
    .product-card-unified .catagory-product-image {
        height: 200px;
        border-radius: 12px !important;
    }
    .food-category-section .product-card-unified .catagory-product-image {
        height: 200px;
    }
    .product-card-unified .catagory-product-content .info-price span,
    .product-card-unified .catagory-product-content .info-price h6 {
        font-size: 1.05rem;
    }
    /* Menü: mobilde de ad/fiyat görselin altında */
    .food-category-section .product-card-unified .catagory-product-content {
        margin-top: 16px !important;
        transform: none !important;
    }
    .food-category-section .product-card-unified:hover .catagory-product-content {
        transform: none !important;
    }
}

/* Çok küçük ekranlar */
@media (max-width: 380px) {
    .product-card-unified .catagory-product-image {
        height: 180px;
        border-radius: 12px !important;
    }
    .food-category-section .product-card-unified .catagory-product-image {
        height: 180px;
    }
    .food-category-section .product-card-unified .catagory-product-content {
        margin-top: 12px !important;
    }
}
