/* =============================================
   VIC Sports – Búsqueda predictiva (dropdown)
   ============================================= */

/* ── Contenedor ─────────────────────────────── */
.vfps-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    border: 1px solid #e4e4e4;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    max-height: 480px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── Lista de resultados ────────────────────── */
.vfps-results {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vfps-result-item {
    border-bottom: 1px solid #f0f0f0;
}

.vfps-result-item:last-child {
    border-bottom: none;
}

.vfps-result-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: inherit;
    transition: background .15s ease;
}

.vfps-result-link:hover,
.vfps-result-link:focus {
    background: #f7f7f7;
}

/* Item activo por teclado */
.vfps-result-item.vfps-active .vfps-result-link {
    background: #f7f7f7;
    outline: none;
}

.vfps-view-all.vfps-active {
    background: #333;
    color: #fff;
    outline: none;
}

/* ── Imagen ─────────────────────────────────── */
.vfps-result-image {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    overflow: hidden;
    background: #fff;
}

.vfps-result-item.vfps-active .vfps-result-link .vfps-result-image,
.vfps-result-link:hover .vfps-result-image,
.vfps-result-link:focus .vfps-result-image {
    background: #f7f7f7;
}

.vfps-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    mix-blend-mode: multiply;
}

/* ── Info (título + precio) ─────────────────── */
.vfps-result-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.vfps-result-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vfps-result-title mark {
    background: #ffe8cc;
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
}

.vfps-result-price {
    font-size: 13px;
    color: #666;
}

.vfps-result-price del {
    opacity: .55;
    margin-right: 4px;
}

.vfps-result-price ins {
    text-decoration: none;
    font-weight: 600;
    color: #f37d01;
}

/* ── Ver todos ──────────────────────────────── */
.vfps-view-all {
    display: block;
    text-align: center;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    border-top: 1px solid #e4e4e4;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

.vfps-view-all:hover,
.vfps-view-all:focus {
    background: #333;
    color: #fff;
}

/* ── Estado: cargando ───────────────────────── */
.vfps-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 14px;
    font-size: 13px;
    color: #888;
}

.vfps-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: vfps-spin .6s linear infinite;
}

@keyframes vfps-spin {
    to { transform: rotate(360deg); }
}

/* ── Estado: sin resultados ─────────────────── */
.vfps-no-results {
    padding: 20px 14px;
    text-align: center;
    font-size: 13px;
    color: #999;
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 767px) {
    .vfps-dropdown {
        position: fixed;
        top: auto;
        left: 8px;
        right: 8px;
        max-height: 60vh;
        border-radius: 8px;
        border: 1px solid #e4e4e4;
    }

    .vfps-result-link {
        padding: 8px 10px;
        gap: 10px;
    }

    .vfps-result-image {
        flex: 0 0 48px;
        width: 48px;
        height: 48px;
    }

    .vfps-result-title {
        font-size: 13px;
    }
}
