:root {
    --secondary-color: #000000;
}

/* Chrome, Safari, Edge, Opera */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

body {
    margin: 0;
    font-family: sans-serif;
    overflow-x: hidden;
}

h1,
p {
    margin: 0;
}

.roboto-slab-robotoSlab {
    font-family: "Roboto Slab", serif;
    font-optical-sizing: auto;
    font-weight: 100;
    font-style: normal;
}

.black-gradient {
    position: absolute;
    height: 100vh;
    width: 100%;
    top: 0;
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.55));
    z-index: 1;
}

#cart {
    position: fixed;
    width: 50px;
    height: 50px;
    bottom: 5%;
    right: -20%;
    z-index: 4;
    background-color: var(--secondary-color);
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
    transition: all 0.4s ease;
}

#cart.visible {
    right: 5%;
}

#carrito-section {
    position: fixed;
    height: 0;
    width: 0;
    bottom: 5%;
    right: 5%;
    z-index: 3;
    background-color: white;
    border-radius: 24px;
    box-shadow: 0 0 120px rgba(0, 0, 0, 0.4);
    transition: all 0.4s ease-in-out;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

#carrito-section::-webkit-scrollbar {
    display: none; /* Oculta scrollbar en navegadores WebKit */
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-items-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 30px;
    position: relative;
    box-sizing: border-box;
    width: 100%;
    height: auto;
    align-items: center;
}

/*PRODUCTOS DEL CARRITO*/

.cart-product {
    display: flex;
    width: 85%;
    max-height: 20%;
    padding: 0px 8px 0px 4px;
    background-color: #f0f4f8;
    /* border: 1px solid black; */
    justify-content: space-around;
    align-items: center;
    gap: 16px;
    font-size: 0.8rem;
    text-align: center;
    border-radius: 16px;
    margin: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-20px);
    opacity: 0;
}

.cart-product.visible {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease-out;
}

.cart-product-img {
    height: 100%;
    width: auto;
    max-width: 80px; /* opcional si querés limitar el ancho */
    object-fit: contain; /* o 'cover', según lo que quieras */
    display: block;
}

.delete-product {
    background-color: #e32424;
    width: 32px;
    height: 32px;
    aspect-ratio: 1/1;
    border: none;
    border-radius: 8px;
    color: white;
}

.mensaje-vacio {
    color: #cccccc;
    opacity: 0;
    position: absolute;
    top: 12%;
    transition: all 1.2s linear;
}

.cart-resume {
    width: 100%;
    min-height: 50px;
    background-color: #f0f4f8;
}

.cart-product-btn {
    background-color: var(--secondary-color);
    border: none;
    height: 82%;
    width: calc(90% - 50px);
    margin-left: 8%;
    border-radius: 16px;
    margin: 5px 0px 5px 8%;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}

.cart-product-detail {
    position: absolute;
    bottom: 0;
    font-size: 0.6rem;
    color: #c0c0c0;
    opacity: 0.6;
}

.card-product-inputnum-container {
    display: none;
    position: absolute;
    bottom: -32px;
    justify-content: center;
    height: 30%;
    text-align: center;
    gap: 10px;
}

.card-product-inputnum-container input {
    width: 20%;
    text-align: center;
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
}

.btn-input {
    background-color: var(--secondary-color);
    border: none;
    border-radius: 8px;
    aspect-ratio: 1/1;
    height: 100%;
    text-align: center;
    color: white;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
}

/*-----------Primer pagina o header----------------*/
.header {
    background-image: url(Assets/Pics/Background.webp);

    height: 100vh;
    width: 100%;
    background-position: bottom;
    background-size: cover;
    display: flex;
    flex-direction: column;

    align-items: center;
}

.title-container {
    margin-top: 15vh;
    text-align: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.title {
    font-size: 4rem;
}

.subtitle {
    font-size: 1.6rem;
    font-style: italic;
}

.contact-img-container {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
}

.contact-img {
    width: 100%;
    height: 100%;
    align-self: center;
    object-fit: cover;
    position: absolute;
    bottom: 0;
}

.contact-btn {
    /*border: 2px solid white;*/
    position: absolute;
    z-index: 3;
    height: 165px;
    width: 300px;
    transform: rotate(4deg);
    bottom: 9vh;
    right: 5vw;
    cursor: pointer;
}

/*--------Products Section-------------*/

.product-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

main h2 {
    margin: 50px 0px;
    font-size: 2.4rem;
    text-align: center;
}

.sort-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-content: center;
    justify-content: center;
    flex-wrap: wrap;
    text-align: center;
    gap: 16px;
}

