/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* Links */
a {
    text-decoration: none;
    color: #007bff;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
}

/* Filter Container */
.filter-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px; /* Space between filter and search */
    padding: 16px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Label for the filter */
.filter-container label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
}

/* Select Dropdown */
.filter-container select {
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    background-color: #fff;
    width: 55%;
}

/* Search Container */
.search-container {
    display: flex;
    align-items: center;
    max-width: 400px;
    flex: 1;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Search Icon */
.search-icon {
    padding: 0 12px;
    color: #888;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    border-right: 1px solid #ddd;
}

/* Search Input */
.search-input {
    flex: 1;
    padding: 10px;
    border: none;
    outline: none;
    font-size: 16px;
    color: #333;
    background-color: transparent;
}

.search-input::placeholder {
    color: #aaa;
}

/* Hover and Focus Effects */
.filter-container select:hover,
.search-container:hover {
    border-color: #007bff;
}

.filter-container select:focus,
.search-container:focus-within {
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
    border-color: #007bff;
}


/* Products Section */
#products-section {
    padding: 2rem 1rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: auto;
}

.product-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card h3 {
    font-size: 1.1rem;
    margin: 1rem;
    color: #333;
}

.product-card p {
    margin: 0 1rem 1rem;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

.product-card .buttons {
    display: flex;
    justify-content: center;
    padding: 0px;
    padding-left: 15px;
    padding-right: 15px;
    margin-bottom: 0px;
    gap: 10px;
}

.product-card button {
    display: flex;
    margin: 1rem auto;
    padding: 0.5rem 1.2rem;
    font-size: 0.8rem;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.product-card button:hover {
    background-color: #0056b3;
}



/* Responsive Design */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .product-card a{
        padding: 0px;
        height: 65px;
        padding-bottom: 10px;
    }

    .product-card .buttons {
        flex-direction: column;
        gap: 0px;
    }
    .filter-container {
        width: 95%;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 480px) {
    .product-card .buttons {
        flex-direction: row;
        gap: 15px;
        padding-bottom: 10px;
    }
    @media (max-width: 768px) {
        .filter-container {
            flex-direction: column; /* Stack elements vertically */
            align-items: stretch; /* Ensure full width alignment */
            gap: 12px; /* Smaller gap for stacked layout */
        }
    
        .search-container {
            max-width: 100%; /* Ensure the search bar spans the full width */
        }
    
        .filter-container label,
        .filter-container select {
            width: 100%; /* Make label and dropdown full width */
            text-align: left; /* Keep text aligned to the left */
        }
    
        .filter-container select {
            padding: 10px; /* Adjust padding for better tap targets */
        }
    
        .search-input {
            font-size: 14px; /* Slightly smaller font size for smaller screens */
            padding: 8px 10px; /* Adjust padding for smaller input fields */
        }
    
        .search-icon {
            font-size: 16px; /* Adjust icon size for proportion */
            padding: 0 10px; /* Smaller padding for better balance */
        }
    }
    
}
