/* =========================================================================
   MishiLand Smart Search v12.0 — سراسری اما سبک (فقط چند کیلوبایت).
   دو بخش: (۱) دراپ‌داون جستجوی زنده، (۲) هدر صفحه نتایج جستجو.
   ========================================================================= */

:root {
    --mlss-copper: #a66731;
    --mlss-ink: #1f2937;
    --mlss-muted: #6b7280;
    --mlss-line: #ece7df;
    --mlss-paper: #fbf7f0;
}

/* ---------- دراپ‌داون جستجوی زنده ---------- */
.mlss-dropdown {
    position: absolute;
    z-index: 9999;
    inset-inline: 0;
    top: 100%;
    margin-top: 6px;
    background: #fff;
    border: 1px solid var(--mlss-line);
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(17,24,39,.14);
    max-height: 420px;
    overflow-y: auto;
    direction: rtl;
    font-family: "Vazirmatn", Tahoma, sans-serif;
}
.mlss-dropdown[hidden] { display: none; }

.mlss-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    text-decoration: none !important;
    color: var(--mlss-ink) !important;
    border-bottom: 1px solid var(--mlss-line);
}
.mlss-item:last-child { border-bottom: none; }
.mlss-item:hover { background: var(--mlss-paper); }

.mlss-item__img {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--mlss-paper);
}
.mlss-item__img img { width: 100%; height: 100%; object-fit: contain; display: block; }

.mlss-item__body { flex: 1 1 auto; min-width: 0; }
.mlss-item__name {
    display: block;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mlss-item__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    font-size: 11px;
    color: var(--mlss-muted);
}
.mlss-item__price { color: var(--mlss-copper); font-weight: 800; }
.mlss-item__oos {
    color: #c0392b;
    font-weight: 700;
    font-size: 10.5px;
}

.mlss-footer {
    display: block;
    text-align: center;
    padding: 10px;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--mlss-copper);
    text-decoration: none !important;
    background: var(--mlss-paper);
}
.mlss-footer:hover { text-decoration: underline !important; }

.mlss-empty,
.mlss-suggestion {
    padding: 14px;
    font-size: 13px;
    color: var(--mlss-muted);
    text-align: center;
}
.mlss-suggestion a { color: var(--mlss-copper); font-weight: 800; text-decoration: none; }
.mlss-suggestion a:hover { text-decoration: underline; }

/* ---------- هدر صفحه نتایج جستجو (فقط زمانی که is_search()) ---------- */
.mlsr-header {
    max-width: 1200px;
    margin: 0 auto 18px;
    padding: 0 20px;
    direction: rtl;
}
.mlsr-title { font-size: 22px; font-weight: 900; color: var(--mlss-ink); margin: 10px 0 4px; }
.mlsr-count { font-size: 13px; color: var(--mlss-muted); margin: 0 0 10px; }
.mlsr-suggestion { font-size: 14px; margin: 0 0 6px; }
.mlsr-suggestion a { color: var(--mlss-copper); font-weight: 800; text-decoration: none; }
.mlsr-empty-hint { font-size: 13px; color: var(--mlss-muted); margin: 0 0 14px; }
.mlsr-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.mlsr-cats a {
    background: var(--mlss-paper);
    color: var(--mlss-copper);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
}
.mlsr-cats a:hover { text-decoration: underline; }

@media (max-width: 600px) {
    .mlss-dropdown { max-height: 320px; }
    .mlsr-title { font-size: 18px; }
}
