@import url("/css/main.css");

.swiper {
    width: 100%;
    height: 500px;
}
.swiper-wrapper {
    left: 0px;
}
.swiper-slide {
    display: flex;
    width: 100%;
}
.swiper-slide img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}
.swiper-button-prev {
    --swiper-theme-color: #fff;
    --swiper-navigation-size: 20px;
    background: #110e0e5b;
    border-radius: 20px;
    padding: 20px;
}
.swiper-button-next {
    --swiper-theme-color: #fff;
    --swiper-navigation-size: 20px;
    background: #110e0e5b;
    border-radius: 20px;
    padding: 20px;
}

.swiper .swiper-pagination {
    --swiper-pagination-color: #fff;
    --swiper-pagination-left: auto;
    --swiper-pagination-right: 10px;
    --swiper-pagination-bottom: 10px;
    --swiper-pagination-top: auto;
    --swiper-pagination-fraction-color: inherit;
    --swiper-pagination-progressbar-bg-color: rgba(0, 0, 0, 0.25);
    --swiper-pagination-progressbar-size: 4px;
    --swiper-pagination-bullet-size: 10px;
    --swiper-pagination-bullet-width: 10px;
    --swiper-pagination-bullet-height: 10px;
    --swiper-pagination-bullet-border-radius: 50%;
    --swiper-pagination-bullet-inactive-color: #000;
    --swiper-pagination-bullet-inactive-opacity: 0.2;
    --swiper-pagination-bullet-opacity: 1;
    --swiper-pagination-bullet-horizontal-gap: 4px;
    --swiper-pagination-bullet-vertical-gap: 6px;
}

/* Menu codiogo */

/* Estilos del grid en el body */

body {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "header "
        "main"
        "footer-nav"; /* Header y main en la primera columna, carrito en la segunda */
    position: relative;
}

/* Estilos de cada área */

.container-menu {
    max-width: 120rem;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.header-wrapper {
    grid-area: header;
    position: fixed;
    width: 100%;
    z-index: 120;
}

.header-wrapper::before {
    content: "";
    position: absolute;
    top: 0rem;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f5f5f5be;
    backdrop-filter: blur(20px);
    padding: 0;
}

.header {
    grid-area: header;
    top: 0;
    z-index: 10;
    grid-column: 1 / 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 8rem;
    position: relative;
}

.header__logo {
    width: 12rem;
    padding: 2rem 0;
    display: none;
}

.header__logo img {
    object-fit: contain;
}

.header__container-nav {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 3rem;
}
.search-container {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid #ccc;
    border-radius: 5rem;
    padding: 5px 10px;

    /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); */
}

.search-input {
    border: none;
    outline: none;
    font-size: 14px;
    flex: 1;
    color: #333;
    padding: 5px 10px;
    width: 100%;

    background-color: #f5f5f500;
}

.search-input::placeholder {
    color: #ccc;
}

.search-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #ccc;
    display: flex;
    align-items: center;
}

.search-button:hover {
    color: #555;
}

svg {
    width: 16px;
    height: 16px;
}

.header__nav {
    position: absolute;
    width: 100%;
    top: 7.8rem;
    left: 0;
    right: 0;
    text-align: center;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.5s ease-out;
    backdrop-filter: blur(20px);
    background: #f5f5f5c0;
    height: auto;
}
.header__nav.active {
    max-height: 900px;
}

.icons {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.icons svg {
    height: 2.5rem;
    width: 2.5rem;
    fill: #000000;
}

.icons #close-icon {
    display: none;
}

.header__nav-user {
    padding-bottom: 4rem;
    display: flex;
    justify-content: center;
}

.icons__header {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.icons__header-notify svg {
    height: 2rem;
    width: 2.5rem;
}

.header__user-button {
    height: 100%;
    padding: 1rem 2.7rem;
    border-radius: 2rem;
    border: none;
    cursor: pointer;
    font-weight: 300;
}
.header__user-button--login {
    color: var(--tx-black);
    text-transform: uppercase;
    background-color: transparent;
    display: flex;
    gap: 1rem;
    align-items: center;
}
.header__nav-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 3rem 0;
}
.header__nav-link {
    list-style: none;
}
.header_nav_btn-contact {
    background-color: #1d1a1a;
    padding: 2rem 3rem;
    color: #fff;
    display: none;
}

.header__nav-link a {
    text-decoration: none;
    font-size: 14px;
    color: var(--tx-primary-dark);
    font-weight: 300;
    text-transform: uppercase;
}
.header__nav-link a:hover {
    color: #a38c6d;
}

