    /* Layout Styling */
.collection {
    display: flex;
    gap: 40px;
    padding: 40px 5%;
}

/* Filters Sidebar */
.filters {
    min-width: 200px;
}

.filters h2 {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 20px;
}

.filter-box {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 20px;
}

.filter-box p {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
}

.filter-box label {
    display: block;
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
    cursor: pointer;
}

/* Products Area */
.products-container {
    flex: 1;
}

.products-header {
    /* border: 3px solid red; */
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.products-header h1 {
    font-size: 24px;
    font-weight: 400;
    color: #444;
    
    
}

.products-header h1 span {
    color: #333;
    font-weight: 600;
}

.products-header select {
    padding: 8px;
    border: 1px solid #ccc;
    outline: none;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.product-card {
    transition: 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: scale(1.02);
}


    .product-card .img-wrapper {
        width: 100%;
        height: 300px; /* ارتفاع ثابت لكل المنتجات */
        overflow: hidden;
        margin-bottom: 10px;
        /*border-radius: 5px;*/ /* اختياري للتجميل */
        background-color: #f5f5f5; /* لون خلفية إذا الصورة صغيرة */
    }

    .product-card img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* يخلي الصورة تغطي المساحة بدون تشويه */
        display: block;
        transition: transform 0.3s ease;
    }

    .product-card:hover img {
        transform: scale(1.05); /* تكبير بسيط عند hover */
    }


.p-name {
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.p-price {
    font-weight: 600;
    font-size: 14px;
}

/* --- Responsive Media Queries --- */

/* للشاشات المتوسطة (Tablets) */
@media (max-width: 992px) {
    .collection {
        gap: 20px;
    }
    
    .filters {
        min-width: 160px; /* تصغير عرض الفلاتر قليلاً */
    }
}

/* للشاشات الصغيرة (Mobile) */
@media (max-width: 768px) {
    .collection {
        flex-direction: column; /* الفلاتر تطلع فوق والمنتجات تحتها */
        padding: 20px 3%;
    }

    .filters {
        width: 100%; /* الفلاتر تأخذ العرض بالكامل */
    }

    /* اختياري: إخفاء الفلاتر وجعلها تظهر عند الضغط (تحتاج JS) 
       أو جعلها تظهر بجانب بعضها لتوفير المساحة */
    .filter-box {
        display: inline-block;
        width: 48%; /* الفلترين يظهروا جنب بعض في الموبايل */
        vertical-align: top;
        margin-right: 2%;
    }

    .products-header h1 {
        font-size: 18px; /* تصغير العنوان في الموبايل */
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* تصغير حجم كارت المنتج */
        gap: 15px;
    }
}

/* للشاشات الصغيرة جداً */
@media (max-width: 480px) {
    .filter-box {
        width: 100%; /* الفلاتر ترجع تحت بعضها تماماً */
        margin-right: 0;
    }
    .products-header {
        flex-direction: column;   /* العناصر تبقى فوق بعض */
        align-items: flex-start;  /* أو center حسب الرغبة */
    }
    
    .products-header h1 {
        margin-bottom: 10px;      /* مسافة تحت العنوان */
    }

    .products-header select {
        width: 100%;               /* يملى العرض لو حبيت */
    }

  
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr); /* عرض منتجين في كل صف */
    }
}
@media (max-width: 300px) {
 
  

    .products-grid {
        grid-template-columns: repeat(1, 1fr); /* عرض منتجين في كل صف */
    }
}
