/* ==========================================
   DIAMANTE — Buscador en tiempo real (dropdown estilo CRONOSTEC)
   ========================================== */

[data-live-search-wrap] {
    position: relative;
}

[data-live-search-results] {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(13, 31, 60, 0.22);
    z-index: 999;
    max-height: 70vh;
    overflow: hidden;
}
[data-live-search-results].open { display: block; }

.ls-panel {
    display: grid;
    grid-template-columns: 1fr 300px;
    max-height: 70vh;
}
@media (max-width: 640px) {
    .ls-panel { grid-template-columns: 1fr; }
    .ls-col-preview { display: none; } /* en mobile priorizamos la lista */
}

.ls-col-list {
    padding: 0.75rem 0;
    overflow-y: auto;
    max-height: 70vh;
    border-right: 1px solid #eceef0;
}

.ls-section-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: #7A8B99;
    padding: 0.6rem 1.25rem 0.4rem;
}

.ls-cat-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1.25rem;
    color: #0D1F3C;
    text-decoration: none;
    font-size: 0.87rem;
    font-weight: 600;
    border-left: 3px solid transparent;
    transition: background 0.12s ease, border-color 0.12s ease;
}
.ls-cat-item:hover,
.ls-cat-item.active {
    background: #F7F7F5;
    border-left-color: #C9A84C;
}
.ls-cat-item svg { color: #C9A84C; flex-shrink: 0; }

.ls-prod-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1.25rem;
    text-decoration: none;
    color: inherit;
    border-left: 3px solid transparent;
    transition: background 0.12s ease, border-color 0.12s ease;
}
.ls-prod-item:hover,
.ls-prod-item.active {
    background: #F7F7F5;
    border-left-color: #C9A84C;
}
.ls-prod-item img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 6px;
    background: #F7F7F5;
    flex-shrink: 0;
}
.ls-prod-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.ls-prod-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #0D1F3C;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ls-prod-code {
    font-size: 0.72rem;
    color: #7A8B99;
}

.ls-ver-todos {
    display: block;
    text-align: center;
    padding: 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #C9A84C;
    text-decoration: none;
    border-top: 1px solid #eceef0;
    margin-top: 0.4rem;
}
.ls-ver-todos:hover { text-decoration: underline; }

/* ---------- Columna derecha: vista previa ---------- */
.ls-col-preview {
    background: #F7F7F5;
    padding: 1.25rem;
    overflow-y: auto;
}
.ls-preview-card { display: flex; flex-direction: column; }
.ls-preview-img {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    margin-bottom: 0.85rem;
}
.ls-preview-img img { width: 100%; height: 100%; object-fit: cover; }
.ls-preview-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    color: #0D1F3C;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}
.ls-preview-desc {
    font-size: 0.76rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 1rem;
}
.ls-preview-desc strong { color: #0D1F3C; }
.ls-preview-btn {
    display: inline-block;
    text-align: center;
    background: #C9A84C;
    color: #0D1F3C;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    text-decoration: none;
}
.ls-preview-btn:hover { background: #b8973f; }

/* ---------- Vista previa de CATEGORÍA (hover sobre categoría) ---------- */
.ls-preview-cat-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    color: #7A8B99;
    margin-bottom: 0.3rem;
}
.ls-preview-cat-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    color: #0D1F3C;
    line-height: 1.3;
    margin-bottom: 1rem;
}
.ls-cat-preview-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.ls-cat-preview-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    background: #fff;
    border-radius: 6px;
    padding: 0.4rem 0.5rem;
    transition: box-shadow 0.15s ease;
}
.ls-cat-preview-item:hover { box-shadow: 0 2px 8px rgba(13,31,60,0.1); }
.ls-cat-preview-item img {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border-radius: 5px;
    background: #F7F7F5;
    flex-shrink: 0;
}
.ls-cat-preview-item span {
    font-size: 0.74rem;
    font-weight: 600;
    color: #0D1F3C;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ls-ver-categoria-btn {
    background: #0D1F3C;
    color: #F7F7F5;
    text-align: center;
}
.ls-ver-categoria-btn:hover { background: #16305c; }

/* ---------- Sin resultados ---------- */
.ls-empty {
    padding: 2rem 1.5rem;
    text-align: center;
}
.ls-empty p { font-size: 0.85rem; color: #333; margin: 0 0 0.5rem; }
.ls-empty-sub { color: #7A8B99 !important; font-size: 0.78rem !important; }
.ls-empty-sub a { color: #C9A84C; font-weight: 600; }