/* «Filtros de Loop Grid» — defaults only; every value here can be
   overridden from the widget's Estilo tab. */

.ayq-lf {
    --ayq-lf-ink: #111111;
    --ayq-lf-paper: #ffffff;
    --ayq-lf-active: #F5C518;
    --ayq-lf-accent: #EE1958;
    --ayq-lf-track: #e7ddd0;
    --ayq-lf-fill: var(--ayq-lf-accent);
    --ayq-lf-thumb: #ffffff;
    --ayq-lf-thumb-border: var(--ayq-lf-ink);
    --ayq-lf-thumb-size: 20px;
    --ayq-lf-track-height: 6px;
    --ayq-lf-drawer-bg: #F7EEE1;
    --ayq-lf-drawer-width: min(360px, 88vw);
    --ayq-lf-overlay: rgba(17, 17, 17, 0.45);
    position: relative;
    color: var(--ayq-lf-ink);
}

.ayq-lf .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.ayq-lf [hidden] {
    display: none !important;
}

/* ---------------------------------------------------------------- Layout */

.ayq-lf__form {
    margin: 0;
}

.ayq-lf__groups {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px;
}

.ayq-lf__group {
    min-width: 0;
}

.ayq-lf__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 12px;
    font-weight: 700;
    font-size: 17px;
    line-height: 1.25;
}

.ayq-lf__details > summary {
    cursor: pointer;
    list-style: none;
}

.ayq-lf__details > summary::-webkit-details-marker {
    display: none;
}

.ayq-lf__caret {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s ease;
}

.ayq-lf__details[open] > summary .ayq-lf__caret {
    transform: rotate(-135deg) translateY(-2px);
}

.ayq-lf__options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ayq-lf__options--check {
    flex-direction: column;
    flex-wrap: nowrap;
}

.ayq-lf__option.is-extra {
    display: none;
}

.ayq-lf__group.is-expanded .ayq-lf__option.is-extra {
    display: inline-flex;
}

.ayq-lf__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.ayq-lf--actions-after .ayq-lf__actions {
    margin-top: 16px;
}

.ayq-lf--actions-before .ayq-lf__actions {
    margin-bottom: 16px;
}

.ayq-lf--actions-inline .ayq-lf__actions {
    align-self: flex-end;
}

/* ----------------------------------------------------------------- Pills */

.ayq-lf__pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: inherit;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.2;
    color: var(--ayq-lf-ink);
    background: var(--ayq-lf-paper);
    border: 2px solid var(--ayq-lf-ink);
    border-radius: 999px;
    padding: 6px 14px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.1s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.ayq-lf__pill:hover {
    transform: translateY(-1px);
    box-shadow: 2px 2px 0 var(--ayq-lf-ink);
}

.ayq-lf__pill.is-active {
    background-color: var(--ayq-lf-active);
    box-shadow: 2px 2px 0 var(--ayq-lf-ink);
}

.ayq-lf__pill input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.ayq-lf__pill:focus-within,
.ayq-lf__btn:focus-visible,
.ayq-lf__chip:focus-visible {
    outline: 3px solid var(--ayq-lf-accent);
    outline-offset: 2px;
}

.ayq-lf__icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex: none;
}

.ayq-lf__count {
    font-size: 0.85em;
    font-weight: 600;
    opacity: 0.6;
}

.ayq-lf__count::before { content: '('; }
.ayq-lf__count::after { content: ')'; }

/* ------------------------------------ «Lista estilo carta» (icon + text + box) */

.ayq-lf__options--list {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 4px;
}

.ayq-lf__row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 7px 10px;
    font: inherit;
    font-size: 14px;
    line-height: 1.25;
    text-align: left;
    color: var(--ayq-lf-ink);
    background: transparent;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.ayq-lf__row:hover {
    background-color: rgba(238, 25, 88, 0.06);
}

.ayq-lf__row.is-active {
    color: var(--ayq-lf-accent);
    background-color: #FCE3EA;
}

.ayq-lf__row .ayq-lf__label {
    flex: 1 1 auto;
    min-width: 0;
}

.ayq-lf__row-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #FBE8DC;
    overflow: hidden;
}

.ayq-lf__row-icon .ayq-lf__icon {
    width: 62%;
    height: 62%;
    object-fit: contain;
}

