/*
** modal-filters-style.css
** Filtros de tienda: panel up/side, acordeón de widgets, pastillas activas.
*/

/* ── Layout general ──────────────────────────────────────────────────────── */

.widget-content.wrap-toc.active.filtering-modal-cols {
    width: 100%;
}

#carga {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

#carga.up aside.shop-sidebar {
    width: 100% !important;
}

#carga.up .entry-toc {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    gap: 24px;
}

/* ── Modo side: sidebar oculto por defecto, visible con body.ymk-sidebar-open ── */

@media (min-width: 769px) {
    #carga.side {
        --ymk-sidebar-col: 0px;
        display: grid !important;
        grid-template-columns: var(--ymk-sidebar-col) 1fr;
        grid-template-rows: auto;
        align-items: start;
        transition: grid-template-columns .25s ease;
    }
}

body.ymk-sidebar-open #carga.side {
    --ymk-sidebar-col: 240px;
}

@media (min-width: 1025px) {
    body.ymk-sidebar-open #carga.side {
        --ymk-sidebar-col: 280px;
    }
}

#carga.side aside.shop-sidebar {
    overflow: hidden;
    width: 100%;
    height: 0;
    transition: height .25s ease;
}

body.ymk-sidebar-open #carga.side aside.shop-sidebar {
    height: auto;
}

/* ── Barra de filtros (modo side) ────────────────────────────────────────── */

.ymk-filter-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    margin-bottom: 1rem;
}

.ymk-filter-bar p.woocommerce-result-count {
    flex: 1;
    margin: 0;
    padding: 0;
}

.ymk-toc-opener {
    display: flex;
    align-items: center;
    gap: .4rem;
    background: none;
    border: var(--button--border-width) solid currentColor;
    border-radius: var(--button--border-radius);
    padding: var(--button--padding-vertical) var(--button--padding-horizontal);
    font-size: var(--button--font-size);
    font-weight: var(--button--font-weight);
    font-family: var(--button--font-family);
    cursor: pointer;
    line-height: 1;
    white-space: nowrap;
    transition: background .15s, color .15s;
}

body.ymk-sidebar-open .ymk-toc-opener {
    background: var(--button--color-background, #111);
    color: var(--button--color-text, #fff);
    border-color: transparent;
}

.ymk-toc-opener svg {
    width: 1.1em;
    height: 1.1em;
}

@media (max-width: 767px) {
    #carga.side aside.shop-sidebar {
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }

    body.ymk-sidebar-open #carga.side aside.shop-sidebar {
        width: 100%;
    }

    #carga.side {
        flex-direction: column;
    }
}

body.ymk-filters-side .widget.woocommerce.reset {
    display: none;
}

#carga.side > ul.products {
    min-width: 0;
}

#carga.side .entry-toc.side .open-toc {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 1rem;
}

#carga.side .entry-toc.side .widget {
    width: 100%;
    box-sizing: border-box;
}

/* ── Widgets ─────────────────────────────────────────────────────────────── */


@media (max-width: 1224px) {
    .carga.up .shop-sidebar.ymk-sidebar .widget:nth-of-type(n + 2) {
        display: none;
    }
}

 .widget.woocommerce.reset.up {
    display: flex !important;
}

.ymk-sidebar .open-toc.footer-widgets.active {
    justify-content: flex-end;
    display: flex;
    margin-top: calc(0 * var(--global--spacing-vertical));
    margin-bottom: calc(0 * var(--global--spacing-vertical));
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    box-sizing: border-box;
    max-width: none;
    align-content: flex-start;
}

.ymk-sidebar .widget, .widget.woocommerce.reset {
    border: var(--button--border-width) solid transparent;
    border-radius: var(--button--border-radius);
    cursor: pointer;
    font-weight: var(--button--font-weight);
    font-family: var(--button--font-family);
    color: white;
    font-size: var(--button--font-size);
    line-height: var(--button--line-height);
    padding: var(--button--padding-vertical) var(--button--padding-horizontal);
    text-decoration: none;
    transition: box-shadow 0.2s ease-in-out;
    background: #dedede;
}

.ymk-sidebar .widget:not(:last-of-type) {
    border-bottom: 1px solid #98989842;
}

