/* Quokka · panel de búsqueda (filtros en desplegables, propuesta A) */
html.qks-lock, html.qks-lock body { overflow: hidden; }
.qks { position: fixed; inset: 0; z-index: 100000; font-family: 'greycliff-cf', 'Greycliff CF', Arial, sans-serif; color: #141414; }
.qks[hidden], .qks [hidden] { display: none !important; }
.qks-shade { position: absolute; inset: 0; background: rgba(20, 20, 20, .38); animation: qks-fade .15s ease both; }
.qks-panel { position: relative; width: min(1120px, calc(100vw - 32px)); max-height: calc(100vh - 48px); margin: 24px auto 0; display: flex; flex-direction: column;
    background: #fff; border-radius: 22px; box-shadow: 0 30px 80px rgba(20, 20, 20, .28); animation: qks-pop .2s cubic-bezier(.2, .9, .3, 1.1) both; }

/* Barra de búsqueda */
.qks-bar { display: flex; align-items: center; gap: 12px; margin: 18px 18px 0; padding: 0 10px 0 20px; height: 58px; border-radius: 999px; background: #F5F5F7; }
.qks-bar svg { flex: none; color: #52525B; }
.qks-input { flex: 1; min-width: 0; height: 100%; border: 0 !important; background: transparent !important; box-shadow: none !important; outline: none; font-size: 18px; font-weight: 600; color: #141414; padding: 0 !important; }
.qks-input::placeholder { color: #8A8A93; font-weight: 500; }
.qks-input::-webkit-search-cancel-button { display: none; }
.qks-x { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: #141414; cursor: pointer; box-shadow: 0 1px 2px rgba(20, 20, 20, .12); transition: background .15s ease; }
.qks-x:hover { background: #E9E9EC; }
.qks-x svg { color: #141414; }

/* Fila de filtros */
.qks-bar, .qks-filters { flex: none; }
.qks-filters { position: relative; z-index: 2; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 14px 22px 0; }
.qks-dd { position: relative; }
.qks-ddbtn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 16px; border: 1px solid #D4D4D8; border-radius: 12px; background: #fff; color: #141414;
    font-family: inherit; font-size: 14px; font-weight: 700; line-height: 1; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.qks-ddbtn:hover, .qks-ddbtn[aria-expanded="true"] { border-color: #141414; }
.qks-ddbtn svg { flex: none; }
.qks-ddlbl { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.qks-ddbtn.is-on { background: #141414; border-color: #141414; color: #fff; padding-right: 6px; }
.qks-ddx { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; color: #fff; }
.qks-ddx:hover { background: rgba(255, 255, 255, .18); }
.qks-clear { margin-left: 4px; padding: 0; border: 0; background: none; font-family: inherit; font-size: 13px; font-weight: 700; color: #52525B; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.qks-clear:hover { color: #141414; }

/* Desplegable */
.qks-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 5; min-width: 250px; max-height: min(440px, calc(100vh - 190px)); overflow-y: auto; overscroll-behavior: contain; padding: 8px; border-radius: 16px; background: #fff;
    box-shadow: 0 18px 50px rgba(20, 20, 20, .18), 0 0 0 1px #E4E4E7; animation: qks-pop .14s ease both; }
.qks-list { display: flex; flex-direction: column; gap: 2px; }
.qks-list.is-scroll { max-height: 320px; overflow-y: auto; overscroll-behavior: contain; }
.qks-list.is-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; min-width: 300px; }
.qks-opt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 6px 10px; border: 0; border-radius: 10px; background: none; color: #141414;
    font-family: inherit; font-size: 14px; font-weight: 700; line-height: 1.2; text-align: left; cursor: pointer; }
.qks-opt:hover { background: #F5F5F7; }
.qks-opt.is-cur { background: #F5F5F7; }
.qks-opt-name { flex: 1; min-width: 0; }
.qks-opt small { font-size: 12px; font-weight: 700; color: #8A8A93; font-variant-numeric: tabular-nums; }
.qks-opt-ok { display: inline-flex; color: #141414; }
.qks-thumb { flex: none; width: 36px; height: 36px; border-radius: 8px; background: #F5F5F7; overflow: hidden; }
.qks-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.qks-sep { margin: 8px 10px 4px; padding-top: 10px; border-top: 1px solid #E4E4E7; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #52525B; }
.qks-sw { flex: none; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.qks-ddbtn.is-on .qks-sw { box-shadow: 0 0 0 1.5px #fff; width: 14px; height: 14px; }
.qks-find { display: flex; align-items: center; gap: 8px; height: 40px; margin: 0 0 6px; padding: 0 12px; border-radius: 10px; background: #F5F5F7; color: #52525B; cursor: text; }
.qks-find-in { flex: 1; min-width: 0; height: 100%; border: 0 !important; background: none !important; box-shadow: none !important; outline: none; padding: 0 !important; font-family: inherit; font-size: 14px; font-weight: 600; color: #141414; }

/* Resultados */
.qks-body { padding: 16px 22px 22px; overflow: auto; }
.qks-lbl { margin: 0 0 10px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #52525B; }
.qks-results { min-width: 0; }
.qks-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; transition: opacity .15s ease; }
.qks.is-loading .qks-grid { opacity: .55; }
.qks-card { display: flex; flex-direction: column; gap: 3px; padding: 10px; border-radius: 16px; background: #F5F5F7; color: #141414 !important; text-decoration: none !important; transition: transform .15s ease, background .15s ease; }
.qks-card:hover { background: #ECECEF; transform: translateY(-2px); }
.qks-photo { position: relative; display: block; width: 100%; aspect-ratio: 251 / 312; border-radius: 12px; background: #fff; overflow: hidden; margin-bottom: 6px; }
/* las fotos traen mucho blanco alrededor: se amplían para que la botella llene la caja */
.qks-photo img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: contain; transform: scale(1.22); }
.qks-name { font-size: 13px; font-weight: 800; line-height: 1.25; }
.qks-kind { font-size: 11.5px; color: #52525B; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qks-ref { display: flex; flex-wrap: wrap; column-gap: 8px; font-size: 11px; line-height: 1.35; color: #8A8A93; font-variant-numeric: tabular-nums; }
.qks-ref mark { display: inline; margin: 0 !important; padding: 0 !important; border-radius: 2px; background: #FFE58A; color: #141414; font: inherit; letter-spacing: inherit; }
.qks-price { margin-top: 2px; font-size: 14px; font-weight: 800; }
.qks-card.is-out { opacity: .6; }
.qks-none { margin: 10px 0; color: #52525B; }
.qks-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.qks-hint { font-size: 12px; color: #8A8A93; }
.qks-all { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: #000; color: #fff !important; font-family: inherit; font-size: 13px; font-weight: 800; text-decoration: none !important; cursor: pointer; }

@keyframes qks-fade { from { opacity: 0; } }
@keyframes qks-pop { from { opacity: 0; transform: translateY(-6px); } }
@keyframes qks-up { from { transform: translateY(100%); } }

@media (max-width: 1023px) {
    .qks-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .qks-panel { width: 100%; max-height: 100%; height: 100%; margin: 0; border-radius: 0; }
    .qks-bar { margin: 12px; height: 52px; }
    /* Filtros en una fila que se desliza; cada desplegable sube como hoja desde abajo */
    .qks-filters { flex-wrap: nowrap; overflow-x: auto; padding: 2px 12px 4px; scrollbar-width: none; }
    .qks-filters::-webkit-scrollbar { display: none; }
    .qks-dd, .qks-clear { flex: none; }
    .qks-ddbtn { height: 38px; font-size: 13px; }
    .qks-menu { position: fixed; top: auto; left: 0; right: 0; bottom: 0; min-width: 0; max-height: 70vh; overflow-y: auto; padding: 14px 12px calc(14px + env(safe-area-inset-bottom, 0px));
        border-radius: 20px 20px 0 0; box-shadow: 0 -10px 40px rgba(20, 20, 20, .25); animation: qks-up .2s ease both; }
    .qks.dd-open .qks-filters { z-index: 6; }
    .qks.dd-open .qks-panel::after { content: ""; position: absolute; inset: 0; z-index: 4; background: rgba(20, 20, 20, .3); }
    .qks-list.is-grid { min-width: 0; }
    .qks-list.is-scroll { max-height: 50vh; }
    .qks-opt { min-height: 46px; }
    .qks-body { padding: 10px 12px 20px; }
    .qks-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .qks-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { .qks-shade, .qks-panel, .qks-menu { animation: none; } .qks-card { transition: none; } }

/* Lupa de la barra móvil (la pone este módulo; el tema no la tiene) */
a.qks-mbtn { order: -2; display: inline-flex !important; align-items: center; justify-content: center; width: 36px; height: 36px; margin: 0 2px 0 0; color: #141414 !important; }

/* La cajita de búsqueda del tema (sale al pasar el ratón por la lupa) se sustituye por este panel */
.stsearchbar_link > .dropdown_list { display: none !important; }