.header__user-button--register {
    color: var(--tx-white);
    text-transform: uppercase;
    background-color: var(--bg-primary-chocolate);
}

/* Main */

.main-wrapper {
    grid-area: main;
    background-color: #f5f5f5;
    padding-top: 8rem;
    padding-bottom: 10rem;
}
/* main Saludo*/

.main__saludo {
    display: block;
}

.main__saludo h3 {
    font-size: 2.6rem;
}
.main__saludo span {
    color: #a38c6d;
}
.main__saludo h5 {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #3e3535;
    font-weight: 400;
}

/* main banner */

.main__banner {
    overflow: hidden;
    width: 100%;
    border-radius: 1rem;
    height: 100%;
    margin-bottom: 2rem;
}

.main__banner img {
    object-fit: contain;
    width: 100%;
    height: 100%;
    display: block;
}

/* main categorias */
.main__categorias {
    display: flex;
    flex-direction: column;
}

.boton-categoria {
    background-color: transparent;
    border: none;
}
.boton-categoria {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.boton-categoria p {
    padding: 1rem 0;
    color: #1d1a1a;
}

.main_categoria-container-icon {
    background-color: #e7e6e6;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 7rem;
    height: 7rem;
    border-radius: 3.5rem;
}
.main_categoria-container-icon path {
    fill: #b0b4b4;
}

.boton-categoria.active .main_categoria-container-icon path {
    fill: #5a4d4a; /* El color cuando el botón tenga la clase active */
}

.main_categoria-container-icon svg {
    width: 3.5rem;
    height: 3.5rem;
}
.main__categorias-name {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    text-transform: uppercase;
}
.main__categorias-list {
    list-style: none;
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

/* main filter */
.main__filter-menu-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.menu-list {
    list-style: none;
}

.submenu {
    display: flex;
    width: 100%;
    justify-content: space-between;
    list-style: none;
}

.submenu-item {
    background-color: transparent;
    color: #000000;
    padding: 0.5rem 2rem;
    border-radius: 3rem;
    font-size: 1.4rem;
    border: 1px solid #dfdeda;
}

.submenu-item:hover {
    background-color: #5a4d4a;
    color: #fff;
    border: #5a4d4a;
}

.menu-item-title {
    display: none;
}

.main__filter-wrapper {
    margin-bottom: 2rem;
}
/* main productos */

.main {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    min-width: 10rem;
    transition: transform 0.3s ease;
    position: relative;
}

.product-btn-favorite {
    position: absolute;
    border: none;
    padding: 1.4rem;
    background-color: transparent;
    cursor: pointer;
    right: 0;
    top: 0;
}
.product-btn-favorite svg path {
    fill: #e7e6e6;
}
.product-btn-favorite svg path:hover {
    fill: #695757;
}

.product-card:hover {
    transform: scale(1.05);
}
.product-card-left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    width: 100%;
}

.product-image {
    border-radius: 10px;
    background-color: #f8f8f8;
    padding: 1rem;
    display: flex;
    justify-content: center;
}
.product-image img {
    object-fit: cover;
    height: 9.2rem;
    width: auto;
}

.product-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
    color: #a38c6d;
    white-space: nowrap;
    overflow: hidden; /* Oculta el contenido que se desborda */
    text-overflow: ellipsis; /* Muestra "..." si el contenido no cabe */
}

.product-description {
    font-size: 1.2rem;
    color: #777;
    margin-bottom: 5px;
    width: 15rem; /* Ajusta el ancho del contenedor */
    overflow: hidden; /* Oculta el contenido desbordado */
    white-space: nowrap; /* Evita el salto de línea */
    text-overflow: ellipsis; /* Añade "..." al final del texto */
    word-wrap: break-word; /* Permite el ajuste de palabras largas */
}

.product-rating {
    color: #ffd700;
    font-size: 14px;
    margin-bottom: 5px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.product-price {
    font-size: 16px;
    font-weight: bold;
    color: #444;
}

.product-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2rem 0 1rem 0;
}

.quantity-btn {
    width: 25px;
    height: 25px;
    border: 1px solid #ccc;
    border-radius: 50%;
    background-color: white;
    font-size: 18px;
    cursor: pointer;
}

.quantity {
    font-size: 16px;
}

.add-to-cart-btn {
    border: none;
    border-radius: 2rem;
    background-color: #5a4d4a;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.car {
    grid-area: car;
    display: none;
}

