/* = :::::::::::::::::::::::::::::::::::::::::
   PRODUCTS LISTING PAGE STYLES (Ürün Listeleme)
   ::::::::::::::::::::::::::::::::::::::::: */

/* 1. Hero Area - Handled in style.css for unification */

/* 2. Layout Grid */
.products-listing-layout {
    padding: 80px 0 120px;
    background: var(--grey-50);
}

.products-listing-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
}

/* 3. Sidebar Filtering */
.products-sidebar {
    position: sticky;
    top: 100px;
}

.filter-widget {
    background: var(--color-white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--color-border);
    margin-bottom: 30px;
}

.filter-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Category Accordion */
.category-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.acc-item {
    border-radius: 12px;
    overflow: hidden;
    background: var(--grey-50);
    transition: var(--transition-base);
}

.acc-header {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-weight: 600;
    color: var(--color-text-main);
    transition: var(--transition-base);
}

.acc-header svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

/* Active state styling removed per user request */
.acc-item.active .acc-header {
    background: transparent;
}

.acc-item.active .acc-header svg {
    transform: rotate(180deg);
}

.acc-content {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--color-white);
}

.acc-item.active .acc-content {
    max-height: 500px;
    /* Big enough for any list */
    padding: 10px 0;
}

.sub-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sub-category-list li a {
    display: block;
    padding: 10px 25px;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    transition: var(--transition-base);
}

.sub-category-list li a:hover {
    color: var(--color-primary);
    background: rgba(235, 114, 5, 0.05);
}

/* 4. Products Main Grid area */
.products-main-area {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Reusing & Adapting product-card from landing.css */
.products-grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--color-white);
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    text-decoration: none;
    color: inherit;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
    border-color: rgba(235, 114, 5, 0.2);
}

.product-img-box {
    width: 100%;
    height: 280px;
    background: #f8f9fa;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.product-img-box img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    transition: transform 0.6s ease;
}

.product-card:hover .product-img-box img {
    transform: scale(1.1);
}

.post-type-archive-urun .product-card:hover,
.tax-urun_kategori .product-card:hover {
    transform: none;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.05);
}

.post-type-archive-urun .product-card:hover .product-img-box img,
.tax-urun_kategori .product-card:hover .product-img-box img {
    transform: none;
}

.product-info {
    padding: 25px;
    text-align: center;
}

.product-tag {
    font-size: 0.75rem;
    color: var(--color-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: block;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.product-btns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

/* Load More Area */
.load-more-container {
    padding-top: 40px;
    display: flex;
    justify-content: center;
}

/* Mobile Filter Button & Bar */
.mobile-filter-bar {
    display: none;
    margin-bottom: 25px;
}

.btn-filter-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 15px;
    font-weight: 700;
    color: var(--color-text-main);
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.btn-filter-trigger svg {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
}

.filter-modal-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.filter-modal-header h3 {
    font-size: 1.5rem;
    font-weight: 800;
}

.close-filter-modal {
    background: var(--grey-100);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.close-filter-modal svg {
    width: 24px;
    height: 24px;
}

/* Responsive */
@media (max-width: 1024px) {
    .products-listing-grid {
        grid-template-columns: 1fr;
    }

    .mobile-filter-bar {
        display: block;
    }

    .products-sidebar {
        display: none;
    }

    /* Popup Modal Animation */
    @keyframes modalFadeUp {
        from {
            opacity: 0;
            transform: translate(-50%, -40%);
        }

        to {
            opacity: 1;
            transform: translate(-50%, -50%);
        }
    }

    /* Mobile Filter Popup / Modal */
    .products-sidebar.mobile-active {
        display: block;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 450px;
        max-height: 85vh;
        background: var(--color-white);
        z-index: 2000;
        padding: 40px 30px;
        border-radius: 30px;
        box-shadow: 0 30px 100px rgba(0, 0, 0, 0.4);
        overflow-y: auto;
        animation: modalFadeUp 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    }

    .filter-modal-header {
        display: flex;
    }

    .filter-widget {
        box-shadow: none;
        border: none;
        padding: 0;
    }
}

@media (max-width: 768px) {
    .products-grid-view {
        grid-template-columns: 1fr;
    }
}
