
@font-face {
    font-family: 'Poppins';
    src: url('../plugins/poppins/Poppins-ExtraLight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins';
    src: url('../plugins/poppins/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/* Añade otras variaciones según los archivos que tengas */
@font-face {
    font-family: 'Poppins';
    src: url('../plugins/poppins/Poppins-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Poppins';
    src: url('../plugins/poppins/Poppins-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

*, *:after, *:before {
    box-sizing: border-box;
    text-decoration: none;
    padding: 0;
    margin: 0;
}

html {
    box-sizing: inherit;
    font-size: 62.5%;
}

body {
    font-size: 1.6rem;
    color: #6b7280;
    line-height: 1.4;
}

img {
    width: 100%;
    object-fit: cover;
}

:is(h1, h2, h3, h4) {
    font-family: "Poppins", sans-serif;
    font-weight: 700;
}

.container {
    width: min(95%, 128rem);
    margin: 0 auto;
}

.header {
    background: linear-gradient(to right, rgb(0,0,0,.60) 0%, rgb(0,0,0,.60) 100%), url(../img/hero-02.jpg);
    background-position: bottom center;
    background-repeat: no-repeat;
    background-size: cover;
}

.navigation {
    padding: 3rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    

    .logotipo {
        font-size: 4rem;
        color: white;
        font-family: "Poppins", sans-serif;
        font-weight: 400;

        span {
            font-weight: 200;
            color: chartreuse;
            font-size: 4rem;
        }
    }

    button {
        border: none;
        background-color: unset;
        cursor: pointer;
        .icon-cart {
            font-size: 2.6rem;
            color: chartreuse;
        } 
    }
    span {
        color: white;
        font-weight: 700;
        font-size: 2rem;
    }
}

.form-header {
    width: min(95%, 60rem);
    margin: 0 auto;
    padding: 20rem 0 30rem 0;
    display: flex;
    align-items: center;
    input {
        width: 100%;
        padding: 1rem;
        background-color: rgb(255, 255, 255, .10);
        backdrop-filter: blur(10px);
        border-top-left-radius: .5rem;
        border-bottom-left-radius: .5rem;
        border-top: 1px solid white;
        border-left: 1px solid white;
        border-bottom: 1px solid white;
        color: white;
        font-size: 1.6rem;

        &:focus,
        &:active {
            outline: none;
        }
    }
    button {
        background-color: chartreuse;
        padding: .8rem;
        border: none;
        border-top: 1px solid white;
        border-right: 1px solid white;
        border-bottom: 1px solid white;
        border-top-right-radius: .5rem;
        border-bottom-right-radius: .5rem;
    }

    .icon-glass {
        transform: rotate(90deg);
        font-size: 2.2rem;
        color: #636363;
    }
}

.banner {
    background: linear-gradient(to right, #71e102 0%, #8bca4c 100%);
    padding: 4rem 0;
}

.banner-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 8rem;
    @media (min-width: 992px) {
         grid-template-columns: repeat(3, 1fr);
    }

    .banner-item {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 3rem;

        .icon-banner {
            font-size: 3rem;
        }
        h3 {
            text-align: center;
        }
        .icon-banner, h3 {
            color: #404040;
            font-weight: 400;
        }
    }
}

.products {
    padding: 8rem 0;
    background-color: #f8fafc;

    h2 {
        text-align: center;
        font-size: clamp(3.8rem, 8vw, 4.6rem);
        color: #404040;
        margin-bottom: 5rem;
    }

    .products-grid {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 2rem;
        @media (min-width: 576px) {
            grid-template-columns: repeat(2, 1fr);
        }

        @media (min-width: 768px) {
            grid-template-columns: repeat(3, 1fr);
        }

        @media (min-width: 1280px) {
            grid-template-columns: repeat(4, 1fr);
        }
    }
}

.product {
    box-shadow: 0 0 2.5rem rgb(0,0,0,.10);
    img {
        border-top-left-radius: .7rem;
        border-top-right-radius: .7rem;
    }
}

.product-info {
    padding: 1.5rem;
    background-color: white;
    border-radius: .7rem;

    h4 {
        color: #404040;
    }

    .product-text {
        margin: 1.2rem 0;
    }

    .icon-star {
        color: #fbbf24;
        font-size: 1.2rem;
    }

    .price {
        margin: 1.2rem 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        span {
            text-decoration: line-through;
        }
        p {
            font-size: 2rem;
            font-weight: bold;
        }
    }

    button {
        border: none;
        background-color: #8bca4c;
        width: 100%;
        padding: 1rem;
        border-radius: .5rem;
        color: #404040;
        font-weight: 700;
        text-transform: uppercase;
        margin-bottom: 1.2rem;
        cursor: pointer;
        transition: background-color .3s ease;
        &:hover {
            background-color: #71e102;
        }
    }
}

.footer {
    background-color: #404040;
    padding: 2.5rem 0;

    div {
        text-align: center;
    }
    p {
        color: white;
    }
}

.cart {
    display: none;
    position: absolute;
    opacity: 0;
    right: -1rem;
    top: 3rem;
    background-color: rgb(0,0,0,.60);
    backdrop-filter: blur(5px);
    padding: 2rem;
    border-radius: .8rem;
    z-index: 10;
    @media (min-width: 1400px) {
        right: -20rem;
    }

    table {
        width: 100%;
        border-collapse: collapse;

        thead {
            th {
                padding: 1rem;
                color: #f7f8f9;
            }
            
            border-bottom: 1px solid white;
        }

        tbody {
            tr {
                padding: 2rem 0;
            }
            td {
                color: #f7f8f9;
                padding: 1rem;
                img {
                    width: 10rem;
                }

                p {
                    font-size: 1.6rem;
                    font-weight: 400;
                }

                input {
                    width: 6rem;
                    background-color: transparent;
                    border: 1px solid #f7f8f9;
                    padding: .7rem;
                    color: #f7f8f9;
                    border-radius: .5rem;
                    &:focus,
                    &:active {
                        outline: none;
                    }
                }

                button {
                    border: none;
                    width: 3rem;
                    height: 3rem;
                    background-color: #dc2626;
                    color: #f7f8f9;
                    border-radius: 50%;
                    cursor: pointer;
                }
            }
        }

        tfoot {
            .total {
                text-align: right;
                padding-bottom: 2rem;

                .heading-total {
                    color: white;
                    span {
                        margin-left: .5rem;
                    }
                }
            }

            td {
                button {
                    width: 100%;
                    background-color: rgb(255, 255, 255, .75);
                    padding: 1rem;
                    border-radius: .5rem;
                    cursor: pointer;
                    color: #404040;
                    font-weight: 700;
                }
            }
        }
    }
    
}

.btn-cart {
    position: relative;
}

.btn-cart:hover .cart {
    display: block;
    opacity: 1;
}

.alert {
     position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 30px 45px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    font-size: 16px;
    text-align: center;
    z-index: 1000;
    opacity: 0;
    animation: fadeInOut 5s ease forwards;
    font-size: 2rem;

    &.error {
        background-color: #f44336;
        color: #fff;
    } 
    
    &.success {
        background-color: #4caf50;
        color: #fff;
    }

}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    10% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    90% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}