.footer-nav {
    grid-area: footer-nav;
    background-color: #f5f5f5bb;

    backdrop-filter: blur(20px);
    z-index: 200;
    position: fixed;
    width: 100%;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    padding: 1rem 2rem;
}

.footer-nav-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.3rem 1rem 0.5rem 1rem;
    border-radius: 1rem;
}

.footer-nav-icon {
    position: relative;
}

.footer-nav-item p {
    font-size: 1.2rem;
    color: #000;
}

.footer-nav-item--active {
    background-color: #695757;
}

.footer-nav-item--active p {
    color: #fff;
    font-size: 1.2rem;
}

@media (min-width: 768px) {
    body {
        display: grid;
        grid-template-columns: 4fr 350px;
        grid-template-rows: auto 1fr;
        grid-template-areas:
            "header car"
            "main car";
        height: 100vh;
        overflow: hidden;
    }

    .main__saludo span {
        font-size: 2.8rem;
    }

    /* Header */
    .header-wrapper {
        position: absolute;
    }

    .icons {
        display: none;
    }
    .header__logo {
        display: block;
    }

    .icons__header {
        display: none;
    }

    .header__container-nav {
        width: 100%;
        display: flex;
        justify-content: space-between;
    }
    .search-container {
        width: 30%;
        margin-left: 3rem;
    }

    .header__nav {
        position: static;
        max-height: none;
        transition: max-height 0.5s ease-out;
        overflow: visible;
        background-color: #00b3ff00;
        backdrop-filter: none;
        width: auto;
        display: flex;
        align-items: center;
    }
    .header__nav-links {
        flex-direction: row;
        gap: 4rem;
        padding: 0;
        align-items: center;
    }
    .header_nav_btn-contact {
        display: block;
        padding: 0.8rem 3rem;
        font-size: 1.4rem;
        border-radius: 1rem;
        cursor: pointer;
        border: none;
    }

    .header__nav-user {
        display: none;
    }
    .icons__header-notify {
        display: none;
    }

    /* Carrito */

    .car {
        background-color: #ffffff;
        grid-area: car;
        display: block;
        position: sticky;
        top: 0;
        right: 0;
        z-index: 11;
        grid-column: 2 / 3;
        height: 100vh;
        border-left: 1px solid #d6d6d6;
    }

    .main-wrapper {
        grid-area: main;

        gap: 1em;
        overflow-y: auto;
        /* max-height: calc(100vh - 50px); */
        scrollbar-width: thin;
        scrollbar-color: #a1a1a1 #f5f5f5;
    }
    .main {
        grid-template-columns: repeat(4, 1fr);
    }

    /* CATEGORIA */
    .main__categorias-name {
        margin-bottom: 2rem;
    }

    .main__categorias-list {
        justify-content: start;
        gap: 2rem;
        margin-bottom: 2rem;
    }

    .main_categoria-container-icon {
        display: none;
    }

    .main_categoria-container-name {
        border-radius: 2rem;
        color: #000;
        padding: 0;
    }
    .boton-categoria p {
        padding: 0.5rem 3rem;
        border: 1px solid #d6d6d6;
        border-radius: 2rem;
    }

    .boton-categoria p:hover {
        background-color: #a38c6d;
        border: 1px solid #a38c6d;
        color: #fff;
        cursor: pointer;
    }

    /* main filter */
    .main__filter-wrapper {
        display: flex;
        justify-content: space-between;
    }
    .menu-list {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
    }

    .menu-item-title {
        display: block;
    }

    .menu-item {
        color: rgb(0, 0, 0);
        cursor: pointer;
        position: relative;
        display: block;
        width: 100%;
    }

    /* Submenú oculto por defecto */
    .submenu {
        list-style: none;
        padding: 0;
        margin: 0;
        display: none;
        position: absolute;
        background-color: #ffffff;
        backdrop-filter: blur(20px);
        top: 100%;
        right: 0;
        width: 120px;
        z-index: 1000;
        border-radius: 1rem;
        padding: 0.5rem;
        box-shadow: 1px 9px 10px 5px #0000001f;
    }

    .menu-item.active .submenu {
        display: block; /* Muestra el submenú cuando el padre tiene la clase 'active' */
    }

    .submenu-item {
        padding: 1rem;
        color: rgb(10, 10, 10);
        cursor: pointer;
        white-space: nowrap;
        border: none;
    }

    .submenu-item:hover {
        background-color: #a38c6d;
        border-radius: 0.8rem;
    }

    /* PRODUCTOS  */

    .product-card {
        flex-direction: row;
        cursor: pointer;
        box-shadow: none;
    }

    .product-info {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        margin-left: 1rem;
    }
    .product-title {
        width: 12rem;
    }

    .product-description {
        overflow: hidden; /* Oculta el contenido desbordado */
        white-space: wrap; /* Evita el salto de línea */
        text-overflow: ellipsis; /* Añade "..." al final del texto */
        word-wrap: break-word; /* Permite el ajuste de palabras largas */
        height: 4rem;
    }
    .product-rating {
        font-size: 10px;
    }
    .product-rating {
        margin: 0;
    }
    .product-quantity {
        justify-content: center;
    }
    .product-price {
        margin-bottom: 1rem;
        font-size: 1.4rem;
        font-weight: 500;
        margin-top: 0.5rem;
    }
    .add-to-cart-btn {
        border-radius: 1rem;
        width: 100%;
        height: 3.5rem;
        font-size: 1.2rem;
        background-color: #f8f8f8;
        color: #5a4d4a;
    }
    .add-to-cart-btn:hover {
        background-color: #695757;
        border: 1px solid #695757;
        color: #ffffff;
    }

    .product-footer {
        flex-direction: column;
        align-items: start;
    }

    /* Car */

    .car {
        position: relative;
    }

    .car__header {
        display: flex;
        flex-direction: column;
    }

    .car__header-user {
        border-bottom: 1px solid #d6d6d6;
        padding: 2rem 3rem 2rem 3rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .car__header-user-left {
        display: flex;
        gap: 1rem;
    }
    .car__user-avatar {
        width: 4rem;
        height: 4rem;
    }
    .car__user-name {
        font-size: 1.4rem;
        font-weight: 500;
    }

    .car__user-gmail {
        font-size: 1.2rem;
        color: #919191;
    }

    .car__header-nav {
        display: flex;
        margin: 1rem 2rem;
        background-color: #ffffff49;
        backdrop-filter: blur(20px);
        box-shadow: 1px 5px 30px 5px #bdbbbb8a;
        border-radius: 1rem;
        padding: 0.7rem;
        gap: 1rem;
        position: absolute;
        width: 86%;
        z-index: 999;
    }

    .car__header-nav-link {
        background-color: transparent;
        width: 100%;
        border-radius: 0.8rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 1.3rem 0 0.7rem 0;
        justify-content: space-between;
        color: #1d1a1a;
    }
    .car__header-nav-link-icon {
        position: relative;
    }
    .car__header-nav-link-icon .numerito-header {
        position: absolute;
        color: #000000;
        background-color: #ffffff;
        width: 1.8rem;
        font-size: 1rem;
        border-radius: 1rem;
        top: -8px;
        left: 10px;
        text-align: center;
    }

    .car__header-nav-link--active {
        background-color: #1d1a1a;
        color: #fff;
    }
    .car__header-nav-link p {
        font-size: 1.2rem;
    }
    .car__product {
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: #a1a1a1 #fff;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        height: 50vh;
        padding: 0 2rem;
    }

    .car__product-card {
        background-color: #f8f8f8;
        display: flex;
        border-radius: 1.5rem;
        justify-content: space-between;
        align-items: center;
        transition: transform 0.3s ease;
    }

    .car__product-card:hover {
        transform: scale(1.05);
    }

    .car__product-card-img {
        background-color: #e7e6e6;
        width: 8rem;
        height: auto;
        border-radius: 1rem;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-right: 1rem;
    }
    .car__product-card-img img {
        object-fit: cover;
        width: 3rem;
    }

    .car__product-left {
        display: flex;
    }

    .car__product-card-right {
        height: auto;
        cursor: pointer;
        width: 1.7rem;
        margin-right: 0.5rem;
    }
    .car__product-car-info-name {
        padding-top: 0rem;
        font-weight: 600;
        font-size: 1.2rem;
    }

    .car__product-car-info-price {
        font-weight: 400;
        margin: 0.5rem 0;
        font-size: 1.4rem;
        color: #695757;
    }

    .car__product-car-info .product-quantity {
        justify-content: start;
        margin: 0;
        font-size: 1rem;
    }
    .quantity-btn {
        width: 2rem;
        height: 2rem;
    }

    .car__product-car-info .product-quantity button,
    span {
        color: #000000;
        font-size: 1.2rem;
    }

    /* main-wrapper */

    /* Car footer */

    /* Footer */

    .footer-nav {
        display: none;
    }
}