.ayq-lf__box {
    -webkit-appearance: none;
    appearance: none;
    flex: none;
    width: 18px;
    height: 18px;
    margin: 0 0 0 auto;
    border: 1.5px solid #CDBFB7;
    border-radius: 4px;
    background: #fff center / 72% no-repeat;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ayq-lf__box:checked {
    border-color: var(--ayq-lf-accent);
    background-color: var(--ayq-lf-accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
}

.ayq-lf__box:focus-visible {
    outline: 3px solid var(--ayq-lf-accent);
    outline-offset: 2px;
}

.ayq-lf__row .ayq-lf__count {
    margin-left: auto;
}

/* Title next to its control, e.g. «Ordenar por: [Más populares ▾]». */
.ayq-lf__group--inline-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ayq-lf__group--inline-title > .ayq-lf__title {
    margin: 0;
    white-space: nowrap;
}

/* «15 resultados» at the left of the same bar, everything else pushed right. */
.ayq-lf--results-inline .ayq-lf__groups > .ayq-lf__results {
    align-self: center;
    margin: 0 auto 0 0;
}

/* ------------------------------------------- Checkboxes, radios, switch */

.ayq-lf__check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.ayq-lf__check input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--ayq-lf-accent);
    cursor: pointer;
    flex: none;
}

.ayq-lf__switch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.ayq-lf__switch-track {
    position: relative;
    width: 40px;
    height: 22px;
    flex: none;
    border: 2px solid var(--ayq-lf-ink);
    border-radius: 999px;
    background: var(--ayq-lf-paper);
    transition: background-color 0.15s ease;
}

.ayq-lf__switch-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--ayq-lf-ink);
    transition: transform 0.15s ease;
}

.ayq-lf__switch.is-active .ayq-lf__switch-track {
    background: var(--ayq-lf-accent);
}

.ayq-lf__switch.is-active .ayq-lf__switch-track::after {
    transform: translateX(18px);
    background: var(--ayq-lf-paper);
}

.ayq-lf__switch:focus-within .ayq-lf__switch-track {
    outline: 3px solid var(--ayq-lf-accent);
    outline-offset: 2px;
}

/* --------------------------------------------------- Selects and inputs */

.ayq-lf__select,
.ayq-lf__field {
    font: inherit;
    font-size: 14px;
    color: var(--ayq-lf-ink);
    background-color: var(--ayq-lf-paper);
    border: 2px solid var(--ayq-lf-ink);
    border-radius: 10px;
    padding: 7px 12px;
    min-height: 40px;
    max-width: 100%;
}

.ayq-lf__search {
    position: relative;
    display: flex;
    align-items: center;
}

.ayq-lf__search svg {
    position: absolute;
    left: 12px;
    pointer-events: none;
    opacity: 0.6;
}

.ayq-lf__search .ayq-lf__field {
    width: 100%;
    padding-left: 34px;
}

/* ------------------------------------------------------------ Range */

.ayq-lf__range {
    min-width: 200px;
}

.ayq-lf__slider {
    position: relative;
    height: var(--ayq-lf-thumb-size);
    margin: 4px 0 8px;
}

.ayq-lf__slider::before,
.ayq-lf__slider::after {
    content: '';
    position: absolute;
    top: 50%;
    height: var(--ayq-lf-track-height);
    transform: translateY(-50%);
    border-radius: 999px;
}

.ayq-lf__slider::before {
    left: 0;
    right: 0;
    background: var(--ayq-lf-track);
}

.ayq-lf__slider::after {
    left: var(--from, 0%);
    right: calc(100% - var(--to, 100%));
    background: var(--ayq-lf-fill);
}

.ayq-lf__slider input[type="range"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    z-index: 2;
}

.ayq-lf__slider input[type="range"]::-webkit-slider-runnable-track {
    background: none;
    border: 0;
}

.ayq-lf__slider input[type="range"]::-moz-range-track {
    background: none;
    border: 0;
}

.ayq-lf__slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    pointer-events: auto;
    width: var(--ayq-lf-thumb-size);
    height: var(--ayq-lf-thumb-size);
    border-radius: 50%;
    background: var(--ayq-lf-thumb);
    border: 2px solid var(--ayq-lf-thumb-border);
    box-shadow: 2px 2px 0 var(--ayq-lf-thumb-border);
    cursor: grab;
}

.ayq-lf__slider input[type="range"]::-moz-range-thumb {
    pointer-events: auto;
    width: var(--ayq-lf-thumb-size);
    height: var(--ayq-lf-thumb-size);
    border-radius: 50%;
    background: var(--ayq-lf-thumb);
    border: 2px solid var(--ayq-lf-thumb-border);
    box-shadow: 2px 2px 0 var(--ayq-lf-thumb-border);
    cursor: grab;
}

.ayq-lf__slider input[type="range"]:focus-visible::-webkit-slider-thumb {
    outline: 3px solid var(--ayq-lf-accent);
    outline-offset: 2px;
}

.ayq-lf__range-values {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
}

.ayq-lf__range-values .ayq-lf__range-sep {
    display: none;
}

.ayq-lf__range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ayq-lf__range-input {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 1 1 0;
    min-width: 0;
}