.filtering-modal-cols.ymk-sidebar .widget {
    margin: 0;
    padding: 24px 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

/* ── Títulos de widget, result-count y toc-opener ────────────────────────── */

.ymk-sidebar .widget .widget-title, p.woocommerce-result-count, a.toc-opener {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    color: var(--header--color-text);
    text-decoration: none !important;
    /* background-color: var(--wp--preset--color--buttonacti) !important; */
    /* border-color: var(--wp--preset--color--buttonacti) !important; */
    /* color: var(--wp--preset--color--buttonacti) !important; */
    justify-content: space-between;
    font-weight: var(--button--font-weight)
600;
    font-family: var(--button--font-family);
    font-size: var(--button--font-size);
    line-height: var(--button--line-height);
    height: var(--button--font-size);
}

a.toc-opener {
    gap: 0.5rem;
}

a.toc-opener::before {
    content: "Todos los filtros";
    line-height: 0;
    margin-right: 0.7rem;
}

a.toc-opener::after {
    content: "\e429"; /* filter_list */
    font-family: 'Material Icons';
    font-size: 24px;
    font-weight: 100;
    line-height: 0;
    order: 1;
}

body.side a.toc-opener::after {
    position: absolute;
}

@media (max-width: 1024px){
  .up .shop-sidebar .widget:not(.reset):nth-of-type(n + 2) {
    display: none;
  }
}

@media (max-width: 768px) {
    a.toc-opener::before {
        content: none;
    }

    .widget.woocommerce.reset.hidden {
        padding: 0.5rem 1rem !important;
    }
}

/* ── Flecha acordeón ─────────────────────────────────────────────────────── */

.ymk-sidebar .widget .widget-title::after {
    font-family: 'Material Icons';
    font-size: 24px;
    font-weight: 100;
}

.ymk-sidebar .widget.show .widget-title::after {
    content: "\e5ce"; /* expand_less */
}

.ymk-sidebar .widget.hidden .widget-title::after {
    content: "\e5cf"; /* expand_more */
}

.ymk-sidebar .widget.show .widget-title {
    margin-bottom: 1.2rem;
}

.widget.woocommerce.reset .widget-title::after {
    content: none !important;
}

/* ── Contenido oculto de widgets ─────────────────────────────────────────── */

.ymk-sidebar .widget.hidden :is(form, ul, .tagcloud) {
    display: none;
}

/* ── Widget reset (toc-opener) ───────────────────────────────────────────── */

.entry-toc:not(.up) .widget.woocommerce.reset {
    display: none;
}

.widget.woocommerce.reset .widget-title a.toc-opener,
.widget.woocommerce.reset.show .widget-title {
    width: 100%;
    position: relative;
    margin: 0 !important;
}

.widget.woocommerce.reset .widget-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 25px;
}

/* ── Links de layered nav ────────────────────────────────────────────────── */

.widget_layered_nav ul,
.widget_layered_nav_filters ul {
    margin: 0;
}

li.wc-layered-nav-term,
li.widget_layered_nav_filters {
    display: flex;
    align-items: center;
    font-size: 1rem;
    color: #00000085;
}

.ymk-sidebar .widget li a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 4;
    flex-wrap: nowrap;
    width: 100%;
    font-size: 14px;
    font-weight: 400;
    color: var(--header--color-text);
    text-decoration: none !important;
}

.ymk-sidebar .widget ul li a,
.ymk-sidebar .widget_product_tag_cloud.woocommerce a {
    padding-block: 10px;
}

.ymk-sidebar li.chosen a,
.ymk-sidebar ul.product-categories > li > a {
    font-weight: 800;
}

.ymk-sidebar ul.product-categories ul.children {
    margin: 0;
    padding: 0;
}

.ymk-sidebar span.count {
    font-size: 0;
}

li.chosen {
    position: relative;
}

