/* Hookain Filter — Smart-Facets styling. Sticky bar + offcanvas. */

/* Active-filter chips + reset (so a picked filter never vanishes — it shows here, removable) */
.hk-filter-active {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.55rem;
}
.hk-filter-active-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.7rem;
    border-radius: 4px;
    background: #16171c;
    color: #fff !important;
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.2;
    transition: background 0.15s ease;
}
.hk-filter-active-chip:hover,
.hk-filter-active-chip:focus {
    background: #e2233b;
    color: #fff !important;
}
.hk-filter-active-chip i {
    font-size: 0.62rem;
    opacity: 0.85;
}
.hk-filter-reset {
    font-size: 0.68rem;
    font-weight: 600;
    color: #e2233b !important;
    text-decoration: none;
    margin-left: 0.2rem;
}
.hk-filter-reset:hover {
    color: #b3192d !important;
    text-decoration: underline;
}

/* ── Smart-Facets display modes — one markup, CSS drives the layout ── */
.hk-facet { display: flex; flex-direction: column; gap: 2px; }
.hk-facet__opt {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 10px; border-radius: 4px;
    color: #16171c; text-decoration: none; font-size: 13px; line-height: 1.2;
    border: 1px solid transparent;
    transition: background .12s ease, border-color .12s ease;
}
.hk-facet__opt:hover { background: #f4f4f3; }
.hk-facet__opt.is-active { border-color: #e2233b; background: rgba(226,35,59,.06); color: #b3192d; font-weight: 600; }
.hk-facet__img { width: 22px; height: 22px; object-fit: contain; flex: 0 0 auto; border-radius: 2px; }
.hk-facet__label { flex: 1 1 auto; }
.hk-facet__count { font-size: 11px; color: #87898f; flex: 0 0 auto; }
.hk-facet__opt.is-active .hk-facet__count { color: #b3192d; }

/* GRID — image gallery tiles */
.hk-facet--grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.hk-facet--grid .hk-facet__opt { flex-direction: column; text-align: center; gap: 4px; padding: 8px 6px; border: 1px solid #e7e7e6; }
.hk-facet--grid .hk-facet__img { width: 38px; height: 38px; }
.hk-facet--grid .hk-facet__label { flex: none; font-size: 11px; }
.hk-facet--grid .hk-facet__count { font-size: 10px; }

/* SWATCH — image squares, label hidden, name via native tooltip */
.hk-facet--swatch { flex-direction: row; flex-wrap: wrap; gap: 6px; }
.hk-facet--swatch .hk-facet__opt { padding: 0; width: 40px; height: 40px; justify-content: center; border: 1px solid #e7e7e6; position: relative; }
.hk-facet--swatch .hk-facet__img { width: 100%; height: 100%; border-radius: 3px; }
.hk-facet--swatch .hk-facet__img--empty { display: flex; align-items: center; justify-content: center; font-family: 'Space Mono', monospace; font-size: 10px; text-transform: uppercase; color: #87898f; }
.hk-facet--swatch .hk-facet__label { display: none; }
.hk-facet--swatch .hk-facet__count { position: absolute; top: -6px; right: -6px; background: #16171c; color: #fff; border-radius: 3px; padding: 0 4px; font-size: 9px; line-height: 1.5; }

/* CHIPS — text pills */
.hk-facet--chips { flex-direction: row; flex-wrap: wrap; gap: 5px; }
.hk-facet--chips .hk-facet__opt { padding: 4px 10px; border: 1px solid #e7e7e6; gap: 5px; }
.hk-facet--chips .hk-facet__img { display: none; }
.hk-facet--chips .hk-facet__label { flex: none; }

/* DROPDOWN / LIST — rows (default column layout) */
.hk-facet--dropdown, .hk-facet--list { gap: 1px; }

.hk-filter-dropdown-menu {
    max-height: 350px;
    overflow-y: auto;
    min-width: 240px;
    padding: 0.5rem 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.hk-filter-dropdown-item {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    color: #1e293b;
    border-radius: 0;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.hk-filter-dropdown-item:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.hk-filter-dropdown-item.active {
    background-color: #0f172a !important;
    color: #ffffff !important;
}

.hk-filter-list-group .hk-filter-list-item {
    border-left: none;
    border-right: none;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    color: #334155;
    background-color: transparent;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.hk-filter-list-group .hk-filter-list-item:hover {
    background-color: #f8fafc;
    color: #0f172a;
}

.hk-filter-list-group .hk-filter-list-item.active {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    font-weight: 600;
}

.hk-filter-list-group .hk-filter-list-item.active i {
    color: #0f172a;
}

.hk-filter-img-xs {
    max-width: 20px;
    max-height: 20px;
    object-fit: contain;
    border-radius: 2px;
}

.hk-filter-cockpit-header .dropdown-toggle::after {
    margin-left: 0.5rem;
    vertical-align: middle;
}
