/* Live search dropdown — Gromark-style panel with dark overlay */

.jh-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(0, 0, 0, 0.58);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s ease;
    pointer-events: none;
}

.jh-search-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.jh-search-overlay[hidden] {
    display: block !important;
}

.jh-search-overlay[hidden]:not(.is-visible) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

html.jh-search-active,
body.jh-search-active {
    overflow: hidden;
}

html.jh-search-scroll-lock {
    overflow: hidden;
}

body.jh-search-scroll-lock {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    overflow: hidden;
}

.jh-live-search {
    position: relative;
    width: 100%;
}

.jh-live-search .search-shell {
    height: 48px;
    border: 2px solid #000;
    border-radius: 999px;
    background: #fff;
    box-shadow: none;
    overflow: hidden;
}

.jh-live-search .search-shell input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 0 14px 0 18px;
    border-radius: 999px 0 0 999px;
    background: #fff;
    font-size: 14px;
    color: #111;
}

.jh-live-search .search-shell input::placeholder {
    color: #9ca3af;
}

.jh-live-search .search-shell .search-btn {
    width: 48px;
    height: 100%;
    border: 0;
    border-radius: 0 999px 999px 0;
    background: #fff;
    color: #111;
    font-size: 17px;
}

.jh-live-search .search-shell .search-btn i {
    -webkit-text-stroke: 0.5px currentColor;
}

.jh-live-search.is-open {
    z-index: 1110;
}

.jh-live-search.is-pinned {
    position: fixed;
    top: var(--jh-pin-top, 0);
    left: var(--jh-pin-left, 0);
    width: var(--jh-pin-width, 600px) !important;
    max-width: calc(100vw - 24px);
    z-index: 1110;
    box-sizing: border-box;
    margin: 0;
}

.jh-live-search.is-pinned .jh-live-search__panel {
    max-height: min(460px, calc(100vh - var(--jh-pin-top, 0px) - 72px));
}

.jh-live-search-placeholder {
    width: 100%;
    pointer-events: none;
}

.jh-live-search__form input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    cursor: pointer;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath fill='%23000000' d='M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
}

.jh-live-search__form input[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
}

body.jh-search-active .jh-live-search.is-open .jh-live-search__form.search-shell,
body.jh-search-active .jh-live-search.is-open .jh-live-search__panel {
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.22);
}

.jh-live-search.is-open .jh-live-search__form.search-shell {
    border: 2px solid #000;
    border-radius: 16px 16px 0 0;
    border-bottom: 0;
    overflow: visible;
}

.jh-live-search.is-open .search-shell input {
    border-radius: 14px 0 0 0;
}

.jh-live-search.is-open .search-shell .search-btn {
    border-radius: 0 14px 0 0;
}

.jh-live-search__panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 2px solid #000;
    border-top: 0;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    max-height: min(460px, 58vh);
    overflow: hidden;
}

.jh-live-search__panel[hidden] {
    display: none !important;
}

.jh-live-search__panel-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.jh-live-search__section {
    padding: 16px 18px;
}

.jh-live-search__section + .jh-live-search__section {
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.jh-live-search__section--list {
    padding: 0;
}

.jh-live-search__section--list + .jh-live-search__section--list {
    border-top: 1px solid #f0f0f0;
}

.jh-live-search__label {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: #111;
}

.jh-live-search__section--list .jh-live-search__label {
    margin: 0;
    padding: 14px 18px 8px;
}

.jh-live-search__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.jh-live-search__chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #e8e0d4;
    background: #f5f0ea;
    color: #111;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .12s ease, background .12s ease;
}

.jh-live-search__chip i {
    font-size: 12px;
    color: #ff5722;
}

.jh-live-search__chip:hover {
    border-color: #000;
    background: #fff;
    color: #000;
}

.jh-live-search__empty-note {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

.jh-live-search__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 56px;
    padding: 12px;
    color: #6b7280;
    font-size: 13px;
}

.jh-live-search__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: inherit;
    border-top: 1px solid rgba(17, 17, 17, .05);
    transition: background .1s ease;
}

.jh-live-search__list .jh-live-search__item:first-child {
    border-top: 0;
}

.jh-live-search__item:hover,
.jh-live-search__item.is-active {
    background: #faf7f3;
}

.jh-live-search__thumb-wrap {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    background: #f3f4f6;
    flex-shrink: 0;
}

