.header-search-form {
    position: relative;
}

.header-search-input {
    text-transform: none;
}

.header-search-results {
    position: absolute;
    top: calc(100% + 12px);
    right: -8px;
    z-index: 1100;
    width: min(440px, calc(100vw - 32px));
    overflow: hidden;
    background: #fff;
    border: 1px solid #dce5ea;
    border-radius: 10px;
    box-shadow: 0 18px 45px rgba(15, 45, 62, 0.18);
}

.header-search-results[hidden] {
    display: none !important;
}

.header-search-results-list {
    max-height: 420px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.header-search-result {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    color: #213946;
    border-bottom: 1px solid #edf1f3;
    background: #fff;
}

.header-search-result:hover,
.header-search-result.is-active {
    color: #132d3b;
    background: #f2f9fc;
}

.header-search-result-image {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e4eaee;
    border-radius: 7px;
}

.header-search-result-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header-search-result-copy {
    min-width: 0;
}

.header-search-result-item {
    display: block;
    margin-bottom: 3px;
    color: #087fc1;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.header-search-result-description {
    display: block;
    overflow: hidden;
    color: #213946;
    font-size: 13px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-search-result-brand {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: #74838b;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-search-result-meta {
    min-width: 86px;
    text-align: right;
}

.header-search-result-price {
    display: block;
    color: #152f3d;
    font-size: 12px;
    font-weight: 700;
}

.header-search-result-tax {
    color: #78878f;
    font-size: 10px;
    text-transform: uppercase;
}

.header-search-stock {
    display: inline-block;
    margin-top: 5px;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.header-search-stock.in-stock {
    color: #17653a;
    background: #e7f6ed;
}

.header-search-stock.arriving {
    color: #875711;
    background: #fff3d7;
}

.header-search-stock.contact {
    color: #5f6870;
    background: #edf0f2;
}

.header-search-state {
    padding: 18px;
    color: #64757e;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.header-search-spelling {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 16px 18px;
    color: #536771;
    background: #f7fafb;
    font-size: 13px;
    line-height: 1.5;
}

.header-search-spelling-link {
    padding: 2px 5px;
    color: #087fc1;
    background: #fff;
    border-radius: 4px;
    font-weight: 700;
}

.header-search-spelling-link:hover,
.header-search-spelling-link.is-active {
    color: #075e8e;
    background: #e7f4fa;
}

.header-search-results-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    background: #f7fafb;
    border-top: 1px solid #e5ecef;
}

.header-search-results-footer a {
    color: #087fc1;
    font-size: 12px;
    font-weight: 700;
}

.header-search-results-footer span {
    color: #71818a;
    font-size: 11px;
}

.product-search-panel {
    margin-bottom: 28px;
    padding: 22px;
    background: #fff;
    border: 1px solid #e1e8ec;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(19, 54, 72, 0.06);
}

.product-search-panel h2 {
    margin: 0 0 6px;
    color: #173646;
    font-size: 18px;
}

.product-search-panel-intro {
    margin: 0 0 18px;
    color: #687982;
    font-size: 13px;
    line-height: 1.55;
}

.product-search-field {
    margin-bottom: 16px;
}

.product-search-field label {
    display: block;
    margin-bottom: 6px;
    color: #294654;
    font-size: 12px;
    font-weight: 700;
}

.product-search-field .form-control {
    height: 42px;
    border-color: #d6e0e5;
    border-radius: 6px;
    font-size: 13px;
}

.product-search-primary {
    position: relative;
}

.product-search-primary input {
    padding-right: 42px;
}

.product-search-primary i {
    position: absolute;
    right: 14px;
    bottom: 14px;
    color: #087fc1;
}

.product-search-advanced-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 16px;
    padding: 0;
    color: #087fc1;
    background: transparent;
    border: 0;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.product-search-advanced-toggle i {
    transition: transform 180ms ease;
}

.product-search-advanced-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.product-search-advanced[hidden] {
    display: none !important;
}

.product-search-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.product-search-actions .btn {
    min-height: 40px;
}

.product-search-fallback {
    margin: 0 0 22px;
    padding: 13px 16px;
    color: #4f5960;
    background: #fff8df;
    border: 1px solid #f0dda0;
    border-radius: 7px;
    font-size: 13px;
}

.product-search-spelling {
    margin: 0 0 22px;
    padding: 13px 16px;
    color: #314e5d;
    background: #eef8fc;
    border: 1px solid #c9e5f1;
    border-radius: 7px;
    font-size: 13px;
}

.product-search-spelling a {
    color: #087fc1;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.product-search-field.is-enhanced > .product-filter-native-select {
    display: none !important;
}

.product-filter-selector {
    position: relative;
}

.product-filter-selector-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    height: 42px;
    padding: 8px 12px;
    color: #334e5b;
    background: #fff;
    border: 1px solid #d6e0e5;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
}

.product-filter-selector-trigger:hover {
    border-color: #9fb2bc;
}

.product-filter-selector-trigger:focus-visible,
.product-filter-selector-trigger[aria-expanded="true"] {
    outline: 0;
    border-color: #087fc1;
    box-shadow: 0 0 0 3px rgba(8, 127, 193, 0.14);
}

.product-filter-selector-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-filter-selector-chevron {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    margin: -4px 3px 0 0;
    border-right: 2px solid #617781;
    border-bottom: 2px solid #617781;
    transform: rotate(45deg);
    transition: transform 160ms ease, margin 160ms ease;
}

.product-filter-selector-trigger[aria-expanded="true"] .product-filter-selector-chevron {
    margin-top: 4px;
    transform: rotate(225deg);
}

.product-filter-selector-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    z-index: 1060;
    overflow: hidden;
    background: #fff;
    border: 1px solid #cbd8de;
    border-radius: 7px;
    box-shadow: 0 14px 36px rgba(18, 49, 64, 0.2);
}

