body {
    font-family: "Inter", Verdana, sans-serif;
    line-height: 2em;
    background-color: #ffffff;
}

/* Componentes */

main {
    min-height: 100vh;
}

h2 {
    font-size: 2.5em;
    margin-bottom: 0.25em;
}

h3 {
    font-size: 1.8em;
}

button {
    cursor: pointer;
}

a.btn,
.btn {
    text-align: center;
    padding: 1em 2em;
    background-color: #02020b;
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 4px;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.25);
    border: none;
    transition: all 0.2s;
}

a.btn:hover,
.btn:hover {
    background-color: #02020b64;
    transform: scale(1.01);
    color: #02020b;
    box-shadow: 3px 3px 5px 2px rgba(0, 0, 0, 0.25);
    transition: all 0.2s;
}

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

.ad {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2em;
}

.ad a {
    width: 100%;
}

.bold {
    font-weight: bold;
}

.icon {
    cursor: pointer;
}

.menu-categories {
    position: fixed;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    padding: 3em 5em;
    background-color: #fff;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    gap: 1em;
    transform: translateX(-100%);
    transition: all 0.2s;
}

.menu-categories.active {
    transform: translateX(0);
    transition: all 0.2s;
}

.menu-categories .categories-list {
    width: 100%;
    overflow-y: auto;
}

.menu-categories .categories-list ul a {
    width: 100%;
    margin-bottom: 1em;
    border-bottom: rgba(0, 0, 0, 0.25) 1px solid;
    transition: all 0.2s;
}

.menu-categories .categories-list ul a:hover {
    border-bottom: rgba(0, 0, 0, 0.1) 1px solid;
    transition: all 0.2s;
}

.menu-categories .categories-list ul a li {
    transform: translateX(0);
    transition: all 0.2s;
}

.menu-categories .categories-list ul a:hover li {
    transform: translateX(0.1em);
    transition: all 0.2s;
}

.category-item {
    width: 100%;
}

.category-title {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.toggle-subcategories {
    background: none;
    border: none;
    font-size: 18px;
    font-weight: bold;
    position: relative;
    right: 0;
    cursor: pointer;
}

.subcategory-list {
    max-height: 0;
    margin-left: 1em;
    padding-left: 0.75em;
    border-left: 2px solid #ccc;
    transition: all 0.2s ease;
}

.category-item.open > .subcategory-list {
    max-height: 1000px;
    transition: all 0.2s ease;
}

/* El <ul> interno debe tener overflow: hidden */
ul.subcategory-list {
    overflow: hidden;
    min-height: 0; /* Necesario para que funcione el grid con fr */
}

.subcategory-list li a {
    text-decoration: none;
    color: #555;
    font-weight: bold;
}

.subcategory-list li a:hover {
    text-decoration: underline;
}

.toggle {
    position: absolute;
    top: 1em;
    right: 1em;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle:hover {
    transform: rotate(180deg);
    transition: all 0.2s;
}

.search-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 3em 5em;
    background-color: #fff;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    gap: 1em;
    transform: translateY(-100%);
    transition: all 0.2s;
}

.search-bar.active {
    transform: translateY(0);
    transition: all 0.2s;
}

.search-bar form {
    width: 70%;
    position: relative;
}

.search-bar form input {
    width: 100%;
    padding: 0.75em 1em;
    border-radius: 4px;
    border: none;
}

.search-bar form button {
    position: absolute;
    color: #fff;
    top: 0;
    right: 0;
    height: 100%;
    border: none;
    padding: 0.75em 1em;
    border-radius: 0 4px 4px 0;
    background-color: #02020b;
    font-weight: bold;
    transition: all 0.2s;
}

.search-bar form button:hover {
    background-color: #02020b64;
    color: #02020b;
    transition: all 0.2s;
}

.search-bar #results-container {
    width: 100%;
    max-height: 50vh;
    overflow-y: auto;
}

.search-bar #results-container a {
    display: flex;
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
    margin-bottom: 1em;
    transition: all 0.2s;
}

.search-bar #results-container a:hover {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background-color: rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.search-bar #results-container a .box-img {
    width: 8em;
    height: 8em;
}

.search-bar #results-container a .box-text {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: column;
    padding: 1em 2em;
    flex: 1;
    min-width: 0;
}

