/* ────────────────────────────────────────────
   ESM QUICK SEARCH — dropdown risultati live
   Si applica a QUALSIASI campo di ricerca esistente
   nel tema (header Astra, overlay, sidebar, ecc.)
   ──────────────────────────────────────────── */

.esm-qs-wrap {
    position: relative;
}

.esm-qs-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 6px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    max-height: 420px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
}

.esm-qs-dropdown.esm-qs-open {
    display: block;
}

.esm-qs-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f1f1f1;
}

.esm-qs-item:last-of-type { border-bottom: none; }

.esm-qs-item:hover,
.esm-qs-item.esm-qs-active {
    background: #f8f9fa;
}

.esm-qs-item img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: #f1f1f1;
}

.esm-qs-item-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 2px;
}

.esm-qs-item-price {
    font-size: 12px;
    color: #262350;
    font-weight: 700;
}

.esm-qs-viewall {
    display: block;
    text-align: center;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #262350;
    text-decoration: none;
    border-top: 1px solid #f1f1f1;
}

.esm-qs-empty,
.esm-qs-loading {
    padding: 16px;
    text-align: center;
    font-size: 13px;
    color: #6c757d;
}

@media (max-width: 768px) {
    .esm-qs-dropdown {
        position: fixed;
        top: var(--esm-qs-mobile-top, 60px);
        left: 8px;
        right: 8px;
        margin-top: 0;
        max-height: calc(100vh - 80px);
    }
}
