.forte-search {
    position: relative;
    z-index: 1080;
    width: 100%;
}

.forte-search__field {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 42px;
    overflow: hidden;
    border: 1px solid #dce1e5;
    border-radius: 12px;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.forte-search:focus-within .forte-search__field {
    border-color: #f0a02f;
    box-shadow: 0 0 0 4px rgba(244, 129, 32, .11);
}

.forte-search__field input,
.forte-search__field input.form-control {
    min-width: 0;
    height: 42px;
    flex: 1 1 auto;
    padding: 0 48px 0 14px;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
    font-size: 14px;
}

.forte-search__field input:focus,
.forte-search__field input.form-control:focus {
    border: 0;
    outline: 0;
    box-shadow: none;
}

.forte-search__field > button {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex;
    width: 46px;
    height: 42px;
    align-items: center;
    justify-content: center;
    color: #d77c20;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.forte-search__panel {
    position: absolute;
    z-index: 1090;
    top: calc(100% + 9px);
    left: 50%;
    width: min(680px, calc(100vw - 28px));
    max-height: min(620px, 72vh);
    overflow: auto;
    border: 1px solid #e2e6e9;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(25, 32, 38, .2);
    transform: translateX(-50%);
    overscroll-behavior: contain;
}

.forte-search__panel[hidden] { display: none; }

.forte-search__section { padding: 12px; }
.forte-search__section + .forte-search__section { border-top: 1px solid #edf0f2; }

.forte-search__section-title {
    display: block;
    padding: 2px 6px 8px;
    color: #858d94;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.forte-search__chips,
.forte-search__brands { display: flex; flex-wrap: wrap; gap: 7px; }
.forte-search__chip,
.forte-search__brand { display: inline-flex; min-height: 34px; align-items: center; gap: 7px; padding: 7px 10px; color: #4c555c; border: 1px solid #e3e7e9; border-radius: 10px; background: #fff; font-size: 11px; font-weight: 700; }
.forte-search__chip:hover,
.forte-search__brand:hover,
.forte-search__chip.is-active,
.forte-search__brand.is-active { color: #8b4b0c; border-color: #f0c28e; background: #fff8ef; }
.forte-search__history-link { display: flex; min-height: 38px; align-items: center; gap: 9px; padding: 6px 9px; color: #4e575e; border-radius: 9px; font-size: 12px; }
.forte-search__history-link i { color: #a2a9ae; }
.forte-search__history-link:hover,
.forte-search__history-link.is-active { color: #2e363c; background: #f6f7f8; }

.forte-search__category,
.forte-search__product,
.forte-search__all {
    text-decoration: none !important;
}

.forte-search__category {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 10px;
    padding: 7px 9px;
    color: #303940;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
}

.forte-search__category > i:first-child {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    color: #9a6b11;
    border-radius: 8px;
    background: #fff4c5;
    place-items: center;
}

.forte-search__category > i:last-child { margin-left: auto; color: #a1a8ad; }

.forte-search__product {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 82px;
    padding: 9px;
    color: #2f373d;
    border-radius: 12px;
}

.forte-search__product img {
    width: 62px;
    height: 62px;
    padding: 4px;
    border: 1px solid #edf0f2;
    border-radius: 10px;
    background: #fff;
    object-fit: contain;
}

.forte-search__product-copy { min-width: 0; }
.forte-search__product-copy strong { display: -webkit-box; overflow: hidden; color: #283138; font-size: 13px; font-weight: 600; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.forte-search__product-copy small { display: block; overflow: hidden; margin-top: 4px; color: #8a9299; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.forte-search__product-meta { min-width: 118px; text-align: right; }
.forte-search__product-meta strong { display: block; color: #20282e; font-size: 13px; }
.forte-search__product-meta small { color: #198754; font-size: 10px; }
.forte-search__product-meta small.is-order { color: #9a6b11; }

.forte-search__category:hover,
.forte-search__product:hover,
.forte-search__option.is-active {
    color: #252d33;
    background: #f7f8f9;
}

.forte-search__all {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 17px;
    color: #93510f;
    border-top: 1px solid #edf0f2;
    background: #fff9f2;
    font-size: 12px;
    font-weight: 700;
}

.forte-search__message {
    display: flex;
    min-height: 150px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: #7c858c;
    text-align: center;
}

.forte-search__message i { margin-bottom: 10px; color: #e2984b; font-size: 22px; }
.forte-search__message strong { color: #3d464d; font-size: 13px; }
.forte-search__message small { max-width: 340px; margin-top: 4px; font-size: 11px; }
.forte-search__loader i { animation: forte-search-spin .8s linear infinite; }

.forte-mobile-search-shell {
    position: relative;
    z-index: 1040;
    padding: 12px;
    background: #3d464d;
}

.forte-search--mobile .forte-search__field { min-height: 46px; border: 0; border-radius: 13px; }
.forte-search--mobile .forte-search__field input { height: 46px; font-size: 14px; }
.forte-search--mobile .forte-search__field > button { height: 46px; }

@keyframes forte-search-spin { to { transform: rotate(360deg); } }

@media (max-width: 991.98px) {
    /* Join the mobile navigation and search backgrounds, including the home-page override. */
    .container-navbar > .container-fluid.mb-30 { margin-bottom: 0 !important; }
}

@media (max-width: 767.98px) {
    .forte-utility-bar .forte-utility-account,
    .forte-utility-bar .forte-utility-currency,
    .forte-utility-bar .forte-utility-language { display: none !important; }
    .forte-utility-bar .row { min-height: 38px; align-items: center; }
    .forte-utility-bar .col-lg-6.text-center { display: flex; align-items: center; justify-content: space-between; }
    .forte-utility-bar .forte-location-trigger { min-height: 34px; padding: 5px 8px; }
    .is-product-page .forte-utility-bar { display: none; }
    .forte-search__panel { top: calc(100% + 7px); width: calc(100vw - 24px); max-height: min(560px, 66vh); border-radius: 14px; }
    .forte-search__section { padding: 9px; }
    .forte-search__product { grid-template-columns: 54px minmax(0, 1fr); min-height: 72px; gap: 10px; padding: 7px; }
    .forte-search__product img { width: 54px; height: 54px; }
    .forte-search__product-meta { grid-column: 2; display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; text-align: left; }
    .forte-search__product-meta strong { font-size: 12px; }
    .forte-search__product-copy strong { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .forte-search__loader i { animation: none; }
}