.ayq-lf__range-input .ayq-lf__field {
    width: 100%;
    min-width: 60px;
}

.ayq-lf__affix:empty {
    display: none;
}

/* ------------------------------------------------------------- Buttons */

.ayq-lf__btn,
.ayq-lf__more {
    font: inherit;
    font-weight: 800;
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
    border: 2px solid var(--ayq-lf-ink);
    border-radius: 999px;
    padding: 9px 18px;
    transition: transform 0.1s ease, background-color 0.15s ease;
}

.ayq-lf__apply,
.ayq-lf__toggle {
    color: #fff;
    background: var(--ayq-lf-accent);
    box-shadow: 3px 3px 0 var(--ayq-lf-ink);
}

.ayq-lf__apply:hover,
.ayq-lf__toggle:hover {
    transform: translateY(-1px);
}

.ayq-lf__reset {
    color: var(--ayq-lf-ink);
    background: transparent;
}

.ayq-lf__more {
    margin-top: 8px;
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--ayq-lf-ink);
    text-decoration: underline;
    font-size: 13px;
}

/* --------------------------------------------------------- Active chips */

.ayq-lf__results {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
}

.ayq-lf__results:empty {
    display: none;
}

.ayq-lf__active {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}

.ayq-lf__active-title {
    font-size: 13px;
    font-weight: 700;
    margin-right: 4px;
}

.ayq-lf__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: var(--ayq-lf-ink);
    border: 0;
    border-radius: 999px;
    padding: 4px 10px;
    cursor: pointer;
}

.ayq-lf__chip span[aria-hidden] {
    font-size: 1.2em;
    line-height: 1;
}

/* ----------------------------------------------------- Loading / notice */

.ayq-lf-loading {
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.ayq-lf.is-loading .ayq-lf__results {
    opacity: 0.5;
}

.ayq-lf-empty {
    padding: 24px 0;
    text-align: center;
    font-weight: 700;
}

.ayq-lf__notice {
    margin-top: 10px;
    padding: 8px 12px;
    font-size: 12px;
    background: #fff8d6;
    border: 1px dashed #c9a800;
    border-radius: 6px;
}

/* ---------------------------------------------------------------- Drawer */

.ayq-lf__toggle,
.ayq-lf__overlay,
.ayq-lf__panel-head,
.ayq-lf__panel-foot {
    display: none;
}

.ayq-lf--drawer .ayq-lf__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ayq-lf__toggle-count {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #fff;
    color: var(--ayq-lf-ink);
    font-size: 12px;
    line-height: 20px;
    text-align: center;
}

.ayq-lf--drawer .ayq-lf__overlay:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 99998;
    background: var(--ayq-lf-overlay);
}

.ayq-lf--drawer .ayq-lf__panel {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 99999;
    width: var(--ayq-lf-drawer-width);
    max-width: 100vw;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--ayq-lf-drawer-bg);
    border-right: 3px solid var(--ayq-lf-ink);
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    visibility: hidden;
}

.ayq-lf--drawer.ayq-lf--side-right .ayq-lf__panel {
    left: auto;
    right: 0;
    border-right: 0;
    border-left: 3px solid var(--ayq-lf-ink);
    transform: translateX(105%);
}

.ayq-lf--drawer.ayq-lf--side-bottom .ayq-lf__panel {
    top: auto;
    left: 0;
    right: 0;
    width: auto;
    max-height: 85vh;
    border-right: 0;
    border-top: 3px solid var(--ayq-lf-ink);
    border-radius: 18px 18px 0 0;
    transform: translateY(105%);
}

.ayq-lf--drawer.is-open .ayq-lf__panel {
    transform: none;
    visibility: visible;
}

.ayq-lf--drawer .ayq-lf__panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.ayq-lf__panel-title {
    font-size: 18px;
    font-weight: 800;
}

.ayq-lf__close {
    font-size: 28px;
    line-height: 1;
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
    padding: 0 4px;
}

.ayq-lf--drawer .ayq-lf__groups {
    flex-direction: column !important;
    align-items: stretch !important;
}

.ayq-lf--drawer .ayq-lf__group {
    width: auto !important;
}

.ayq-lf--drawer .ayq-lf__panel-foot {
    display: block;
    position: sticky;
    bottom: -20px;
    margin: auto -20px -20px;
    padding: 14px 20px 20px;
    background: var(--ayq-lf-drawer-bg);
}

.ayq-lf--drawer .ayq-lf__panel-foot .ayq-lf__done {
    width: 100%;
}

html.ayq-lf-lock,
html.ayq-lf-lock body {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .ayq-lf *,
    .ayq-lf-loading {
        transition: none !important;
    }
}
