.content-products {
    position: relative;
    padding: 0 5vw 40px 5vw;
    margin-top: 40px;
}

.content-products h3{
    position: absolute;
    left: 50%;
    transform: translate(-50%, 60px);
    z-index: 10;
    color: var(--color-white);
    font-size: 4.5rem;
    letter-spacing: 8px;
    opacity: 0.95;
}

.content-products .img-products{
    height: 300px;
    width: 100%;
    overflow: hidden;
    position: absolute;
    left: 0;
}

.content-products .img-products.coffee{
    background: url('../img/products_coffee.webp');
    background-size: cover;
}

.content-products .img-products::before {
    content: "";
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    position: absolute;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
}

.content-products .img-products img{
    object-fit: cover;
    width: 100%;
    position: relative;
}

.swiper-products{
    width: 85.36vw;
    padding: 10px 5px;
    margin-top: 200px;
}

.content-products .swiper-button{
    background: var(--main-color);
    color: var(--color-white);
    border-radius: 100%;
    width: 40px;
    height: 40px;
    top: 65%;
}

.content-products .swiper-button::after{
    font-size: 20px;
}

.content-products .swiper-button.swiper-button-prev::after{
    font-family: "Font Awesome 5 Free";
    font-weight: 600;
    content: "\f053";
}

.content-products .swiper-button.swiper-button-next::after{
    font-family: "Font Awesome 5 Free";
    font-weight: 600;
    content: "\f054";
}

.content-products .swiper-button.swiper-button-prev{
    left: 40px;
}

.content-products .swiper-button.swiper-button-next{
    right: 40px;
}

.card-product-nc {
    position: relative;
    display: grid;
    grid-template-rows: 1fr 1fr auto;
    padding: 20px;
    row-gap: 20px;
    background: var(--color-white);
    border-radius: 8px 8px 2px 2px; 
    max-width: 250px;
    width: 250px;
    box-shadow: 0 2px 6px rgba(0,0,0,.1);
    margin-right: 20px;
    height: fit-content;
    max-height: 385px;
    min-height: 385px;
}

.card-product-nc .quantity-prod {
    opacity: 0;
    cursor: pointer;
    position: absolute;
    top: 20px;
    display: grid;
    align-items: center;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: var(--green-color);
    color: var(--color-white);
    border-radius: 0 20px 20px 0;
    padding: 8px 20px 8px 8px;
    transition: opacity .2s ease-in-out;
}

.card-product-nc.in-cart .quantity-prod {
    opacity: 1;
}

.quantity-prod .caption{
    color: var(--color-white);
}

.card-product-nc div{
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    text-transform: uppercase;
    text-align: center;
}

.swiper-products .swiper-wrapper article.card-product-nc:last-child{
    margin-right: 0;
}

.card-product-nc figure {
    position: relative;
    display: flex;
    min-height: 180px;
    max-height: 180px;
    width: 100%;
    justify-content: center;
    cursor: pointer;
    padding: 16px 0;
}

.card-product-nc .see-more-preview{
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
    opacity: 0;
    border-radius: 4px;
    transition: opacity .3s ease-in-out;
}

.card-product-nc figure:hover .see-more-preview{
    opacity: 1;
}

.see-more-preview .caption{
    color: var(--color-white);
}

.card-product-nc figure img{
    height: 100%;
    pointer-events: none;
    transition: transform .2s ease-in-out;
}

.card-product-nc figure:hover img{
    transform: scale(1.1);
}

.card-product-nc .caption{
    font-weight: 600;
}

.card-product-nc button{
    padding: 10px 12px;
    width: 100%;
}

.ctn-images-preview {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    padding: 2% 3%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    opacity: 0;
    pointer-events: none;
    z-index: -9999;
    transition: opacity .2s ease-in-out;
}

.ctn-images-preview.open{
    opacity: 1;
    pointer-events: all;
    z-index: 9999;
    transition: opacity .3s ease-in-out;
}

.ctn-images-preview .btn-close-preview{
    display: flex;
    font-size: 30px;
    color: var(--color-white);
    cursor: pointer;
    height: fit-content;
    width: 100%;
    justify-content: end;
}

.ctn-images-preview .preview-wrapper{
    display: flex;
    height: 100%;
}

.btn-close-preview .fa-solid{
    pointer-events: none;
}

.swiper-img-preview .article-preview{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.swiper-img-preview .swiper-slide{
    height: revert;
}

.slide-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(255,255,255,0.8);
    border-radius: 4px;
    width: 300px;
    height: 500px;
}

.slide-preview img {
    object-fit: cover;
    height: 100%;
    max-width: 100%;
}

.parent-product-add{
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9998;
}

.ctn-product-add{
    border: 2px solid var(--green-color);
    background-color: var(--color-white);
    padding: 12px 16px;
    border-radius: 20px;
    max-width: 320px;
    margin-bottom: 8px;
    animation: right_to_left .3s ease-in-out, opacity .6s ease-in-out;
}

.ctn-product-add.remove:not(.hover){
    animation: left_to_right .5s ease-in-out forwards;
    pointer-events: none;
}

@keyframes right_to_left {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes left_to_right {
    from {
        transform: translateX(0%);
    }
    to {
        transform: translateX(100vw);
    }
}

@keyframes opacity {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.parent-product-add div:last-child{
    margin-bottom: 0;
}

.ctn-product-add .head{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
    margin-bottom: 12px;
}

.ctn-product-add .head .caption{
    color: var(--green-color);
    font-weight: 600;
}

.ctn-product-add .head .close{
    color: var(--border-color);
    font-size: 20px;
    cursor: pointer;
    transition: color .2s ease-in-out;
}

.ctn-product-add .head .close:hover{
    color: var(--color-label);
}

.ctn-product-add .product-info{
    display: flex;
    gap: 20px;
    pointer-events: none;
}

.ctn-product-add .product-info figure{
    max-width: 50px;
}

.ctn-product-add .product-info img{
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.ctn-product-add .product-info .p-inf{
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}

.ctn-product-add .product-info .name{
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
}

.ctn-product-add .product-info p{
    font-weight: 600;
}

.ctn-product-add .product-info .caption.price{
    color: var(--green-color)
}

@media screen and (max-width: 1080) {

    .card-product-nc figure:hover .see-more-preview{
        opacity: 0;
    }
    
}

@media screen and (max-width: 600px) {

    .content-products {
        padding: 0 0 40px 0;
    }

    .swiper-products {
        width: 100vw;
        padding: 0;
        margin-top: 130px;
        padding: 0 16px;
    }

    .content-products h3 {
        font-size: 3.5rem;
        letter-spacing: 5px;
        transform: translate(-50%, 30px);
    }

    .content-products .swiper-button.swiper-button-prev, 
    .content-products .swiper-button.swiper-button-next {
        display: none;
    }

    .ctn-images-preview {
        padding: 20px 5%;
    }

    .slide-preview {
        max-width: 250px;
        max-height: 300px;
    }

}