/* ── Nav Search Button ── */
.nav-search-btn {
    position: absolute;
    right: 130px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 4px;
    color: var(--brown, #3D2F23);
    display: flex;
    align-items: center;
    transition: color 0.2s;
    line-height: 0;
}
[dir="ltr"] .nav-search-btn { right: auto; left: 130px; }
.nav-search-btn:hover { color: var(--gold, #B5A064); }
.nav-search-btn svg { width: 21px; height: 21px; }

/* On mobile the navbar switches to flex-row via mobile-nav.js — give the
   search button a static position and an explicit order so it sits
   between the hamburger and the cart, not on top of them. */
@media (max-width: 820px) {
    .nav-search-btn {
        position: static !important;
        order: 1 !important;
        right: auto !important;
        left: auto !important;
        transform: none !important;
        margin: 0 6px !important;
    }
}

@media (max-width: 480px) {
    .nav-search-btn svg { width: 19px; height: 19px; }
}

/* ── Nav Search Overlay ── */
#nav-search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 8500;
    background: rgba(20, 12, 6, 0.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
#nav-search-overlay.open { display: block; }

.nso-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: var(--cream, #FAF7F2);
    box-shadow: 0 6px 40px rgba(0,0,0,0.18);
    max-height: 80vh;
    overflow-y: auto;
}

.nso-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--cream-dark, #EFE9DF);
}

.nso-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--brown-light, #6B5547);
}

#nso-input {
    flex: 1;
    border: none;
    background: none;
    font-family: 'Frank Ruhl Libre', serif;
    font-size: 1.1rem;
    color: var(--brown, #3D2F23);
    outline: none;
    direction: rtl;
}
#nso-input::placeholder { color: var(--brown-light, #6B5547); opacity: 0.65; }

#nso-close {
    flex-shrink: 0;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--brown-light, #6B5547);
    padding: 4px 8px;
    transition: color 0.2s;
    line-height: 1;
}
#nso-close:hover { color: var(--brown, #3D2F23); }

#nso-results { padding: 8px 0; }

.nso-result {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 24px;
    color: var(--brown, #3D2F23);
    text-decoration: none;
    transition: background 0.15s;
    direction: rtl;
}
.nso-result:hover { background: var(--cream-dark, #EFE9DF); }

.nso-thumb {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--cream-dark, #EFE9DF);
}
.nso-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nso-no-img { width: 100%; height: 100%; }

.nso-info { flex: 1; min-width: 0; }

.nso-name {
    font-size: 0.98rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nso-price {
    font-size: 0.88rem;
    color: var(--brown-light, #6B5547);
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nso-sold-out {
    font-size: 0.78rem;
    color: var(--brown-light, #6B5547);
    background: var(--cream-dark, #EFE9DF);
    border-radius: 3px;
    padding: 1px 6px;
}

.nso-empty {
    padding: 16px 24px;
    color: var(--brown-light, #6B5547);
    font-size: 0.95rem;
    text-align: center;
}

.nso-body-open { overflow: hidden; }

@media (max-width: 480px) {
    .nso-bar { padding: 12px 16px; gap: 8px; }
    .nso-result { padding: 10px 16px; gap: 12px; }
    .nso-thumb { width: 44px; height: 44px; }
    .nso-name { font-size: 0.92rem; }
}
