/* ========================================================= */
/* --- ERKAP KAPI - ÜRÜNLER SAYFASI ÖZEL STİL DOSYASI --- */
/* ========================================================= */

:root {
    --bg-main: #f5f2eb;          /* Ana Zemin: Sıcak Krem */
    --bg-card: #fdfbf7;          /* Kart Zemin: Fildişi */
    --bg-section: #eae4d8;        
    
    --gold-primary: #b58d43;     /* Şampanya Altını */
    --gold-dark: #8c6a2a;        /* Koyu Kehribar */
    --gold-gradient: linear-gradient(135deg, #d6b46e 0%, #b58d43 50%, #8c6a2a 100%);
    
    --text-dark: #2c2724;        /* Derin Ahşap Antrasit */
    --text-body: #544d47;        
    --text-muted: #736a61;
    
    --border-color: #dcd4c8;
    --border-gold: rgba(181, 141, 67, 0.4);
    --shadow-soft: 0 10px 30px rgba(70, 50, 20, 0.06);
    --shadow-hover: 0 18px 40px rgba(181, 141, 67, 0.18);
}

body {
    background-color: var(--bg-main);
    color: var(--text-body);
}

.products-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================================= */
/* --- HERO BANNER --- */
/* ========================================================= */

.page-hero {
    position: relative;
    width: 100%;
    min-height: 380px;
    background-image: url('../uploads/kurumsal/arkaplan.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 140px;
    padding-bottom: 60px;
}

.page-hero .hero-curtain-light {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg, 
        rgba(18, 22, 28, 0.85) 0%, 
        rgba(45, 36, 25, 0.60) 45%, 
        rgba(245, 242, 235, 1) 100%
    );
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.page-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 42px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 2px;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.breadcrumb-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-gold);
    padding: 8px 22px;
    border-radius: 30px;
    font-size: 13px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.breadcrumb-link {
    color: var(--text-body);
    text-decoration: none;
    font-weight: 600;
}

.breadcrumb-link:hover { color: var(--gold-primary); }
.breadcrumb-separator { color: var(--gold-primary); font-size: 11px; }
.breadcrumb-current { color: var(--gold-dark); font-weight: 700; }

/* ========================================================= */
/* --- ÖNE ÇIKAN POPÜLER ÜRÜNLER --- */
/* ========================================================= */

.products-main-section {
    padding: 30px 0 80px 0;
}

.popular-showcase-wrapper {
    margin-bottom: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 30px 25px;
    box-shadow: var(--shadow-soft);
}

.section-tag {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.section-tag.center { justify-content: center; }

.tag-line {
    width: 30px;
    height: 2px;
    background: var(--gold-gradient);
}

.tag-text {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--gold-primary);
}

.showcase-title {
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.popular-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.popular-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-primary);
    box-shadow: var(--shadow-hover);
}

/* Dik Boyutlu Görsel Çerçeve (Popüler Ürünler) */
.popular-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    background: #f4efea;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    overflow: hidden;
}

.popular-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.popular-card:hover .popular-thumb img {
    transform: scale(1.06);
}

.popular-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(181, 141, 67, 0.95);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
}

.popular-info {
    padding: 10px;
    text-align: center;
}

.popular-info h4 {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 3px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.popular-info .pop-cat {
    font-size: 11px;
    font-weight: 700;
    color: var(--gold-dark);
}

/* ========================================================= */
/* --- TAM MOBİL UYUMLU VE NET KATEGORİ FİLTRE BARI --- */
/* ========================================================= */

.filter-sticky-wrapper {
    position: sticky;
    top: 85px;
    z-index: 99;
    margin-bottom: 30px;
}

.filter-card {
    background: rgba(253, 251, 247, 0.96);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-gold);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.09);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold-primary);
    font-size: 16px;
}

.search-box input {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: 30px;
    padding: 13px 45px 13px 48px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    outline: none;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.search-box input:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 4px rgba(181, 141, 67, 0.18);
}

.btn-clear {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
}

/* Kategori Butonları: Sürüklemesiz & Tam Görünür (Flex Wrap) */
.category-pills-wrapper {
    width: 100%;
}

.category-pills {
    display: flex;
    flex-wrap: wrap; /* Mobilde alta geçer, kaydırma gerektirmez */
    gap: 10px;
    justify-content: center;
}