.product-description {
    text-overflow: ellipsis;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    width: 100%;
    height: 8em;
    text-wrap: auto;
}

.cart-preview {
    position: fixed;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    padding: 3em 5em;
    background-color: #fff;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    gap: 1em;
    transform: translateX(100%);
    transition: all 0.2s;
}

.cart-preview.active {
    transform: translateX(0);
    transition: all 0.2s;
}

.cart-preview .cart-items {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: column;
    gap: 2em;
    overflow-y: auto;
}

.cart-preview .cart-items .cart-item {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}

.cart-preview .cart-items .cart-item .box-img {
    width: 20%;
}

.cart-preview .cart-items .cart-item .remove-item {
    position: absolute;
    top: 0;
    right: 0;
    transform: translateY(100%);
    background-color: #02020b;
    padding: 0.3em;
    border-radius: 100%;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.cart-preview .cart-items .cart-item .remove-item:hover {
    background-color: #02020b64;
    transition: all 0.2s;
}

.cart-preview .cart-items .cart-item .remove-item svg {
    fill: #fff;
    transition: all 0.2s;
}

.cart-preview .cart-items .cart-item .remove-item:hover {
    fill: #02020b;
    transition: all 0.2s;
}

.cart-preview .cart-total {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1em;
    margin-top: auto;
}

.product-modal {
    position: fixed;
    top: 15%;
    left: 25%;
    width: 50%;
    height: 70vh;
    padding: 2em 3em;
    background-color: #f5f5f5;
    overflow: auto;
    transform: translateX(-150%);
    transition: all 0.2s;
}

.product-modal.active {
    transform: translateX(0);
    transition: all 0.2s;
}

.product-modal .product {
    width: 100%;
    align-items: center;
    flex-direction: column;
}

.product-modal .product .product-details {
    width: 90%;
}

.modal {
    z-index: 500;
}

.modal-rounded {
    border-radius: 12px;
    overflow: hidden;
}

.quantity {
    position: relative;
    min-width: 25%;
    max-width: 50%;
}

.quantity input {
    width: 100%;
    height: 100%;
    border: 1px solid #02020b;
    text-align: center;
    padding: 0.5em 1em;
    border-radius: 50px;
    margin: 0;
}

.quantity input:focus-visible {
    outline: none;
}

.quantity button {
    height: 100%;
    font-weight: bold;
    position: absolute;
    border: none;
    padding: 0.5em 1em;
    color: #fff;
    background-color: #02020b;
}

.quantity .minus {
    top: 0;
    left: 0;
    border-radius: 100% 0 0 100%;
}

.quantity .plus {
    top: 0;
    right: 0;
    border-radius: 0 100% 100% 0;
}

.size-options {
    display: flex;
    gap: 0.5em;
}

.product-options input {
    display: none;
}

.product-options label {
    padding: 0.5em 1em;
    border: 1px solid #02020b;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.product-options label:hover {
    background-color: #02020b64;
    transition: all 0.2s;
}

.product-options input:checked + label {
    background-color: #02020b;
    color: #fff;
    transition: all 0.2s;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    transform: translateX(-100%);
    opacity: 0;
    z-index: 300;
}

.overlay.active {
    opacity: 1;
    transform: translateX(0);
}

.checkout-modal {
    position: fixed;
    top: 25%;
    left: 35%;
    width: 30%;
    height: 60vh;
    padding: 2em 3em;
    background-color: #f5f5f5;
    overflow: auto;
    transform: translateX(-250%);
    transition: all 0.2s;
}

.checkout-modal.active {
    transform: translateX(0);
    transition: all 0.2s;
}

.checkout-modal .checkout {
    width: 100%;
    height: 100%;
}

.checkout-modal .checkout form {
    height: 90%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-direction: column;
    gap: 1em;
}

.checkout-modal .checkout form input,
.checkout-modal .checkout form select {
    width: 100%;
    padding: 0.5em 0.75em;
}

.checkout-modal .checkout form .btn {
    width: 100%;
    margin-top: auto;
}

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.opacinner {
    width: 50%;
    animation: opacity 2s linear infinite;
}

.opacinner img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes opacity {
    0% {
        opacity: 0;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 0;
        transform: scale(1);
    }
}

.modal-icon {
    position: relative;
}

.counter {
    position: absolute;
    background: #02020b;
    padding: 0.25em;
    border-radius: 50%;
    height: 1em;
    width: auto;
    top: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.counter.light {
    background: #fff;
}

.counter.light .counter-items {
    color: #02020b;
}

.counter .counter-items {
    color: #fff;
    font-size: 0.85em;
    font-weight: bold;
}

/* Header */

header {
    position: sticky;
    top: 0;
    left: 0;
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 1.5em 3em;
    background-color: #fff;
    box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2em;
}

.header-section.logo {
    width: 20%;
    margin: auto;
}

.header-section.logo .box-img {
    width: 100%;
    height: 3em;
}

nav {
    width: 100%;
    height: 9vh;
    position: fixed;
    bottom: 0;
    left: 0;
    padding: 0.5em 1em;
    background-color: #02020b;
    color: #fff;
    z-index: 1000;
    display: none;
}

nav ul {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
}

nav ul a {
    width: 20%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

nav ul a svg {
    fill: #fff;
}

nav ul a li {
    width: 100%;
}

/* Slider */

.slider {
    aspect-ratio: 3/1;
    margin-bottom: 2em;
}

.slider .keen-slider {
    width: 100%;
    height: 100%;
}

.slider .box-img {
    width: 100%;
    height: 100%;
    position: relative;
}

.slider .box-img img {
    object-fit: fill;
    position: relative;
    z-index: 0;
}

.slider .slide-content {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin: 0 auto;
}

.slider .slide-content .product-info {
    width: 100%;
    height: 100%;
    padding: 2em 3em;
    display: flex;
    color: #fff;
    text-align: center;
    justify-content: center;
    gap: 3em;
    align-items: center;
    flex-direction: column;
    position: absolute;
    z-index: 2;
    display: none;
}

.slider .slide-content .product-info .product-title {
    font-size: 2.5em;
    font-weight: bold;
    text-overflow: ellipsis;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    width: 100%;
}

.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
    font-size: 20px;
    user-select: none;
    transition: background 0.3s;
}

.arrow:hover {
    background: rgba(0, 0, 0, 0.8);
}

.arrow-left {
    left: 10px;
}

.arrow-right {
    right: 10px;
}

/* Categorías */

.categorias {
    width: 70%;
    margin: auto auto 2em auto;
    padding: 2em 0;
}

.categorias-slider {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.categorias-slider .keen-slider__slide {
    position: relative;
    display: flex;
    overflow: hidden;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    aspect-ratio: 1/1;
}

.categorias-slider .categoria-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.categorias-slider .categoria-nombre {
    font-weight: 600;
    text-align: center;
    font-size: 0.9em;
}

.categoria-imagen {
    height: 100%;
    border-radius: 100%;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.categoria-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Productos */

.productos {
    width: 70%;
    margin: auto auto 2em auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 2em;
}

.productos .productos-list {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1em;
}

.productos .producto {
    width: 23%;
    margin-bottom: 2em;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    height: 25em;
    padding: 0.5em;
    overflow: hidden;
    transition: all 0.2s;
}

.productos .producto:hover {
    transform: scale(1.01);
    transition: all 0.2s;
}

.productos .producto .box-img {
    position: relative;
    margin-bottom: 0.5em;
    width: 100%;
    height: 15em;
}

.productos .producto .icons {
    position: absolute;
    bottom: 2.5%;
    right: 2.5%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 0.5em;
    z-index: 1;
}

.productos .producto .icons span {
    background-color: #02020b;
    padding: 0.3em;
    border-radius: 100%;
    cursor: pointer;
    transition: all 0.2s;
}

.productos .producto .icons span:hover {
    background-color: #02020b64;
    transition: all 0.2s;
}

.productos .producto .icons span svg {
    fill: #fff;
}

.productos .producto .producto-info {
    width: 100%;
    padding: 0.5em 1em;
    text-align: center;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.95em;
}

.productos .producto .producto-precio {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.5em;
}

.midline {
    color: tomato;
    text-decoration: line-through;
    opacity: 0.5;
}

/* Siguenos */

.siguenos {
    width: 100%;
    margin: auto auto 2em auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.siguenos h2 + p {
    font-size: 1.25em;
    color: #181818aa;
    text-align: center;
}

.siguenos .posts {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Footer */

footer {
    width: 100%;
    margin-bottom: 1em;
}

.footer-accordion {
    margin-bottom: 1em;
}

.accordion-item {
    border-top: 1px solid #ddd;
}

.accordion-header {
    background-color: #02020b;
    color: #fff;
    border: none;
    padding: 15px;
    width: 100%;
    text-align: left;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s;
}

.accordion-header:hover {
    background-color: #02020b64;
    transition: all 0.2s;
}

.accordion-content {
    max-height: 0;
    padding: 0;
    border-top: 1px solid #ddd;
    background-color: #fff;
    overflow: hidden;
    transition: all 0.2s;
}

.accordion-header.active + .accordion-content {
    max-height: 10em;
    padding: 1em;
    transition: all 0.2s;
}

footer .copy {
    text-align: center;
}

footer h6 {
    text-align: center;
    font-size: 0.5rem;
}

/*


PERFIL


*/

.perfil {
    width: 100%;
    padding: 2em 3em;
    margin: auto auto 2em auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.perfil-info {
    width: 70%;
    padding: 2em 3em;
    background-color: #f5f5f5;
    margin: auto auto 2em auto;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-direction: column;
}

.perfil-options {
    width: 70%;
    margin: auto auto 2em auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

/*


CATEGORIA


*/

.categoria-list {
    width: 100%;
    padding: 2em 3em;
    margin-bottom: 2em;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.categoria-list .filter-icon {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    align-self: flex-end;
    gap: 1em;
    margin-bottom: 1em;
}

.categoria-list .filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1em;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s;
}

.categoria-list .filters.active {
    opacity: 1;
    pointer-events: all;
    transition: all 0.2s;
}

.categoria-list .filter {
    opacity: 0.5;
}

.categoria-list .filter.active {
    opacity: 1;
}

.categoria-list .icon-filter {
    cursor: pointer;
}

/*


PRODUCTO


*/

.product {
    width: 70%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 2em;
    margin: 2em auto 2em auto;
}

.product-img {
    width: 50%;
}

.product-gallery {
    display: flex;
    flex-direction: column;
}

.product-main {
    width: 75%;
    margin-bottom: 1rem;
    margin-left: auto;
    margin-right: auto;
}

.product-thumbnails {
    position: relative;
    width: 100%;
}

.product-thumbnails .thumbnail {
    width: 80px;
    cursor: pointer;
}

.product-thumbnails .thumbnail img {
    width: 100%;
    height: auto;
}

.product-thumbnails .arrow {
    width: 30px;
    height: 30px;
    font-size: 14px;
    top: 50%;
    transform: translateY(-50%);
}

.product-details {
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-direction: column;
    gap: 1em;
}

.producto-precio {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.5em;
}

.product-cta {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1em;
}

.product-cta .btn {
    width: 100%;
}

@media screen and (max-width: 1080px) {
    body {
        font-size: 12px;
    }

    header {
        display: none;
    }

    nav {
        display: block;
    }

    main {
        margin-top: 6.5em;
    }

    section {
        width: 100%;
    }

    footer {
        margin-bottom: 5em;
    }

    .slider {
        aspect-ratio: 2/1;
    }

    .productos {
        width: 90%;
    }

    .categorias-slider .keen-slider__slide {
        width: 100%;
    }

    .modal {
        width: 100%;
        height: 79vh;
        top: 0;
        left: 0;
    }

    .modal.active {
        margin-top: 6em;
    }

    .modal.search-bar {
        height: auto;
        transform: translateY(0);
        padding: 1em 2em;
        box-shadow: 0.1em 0.1em 0.2em rgba(0, 0, 0, 0.1);
    }

    .modal.search-bar .toggle {
        display: none;
    }

    .productos .producto {
        width: 48%;
        margin: auto auto 2em auto;
    }

    .categoria-list .filter-icon {
        margin-bottom: 1em;
    }

    .product {
        flex-direction: column;
    }

    .product-main {
        width: 100%;
    }

    .product-img {
        width: 100%;
    }

    .product-details {
        width: 100%;
    }

    .search-bar form {
        width: 100%;
    }

    .arrow {
        display: none;
    }

    #wabutton a {
        bottom: 100px !important;
    }
}
