/* Ürünler Sayfası CSS */

/* Breadcrumb Section - İletişim sayfası ile aynı */
body.urunler-page .breadcrumb-section {
    background: white;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0; /* Header'ın hemen altında */
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-top: 150px; /* Header'ın altında daha aşağıda */
}

body.urunler-page .breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

body.urunler-page .breadcrumb-item {
    display: flex;
    align-items: center;
}

body.urunler-page .breadcrumb-item a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 400;
    font-size: 0.9rem;
}

body.urunler-page .breadcrumb-item a:hover {
    color: #09a2e3;
}

body.urunler-page .breadcrumb-item.active {
    color: #495057;
    font-weight: 500;
    font-size: 0.9rem;
}

body.urunler-page .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #adb5bd;
    margin: 0 0.5rem;
    font-size: 1rem;
}

/* Ana Container */
body.urunler-page .urunler-page-main-section {
    padding: 3rem 0;
    background: #f8f9fa;
    min-height: 70vh;
}

body.urunler-page .urunler-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (max-width: 768px) {
    body.urunler-page .urunler-page-container {
        padding: 0 0.5rem;
    }
}

@media (max-width: 576px) {
    body.urunler-page .urunler-page-container {
        padding: 0 0.25rem;
    }
}

/* Başlık Bölümü */
body.urunler-page .urunler-page-header {
    text-align: center;
    margin-bottom: 4rem;
}

body.urunler-page .urunler-page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

body.urunler-page .urunler-page-title-normal {
    color: #2c3e50;
}

body.urunler-page .urunler-page-description {
    color: #6c757d;
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

/* Filtre Butonları */
body.urunler-page .urunler-page-filters {
    margin-bottom: 3rem;
}

body.urunler-page .filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

body.urunler-page .filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    color: #6b7280;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

body.urunler-page .filter-btn:hover {
    border-color: #09a2e3;
    color: #09a2e3;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(9, 162, 227, 0.2);
}

body.urunler-page .filter-btn.active {
    background: #09a2e3;
    border-color: #09a2e3;
    color: white;
}

body.urunler-page .filter-btn i {
    font-size: 1rem;
}

body.urunler-page .product-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap; /* Badge'i kırma */
    display: inline-block;
}

body.urunler-page .filter-btn.active .product-count {
    background: rgba(255, 255, 255, 0.2);
}

/* Ürünler Grid */
body.urunler-page .urunler-page-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 sütun */
    gap: 2rem;
    margin-bottom: 3rem;
    justify-content: start;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Az ürün olduğunda ortalama */
body.urunler-page .urunler-page-products-grid.centered {
    justify-content: center;
}

/* Tek ürün olduğunda maksimum genişlik */
body.urunler-page .urunler-page-products-grid.single-item {
    grid-template-columns: minmax(320px, 500px);
    justify-content: center;
}

body.urunler-page .urunler-page-product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    height: 100%; /* Tüm kartlar aynı yükseklikte */
}

body.urunler-page .urunler-page-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-color: #09a2e3;
}

/* Ürün Görseli */
body.urunler-page .urunler-page-product-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #09a2e3 0%, #01d7bb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

body.urunler-page .urunler-page-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

body.urunler-page .urunler-page-product-card:hover .urunler-page-product-image img {
    transform: scale(1.05);
}

body.urunler-page .urunler-page-product-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #09a2e3 0%, #01d7bb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: absolute;
    top: 0;
    left: 0;
}

/* Ürün İçeriği */
body.urunler-page .urunler-page-product-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* İçeriği eşit dağıt */
}

body.urunler-page .urunler-page-product-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

body.urunler-page .urunler-page-product-description {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    flex: 1;
    max-height: 4.8rem; /* 3 satır yükseklik sınırı */
    overflow: hidden;
    position: relative;
    word-wrap: break-word; /* Uzun kelimeleri kır */
}

/* HTML içeriyorsa (p, div vb.) line-clamp kullanma, normal göster */
body.urunler-page .urunler-page-product-description:has(p),
body.urunler-page .urunler-page-product-description:has(div) {
    max-height: 4.8rem;
    overflow: hidden;
    display: block;
}

/* Metin kırpma için ellipsis - sadece düz metin için */
body.urunler-page .urunler-page-product-description:not(:has(p)):not(:has(div)) {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

/* HTML formatlarını destekle */
body.urunler-page .urunler-page-product-description strong,
body.urunler-page .urunler-page-product-description b {
    font-weight: 700;
    color: #1f2937;
}

body.urunler-page .urunler-page-product-description em,
body.urunler-page .urunler-page-product-description i {
    font-style: italic;
}

body.urunler-page .urunler-page-product-description u {
    text-decoration: underline;
}

body.urunler-page .urunler-page-product-description p {
    margin: 0.5rem 0;
    min-height: 0.3rem; /* Boş paragraflar için minimum yükseklik */
}

body.urunler-page .urunler-page-product-description p + p {
    margin-top: 0.5rem; /* Paragraflar arası boşluk */
}

body.urunler-page .urunler-page-product-description p:first-child {
    margin-top: 0;
}

body.urunler-page .urunler-page-product-description p:last-child {
    margin-bottom: 0;
}

/* Boş paragraflar için görünürlük */
body.urunler-page .urunler-page-product-description p:empty:before {
    content: '\00a0'; /* Non-breaking space */
}

/* Buton */
body.urunler-page .urunler-page-product-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #09a2e3;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    align-self: flex-start;
    margin-top: auto; /* Butonu en alta yapıştır */
}

