@charset "UTF-8";

@font-face {
    font-family: "Erstoria";
    src: url("../fonts/Erstoria.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

*{
    margin:0;
    padding: 0;
    box-sizing: border-box;
}

html{
    font-size: 62.5%;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

:root{
    --first-color: #5402E9;
    --second-color: #F821F4;
    --third-color:#6CAF3D;
    --fourth-color:#F3A103;
    --black: #18181b;
    --white: #f8f9fa;
    --grey: #e9ecef;
    --main-font: "Erstoria", sans-serif;
    --text-xs: 0.75rem;   
    --text-sm: 0.875rem;  
    --text-base: 1rem;    
    --text-lg: 1.125rem;  
    --text-xl: 1.25rem;   
    --text-2xl: 1.5rem;   
    --text-3xl: 1.875rem; 
    --text-4xl: 2.25rem;  
    --text-5xl: 3rem;     
    --text-6xl: 3.75rem;  
    --text-7xl: 4.5rem;   
    --text-8xl: 6rem;     
    --text-9xl: 8rem;      
}
body{
    font-family: var(--main-font);
}

#categories_list{
    width: 100%;
    height: fit-content;
    padding: 2rem 5%;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    margin-top: 10vh;
    overflow-x: auto; 
    scroll-snap-type: x mandatory; 
    white-space: nowrap; 
}
.category_button {
    margin: 0 1rem; 
    flex-shrink: 0; 
    scroll-snap-align: start;
    white-space: nowrap; 
}

#categories_list::-webkit-scrollbar {
    display: none; 
}

#categories_list button {
    background-color: transparent;
    border: 0;
    padding: 1rem 2rem;
    font-size: var(--text-2xl);
    font-weight: 600;
    cursor: pointer;
    color: var(--black);
    position: relative;
    outline: none;
}

#categories_list button:hover{
    color: var(--second-color);
}

#categories_list button::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--second-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

#categories_list button:hover::before {
    width: 100%;
}

#categories_container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5rem;
    padding: 12vh 0;
    background-size: cover;
    z-index: 1;
}

#categories_container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-repeat: repeat;
    background-position: center;
    background-attachment: fixed;
    opacity: 1;
    z-index: -1;
    background-image: url('../img/bg_white_trans.png');
}

.category_container{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1.5rem;
    width: 70%;
    margin: 0 auto;
}

.category_container h1{
    margin: 4rem 0;
    font-size: var(--text-7xl);
    font-weight:700;
    color: var(--black);
}

.products_grid{
    width: 100%;
    height: fit-content;
    display: grid;
    grid-template-columns: repeat(3,1fr);
    grid-template-rows: auto;
    gap: 2rem;
}

.product_card {
    width: 100%;
    height: 50vh;
    border: 0.2px solid var(--grey);
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--white);
    transition: 0.2s ease-in-out;
}

.product_card:hover{
    box-shadow: 2px 6px 15px 2px rgba(0,0,0,0.075);
    -webkit-box-shadow: 2px 6px 15px 2px rgba(0,0,0,0.075);
    -moz-box-shadow: 2px 6px 15px 2px rgba(0,0,0,0.075);
    cursor: pointer;
}

.product_img_container {
    position: relative;
    width: 100%;
    height: 65%;
}

.product_img_container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.gradient_img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.product_info {
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: auto;
    width: 85%;
    position: relative;
}

.product_name{
    font-size: var(--text-3xl);
    font-weight: 700;
    color: #696969;
}

.product_description{
    font-size: var(--text-xl);
    color: #696969;
    font-weight: 500;
}

.product_price{
    font-size: var(--text-2xl);
    color: #696969;
    font-weight: 600;
}

.cart_container{
    width: 45%;
    height: 100vh;
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 999;
    position: absolute;
    top: 0;
    left: 0;
    position: fixed;
    -webkit-box-shadow: 5px 1px 67px -23px rgba(0,0,0,0.58);
    -moz-box-shadow: 5px 1px 67px -23px rgba(0,0,0,0.58);
    box-shadow: 5px 1px 67px -23px rgba(0,0,0,0.58);
    transform: translateX(-100%);
    transition: 0.2s ease-in-out;
}

.cart_container h2{
    font-size: var(--text-6xl);
    color: var(--black);
    height: fit-content;
    padding: 3rem 5rem 0 5rem;
}
#close_cart_btn{
    background-color: var(--white);
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    padding: 1rem;
    border: 0;
    cursor: pointer;
}
#close_cart_btn svg{
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

