/* Base Styles (Desktop) */
.products-section {
    width: 100%;
    background-color: #fff;
    padding-top: 8vh;
    padding-bottom: 8vh;
}

.products-section h3 {
    margin-left: 8vw;
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
}

.products-container {
    margin-top: 4vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2vw;
    flex-wrap: wrap;
    width: fit-content;
}

.product-item {
    width: 340px;
    height: max-content;
    padding: 15px;
    background-color: white;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out, box-shadow 0.3s ease;
}

.product-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.product-item img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
}

.product-text {
    margin-top: 2vh;
    font-size: 1rem;
}

.product-text h6 {
    font-weight: bold;
    margin: 10px 0;
    color: #2e9d64;
}

.product-text h5 {
    margin-top: 15px;
    font-weight: bold;
    font-size: 1.4rem;
}

.product-text p {
    margin-top: 5px;
}

/* Tablet Styles (min-width: 601px and max-width: 992px) */
@media only screen and (min-width: 601px) and (max-width: 992px) {
    .products-section {
        padding-top: 6vh;
        padding-bottom: 6vh;
    }

    .products-section h3 {
        margin-left: 5vw;
        font-size: 1.8rem;
    }

    .products-container {
        margin-left: 5vw;
        margin-right: 5vw;
        gap: 3vw;
    }

    .product-item {
        width: 48%; /* Two products per row */
        height: max-content; /* Let the height be auto */
    }

    .product-text h6 {
        font-size: 1rem;
    }

    .product-text h5 {
        font-size: 1.2rem;
    }

    .product-text p {
        font-size: 0.9rem;
    }
}

/* Mobile Styles (max-width: 600px) */
@media only screen and (max-width: 600px) {
    .products-section {
        padding-top: 4vh;
        padding-bottom: 4vh;
    }

    .products-section h3 {
        margin-left: 4vw;
        font-size: 1.5rem;
        text-align: center; /* Center title on mobile */
    }

    .products-container {
        margin-left: 4vw;
        margin-right: 4vw;
        gap: 4vw;
        justify-content: center; /* Center the products */
    }

    .product-item {
        width: 100%; /* Full width for mobile */
        height: max-content; /* Let the height be auto */
        margin-bottom: 20px; /* Add space between items */
    }

    .product-text {
        text-align: left; /* Center text on mobile */
    }

    .product-text h6 {
        font-size: 0.9rem;
    }

    .product-text h5 {
        font-size: 1.1rem;
    }

    .product-text p {
        font-size: 0.8rem;
    }
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .products-container {
        margin-left: 5vw;
        margin-right: 5vw;
        gap: 1.5vw;
    }
    .product-item {
        width: 300px;
        height: max-content;
    }
    .product-item img {
        width: 280px;
        height: 180px;
    }
}

@media (max-width: 992px) {
    .products-section h3 {
        margin-left: 6vw;
        font-size: 1.75rem;
    }
    .products-container {
        margin-left: 4vw;
        margin-right: 4vw;
        gap: 1.5vw;
    }
    .product-item {
        width: 260px;
        height: max-content;
    }
    .product-item img {
        width: 240px;
        height: 160px;
    }
    .product-text {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .products-section {
        padding-top: 6vh;
        padding-bottom: 6vh;
    }
    .products-section h3 {
        margin-left: 4vw;
        font-size: 1.5rem;
    }
    .products-container {
        margin-left: 3vw;
        margin-right: 3vw;
        gap: 10px;
        justify-content: center;
    }
    .product-item {
        width: 220px;
        height: max-content;
    }
    .product-item img {
        width: 200px;
        height: 140px;
    }
    .product-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .products-section {
        padding-top: 5vh;
        padding-bottom: 5vh;
    }
    .products-section h3 {
        margin-left: 3vw;
        font-size: 1.25rem;
    }
    .products-container {
        margin-left: 3vw;
        margin-right: 3vw;
        gap: 10px;
        justify-content: center;
    }
    .product-item {
        width: 180px;
        height: max-content;
        padding: 10px;
    }
    .product-item img {
        width: 160px;
        height: 120px;
    }
    .product-text {
        font-size: 0.9rem;
    }
    .product-text h5 {
        font-size: 1.1rem;
    }
}

@media (max-width: 400px) {
    .products-section h3 {
        margin-left: 2vw;
        font-size: 1rem;
    }
    .product-item {
        width: 160px;
        height: max-content;
        padding: 10px;
    }
    .product-item img {
        width: 140px;
        height: 100px;
    }
    .product-text {
        font-size: 0.8rem;
    }
}