.product-filter-selector-panel[hidden] {
    display: none !important;
}

.product-filter-selector-search {
    padding: 10px;
    background: #f5f8fa;
    border-bottom: 1px solid #e0e8ec;
}

.product-filter-selector-search .form-control {
    height: 38px;
    padding: 7px 10px;
    background: #fff;
    font-size: 13px;
}

.product-filter-selector-options {
    max-height: 240px;
    overflow-x: hidden;
    overflow-y: scroll;
    overscroll-behavior: contain;
    scrollbar-color: #7c929f #edf2f5;
    scrollbar-gutter: stable;
    scrollbar-width: auto;
}

.product-filter-selector-options::-webkit-scrollbar {
    width: 12px;
}

.product-filter-selector-options::-webkit-scrollbar-track {
    background: #edf2f5;
}

.product-filter-selector-options::-webkit-scrollbar-thumb {
    background: #7c929f;
    border: 3px solid #edf2f5;
    border-radius: 8px;
}

.product-filter-selector-options::-webkit-scrollbar-thumb:hover {
    background: #526b78;
}

.product-filter-selector-option {
    position: relative;
    display: block;
    width: 100%;
    min-height: 39px;
    padding: 9px 36px 9px 12px;
    color: #294654;
    background: #fff;
    border: 0;
    border-bottom: 1px solid #edf1f3;
    font-size: 12px;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
}

.product-filter-selector-option:last-child {
    border-bottom: 0;
}

.product-filter-selector-option:hover,
.product-filter-selector-option:focus-visible {
    outline: 0;
    color: #12394d;
    background: #eef7fb;
}

.product-filter-selector-option.is-selected {
    color: #075f8f;
    background: #e5f3f9;
    font-weight: 700;
}

.product-filter-selector-option.is-selected::after {
    position: absolute;
    top: 50%;
    right: 13px;
    content: '\2713';
    font-size: 14px;
    transform: translateY(-50%);
}

.product-filter-selector-option[hidden] {
    display: none !important;
}

.product-filter-selector-empty {
    margin: 0;
    padding: 14px 12px;
    color: #687982;
    background: #fff;
    font-size: 12px;
    text-align: center;
}

.product-filter-selector-empty[hidden] {
    display: none !important;
}

@media only screen and (max-width: 991px) {
    .header-search-results {
        right: 0;
    }
}

@media only screen and (max-width: 575px) {
    .header-search-results {
        position: fixed;
        top: var(--header-search-mobile-top, 72px);
        right: 12px;
        left: 12px;
        width: auto;
        max-height: var(--header-search-mobile-max-height, calc(100dvh - 84px));
        margin-top: 0;
        border-radius: 8px;
    }

    .header-search-results-list {
        max-height: var(--header-search-mobile-max-height, calc(100dvh - 84px));
    }

    .header-search-result {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 7px 10px;
        min-height: 72px;
        padding: 10px 12px;
    }

    .header-search-result-image {
        grid-row: 1 / span 2;
        width: 48px;
        height: 48px;
    }

    .header-search-result-description {
        display: -webkit-box;
        line-height: 1.3;
        white-space: normal;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .header-search-result-meta {
        display: flex;
        grid-column: 2;
        align-items: center;
        flex-wrap: wrap;
        gap: 4px 8px;
        min-width: 0;
        text-align: left;
    }

    .header-search-result-tax,
    .header-search-stock {
        margin-top: 0;
    }

    .header-search-results-footer {
        position: sticky;
        bottom: 0;
        flex-wrap: wrap;
        padding: 10px 12px;
    }

    .header-search-results-footer a {
        min-height: 32px;
        display: inline-flex;
        align-items: center;
    }

    .product-search-panel {
        padding: 18px;
    }

    .product-search-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .product-filter-selector-options {
        max-height: 45vh;
    }

    .product-filter-selector-search .form-control {
        font-size: 16px;
    }

    .product-filter-selector-option {
        min-height: 44px;
        padding-top: 11px;
        padding-bottom: 11px;
    }
}