body.urunler-page .urunler-page-product-btn:hover {
    color: #01d7bb;
    transform: translateX(5px);
}

body.urunler-page .urunler-page-product-btn i {
    transition: transform 0.3s ease;
}

body.urunler-page .urunler-page-product-btn:hover i {
    transform: translateX(3px);
}

/* Ürün Bulunamadı */
body.urunler-page .urunler-page-no-products {
    text-align: center;
    padding: 4rem 2rem;
}

body.urunler-page .no-products-content i {
    font-size: 4rem;
    color: #d1d5db;
    margin-bottom: 1.5rem;
}

body.urunler-page .no-products-content h3 {
    font-size: 1.5rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

body.urunler-page .no-products-content p {
    color: #9ca3af;
    max-width: 400px;
    margin: 0 auto;
}

/* Responsive Tasarım */
@media (max-width: 1024px) {
    body.urunler-page .urunler-page-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    body.urunler-page .breadcrumb-section {
        padding: 0.5rem 0;
        margin-top: 120px; /* Mobilde daha az margin */
    }
    
    body.urunler-page .urunler-page-products-grid {
        grid-template-columns: repeat(2, 1fr); /* Mobilde 2 sütun */
        gap: 1rem; /* Daha az gap */
        padding: 0 0.5rem; /* Yan boşluk ekle */
    }
    
    body.urunler-page .filter-buttons {
        display: flex;
        flex-direction: column; /* Dikey düzen */
        gap: 0.75rem;
        padding: 0 0.5rem;
        max-width: 100%;
    }
    
    body.urunler-page .filter-btn {
        padding: 1rem;
        font-size: 0.9rem;
        width: 100%; /* Tam genişlik */
        justify-content: center;
        text-align: center;
        min-width: auto;
        border-radius: 12px;
    }
    
    body.urunler-page .filter-btn .product-count {
        margin-left: 0.5rem;
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    body.urunler-page .urunler-page-product-image {
        height: 160px; /* Mobilde 2x2 için daha düşük */
    }
    
    body.urunler-page .urunler-page-product-content {
        padding: 1rem; /* Daha az padding */
    }
    
    body.urunler-page .urunler-page-product-title {
        font-size: 1.1rem; /* Mobilde daha küçük başlık */
        margin-bottom: 0.5rem;
    }
    
    body.urunler-page .urunler-page-product-description {
        font-size: 0.85rem; /* Mobilde daha küçük font */
        max-height: 2.8rem; /* Mobilde 2 satır */
        -webkit-line-clamp: 2; /* 2 satır sınırı */
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    body.urunler-page .breadcrumb-section {
        margin-top: 165px; /* Çok küçük ekranlarda daha az margin */
        padding: 0.4rem 0;
    }
    
    body.urunler-page .breadcrumb {
        font-size: 0.8rem;
    }
    
    body.urunler-page .breadcrumb-item a,
    body.urunler-page .breadcrumb-item.active {
        font-size: 0.8rem;
    }
    
    body.urunler-page .urunler-page-main-section {
        padding: 2rem 0;
    }
    
    body.urunler-page .urunler-page-container {
        padding: 0 0.5rem;
    }
    
    body.urunler-page .urunler-page-products-grid {
        grid-template-columns: repeat(2, 1fr); /* Çok küçük ekranlarda da 2 sütun */
        padding: 0 0.25rem; /* Çok küçük ekranlarda daha az boşluk */
        gap: 0.75rem; /* Daha az gap */
    }
    
    body.urunler-page .urunler-page-product-image {
        height: 140px; /* Çok küçük ekranlarda daha düşük */
    }
    
    body.urunler-page .urunler-page-product-content {
        padding: 0.75rem; /* Daha az padding */
    }
    
    body.urunler-page .urunler-page-product-title {
        font-size: 1rem; /* Daha küçük başlık */
        margin-bottom: 0.25rem;
    }
    
    body.urunler-page .urunler-page-product-description {
        font-size: 0.8rem; /* Daha küçük açıklama */
        max-height: 2.4rem; /* 2 satır için yeterli alan */
        -webkit-line-clamp: 2; /* 2 satır sınırı */
        margin-bottom: 0.75rem;
    }
    
    body.urunler-page .filter-buttons {
        padding: 0 0.25rem;
        gap: 0.5rem;
        flex-direction: column;
    }
    
    body.urunler-page .filter-btn {
        padding: 0.75rem;
        font-size: 0.8rem;
        width: 100%;
        justify-content: center;
        text-align: center;
        min-width: auto;
        border-radius: 10px;
    }
    
    body.urunler-page .filter-btn .product-count {
        margin-left: 0.25rem;
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
}
