/* ── Prairie Roots Live Search ── */

.prs-search-wrap {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: 6px auto 4px;
    z-index: 9999;
    font-family: 'Montserrat', sans-serif;
    box-sizing: border-box;
}

.prs-search-inner {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.prs-search-input {
    width: 100% !important;
    padding: 12px 46px 12px 18px !important;
    font-size: 0.95rem !important;
    font-family: 'Montserrat', sans-serif !important;
    border: 1px solid rgba(212,168,67,0.35) !important;
    border-radius: 999px !important;
    background: rgba(212,168,67,0.07) !important;
    color: #fff !important;
    outline: none !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.prs-search-input::placeholder {
    color: rgba(255,255,255,0.4) !important;
    font-family: 'Montserrat', sans-serif !important;
}

.prs-search-input:focus {
    border-color: #d4a843 !important;
    background: rgba(212,168,67,0.12) !important;
    box-shadow: 0 0 0 3px rgba(212,168,67,0.15) !important;
}

.prs-search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #d4a843;
    background: transparent;
    pointer-events: none;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prs-search-clear {
    position: absolute;
    right: 42px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    display: none;
    font-family: 'Montserrat', sans-serif;
}

.prs-search-clear.prs-visible {
    display: block;
}

.prs-search-clear:hover {
    color: #d4a843;
}

/* ── Results Panel ── */
.prs-results-panel {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #161616;
    border: 1px solid rgba(212,168,67,0.25);
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.55);
    max-height: 480px;
    overflow-y: auto;
    z-index: 10000;
    font-family: 'Montserrat', sans-serif;
}

.prs-results-panel.prs-open {
    display: block;
}

.prs-loading,
.prs-no-results {
    padding: 20px 18px;
    text-align: center;
    font-size: 0.85rem;
    font-family: 'Montserrat', sans-serif;
    color: rgba(255,255,255,0.45);
}

.prs-no-results strong {
    color: #d4a843;
}

.prs-results-list {
    display: flex;
    flex-direction: column;
    padding: 8px;
}

.prs-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    text-decoration: none !important;
    border-radius: 12px;
    transition: background 0.15s;
}

.prs-result-item:hover {
    background: rgba(212,168,67,0.1);
}

.prs-result-img {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 10px;
    overflow: hidden;
    background: #0d0d0d;
    border: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

.prs-result-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.prs-result-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.prs-result-title {
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    color: #fff;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prs-result-brand {
    font-size: 0.68rem;
    color: rgba(212,168,67,0.8);
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.prs-result-price {
    font-size: 0.8rem;
    font-family: 'Montserrat', sans-serif;
    color: rgba(255,255,255,0.6);
}

.prs-result-price ins {
    text-decoration: none;
    color: #d4a843;
}

.prs-result-price del {
    color: rgba(255,255,255,0.3);
    margin-right: 4px;
}

.prs-result-oos {
    font-size: 0.65rem;
    color: #ef4444;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.prs-view-all {
    display: block;
    text-align: center;
    padding: 13px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    color: #d4a843 !important;
    text-decoration: none !important;
    border-top: 1px solid rgba(212,168,67,0.15);
    border-radius: 0 0 18px 18px;
    background: rgba(212,168,67,0.06);
    transition: background 0.15s;
}

.prs-view-all:hover {
    background: rgba(212,168,67,0.14);
    text-decoration: none !important;
}

/* ── Scrollbar styling ── */
.prs-results-panel::-webkit-scrollbar {
    width: 6px;
}
.prs-results-panel::-webkit-scrollbar-track {
    background: transparent;
}
.prs-results-panel::-webkit-scrollbar-thumb {
    background: rgba(212,168,67,0.3);
    border-radius: 999px;
}

/* ── Mobile ── */
@media (max-width: 600px) {
    .prs-search-wrap {
        max-width: 100%;
        margin: 8px auto;
        padding: 0 12px;
    }
    .prs-results-panel {
        left: 12px;
        right: 12px;
        max-height: 60vh;
    }
    .prs-result-title {
        font-size: 0.8rem;
    }
}

/* ── Compact variant for fitting inside a fixed nav bar ──
   Use class="prs-search-wrap prs-nav-compact" on the wrapper */
.prs-nav-compact {
    max-width: 220px;
    margin: 0 0.75rem !important;
    flex: 0 1 220px;
}

.prs-nav-compact .prs-search-input {
    padding: 7px 34px 7px 14px !important;
    font-size: 0.74rem !important;
}

.prs-nav-compact .prs-search-icon {
    right: 12px;
    font-size: 0.85rem;
}

.prs-nav-compact .prs-search-clear {
    right: 32px;
}

.prs-nav-compact .prs-results-panel {
    top: calc(100% + 12px);
    left: auto;
    right: 0;
    width: 320px;
}

@media (max-width: 992px) {
    .prs-nav-compact {
        max-width: 160px;
        flex: 0 1 160px;
        margin: 0 0.5rem !important;
    }
}

@media (max-width: 768px) {
    .prs-nav-compact {
        max-width: 100%;
        order: 99;
        flex: 1 1 100%;
        margin: 8px 0 0 0 !important;
    }
    .prs-nav-compact .prs-search-input {
        padding: 9px 38px 9px 16px !important;
        font-size: 0.85rem !important;
    }
    .prs-nav-compact .prs-results-panel {
        left: 0;
        right: 0;
        width: auto;
    }
}
