/* ==========================================================================
   Header product search + autocomplete (public/js/site-search.js)
   Used by the desktop .header-search box, the mobile .mobile-search-dropdown
   and the search box on /products/search.
   ========================================================================== */

.site-search-input {
    -webkit-appearance: none;
    appearance: none;
}

.site-search-input::-webkit-search-decoration {
    -webkit-appearance: none;
}

/* The mobile form sits inside .search_inner (flex); make the form itself the flex row. */
.mobile-search-dropdown .site-search-form {
    display: flex;
    flex: 1;
    width: 100%;
    min-width: 0;
}

.mobile-search-dropdown .site-search-form .form--control {
    min-width: 0;
}

.site-search-listbox {
    max-height: min(70vh, 520px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    text-align: left;
    font-size: 14px;
    line-height: 1.35;
    color: #1f2937;
}

.site-search-listbox[hidden] {
    display: none !important;
}

.header-search__wrapper .site-search-listbox {
    margin: 10px -10px -10px;
    border-top: 1px solid #e5e7eb;
}

.mobile-search-dropdown .site-search-listbox {
    max-height: 60vh;
    margin-top: 8px;
    border-top: 1px solid #e5e7eb;
}

.site-search-group + .site-search-group {
    border-top: 1px solid #f0eee9;
}

.site-search-group__title {
    padding: 10px 12px 4px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #0481c5;
}

.site-search-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    color: #1f2937;
    text-decoration: none;
    cursor: pointer;
}

.site-search-option:hover,
.site-search-option.is-active {
    background: #f3f1ec;
    color: #1f2937;
    text-decoration: none;
}

.site-search-option.is-active {
    box-shadow: inset 3px 0 0 var(--brand-primary, #3D3934);
}

.site-search-option__img {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 4px;
    background: #fff;
}

.site-search-option__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.site-search-option__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-weight: 500;
}

.site-search-option__meta {
    font-size: 12px;
    color: #6b7280;
}

.site-search-option mark {
    padding: 0;
    background: none;
    color: inherit;
    font-weight: 700;
}

.site-search-option--all {
    justify-content: space-between;
    padding-top: 11px;
    padding-bottom: 11px;
    border-top: 1px solid #e5e7eb;
    font-weight: 700;
    color: var(--brand-primary, #3D3934);
}

.site-search-empty {
    padding: 12px;
    color: #6b7280;
}

.site-search-status {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
}

/* Keyboard focus for the icon toggles (role="button") */
.header-search .search-button:focus-visible,
.mobile-search-icon:focus-visible {
    outline: 2px solid var(--brand-primary, #3D3934);
    outline-offset: 2px;
}
