/* ============================================
   SITE STYLE CSS - Ortak Ürün Kartı Stilleri
   Index, Urundetay ve Kategoriler sayfaları için
   ============================================ */

/* Swiper Butonları */
.swiper-button-next-1,
.swiper-button-prev-1 {
    background-color: transparent;
    border: none;
    font-size: 24px;
    color: #bfbfbf;
}

.swiper-button-next-2,
.swiper-button-prev-2 {
    background-color: transparent;
    border: none;
    font-size: 24px;
    color: #bfbfbf;
}

.swiper-button-next-1:hover,
.swiper-button-prev-1:hover,
.swiper-button-next-2:hover,
.swiper-button-prev-2:hover {
    color: #494949;
}

/* Ürün Grid Container */
.product-grid-container {
    width: 100%;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    width: 100%;
    align-items: start; /* Kartların üstten hizalanması */
}

/* Ürün kartı yüksekliği - resim yüksekliğini artır */
.card-product .card-product-wrapper {
    aspect-ratio: 1/1.4 !important; /* PC'de daha yüksek resim */
}

/* Ürün bilgisi padding'ini azalt */
.card-product .card-product-info {
    padding: 10px 12px !important; /* Önceden 15px */
}

/* Navigator margin'ini azalt */
.product-image-nav {
    /*margin-top: 8px !important;*/ /* Önceden 12px */
}

/* Mobilde 2 sütun - grid-layout için */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }
    
    /* Index sayfası için - grid-layout mobilde 2 sütun */
    .grid-layout.wrapper-shop[data-grid="grid-6"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 5px !important;
    }
    
    /* Mobilde yüksek resim */
    .card-product .card-product-wrapper {
        aspect-ratio: 1/1.35 !important; /* Mobilde daha yüksek resim */
    }
    
    /* Mobilde de PC modu gibi - card-carosel.css'deki yapı kullanılıyor */
    /* Mobilde product-image-nav göster */
    .product-image-nav {
        display: flex !important;
    }
    
    /* Mobilde touch için optimizasyon */
    .product-images-container {
        touch-action: pan-y !important; /* Dikey scroll'a izin ver, yatay swipe için kontrol bizde */
        -webkit-user-select: none !important;
        user-select: none !important;
    }
    
    .product-img {
        touch-action: pan-y !important;
        -webkit-tap-highlight-color: transparent !important;
        -webkit-user-select: none !important;
        user-select: none !important;
        /* Swipe için gerekli */
        position: relative !important;
    }
    
    .card-product-wrapper {
        touch-action: pan-y !important;
    }
    
    .nav-dot {
        -webkit-tap-highlight-color: transparent !important;
        min-height: 3px !important; /* Touch için daha büyük hedef alan */
        padding: 2px 0 !important;

        margin: -8px 0 !important; /* Padding'i dengelemek için */
        -webkit-user-select: none !important;
        user-select: none !important;
        position: relative !important;
        z-index: 10 !important;
        pointer-events: auto !important;
    }
    
    .product-image-nav {
        pointer-events: auto !important; /* Mobilde tıklanabilir olmalı */
    }
}

/* Ürün Kartı */
.product-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%; /* Kartın tam yüksekliği */
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Ürün Resim Swiper Container */
.product-image-swiper-container {
    position: relative;
    width: 100%;
    background-color: #f8f8f8; /* Resim etrafındaki boşluklar için arka plan */
    overflow: hidden;
}

/* PC'de daha yüksek aspect-ratio - resimlerin tam görünmesi için */
@media (min-width: 769px) {
    .product-image-swiper-container {
        /*aspect-ratio: 1 / 1.6;*/ /* PC'de daha yüksek - resimlerin tam görünmesi için */
        /*min-height: 450px;*/ /* PC'de minimum yükseklik - artırıldı */
        /*max-height: 680px;*/ /* PC'de maksimum yükseklik - artırıldı */
    }
}

/* Mobilde aynı yükseklik */
@media (max-width: 768px) {
    .product-image-swiper-container {
        /*aspect-ratio: 1 / 1.35;*/ /* Mobilde mevcut oran */
        /*min-height: 350px;*/ /* Mobilde minimum yükseklik */
        /*max-height: 450px;*/ /* Mobilde maksimum yükseklik */
    }
}

.product-image-swiper-container .swiper {
    width: 100%;
    height: 100%;
}

.product-image-swiper-container .swiper-slide {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-swiper-container .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: fill; /* Resimlerin container'ı tam doldurması için */
    object-position: center;
    border: none;
    outline: none;
}

/* Ürün Swiper Navigation Butonları */
.product-image-swiper-container .swiper-button-next,
.product-image-swiper-container .swiper-button-prev {
    color: rgba(0, 0, 0, 0.6);
    background-color: rgba(255, 255, 255, 0.8);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0;
    z-index: 30;
    pointer-events: auto;
    cursor: pointer;
}

.product-image-swiper-container:hover .swiper-button-next,
.product-image-swiper-container:hover .swiper-button-prev {
    opacity: 1;
}

.product-image-swiper-container .swiper-button-next:hover,
.product-image-swiper-container .swiper-button-prev:hover {
    color: rgba(0, 0, 0, 1);
    background-color: rgba(255, 255, 255, 1);
}

.product-image-swiper-container .swiper-button-next::after,
.product-image-swiper-container .swiper-button-prev::after {
    font-size: 16px;
    font-weight: bold;
}

.product-image-swiper-container .swiper-button-next {
    right: 10px;
}

.product-image-swiper-container .swiper-button-prev {
    left: 10px;
}

/* Mobilde ok butonlarını gizle */
@media (max-width: 768px) {
    .product-image-swiper-container .swiper-button-next,
    .product-image-swiper-container .swiper-button-prev {
        display: none !important;
    }
}

/* Ürün Swiper Pagination */
.product-image-swiper-container .swiper-pagination {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    z-index: 10;
    display: flex;
    gap: 8px;
    padding: 4px 8px;
}

.product-image-swiper-container .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.5);
    opacity: 1;
    margin: 0 !important;
    padding: 0;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.product-image-swiper-container .swiper-pagination-bullet-active {
    background-color: rgba(0, 0, 0, 0.8);
    width: 20px;
    border-radius: 4px;
}

/* Ürün Bilgileri */
.product-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    margin-bottom: 5px;
}

/* Ürün Fiyat Stilleri */
.product-prices {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.product-prices .compare-at-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
    font-weight: 400;
}

.product-prices .price-on-sale {
    color: #000;
    font-size: 18px;
    font-weight: 600;
}

