/* Header */
.products-header {
    position: relative;
    background-image: 
        linear-gradient(rgb(167 139 85 / 50%), rgb(0 0 0 / 82%)), /* overlay */
        url('/static/img/banner/banner.png'); /* şəkil */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 100px 0; 
    color: white;
    text-align: center;
    overflow: hidden;
}


.products-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    color: var(--light);
}

.products-header p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
    opacity: 0.9;
    color: var(--light);
}

/* Main Layout */
.products-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin-bottom: 50px;
}


.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Filters Sidebar */
.filters-sidebar {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    padding: 25px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.filter-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--light-gray);
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--dark);
}

.filter-title i {
    color: var(--primary);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-option input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-option label {
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
    color: var(--dark);
}

.filter-option label:hover {
    color: var(--primary);
}

.filter-reset {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    cursor: pointer;
    font-weight: 500;
    padding: 10px;
    border-radius: 8px;
    background: #f5f7ff;
    transition: var(--transition);
}

.filter-reset:hover {
    background: var(--primary);
    color: white;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-car.hidden {
    display: none;
}

.product-image {
    height: 220px;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-name {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark);
    min-height: 48px;
}

.product-specs {
    display: flex;
    gap: 25px;
    margin-bottom: 2px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--light-gray);
    align-items: center;   
    justify-content: flex-start;
}

.spec {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1;
    text-align: center;
    justify-content: flex-start;
}

.spec i {
    color: var(--primary);
    font-size: 1.2rem;
    display: block;
    align-items: center;
    justify-content: center;
    height: 25px;
}

.spec span {
    font-size: 0.8rem;
    color: var(--gray);
}

.price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.3rem;
}

.old-price {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 0.9rem;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: white;
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.results-info {
    font-weight: 500;
    color: var(--dark);
}

.sort-by {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-by select {
    padding: 8px 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    cursor: pointer;
}

.mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 50px 0 30px;
}

.page-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    color: var(--dark);
}

.page-btn:hover,
.page-btn.active {
    background: var(--primary);
    color: white;
}

/* Active Filters */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f7ff;
    border-radius: 10px;
}

.active-filter {
    background: var(--primary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.active-filter i {
    cursor: pointer;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .products-container {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 320px;
        height: 100vh;
        z-index: 1000;
        overflow-y: auto;
        transition: var(--transition);
    }

    .filters-sidebar.active {
        left: 0;
    }

    .mobile-filter-btn {
        display: flex;
    }

    .filter-controls {
        flex-wrap: wrap;
        gap: 15px;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .products-header {
        padding: 60px 0 30px;
    }

    .products-header h1 {
        font-size: 2rem;
    }


    .products-grid {
        grid-template-columns: repeat(2, 2fr) !important;
        gap: 20px;
        padding: 0 1px;
    }

    .product-image {
        height: 160px;
    }


    .product-name {
        font-size: 0.95rem;
        min-height: 20px;
    }

    .price {
        font-size: 1.1rem;
    }

    .social-icons {
        display: none;
    }

    .language-selector {
        display: flex;
        justify-content: flex-end;
        flex: 1;
        margin-left: 0;
    }

    .top-bar-content {
        justify-content: space-between;
    }

    .top-links a {
        margin-right: 10px;
        font-size: 0.85rem;
    }

    .language-selector select {
        font-size: 0.85rem;
        padding: 5px 12px;
        border-radius: 18px;
    }

    .search-box {
        display: none;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    /* Başlıq və paddingləri daha da kiçildirik */
    .products-header {
        padding: 40px 0 20px;
    }

    .products-header h1 {
        font-size: 1.5rem;
    }

    /* Məhsul şəbəkəsini (grid) tənzimləyirik */
    .products-grid {
        /* Ekran çox kiçik olduqda məhsulları tək sütuna və ya daha sıx 2 sütuna keçirmək olar */
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 10px; /* Boşluqları azaldırıq ki, yerə qənaət olunsun */
    }

    /* Məhsul kartının daxili elementləri */
    .product-image {
        height: 140px; /* Şəkil hündürlüyünü azaldırıq */
    }

    .product-info {
        padding: 10px;
    }

    .product-name {
        font-size: 0.85rem;
        margin-bottom: 5px;
    }

    .price {
        font-size: 1rem;
    }

    
    .filters-sidebar {
        width: 85%;
    }

    
    .top-links {
        display: none; 
    }
    
    .language-selector select {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    
    .btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

        .product-specs {
        display: flex;
        gap: 10px;
        margin-bottom: 2px;
        padding-bottom: 2px;
        border-bottom: 1px solid var(--light-gray);
        align-items: center;   
        justify-content: flex-start;
    }

    .spec {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 5px;
        flex: 1;
        text-align: center;
        justify-content: flex-start;
    }
    
    .spec i {
        color: var(--primary);
        font-size: 1.2rem;
        display: block;
        align-items: center;
        justify-content: center;
        height: 25px;
    }
    
    .spec span {
        font-size: 0.7rem;
        color: var(--gray);
    }
    
    .price {
        font-weight: 700;
        color: var(--primary);
        font-size: 1.3rem;
    }
    
    .old-price {
        text-decoration: line-through;
        color: var(--gray);
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .social-icons {
        margin: 0 auto;
    }

}