/* ==========================================================================
   Product search box — [hec_search_box]
   ========================================================================== */

.hec-search-box {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
}

.hec-search-input {
    flex: 1;
    min-width: 0;
    width: 100% !important;
    padding: 13px 16px !important;
    border: 1.5px solid #e0e0e0 !important;
    border-right: none !important;
    border-radius: 8px 0 0 8px !important;
    background: #fff !important;
    color: #222 !important;
    font-size: 14px !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
}
.hec-search-input::placeholder {
    color: #aaa;
}
.hec-search-input:focus {
    outline: none !important;
    border-color: var(--e-global-color-primary, #ff7a1a) !important;
}
/* Remove the native browser "x" clear button on type=search so it
   doesn't collide with our own suggestions dropdown */
.hec-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.hec-search-submit,
.hec-search-submit:link,
.hec-search-submit:visited,
.hec-search-submit:hover,
.hec-search-submit:focus,
.hec-search-submit:active {
    flex-shrink: 0;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 52px !important;
    min-width: 52px !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 8px 8px 0 !important;
    background: var(--e-global-color-primary, #ff7a1a) !important;
    color: #fff !important;
    cursor: pointer;
    box-shadow: none !important;
}
@media (hover: hover) and (pointer: fine) {
    .hec-search-submit:hover {
        filter: brightness(0.94);
    }
}
/* Belt-and-braces: a sitewide icon/SVG reset can otherwise force
   fill on the circle/path (CSS fill always wins over the SVG's own
   fill="none" attribute), turning the hollow magnifying-glass outline
   into a solid blob — which is what made the icon look "broken". */
.hec-search-submit svg {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    max-width: none !important;
    flex-shrink: 0;
    overflow: visible;
}
.hec-search-submit svg circle,
.hec-search-submit svg path {
    fill: none !important;
    stroke: #fff !important;
}

/* ---------------- Suggestions dropdown ---------------- */
.hec-search-suggestions {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    z-index: 500;
    max-height: 360px;
    overflow-y: auto;
    text-align: left;
}
.hec-search-suggestions.is-open {
    display: block;
}

.hec-search-suggestion {
    display: flex !important;
    align-items: center !important;
    gap: 10px;
    padding: 10px 14px !important;
    text-decoration: none !important;
    border-bottom: 1px solid #f2f2f2;
    color: inherit !important;
}
.hec-search-suggestion:last-child {
    border-bottom: none;
}
.hec-search-suggestion:hover,
.hec-search-suggestion:focus {
    background: #f8f9fa;
}
.hec-search-suggestion img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f8f9fa;
}
.hec-search-suggestion-info {
    flex: 1;
    min-width: 0;
}
.hec-search-suggestion-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #222;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hec-search-suggestion-price {
    display: block;
    font-size: 12.5px;
    color: var(--e-global-color-primary, #ff7a1a);
    font-weight: 700;
    margin-top: 2px;
}

.hec-search-suggestion-more {
    display: block !important;
    text-align: center !important;
    padding: 11px !important;
    font-size: 13px;
    font-weight: 700;
    color: var(--e-global-color-primary, #ff7a1a) !important;
    text-decoration: none !important;
    background: #fafafa;
}
.hec-search-suggestion-more:hover {
    background: #f2f2f2;
}

.hec-search-suggestion-empty,
.hec-search-suggestion-loading {
    padding: 16px;
    text-align: center;
    font-size: 13px;
    color: #999;
}

/* ---------------- Search results heading ---------------- */
.hec-search-heading {
    text-align: center;
    margin-bottom: 20px;
}
.hec-search-heading-title {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin: 0 0 6px;
}
.hec-search-heading-count {
    font-size: 14px;
    color: #777;
    margin: 0;
}
