/* Widget: HawkSearch Bar — mirrors header-search expansion behaviour */

.hs-bar {
    position: relative;
    width: 100%;
    height: 35px;
    font-family: inherit;
}

/* Form wrapper — transform traps the fixed input within the widget bounds */
.hs-bar__form {
    position: relative;
    width: 100%;
    height: 35px;
    -webkit-transform: translate(0, 0);
    transform: translate(0, 0);
}

/* Remove form transform when open so the fixed input escapes to the full header */
.hs-bar--open .hs-bar__form {
    -webkit-transform: none;
    transform: none;
}

/* Input — fixed positioning, trapped within form until open */
.hs-bar__input {
    height: 33px;
    padding: 8px 50px 8px 24px;
    background: #fff;
    border-radius: 5px;
    border: none;
    outline: none;
    font-size: 16px;
    font-weight: 500;
    color: #8b8b8b;
    position: fixed;
    top: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    left: 0;
    right: 0;
    width: auto;
    -webkit-transition: 0s;
    transition: 0s;
    box-sizing: border-box;
}

.hs-bar__input::placeholder {
    color: #8b8b8b;
}

/* When open: left retracts to show nav links (same as original widget) */
@media (min-width: 1024px) {
    .hs-bar--open .hs-bar__input {
        left: 200px;
        padding-right: 145px; /* room for category + submit */
    }
}

@media (min-width: 1200px) {
    .hs-bar--open .hs-bar__input {
        left: 350px;
        padding-right: 145px;
    }
}

/* Submit button — absolute inside form, sits at the widget right edge */
.hs-bar__submit {
    position: absolute;
    width: 40px;
    height: 35px;
    top: 0;
    right: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b8b8b;
    z-index: 9999;
}

.hs-bar__submit:hover {
    background: transparent;
}

.hs-bar__submit:hover svg {
    color: #333;
}

.hs-bar__submit svg {
    pointer-events: none;
}

/* Category select — hidden by default, shown when bar is open */
.hs-bar__category {
    display: none;
    position: absolute;
    right: 40px;
    top: 0;
    height: 35px;
    border: none;
    border-left: 1px solid #ddd;
    background: transparent;
    padding: 0 8px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    outline: none;
    z-index: 9999;
}

.hs-bar--open .hs-bar__category {
    display: block;
}

/* Dropdown — fixed, JS sets top; left mirrors the expanded input */
.hs-bar__dropdown {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    /* top set by JS on open */
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 9998;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .hs-bar__dropdown { left: 200px; }
}

@media (min-width: 1200px) {
    .hs-bar__dropdown { left: 350px; }
}

.hs-bar__dropdown.is-visible {
    display: block;
}

/* Text suggestions */
.hs-bar__suggestions {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.hs-bar__suggestions:empty {
    display: none;
}

.hs-bar__suggestions li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background 0.1s;
}

.hs-bar__suggestions li:hover,
.hs-bar__suggestions li.is-active {
    background: #f5f5f5;
}

.hs-bar__suggestions li svg {
    flex-shrink: 0;
    color: #999;
}

.hs-bar__suggestion-text {
    flex: 1;
}

.hs-bar__suggestion-text strong {
    font-weight: 600;
}

/* Products section */
.hs-bar__products {
    border-top: 1px solid #eee;
    padding: 12px 16px 16px;
}

.hs-bar__products.is-hidden {
    display: none;
}

.hs-bar__products-heading {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    margin-bottom: 10px;
}

.hs-bar__products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.hs-bar__product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.1s;
    text-decoration: none;
    color: inherit;
}

.hs-bar__product-card:hover {
    background: #f5f5f5;
}

.hs-bar__product-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    margin-bottom: 6px;
}

.hs-bar__product-title {
    font-size: 12px;
    color: #333;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hs-bar__products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