.jh-live-search__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.jh-live-search__meta {
    flex: 1;
    min-width: 0;
}

.jh-live-search__meta strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary, #111);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jh-live-search__meta strong mark {
    background: rgba(255, 106, 61, .15);
    color: inherit;
    padding: 0;
    border-radius: 0;
}

.jh-live-search__meta-sub {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jh-live-search .product-tag {
    font-size: 10px;
    text-transform: uppercase;
    color: #000000;
    font-weight: 800;
}

.jh-live-search__price {
    flex-shrink: 0;
    text-align: right;
    font-size: 12px;
    font-weight: 700;
    color: #000000;
}

.jh-live-search__price small {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: #6b7280;
}

.jh-live-search__price.is-pod {
    color: #17603a;
    font-size: 11px;
    max-width: 80px;
    line-height: 1.25;
}

.jh-live-search__category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--secondary, #111);
    border-top: 1px solid rgba(17, 17, 17, .05);
    font-size: 13px;
    font-weight: 600;
    transition: background .1s ease;
}

.jh-live-search__list .jh-live-search__category:first-child {
    border-top: 0;
}

.jh-live-search__category:hover {
    background: #faf7f3;
}

.jh-live-search__category small {
    display: block;
    margin-top: 1px;
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
}

.jh-live-search__category > i {
    color: #9ca3af;
    font-size: 10px;
}

.jh-live-search__empty {
    padding: 16px 14px;
}

.jh-live-search__empty-title {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary, #111);
}

.jh-live-search__empty-text {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.45;
}

.jh-live-search__panel-foot {
    padding: 10px 14px;
    border-top: 1px solid var(--line, #ece6de);
    background: #faf7f3;
    text-align: center;
}

.jh-live-search__view-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    color: var(--secondary, #111);
}

.jh-live-search__view-all:hover {
    color: #000;
}

.jh-live-search__view-all i {
    font-size: 10px;
}

/* Mobile full-screen */
.jh-live-search-mobile {
    position: fixed;
    inset: 0;
    z-index: 1120;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.jh-live-search-mobile__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px 8px;
    border-bottom: 1px solid #f0ebe4;
    background: #fff;
}

.jh-live-search-mobile__close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #111;
    font-size: 16px;
}

.jh-live-search-mobile__title {
    font-size: 16px;
    font-weight: 700;
    color: #111;
}

.jh-live-search-mobile__body {
    padding: 8px 16px 16px;
    overflow: auto;
    flex: 1;
    background: #fff;
}

/* Mobile: gray rounded field + white results panel */
.jh-live-search--mobile-shell .jh-live-search__form.search-shell,
.jh-live-search--mobile-shell.is-open .jh-live-search__form.search-shell {
    height: 46px;
    border: 0 !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    background: #f3f3f3 !important;
    overflow: hidden;
}

.jh-live-search--mobile-shell .search-shell input,
.jh-live-search--mobile-shell.is-open .search-shell input,
.jh-live-search--mobile-shell .search-shell .search-btn,
.jh-live-search--mobile-shell.is-open .search-shell .search-btn {
    background: transparent !important;
    border-radius: 0 !important;
}

.jh-live-search--mobile-shell .jh-live-search__panel {
    position: static;
    top: auto;
    margin-top: 8px;
    max-height: none;
    border: 0 !important;
    box-shadow: none !important;
    background: #fff;
}

.jh-live-search--mobile-shell.is-open .jh-live-search__panel {
    border: 0 !important;
    box-shadow: none !important;
    background: #fff;
}

body.jh-search-active .jh-live-search--mobile-shell.is-open .jh-live-search__form.search-shell,
body.jh-search-active .jh-live-search--mobile-shell.is-open .jh-live-search__panel {
    box-shadow: none !important;
}

.jh-live-search--mobile-shell .jh-live-search__item:hover,
.jh-live-search--mobile-shell .jh-live-search__item.is-active,
.jh-live-search--mobile-shell .jh-live-search__category:hover {
    background: #faf7f3;
}

.jh-live-search--mobile-shell .jh-live-search__panel-foot {
    padding: 10px 14px;
    border-top: 1px solid #ece6de;
    background: #faf7f3;
    text-align: center;
}

.header-search-open {
    min-width: 40px;
}

@media (max-width: 991.98px) {
    body.jh-search-active .jh-live-search-mobile {
        display: flex !important;
    }
}
