.jd-ps-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999999;
    box-sizing: border-box;
}

.jd-ps-overlay.active {
    display: block;
}

.jd-ps-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 72px 60px 64px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-12px);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.jd-ps-overlay.active .jd-ps-panel {
    transform: translateY(0);
    opacity: 1;
}

body.admin-bar .jd-ps-panel {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .jd-ps-panel {
        top: 46px;
    }
}

.jd-ps-close {
    position: absolute;
    top: 18px;
    right: 28px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #222;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 2;
}

.jd-ps-close:hover {
    color: #000;
    opacity: 0.7;
}

.jd-ps-panel-inner {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.jd-ps-search-box {
    position: relative;
}

.jd-ps-input-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.jd-ps-input {
    flex: 1;
    min-width: 0;
    height: 52px;
    margin: 0;
    border: 0 !important;
    border-bottom: 1px solid #cfcfcf !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0 8px 0 0;
    font-size: 24px;
    line-height: 1.3;
    color: #555;
    -webkit-appearance: none;
    appearance: none;
}

.jd-ps-input:focus {
    border-bottom-color: #999 !important;
}

.jd-ps-input::placeholder {
    color: #b0b0b0;
}

.jd-ps-clear {
    border: 0;
    background: transparent;
    color: #b5b5b5;
    font-size: 22px;
    line-height: 1;
    width: 28px;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jd-ps-clear:hover {
    color: #666;
}

.jd-ps-clear[hidden] {
    display: none !important;
}

.jd-ps-submit-btn {
    flex-shrink: 0;
    min-width: 120px;
    height: 44px;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 0 28px;
    background: var(--jd-ps-primary, #ffc107);
    color: #222;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: none;
    outline: none;
}

.jd-ps-submit-btn:hover {
    filter: brightness(0.97);
}

.jd-ps-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    margin: 0;
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
    max-height: min(420px, 55vh);
    overflow-y: auto;
    z-index: 5;
}

.jd-ps-suggestions[hidden] {
    display: none !important;
}

.jd-ps-suggestions::-webkit-scrollbar {
    width: 6px;
}

.jd-ps-suggestions::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.jd-ps-suggestion-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    text-decoration: none;
    color: #444;
    background: #fff;
    border: 0;
}

.jd-ps-suggestion-item:hover {
    background: #fafafa;
    color: #222;
}

.jd-ps-suggestion-item img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f5f5f5;
}

.jd-ps-suggestion-title {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
    color: inherit;
}

.jd-ps-loading,
.jd-ps-no-results {
    text-align: center;
    padding: 30px 20px;
    color: #999;
    font-size: 14px;
}

.jd-ps-see-all {
    display: block;
    text-align: center;
    padding: 16px 18px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9a9a9a;
    text-decoration: none;
    border-top: 1px solid #f0f0f0;
    background: #fff;
}

.jd-ps-see-all:hover {
    color: #666;
}

.jd-ps-panel *:focus {
    outline: none !important;
    box-shadow: none !important;
}

@media (max-width: 600px) {
    .jd-ps-panel {
        padding: 56px 20px 44px;
    }

    .jd-ps-close {
        top: 10px;
        right: 12px;
        font-size: 30px;
    }

    .jd-ps-input-wrapper {
        gap: 10px;
    }

    .jd-ps-input {
        font-size: 20px;
        height: 46px;
    }

    .jd-ps-submit-btn {
        min-width: 92px;
        height: 40px;
        padding: 0 14px;
        font-size: 13px;
    }

    .jd-ps-suggestions {
        max-height: 50vh;
    }

    .jd-ps-suggestion-item {
        padding: 12px 14px;
        gap: 12px;
    }

    .jd-ps-suggestion-item img {
        width: 40px;
        height: 40px;
    }
}
