.products {
    padding: 0;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.product {
    z-index: 1;
    overflow: hidden;
    padding-bottom: 50px;
    flex: 1;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: flex 0.4s ease;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;

}

.product-title, .product-starting-price, .product-button {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.product-title {
    font-family: Raleway-ExtraBold;
    font-size: 70px;
    white-space: nowrap;
}

.product-starting-price {
    font-size: 30px;
}

.product-button {
    width: 200px;
    margin-top: 10px;
    font-size: 24px;
}

.product:nth-of-type(1) {
    background-image: url(../images/products/beamer.png);
}

.product:nth-of-type(2) {
    background-image: url(../images/products/laptop.jpeg);
}

.product:nth-of-type(3) {
    background-image: url(../images/products/computer.jpeg);
}

.product:nth-of-type(4) {
    background-image: url(../images/products/devices.jpeg);
}

.product:hover {
    flex: 2;
}

.product:hover .product-title,
.product:hover .product-starting-price,
.product:hover .product-button {
    opacity: 1;
    /* wait for the flex transition (0.4s) + 2s extra = 2.4s */
}

@media (min-width: 1500px) {
    .products {
        margin-top: 50px;
    }
}

@media screen and (max-width: 1000px) {
    .products {
        gap: 20px;
        height: auto;
        flex-direction: column;
        padding: 50px;
    }

    .product-title, .product-starting-price, .product-button {
        opacity: 1;
    }

    .product-title {
        font-size: 50px;
    }

    .product-starting-price {
        font-size: 20px;
    }

    .product-button {
        width: 175px;
    }

    .product {
        border-radius: var(--border-radius);
        flex:unset;
        width: 100%;
        height: 600px;
    }

    .product:hover {
        flex: unset;
    }
}

@media screen and (max-width: 1350px) {
    .product-title {
        font-size: 60px;
    }

    .product-starting-price {
        font-size: 25px;
    }
}

@media screen and (max-width: 1200px) {
    .product-title {
        font-size: 55px;
    }

    .product-starting-price {
        font-size: 22.5px;
    }

    .product-button {
        width: 175px;
    }
}

@media (pointer: coarse) and (max-width: 1400px) {
    .product-title, .product-starting-price, .product-button {
        opacity: 1;
    }

    .product-title {
        font-size: 40px;
    }

    .product-starting-price {
        font-size: 20px;
    }

    .product-button {
        width: 150px;
        font-size: 20px;
    }
}

@media (pointer: coarse) and (max-width: 1400px) {
        .product-title {
        font-size: 35px;
    }

    .product-starting-price {
        font-size: 17.5px;
    }
}