/* Mega navegación de categorías. Se apoya en la estructura nativa de Woodmart. */
/* El bloque Productos ya incluye su propio ancho de contenido: evitar el
   padding global de Woodmart solo para este desplegable. */
/* Woodmart aplica el padding al menú cuando no hay scroll y al contenedor
   interno cuando sí lo hay. Ambas variantes corresponden al mismo submenu. */
.wd-dropdown-menu.wd-design-full-width:not(.wd-scroll):has(.wd-nav-product-cat),
.wd-dropdown-menu.wd-design-full-width.wd-scroll:has(.wd-nav-product-cat) .wd-dropdown-inner {
    padding-block: 0 !important;
    padding-left: 0 !important;
}



@media (min-width: 1025px) {
    .wd-nav:not(.wd-nav-mobile) .botik-category-mega-menu > .wd-dropdown-menu .wd-sub-menu {
        display: grid;
        grid-template-columns: minmax(210px, 1fr) minmax(210px, 1fr) minmax(180px, .8fr) minmax(180px, .8fr);
        gap: 24px;
        align-items: start;
    }

    .wd-nav:not(.wd-nav-mobile) .botik-category-mega-menu .botik-nav-group,
    .wd-nav:not(.wd-nav-mobile) .botik-category-mega-menu .botik-nav-promo {
        width: auto !important;
        max-width: none !important;
        padding: 0 !important;
    }

    .wd-nav:not(.wd-nav-mobile) .botik-category-mega-menu .botik-nav-group > .woodmart-nav-link {
        margin-bottom: 12px;
        padding: 0 0 9px;
        border-bottom: 1px solid var(--brdcolor-gray-300);
        color: var(--color-gray-900);
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: .03em;
    }

    .wd-nav:not(.wd-nav-mobile) .botik-category-mega-menu .botik-nav-group > .sub-sub-menu {
        position: static;
        display: block;
        min-width: 0;
        padding: 0;
        visibility: visible;
        opacity: 1;
        transform: none;
        box-shadow: none;
    }

    .wd-nav:not(.wd-nav-mobile) .botik-category-mega-menu .botik-nav-category-link > a {
        padding: 6px 0;
        line-height: 1.35;
    }

    /* El menú desktop actual usa el widget de categorías dentro de un HTML Block. */
    .wd-nav-product-cat {
        position: relative;
    }

    .wd-nav-product-cat .botik-category-mega-node {
        position: static;
    }

    .wd-nav-product-cat .botik-category-mega-node > .botik-category-panels {
        display: grid;
        grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(200px, .85fr) minmax(230px, 1fr);
        gap: clamp(28px, 3vw, 52px);
        top: calc(100% - 2px);
        right: auto;
        left: calc((101% - 100vw) / 2);
        width: 100vw;
        margin-top: 0px !important;
        max-width: none;
        max-height: min(72vh, 660px);
        margin: 0;
        padding: 32px clamp(32px, 4vw, 72px);
        overflow-x: hidden;
        overflow-y: auto;
        border-radius: 0;
        border-top: 1px solid var(--brdcolor-gray-300);
        box-shadow: 0 8px 18px rgba(0, 0, 0, .08);
        box-sizing: border-box;
        transform: none;
    }

    .wd-nav-product-cat .botik-category-mega-node > .botik-category-panels:not(:has(.botik-nav-group-need)),
    .wd-nav-product-cat .botik-category-mega-node > .botik-category-panels:not(:has(.botik-nav-group-type)) {
        grid-template-columns: minmax(300px, 1.35fr) minmax(210px, .9fr) minmax(240px, 1.05fr);
    }

    .wd-nav-product-cat .botik-category-panels > li {
        width: auto;
        min-width: 0;
        padding: 0;
    }

    .wd-nav-product-cat .botik-nav-group-title {
        display: block;
        margin-bottom: 10px;
        padding: 0 0 9px;
        border-bottom: 1px solid currentColor;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: .03em;
        opacity: .95;
    }

    .wd-nav-product-cat .botik-nav-group-links {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .wd-nav-product-cat .botik-nav-group-links a {
        display: block;
        padding: 8px 0;
        line-height: 1.35;
    }

}

.botik-nav-promo-link {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start !important;
    gap: 7px;
    padding: 0 !important;
    white-space: normal;
}

.botik-nav-promo-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--wd-brd-radius);
    object-fit: cover;
    transition: transform .25s ease;
}

.botik-nav-promo-link:hover .botik-nav-promo-image {
    transform: scale(1.015);
}

.botik-nav-promo-label {
    color: var(--color-gray-500);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.botik-nav-promo-title {
    color: var(--color-gray-900);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.botik-nav-category-reference-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.botik-nav-product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: center;
}

.botik-nav-product-image-link {
    display: block;
    width: 100%;
}

/* Solo la imagen promocional del producto: no recorta el arte provisto. */
.botik-nav-product-card .botik-nav-promo-image {
    object-fit: contain;
}

.botik-nav-product-title {
    color: var(--color-gray-900);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.botik-nav-product-price {
    color: var(--color-gray-900);
    font-size: 14px;
    font-weight: 700;
}

.botik-nav-buy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 16px;
    border: 1px solid var(--wd-primary-color);
    color: var(--wd-primary-color) !important;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}

.botik-nav-product-card .botik-nav-buy-button,
.botik-nav-category-reference-card .botik-nav-reference-button {
    align-self: center;
}

.botik-nav-buy-button:hover {
    background: var(--wd-primary-color);
    color: #fff !important;
}

.botik-nav-reference-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 16px;
    background: var(--wd-primary-color);
    color: #fff !important;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: opacity .2s ease;
}

.botik-nav-reference-button:hover {
    color: #fff !important;
    opacity: .86;
}

@media (max-width: 1024px) {
    .wd-nav-mobile .botik-nav-group > .woodmart-nav-link {
        background: var(--bgcolor-gray-100);
        font-weight: 600;
        /* text-transform: uppercase; */
        letter-spacing: .025em;
    }

    .wd-nav-mobile .botik-nav-category-link > .woodmart-nav-link {
        padding-inline-start: 30px;
    }

    .wd-nav-mobile .botik-nav-promo {
        padding: 12px 20px;
    }

    .wd-nav-mobile .botik-nav-promo-image {
        max-height: 150px;
    }

    .wd-nav-mobile .botik-nav-category-reference-card {
        padding: 12px 20px;
    }
}

@media (max-width: 1200px) and (min-width: 1025px) {
    .wd-nav:not(.wd-nav-mobile) .botik-category-mega-menu > .wd-dropdown-menu .wd-sub-menu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wd-nav-product-cat .botik-category-mega-node > .botik-category-panels {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
        padding: 26px 30px;
    }

    .wd-nav-product-cat .botik-category-mega-node > .botik-category-panels:not(:has(.botik-nav-group-need)),
    .wd-nav-product-cat .botik-category-mega-node > .botik-category-panels:not(:has(.botik-nav-group-type)) {
        grid-template-columns: minmax(270px, 1.25fr) minmax(190px, .9fr) minmax(220px, 1fr);
    }
}