/* Icono check/uncheck */
.widget_layered_nav li a:not(.color)::before,
.widget_layered_nav_filters li a::before,
ul.product-categories li a::before,
.widget_product_tag_cloud.woocommerce a::before {
    content: "\e836"; /* check_box_outline_blank */
    font-family: 'Material Icons';
    font-size: 24px;
    font-weight: 100;
    font-style: normal;
    flex: 0;
    display: inline-block;
    line-height: normal;
    position: inherit !important;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

.widget_layered_nav li.chosen a::before,
.widget_layered_nav_filters li.chosen a::before,
ul.product-categories li.current-cat a::before,
.widget_product_tag_cloud.woocommerce a.chosen::before {
    content: "\e837" !important; /* check_box */
    color: var(--wp--preset--color--buttonacti) !important;
}

/* Modo modal lateral: chevron en lugar de checkbox */
.filtering-modal-cols.ymk-sidebar :is(
    li a:not(.color),
    .widget_product_tag_cloud.woocommerce a
)::after {
    content: "\e835"; /* chevron_right */
    font-family: 'Material Icons';
    font-size: 24px;
    font-weight: 100;
    position: absolute;
    right: 0;
    line-height: normal;
}

.filtering-modal-cols.ymk-sidebar :is(
    .widget_layered_nav li.chosen a:not(.color),
    .widget_layered_nav_filters li.chosen a,
    ul.product-categories li.current-cat a,
    li.chosen a:not(.color)
)::after {
    content: "\e834" !important; /* check */
    color: var(--wp--preset--color--buttonacti) !important;
}

/* Limpiar ::before en modo modal */
.filtering-modal-cols.ymk-sidebar :is(
    .widget_layered_nav li a:not(.color),
    .widget_layered_nav_filters li a,
    ul.product-categories li a,
    .widget_product_tag_cloud a,
    .widget.woocommerce li a,
    .widget_product_tag_cloud.woocommerce a
)::before {
    content: "" !important;
    gap: 0;
}

/* ── Filtro de precio ────────────────────────────────────────────────────── */

.widget_price_filter button {
    display: none;
}

.widget_price_filter .price_slider_amount {
    text-align: left;
}

.widget_price_filter .ui-slider .ui-slider-handle {
    border: 3px solid white;
    background-color: var(--header--color-text);
}

.widget_price_filter .ui-slider .ui-slider-range {
    background-color: var(--header--color-text);
    border-radius: 1em;
    border: 0;
    pointer-events: none !important;
}

.widget_price_filter .price_slider_wrapper .ui-widget-content {
    background-color: var(--branding--color-text);
    border-radius: 1em;
    border: 0;
}

.widget_price_filter input#min_price,
span.ui-slider-handle.ui-corner-all.ui-state-default:first-of-type {
    pointer-events: none !important;
}

span.ui-slider-handle.ui-corner-all.ui-state-default:first-of-type {
    display: none;
}

.price_label {
    line-height: 0.5;
    margin-top: 1.3rem;
}

.price_label span.from {
    font-size: 0;
}

.price_label span.to {
    font-size: 1rem;
}

.price_label span.to::before {
    content: "max: ";
}

/* ── Pastillas de filtros activos ────────────────────────────────────────── */

ul.reset-filters {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

ul.reset-filters.up {
    overflow-x: auto;
    overflow-y: hidden;
    -ms-overflow-style: none;
    width: 100%;
    padding-bottom: 2.25rem;
    flex-wrap: nowrap;
}

ul.reset-filters.up::-webkit-scrollbar {
    display: none;
}

ul.reset-filters.side {
    margin: 2rem 0;
}

a.reset {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    width: max-content;
    padding: var(--button--padding-vertical) calc(var(--button--padding-horizontal) / 2);
    font-family: var(--button--font-family);
    font-size: small;
    line-height: 1;
    color: var(--global--color-primary) !important;
    border: 1px solid var(--global--color-primary);
    border-radius: var(--button--border-radius);
    text-decoration: none !important;
}

a.reset:hover {
    background: var(--global--color-primary);
    color: white !important;
}

li.chosen a.reset::before {
    content: "\e5cd"; /* close */
    font-family: 'Material Icons';
    font-size: 14px;
    margin-right: 7px;
}

a.reset-all {
    font-weight: 600;
}

/* ── Contador de resultados ──────────────────────────────────────────────── */

p.woocommerce-result-count {
    /* font-size: initial; */
    /* padding-top: 0; */
    /* margin-right: 1rem; */
    /* margin-bottom: var(--global--spacing-vertical); */
    padding: 0;
    margin: 0;
    flex: 1;
}



/* v2 */
