/*  1. CONTENEDORES PRINCIPALES Y TÍTULOS */

:is(.elementor-widget-wd_sidebar, .widget-area) .sidebar-widget {
    padding: 20px;
    background: #fff;
    border: 1px solid #dedede;
    border-radius: 10px;
}

:is(.elementor-widget-wd_sidebar, .widget-area) .sidebar-widget .widget-title,
.woodmart-brands-filter h2 {
    margin-bottom: 0;
    color: var(--e-global-color-secondary);
    font-size: 1.15rem !important;
    font-weight: 700;
    border-radius: 10px;
}

/*  2. WIDGET: CATEGORÍAS DE PRODUCTOS */

:is(.elementor-widget-wd_sidebar, .widget-area) .sidebar-widget .product-categories > li > a {
    display: block;
    position: relative;
    padding: 10px 20px;
    border-bottom: 1px solid #d9d9d9;
    color: #333;
    font-size: 14px;
    line-height: 19px;
}

:is(.elementor-widget-wd_sidebar, .widget-area) .sidebar-widget .product-categories > li:last-child > a {
    border: none;
}

:is(.elementor-widget-wd_sidebar, .widget-area) .sidebar-widget .product-categories li > a:before {
    content: "";
    position: absolute;
    top: 15px;
    left: 0;
    width: 8px;
    max-width: 10px;
    height: 8px;
    border: 1px solid var(--e-global-color-primary) !important;
    border-radius: 50%;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
}

:is(.elementor-widget-wd_sidebar, .widget-area) .sidebar-widget .product-categories li > a:hover:before,
:is(.elementor-widget-wd_sidebar, .widget-area) .sidebar-widget .product-categories li.current-cat > a:before {
    background: var(--e-global-color-primary) !important;
}

:is(.elementor-widget-wd_sidebar, .widget-area) .widget_product_categories .children a {
    padding-inline-start: 20px;
}

:is(.elementor-widget-wd_sidebar, .widget-area) .widget_product_categories .wd-cats-toggle {
    inset-inline-end: 0;
}

/* 4. WIDGET: FILTRO DE MARCAS (WOODMART BRANDS) */

.woodmart-brands-filter {
    margin-top: -20px;
    margin-bottom: -15px;
}

.brand-list {
    max-height: 300px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.brand-list.expanded {
    max-height: none;
}

.brand-item {
    display: flex;
    align-items: center;
}

.brand-hidden {
    display: none;
}

.brand-list.expanded .brand-hidden {
    display: flex;
}

.brand-label {
    display: flex;
    align-items: center;
    gap: 10px;
    width: -webkit-fill-available;
}

.brand-label .campo_datos {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    width: -webkit-fill-available;
}

.brand-name {
    font-size: 14px;
}

.brand-image img.brand-thumbnail {
    width: 60px;
    height: 40px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 4px;
}

.brand-image-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    border: 1px solid #eee;
    border-radius: 4px;
    color: #999;
    font-size: 12px;
}

/* 5. BOTONES Y ACCIONES */

.botones_brand {
    display: inline-flex;
    align-items: stretch;
    gap: 15px;
    width: -webkit-fill-available;
    margin-top: 10px;
}

.show-more-brands {
    display: flex;
    justify-content: center;
    align-items: center;
    width: -webkit-fill-available;
    padding: 5px;
    color: #282828;
    border: 1px solid #eee;
    border-radius: 50px;
    text-decoration: none;
}

.show-more-brands:hover {
    color: #000;
    border-color: #000;
}

/* Botón estándar (Woodmart btn) */

.woodmart-btn {
    display: flex;
    width: -webkit-fill-available;
    padding: 10px 20px;
    background-color: var(--e-global-color-secondary);
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
}

.woodmart-btn:hover {
    background-color: var(--e-global-color-primary);
    color: #fff;
}

/* ==============================> ESTILOS FILTRO DE MARCAS */

.filtro-marcas-wrapper {
    display: flex;
    overflow-x: auto;
    scrollbar-width: thin;
    flex-direction: column;
    height: 350px;
    border: 1px solid #d5dfe4;
    padding: 20px;
    border-radius: var(--wd-form-brd-radius);
    padding-bottom: 20px !important;
}

.filtro-marcas-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    border-bottom: 1px solid #e3e3e3;
    padding: 6px 4px;
    border-radius: 0;
    transition: border-color 0.3s ease;
    flex-shrink: 0;
}

.filtro-marcas-imgbox {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filtro-marcas-imgbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.filtro-marcas-title {
    font-size: 14px;
    color: #333;
    transition: color 0.3s ease;
}

/* Hover */
.filtro-marcas-item:hover {
    border-color: var(--e-global-color-primary);
}

.filtro-marcas-item:hover .filtro-marcas-title {
    color: var(--e-global-color-primary);
}

/* Responsive */
@media (max-width: 767px) {
    .filtro-marcas-item {
        padding: 6px 10px;
        gap: 8px;
    }

    .filtro-marcas-title {
        font-size: 13px;
    }

    .filtro-marcas-imgbox {
        width: 30px;
        height: 30px;
    }
}