/* General styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

h1 {
    font-size: 2rem;
    text-align: center;
    margin: 1rem 0;
    color: #444;
}

/* Filter section styles */
.filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.filters label {
    margin-right: 0.5rem;
}

.filters select,
.filters input[type="checkbox"] {
    cursor: pointer;
}

/* Product list styles */
.product-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
}

.product {
    width: 250px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease; /* Add a smooth transition */
}

.product:hover {
    transform: scale(1.05); /* Slightly enlarge the card on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Increase the box shadow */
}

.product img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    max-height: 250px; /* Limit the height */
}

.product-title {
    font-size: 16px;
    font-weight: bold;
    margin: 0.5rem 0;
    flex-grow: 1;
}

.product-price {
    color: #f60;
    font-size: 1.1rem;
}

/* Add this section at the end of your styles.css */
.dark-mode-toggle {
    display: flex;
    justify-content: center;
    padding: 1rem;
    margin-bottom: 2rem;
}

.dark-mode-toggle label {
    margin-right: 0.5rem;
}

/* Dark mode styles */
body.dark {
    background-color: #222;
    color: #eee;
}

body.dark h1 {
    color: #ddd;
}

body.dark .filters,
body.dark .product {
    background-color: #333;
    color: #eee;
}

body.dark .product-price {
    color: #f60;
}

/* Add this section to your styles.css */
.spinner {
    display: none;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
    margin: 50px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}