﻿/* ================================
   PRODUCTS PAGE
   Tüm ürünler listesi sayfası
   ================================ */

.products-page-section {
    padding: 60px 0;
    background: #f8f9fa;
    min-height: 80vh;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

    .page-header h1 {
        font-size: 2.5rem;
        color: #2c3e50;
        margin-bottom: 10px;
    }

        .page-header h1 i {
            color: #4CAF50;
        }

.products-count {
    font-size: 1.1rem;
    color: #7f8c8d;
}

    .products-count strong {
        color: #4CAF50;
    }

/* Layout */
.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

/* ===== SIDEBAR (Filters) ===== */
.products-sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.filter-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
}

    .filter-header h3 {
        font-size: 1.3rem;
        color: #2c3e50;
        margin: 0;
    }

.filter-reset {
    color: #4CAF50;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s;
}

    .filter-reset:hover {
        color: #45a049;
    }

/* Filter Section */
.filter-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #ecf0f1;
}

    .filter-section:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

.filter-title {
    font-size: 1rem;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 12px;
}

/* Filter Options (Radio) */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

    .filter-option:hover {
        background: #f8f9fa;
    }

    .filter-option input[type="radio"] {
        margin-right: 8px;
        accent-color: #4CAF50;
    }

    .filter-option span:first-of-type {
        flex: 1;
        font-size: 0.95rem;
    }

.option-count {
    color: #95a5a6;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Price Inputs */
.price-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.price-input {
    flex: 1;
    min-width: 0; /* ← ÖNEMLİ: Flex item'ların taşmasını önler */
    width: 100%;
    padding: 8px 6px; /* Padding azaltıldı */
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem; /* Font küçültüldü */
}

    .price-input::placeholder {
        font-size: 0.8rem; /* Placeholder font'u küçültüldü */
    }

    .price-input:focus {
        outline: none;
        border-color: #4CAF50;
    }

.price-separator {
    color: #95a5a6;
    font-weight: 600;
}

.btn-apply-price {
    width: 100%;
    padding: 10px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

    .btn-apply-price:hover {
        background: #45a049;
    }

/* Filter Select */
.filter-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
}

    .filter-select:focus {
        outline: none;
        border-color: #4CAF50;
    }

/* Filter Checkbox */
.filter-checkbox {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
}

    .filter-checkbox input[type="checkbox"] {
        margin-right: 10px;
        accent-color: #4CAF50;
        width: 18px;
        height: 18px;
    }

    .filter-checkbox span {
        font-size: 0.95rem;
    }

/* Mobile Filter Toggle */
.mobile-filter-toggle {
    display: none;
    width: 100%;
    padding: 15px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
}

/* ===== MAIN CONTENT ===== */
.products-main {
    min-height: 400px;
}

/* Toolbar */
.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.results-info {
    font-size: 1rem;
    color: #34495e;
}

.mobile-sort {
    display: none;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    }

.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f8f9fa;
}

    .product-card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s;
    }

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #bdc3c7;
    font-size: 3rem;
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 1;
}

.badge-new {
    background: #3498db;
    color: white;
}

.badge-out-of-stock {
    background: #e74c3c;
    color: white;
}

.product-card-content {
    padding: 20px;
}

.product-category {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 12px;
    line-height: 1.5;
}

.product-price {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ecf0f1;
}

.price-amount {
    font-size: 1.4rem;
    font-weight: 700;
    color: #4CAF50;
}

.price-label {
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Pagination */
.pagination-nav {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.pagination {
    display: flex;
    gap: 5px;
    list-style: none;
    padding: 0;
}

.page-item {
    display: inline-block;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    background: white;
    color: #2c3e50;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

    .page-link:hover:not(.disabled) {
        background: #4CAF50;
        color: white;
        border-color: #4CAF50;
    }

.page-item.active .page-link {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
}

    .no-results i {
        color: #bdc3c7;
        margin-bottom: 20px;
    }

    .no-results h3 {
        color: #2c3e50;
        margin-bottom: 10px;
    }

    .no-results p {
        color: #7f8c8d;
        margin-bottom: 25px;
    }

.btn-reset-filters {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s;
}

    .btn-reset-filters:hover {
        background: #45a049;
    }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .products-layout {
        grid-template-columns: 1fr;
    }

    .products-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: white;
        z-index: 10000;
        overflow-y: auto;
        transition: left 0.3s;
        padding-top: 20px;
    }

        .products-sidebar.active {
            left: 0;
            box-shadow: 5px 0 15px rgba(0,0,0,0.3);
        }

    .mobile-filter-toggle {
        display: block;
    }

    body.filter-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 9999;
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.8rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .product-card-image {
        height: 180px;
    }

    .product-card-content {
        padding: 15px;
    }

    .product-name {
        font-size: 1rem;
    }

    .products-toolbar {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .mobile-sort {
        display: block;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 3px;
    }

    .page-link {
        min-width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}
