/* Typesense InstantSearch layout — functional only, no colors or typography */

.ts-search-toolbar {
    margin-bottom: 1rem;
}

.ts-search-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

@media (max-width: 767px) {
    .ts-search-layout {
        flex-direction: column;
    }

    .ts-facets {
        width: 100%;
    }
}

.ts-facets {
    min-width: 200px;
    flex-shrink: 0;
}

.ts-results {
    flex: 1;
    min-width: 0;
}

/* Hit image */
.ts-hit .p-illustration img,
#ts-hits .p-illustration img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Pagination */
#ts-pagination .ais-Pagination-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    gap: 0.25rem;
    flex-wrap: wrap;
}

#ts-pagination .ais-Pagination-item a,
#ts-pagination .ais-Pagination-item span {
    display: inline-block;
    padding: 0.25rem 0.5rem;
}

/* Facet lists */
.ais-RefinementList-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ais-RefinementList-item {
    margin-bottom: 0.25rem;
}

/* Stats */
#ts-stats {
    margin-bottom: 0.5rem;
}

/* Current refinements */
#ts-current-refinements {
    margin-bottom: 0.5rem;
}

/* Header facet panels — inline dropdown mode */
.ts-header-facet .ais-Panel {
    position: relative;
    cursor: pointer;
}
.ts-header-facet .ais-Panel-body {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: #fff;
    border: 1px solid #ccc;
    padding: 8px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 300px;
    overflow-y: auto;
}
.ts-header-facet .ais-Panel.facet-open .ais-Panel-body {
    display: block;
}

/* -----------------------------------------------------------------------
   Header search dropdown items
   ----------------------------------------------------------------------- */

/* Item wrapper — column so main row sits flush */
.ts-header-dropdown .ts-header-dropdown-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
}

/* Main row — matches form-control-lg horizontal padding */
.ts-header-dropdown .ts-hd-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
}

/* Thumbnail wrapper */
.ts-header-dropdown .ts-hd-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    width: 48px;
}

.ts-header-dropdown .ts-hd-thumb {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

/* Info block fills remaining space */
.ts-header-dropdown .ts-hd-info {
    flex: 1;
    min-width: 0;
}

/* Title text */
.ts-header-dropdown .ts-hd-title {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    color: rgb(61, 60, 56);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Right-arrow button — styled by btn btn-outline-primary color-customer-hi back in main.css */
.ts-header-dropdown .ts-hd-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