#cart_list{
    height: 80%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: scroll;
    padding: 2rem;
}

.cart_item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--grey);
    padding: 1rem 0;
}

.cart_item_img {
    width: 100px;
    height: 100px;
    margin-right: 3rem;
    object-fit: cover;
    object-position: center;
    border-radius: 5px;
}

.cart_item_details{
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart_item_details h3{
    font-size: var(--text-2xl);
    color: var(--second-color);
    font-weight: 600;
}

.cart_item_details p{
    font-size: var(--text-xl);
    color: var(--black);
}

.cart_item_details ul{
    margin-left: 2rem;
}
.cart_item_details ul li{
    margin: 0.5rem;
    font-style: italic;
    font-size: var(--text-xl);
    color: var(--black);
}

.remove_item_btn {
    color: #A70000;
    font-size: var(--text-xl);
    background-color: transparent;
    border-radius: 5px;
    padding: 1rem;
    border: 0;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 3rem;
}

.remove_item_btn:hover{
    background-color: var(--grey);
}

.cart_checkout_container{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 1rem;
    padding: 2rem;
    border-top: 2.5px solid var(--first-color);
}

.cart_checkout_container p{
    font-weight: 700;
    font-size: var(--text-4xl);
    margin-right: 5rem;
}

.cart_checkout_container button{
    width: fit-content;
    height: fit-content;
    padding: 1.5rem 5rem;
    background-color: var(--white);
    color: var(--fourth-color);
    font-size: var(--text-3xl);
    border: 0;
    border-radius: 5px;
    transition: 0.2s ease-in-out;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    text-wrap: nowrap;
}


.cart_checkout_container button:hover{
    background-color: var(--fourth-color);
    color: var(--white);
    cursor: pointer;
}

#doordash_checkout_btn{
    user-select: none;
    background-color: grey;
    pointer-events: none;
    color: var(--white);
    text-decoration: line-through;
}

.add-button-container {
    position: absolute;
    bottom: 0;
    right: 0;
}

.add-button-container svg {
    width: 24px;
    height: 24px;
    fill: none;
    background-color: transparent;
    border-radius: 50%; /* Redondeado si lo deseas */
    stroke: #000;
    stroke-width: 2;
    cursor: pointer;
}

.scrollToTopBtn {
    position: fixed;
    bottom: 3rem;
    left: 3rem;
    background-color: var(--second-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 20px;
    cursor: pointer;
    display: none; /* Oculto por defecto */
    z-index: 100; /* Asegura que el botón esté por encima de otros elementos */
}

.scrollToTopBtn:hover {
    background-color: var(--first-color);
    color: black;
}



@media (max-width: 1024px) {

    .cart_container{
        width: 100%;
    }

    .products_grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 1.5rem;
    }

    .product_name, .product_description, .product_price {
        font-size: var(--text-xl);
    }

    .category_container{
        width: 85%;
    }
    

    .category_container h1{
        margin: 0;
        font-size: var(--text-5xl);
    }


    .cart_container{
        width: 100%;
    }

    .cart_item {

        padding: 1rem 0;
        border-bottom: 1px solid var(--grey);
    }

    .cart_item img {
        width: 100px; /* Ajuste de tamaño para pantallas pequeñas */
        height: 100px;
        margin-bottom: 1rem;
        object-fit: cover;
        display: block; /* Asegura que la imagen esté en bloque */
    }

    .cart_item_details {
        margin-top: 1rem;
        font-size: var(--text-base); /* Tamaño ajustado para pantallas pequeñas */
    }

    /* Ajustar el contenedor de checkout para evitar que los botones se desborden */
    .cart_checkout_container {
        display: flex;
        gap: 1rem;
        padding: 1rem; /* Reduce el padding en pantallas pequeñas */
        width: 100%; /* Asegura que ocupe el ancho completo */
        flex-direction: column;
    }

    .cart_checkout_container button {
        width: 100%; /* Botones ocupan el 100% del contenedor */
        font-size: var(--text-xl); /* Tamaño ajustado del texto */
        display: flex;
        justify-content: center; /* Centrar el contenido del botón */
        background-color: var(--fourth-color);
        color: var(--white);
        margin-bottom: 2%;
    }

    .cart_checkout_container button svg {
        width: 20px;
        height: 20px; 
    }

    #close_cart_btn svg {
        width: 100%;
        height: 100%;
    }

    .cart_checkout_container p{
        text-align: center;
        margin: 3rem 0;
    }
}

