/*
 * ============================================================
 * MIL ESTILOS - NAVEGACIÓN DE CATEGORÍAS
 * ============================================================
 */


/* ============================================================
 * 1. EXPLORADOR VISUAL SUPERIOR
 * ============================================================
 */

body.tax-product_cat .me-category-explorer {
    width: 100%;
    padding: 26px 0 22px;
    background: #fff;
}

body.tax-product_cat .me-category-explorer__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

body.tax-product_cat .me-category-explorer__title {
    margin: 0;
    color: #171717;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 700;
}

body.tax-product_cat .me-category-explorer__hint {
    color: #8b8b8b;
    font-size: 12px;
}

body.tax-product_cat .me-category-explorer__rail {
    display: flex;
    gap: 14px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 10px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

body.tax-product_cat .me-category-card {
    flex: 0 0 142px;
    min-width: 142px;
    scroll-snap-align: start;

    display: flex;
    flex-direction: column;
    gap: 9px;

    color: #202020 !important;
    text-decoration: none !important;
}

body.tax-product_cat .me-category-card__media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    aspect-ratio: 1 / 1;

    padding: 10px;

    overflow: hidden;

    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;

    transition:
        transform .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

body.tax-product_cat .me-category-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

body.tax-product_cat .me-category-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 72%;
    height: 72%;

    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            #f8f8f8,
            #eeeeee
        );

    color: #aaa;
    font-size: 34px;
    font-weight: 700;
}

body.tax-product_cat .me-category-card__name {
    min-height: 34px;
    padding: 0 4px;

    text-align: center;

    color: #262626;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 600;
}

body.tax-product_cat .me-category-card:hover .me-category-card__media {
    transform: translateY(-2px);

    border-color: rgba(212, 164, 55, .55);

    box-shadow:
        0 8px 22px rgba(0, 0, 0, .08);
}

body.tax-product_cat .me-category-card:hover .me-category-card__name {
    color: #b9820e;
}


/* ============================================================
 * 2. ÁRBOL LATERAL
 * ============================================================
 */

body.tax-product_cat .me-catalog-tree {
    width: 100%;
    margin: 0 0 18px;
    padding: 20px;

    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
}

body.tax-product_cat .me-catalog-tree__title {
    margin: 0 0 15px;

    color: #191919;
    font-size: 17px;
    line-height: 1.25;
    font-weight: 700;
    text-transform: uppercase;
}

body.tax-product_cat .me-catalog-tree__back {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    margin-bottom: 12px;

    color: #666 !important;
    font-size: 12px;
    line-height: 1.3;
    text-decoration: none !important;
}

body.tax-product_cat .me-catalog-tree__back:hover {
    color: #b9820e !important;
}

body.tax-product_cat .me-catalog-tree__current {
    margin: 0 0 7px;
    padding: 10px 11px;

    background: #f7f7f7;
    border-left: 3px solid #d4a437;

    color: #202020;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 700;
}

body.tax-product_cat .me-catalog-tree__list,
body.tax-product_cat .me-catalog-tree__children {
    margin: 0;
    padding: 0;
    list-style: none;
}

body.tax-product_cat .me-catalog-tree__item {
    margin: 0;
    padding: 0;
}

body.tax-product_cat .me-catalog-tree__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    width: 100%;

    padding: 9px 4px;

    border-bottom: 1px solid #ededed;

    color: #343434 !important;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 500;
    text-decoration: none !important;

    transition:
        color .18s ease,
        padding-left .18s ease;
}

body.tax-product_cat .me-catalog-tree__link:hover {
    padding-left: 8px;
    color: #b9820e !important;
}

body.tax-product_cat .me-catalog-tree__item.is-current
> .me-catalog-tree__link {
    color: #b9820e !important;
    font-weight: 700;
}

body.tax-product_cat .me-catalog-tree__chevron {
    color: #aaa;
    font-size: 17px;
    line-height: 1;
}

body.tax-product_cat .me-catalog-tree__children {
    padding: 2px 0 5px 14px;
}

body.tax-product_cat .me-catalog-tree__children
.me-catalog-tree__link {
    padding-top: 7px;
    padding-bottom: 7px;

    border-bottom: 0;

    color: #6a6a6a !important;
    font-size: 12px;
    font-weight: 400;
}

body.tax-product_cat .me-catalog-tree__children
.me-catalog-tree__item.is-current
> .me-catalog-tree__link {
    color: #b9820e !important;
    font-weight: 700;
}


/* ============================================================
 * 3. RESPONSIVE
 * ============================================================
 */

@media (max-width: 991px) {

    body.tax-product_cat .me-category-explorer {
        padding: 18px 0 16px;
    }

    body.tax-product_cat .me-category-explorer__head {
        margin-bottom: 11px;
    }

    body.tax-product_cat .me-category-explorer__title {
        font-size: 17px;
    }

    body.tax-product_cat .me-category-explorer__hint {
        display: none;
    }

    body.tax-product_cat .me-category-explorer__rail {
        gap: 10px;
        padding-bottom: 6px;
    }

    body.tax-product_cat .me-category-card {
        flex-basis: 118px;
        min-width: 118px;
    }

    body.tax-product_cat .me-category-card__media {
        padding: 8px;
        border-radius: 10px;
    }

    body.tax-product_cat .me-category-card__name {
        min-height: 31px;
        font-size: 12px;
    }

    /*
     * En móvil este bloque entra dentro del drawer existente
     * de filtros de Mafoil.
     */
    body.tax-product_cat .sidebar-product .me-catalog-tree {
        margin-top: 8px;
        margin-bottom: 16px;
        padding: 16px;
        border-radius: 5px;
    }

    body.tax-product_cat .me-catalog-tree__title {
        font-size: 16px;
    }
}


@media (max-width: 480px) {

    body.tax-product_cat .me-category-explorer {
        padding-top: 15px;
    }

    body.tax-product_cat .me-category-card {
        flex-basis: 108px;
        min-width: 108px;
    }

    body.tax-product_cat .me-category-card__name {
        font-size: 11.5px;
    }
}