.sort-option {
    width: 35%;
    text-align: center;
    padding: 16px;
    background-color: var(--secondary-color);
    border: none;
    border-radius: 16px;
}

.product-container {
    width: 80%;
    height: auto; /* Cambio crucial - de 55vh a auto */
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    box-sizing: border-box;
    border-radius: 24px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    margin: 40px 0px;
    position: relative;
    padding: 20px 0; /* Espacio interno adicional */
}

.product-img {
    height: 200px; /* Altura fija en lugar de porcentaje */
    width: auto;
    max-width: 90%;
    margin: 12px;
    object-fit: contain; /* Mantiene proporciones */
}

.product-name {
    font-size: 1.4rem; /* Reducido ligeramente */
    padding: 0 15px;
    margin: 10px 0;
    height: auto; /* De inline-flex a auto */
    text-align: center;
    display: flex;
    align-items: center;
    min-height: 60px; /* Altura mínima consistente */
}

.product-price {
    font-size: 1.2rem;
    height: auto; /* De 15% a auto */
    font-style: italic;
    margin: 10px 0;
}

.add-product-btn {
    position: absolute;
    bottom: 4%;
    right: 8%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: var(--secondary-color);
    color: white;
    font-size: 1.6rem;
}
/*
.add-product-btn {
    position: relative; 
    bottom: auto;
    right: auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: var(--secondary-color);
    color: white;
    font-size: 1.6rem;
    margin: 10px 0;
}
*/
.add-product-btn.clicked {
    animation: pop-up 0.3s ease;
}

.view-btn {
    background-color: var(--secondary-color);
    border: none;
    color: white;
    border-radius: 16px;
    padding: 16px;
    font-weight: bold;
}

#footer {
    height: 40vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    background-color: var(--secondary-color);
    margin-top: 40px;
}

.footer-section {
    display: flex;
    width: 100%;
    height: 75%;
    justify-content: space-between;
    align-items: center;
}

.img-footer-container {
    height: 80%;
    margin-right: 20px;
}

.img-footer {
    object-fit: cover;
    height: 100%;
}

.redes {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-left: 20px;
}

.red-social {
    display: flex;
    align-items: center;
    gap: 10px;
}

.red-social a {
    text-decoration: none;
    color: white;
}

.derechos {
    display: flex;
    flex-direction: column;
    height: 25%;
    align-items: center;
    text-align: center;
    color: white;
    gap: 10px;
    padding: 0px 15px;
}

.derechos a {
    text-decoration: none;
    color: white;
    font-weight: bolder;
}

@media screen and (min-width: 760px) {
    .header {
        flex-direction: row;
        height: 50vh;
        justify-content: space-evenly;
    }
    #carrito-section {
        width: 35% !important;
    }
    .black-gradient {
        height: 50vh;
    }
    .contact-img-container {
        width: auto;
        padding-right: 100px;
    }
    .contact-img {
        width: auto;
    }
    .title-container {
        margin-top: 5vh;
    }
    .title {
        font-size: 5.6rem;
    }
    .subtitle {
        font-size: 2.4rem;
    }
    .product-section {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
        padding: 0 12%;
        align-items: center;
    }
    .product-container {
        flex: 1 1 calc(33.3% - 1rem);
        max-width: 33.3%;
        height: auto; /* Mantener auto en desktop */
        min-height: 400px; /* Altura mínima para consistencia */
    }
    .product-img {
        height: 180px; /* Altura fija para desktop */
        max-height: 180px;
    }
    .product-name {
        font-size: 1.2rem; /* Un poco más pequeño en desktop */
        min-height: 80px; /* Más espacio para nombres largos */
    }
}

/*--------------------KEYFRAMES----------------------*/

@keyframes aparecer {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes pop-up {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}
