/* Filtros móvil: barra fija, chips y hoja inferior, según el diseño. */

.ams-fm { display: none; }

@media (max-width: 767px) {

.ams-fm { display: block; }

/* ---------- barra fija ---------- */

/* La barra queda fija mientras se recorre el catalogo. Lo pegajoso va en el
   envoltorio del widget y no en la barra: `sticky` solo se despega dentro de la
   caja de su padre, y el padre de la barra mide lo mismo que ella. El envoltorio,
   en cambio, es hermano de la grilla, asi que la barra acompana todo el listado. */
.elementor-widget-ams-filtros-movil {
    position: sticky;
    top: 56px;
    z-index: 40;
}

.ams-fm__barra {
    background: #F3F5FA;
    padding: 14px 20px 10px;
    margin: 0 -20px;
}

.ams-fm__botones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ams-fm__btn {
    background: #fff;
    font-family: "Barlow Condensed", "Barlow", sans-serif;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 13px 0;
    border-radius: 4px;
    cursor: pointer;
    line-height: 1;
}

.ams-fm__btn--filtros { border: 1px solid #16171A; color: #16171A; font-weight: 700; }
.ams-fm__btn--orden   { border: 1px solid #E2E5EC; color: #3E434C; font-weight: 600; }
/* con `background` explicito: el tema pinta los `button:hover` a su manera */
.ams-fm__btn:hover        { background: #fff; border-color: #F0500A; color: #F0500A; }
.ams-fm__btn:focus-visible { outline: 2px solid #F0500A; outline-offset: 2px; }

.ams-fm__cuenta:not(:empty) { margin-left: 6px; }

.ams-fm__resumen {
    margin: 10px 0 0;
    font-size: 13px;
    color: #6E737D;
}
.ams-fm__resumen strong { color: #16171A; }

/* ---------- chips de lo aplicado ---------- */

.ams-fm__chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0 2px;
    scrollbar-width: none;
}
.ams-fm__chips::-webkit-scrollbar { display: none; }
.ams-fm__chips[hidden] { display: none; }

.ams-fm__chip {
    flex: 0 0 auto;
    border: 1px solid #F0500A;
    background: #fff;
    color: #16171A;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 12px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}
.ams-fm__chip b { color: #F0500A; font-weight: 700; }
.ams-fm__chip:hover { background: #F0500A; color: #fff; }
.ams-fm__chip:hover b { color: #fff; }

/* ---------- la hoja ---------- */

.ams-fm__velo {
    position: fixed;
    inset: 0;
    z-index: 9990;
    background: rgba(16, 17, 20, .6);
    display: flex;
    align-items: flex-end;
}
.ams-fm__velo[hidden] { display: none; }

.ams-fm__hoja {
    width: 100%;
    background: #fff;
    border-radius: 10px 10px 0 0;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    animation: ams-fm-sube .22s ease;
}

@keyframes ams-fm-sube { from { transform: translateY(100%); } to { transform: none; } }

.ams-fm__cabecera {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #ECEEF3;
}

.ams-fm__titulo {
    font-family: "Barlow Condensed", "Barlow", sans-serif;
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1;
}

.ams-fm__acciones { display: flex; align-items: center; gap: 14px; }

.ams-fm__limpiar {
    border: 0; background: none; padding: 0;
    font-size: 13px; font-weight: 600; color: #F0500A;
    text-transform: uppercase; letter-spacing: .08em; cursor: pointer;
    line-height: 1;
}

.ams-fm__limpiar:hover { background: none; color: #16171A; }

.ams-fm__cerrar {
    width: 38px; height: 38px; border: 0;
    background: #F3F5FA; border-radius: 50%;
    cursor: pointer; color: #16171A;
    display: flex; align-items: center; justify-content: center;
    flex: 0 0 auto;
}

.ams-fm__cerrar:hover { background: #F0500A; color: #fff; }

/* el tema encoge los svg sueltos: la aspa necesita su tamano explicito */
.ams-fm__cerrar svg { width: 15px; height: 15px; flex: 0 0 auto; }

.ams-fm__cuerpo { flex: 1; overflow: auto; padding: 20px; }

.ams-fm__pie { padding: 14px 20px; border-top: 1px solid #ECEEF3; }

.ams-fm__ver {
    width: 100%; border: 0;
    background: #F0500A; color: #fff;
    font-family: "Barlow Condensed", "Barlow", sans-serif;
    font-size: 18px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    padding: 15px 0; border-radius: 4px; cursor: pointer;
    line-height: 1;
    transition: background .2s ease;
}

.ams-fm__ver:hover { background: #16171A; }

/* ---------- los filtros de JetSmartFilters, ya dentro de la hoja ---------- */

.ams-fm__grupo {
    padding-bottom: 20px;
    border-bottom: 1px solid #ECEEF3;
    margin-bottom: 20px;
}
.ams-fm__grupo:last-child { padding-bottom: 0; border-bottom: 0; margin-bottom: 0; }

.ams-fm__grupo .elementor-widget { width: 100%; max-width: none; }

/* el titulo de cada grupo */
.ams-fm__grupo .elementor-widget-heading { margin-bottom: 12px; }
.ams-fm__grupo .elementor-heading-title {
    font-family: "Barlow Condensed", "Barlow", sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: .16em !important;
    text-transform: uppercase !important;
    color: #8A8F99 !important;
    line-height: 1.2 !important;
}

/* la lista: sin scroll interno, que la hoja ya scrollea */
.ams-fm__grupo .jet-filter,
.ams-fm__grupo .jet-checkboxes-list,
.ams-fm__grupo .jet-checkboxes-list-wrapper {
    max-height: none !important;
    overflow: visible !important;
    margin: 0;
    padding: 0;
    border: 0;
}

.ams-fm__grupo .jet-checkboxes-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ams-fm__grupo .jet-checkboxes-list__row { margin: 0 !important; }

.ams-fm__grupo .jet-checkboxes-list__item { margin: 0; }

.ams-fm__grupo .jet-checkboxes-list__button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.ams-fm__grupo .jet-checkboxes-list__decorator {
    width: 20px; height: 20px;
    min-width: 20px; min-height: 20px;
    margin: 0;
    border: 1px solid #D6DAE2;
    border-radius: 3px;
    background: #fff;
}

/* el propio widget del catalogo pinta la casilla marcada de gris con una regla
   mas especifica (la lleva su selector .elementor-element-…): de ahi el !important */
.ams-fm__grupo .jet-checkboxes-list__input:checked + .jet-checkboxes-list__button .jet-checkboxes-list__decorator {
    background: #F0500A !important;
    border-color: #F0500A !important;
}

.ams-fm__grupo .jet-checkboxes-list__checked-icon { font-size: 12px; }

.ams-fm__grupo .jet-checkboxes-list__label {
    flex: 1;
    font-family: "Barlow", sans-serif;
    font-size: 16px !important;
    color: #3E434C;
    margin: 0;
}

.ams-fm__grupo .jet-filter-items-moreless__toggle {
    font-family: "Barlow", sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #F0500A;
    cursor: pointer;
}

/* Mientras la hoja esta abierta, el globo de WhatsApp se aparta: vive en el pie,
   dentro de su propio contexto de apilado, asi que quedaria por encima del velo
   por mas z-index que se le ponga a este. En el diseno la hoja tapa todo. */
html.ams-fm-abierta .ams-fab { display: none; }

/* la barra lateral original desaparece en movil: su sitio es la hoja */
.ams-filtros.ams-filtros--movida { display: none !important; }

}

@media (prefers-reduced-motion: reduce) {
    .ams-fm__hoja { animation: none; }
}