.pill-btn {
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    color: var(--text-dark); /* Koyu net metin */
    padding: 9px 18px;
    border-radius: 25px;
    font-size: 13.5px;
    font-weight: 700; /* Belirgin yazı tipi */
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.pill-btn:hover {
    border-color: var(--gold-primary);
    color: var(--gold-dark);
    transform: translateY(-1px);
}

.pill-btn.active {
    background: var(--gold-gradient);
    color: #ffffff;
    border-color: transparent;
    font-weight: 800;
    box-shadow: 0 5px 15px rgba(181, 141, 67, 0.35);
}

/* ========================================================= */
/* --- DİK ÇERÇEVELİ ÜRÜN KARTLARI --- */
/* ========================================================= */

.products-list-header {
    margin-bottom: 20px;
    padding: 0 5px;
}

.results-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-body);
}

.results-count strong {
    color: var(--gold-dark);
    font-weight: 800;
}

.products-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.35s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: var(--gold-primary);
    box-shadow: var(--shadow-hover);
}

/* Dik Boyut Çerçevesi (3:4 Oranı) & Tüm Hatlarıyla Görsel Sığdırma */
.card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4; /* Dikey kapı formuna uygun dik çerçeve */
    background: #eae4d8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px; /* Ürün kenarlarının tam görünmesi için çerçeve boşluğu */
    overflow: hidden;
}

.card-media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Görsel kırpılmaz, tüm hatlarıyla çerçeveye sığar */
    filter: drop-shadow(0 5px 12px rgba(0,0,0,0.12)); /* Kapıya derinlik verir */
    transition: transform 0.4s ease;
}

.product-card:hover .card-media img {
    transform: scale(1.05);
}

.media-overlay {
    position: absolute;
    inset: 0;
    background: rgba(44, 39, 36, 0.35);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .media-overlay {
    opacity: 1;
}

.overlay-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gold-gradient);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.product-card:hover .overlay-btn {
    transform: scale(1);
}

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-badge.popular { background: #d97706; }
.card-badge.ahsap { background: #0284c7; left: auto; right: 12px; }

/* Kategori İsmi Rozet Tasarımı (Kristal Netlik) */
.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--gold-dark);
    background: rgba(181, 141, 67, 0.14);
    border: 1px solid rgba(181, 141, 67, 0.25);
    padding: 4px 10px;
    border-radius: 6px;
    width: fit-content;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

.card-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.card-title a:hover {
    color: var(--gold-primary);
}

.card-excerpt {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 18px;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.btn-detail {
    font-size: 13px;
    font-weight: 800;
    color: var(--gold-dark);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-detail:hover {
    color: var(--gold-primary);
}

.btn-whatsapp-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #25d366;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    text-decoration: none;
    transition: transform 0.2s;
}

.btn-whatsapp-icon:hover {
    transform: scale(1.1);
}

/* ========================================================= */
/* --- SPINNER VE DURUM ALANLARI --- */
/* ========================================================= */

.infinite-scroll-status {
    margin-top: 40px;
    text-align: center;
}

.spinner-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
}

.gold-spinner {
    width: 38px;
    height: 38px;
    border: 3.5px solid rgba(181, 141, 67, 0.2);
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.no-more-msg {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    padding: 20px;
}

.empty-results-box {
    background: var(--bg-card);
    border: 1px dashed var(--border-gold);
    border-radius: 20px;
    padding: 45px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.empty-icon {
    font-size: 45px;
    color: var(--gold-primary);
    margin-bottom: 12px;
}

.empty-results-box h3 {
    font-size: 19px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.empty-results-box p {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.btn-reset {
    background: var(--gold-gradient);
    color: #ffffff;
    border: none;
    padding: 10px 22px;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
}

/* ========================================================= */
/* --- MOBİL UYUMLULUK --- */
/* ========================================================= */

@media screen and (max-width: 1200px) {
    .products-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .popular-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 992px) {
    .products-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .popular-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .filter-sticky-wrapper {
        top: 75px;
    }
}

@media screen and (max-width: 576px) {
    .products-cards-grid {
        grid-template-columns: repeat(2, 1fr); /* Mobilde 2'li düzen kapılar için idealdir */
        gap: 15px;
    }

    .popular-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .page-title {
        font-size: 28px;
    }

    .filter-card {
        padding: 14px;
    }

    .category-pills {
        justify-content: flex-start; /* Mobilde sola dayalı esnek sarmal */
        gap: 8px;
    }

    .pill-btn {
        font-size: 12px;
        padding: 7px 13px;
    }

    .card-content {
        padding: 14px;
    }

    .card-title {
        font-size: 14px;
    }

    .card-excerpt {
        display: none; /* Mobilde kart yüksekliğini dengede tutar */
    }
}