﻿.product-item img {
    width: 100%;
    height: auto;
}

.sidebar h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2f4f4f;
    margin-bottom: 1rem;
}

.product-item .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2f4f4f;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-item .card-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2f4f4f;
}

.card-img-top {
    min-height: 200px;
    object-fit: cover;
}

#product-count {
    font-size: 0.9rem;
    color: #6c757d;
}

.collapse-section {
    margin-bottom: 10px;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}

.collapse-toggle {
    width: 100%;
    padding: 12px 15px;
    background: linear-gradient(to right, #4a90e2, #50e3c2);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    text-align: left;
    transition: background 0.3s ease;
}

    .collapse-toggle:hover {
        background: linear-gradient(to right, #357abd, #34c4a6);
    }

    .collapse-toggle::after {
        content: '▼';
        float: right;
        transition: transform 0.3s ease;
    }

    .collapse-toggle.active::after {
        transform: rotate(180deg);
    }

.collapse-content {
    display: none;
    padding: 10px 15px;
    background: #fff;
    border-top: 1px solid #ddd;
}

    .collapse-content a {
        display: block;
        padding: 8px 0;
        color: #333;
        text-decoration: none;
        font-size: 0.9rem;
        transition: color 0.3s ease;
    }

        .collapse-content a:hover {
            color: #4a90e2;
        }

#sort-select, #items-per-page {
    font-size: 0.9rem;
}

.pagination .page-link {
    font-size: 0.9rem;
    color: #2f4f4f;
}

@media (max-width: 767px) {
    .container {
        padding: 1.5rem 1rem;
    }

    .sidebar h3 {
        font-size: 1.3rem;
    }

    .product-item .card-title {
        font-size: 0.9rem;
    }

    .product-item .card-text {
        font-size: 0.75rem;
    }

    .card-img-top {
        min-height: 150px;
    }

    #product-count, .collapse-content a, #sort-select, #items-per-page, .pagination .page-link {
        font-size: 0.85rem;
    }

    .collapse-toggle {
        font-size: 0.85rem;
        padding: 10px 12px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
    }

    #sort-select, #items-per-page {
        margin-top: 10px;
        width: 100%;
    }

    .collapse-content {
        position: static;
        min-width: 100%;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 1rem 1rem;
    }

    .sidebar h3 {
        font-size: 1.2rem;
    }

    .product-item .card-title {
        font-size: 0.85rem;
    }

    .product-item .card-text {
        font-size: 0.7rem;
    }

    .card-img-top {
        min-height: 130px;
    }

    #product-count, .collapse-content a, #sort-select, #items-per-page, .pagination .page-link {
        font-size: 0.8rem;
    }

    .collapse-toggle {
        font-size: 0.8rem;
        padding: 8px 10px;
    }
}

@media (max-width: 412px) {
    .container {
        padding: 1rem 1rem;
    }

    .sidebar h3 {
        font-size: 1.2rem;
    }

    .product-item .card-title {
        font-size: 0.8rem;
    }

    .product-item .card-text {
        font-size: 0.65rem;
    }

    .card-img-top {
        min-height: 120px;
    }

    #product-count, .collapse-content a, #sort-select, #items-per-page, .pagination .page-link {
        font-size: 0.8rem;
    }

    .collapse-toggle {
        font-size: 0.8rem;
        padding: 8px 10px;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 0.75rem 1rem;
    }

    .sidebar h3 {
        font-size: 1.1rem;
    }

    .product-item .card-title {
        font-size: 0.75rem;
    }

    .product-item .card-text {
        font-size: 0.6rem;
    }

    .card-img-top {
        min-height: 100px;
    }

    #product-count, .collapse-content a, #sort-select, #items-per-page, .pagination .page-link {
        font-size: 0.75rem;
    }

    .collapse-toggle {
        font-size: 0.75rem;
        padding: 6px 8px;
    }
}
