/* ── Buscador del header (navbar) ─────────────────────── */

.search-form {
    width: 100%;
    max-width: 420px;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box .search-input {
    padding-right: 3rem;
    border-radius: .375rem;
}

.search-box .search-btn {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    border: 0;
    background: transparent;
    color: #6c757d;
    padding: 0 .95rem;
    z-index: 1;
}

.search-box .search-btn:hover,
.search-box .search-btn:focus {
    color: #212529;
}

/* ── Dropdown de sugerencias ───────────────────────────── */

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    margin-top: .35rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: .375rem;
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .15);
    max-height: 320px;
    overflow-y: auto;
}

.search-dropdown[hidden] {
    display: none;
}

.search-dropdown .search-status {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1rem;
    color: #6c757d;
    font-size: .875rem;
}

.search-dropdown .search-suggestion {
    display: flex;
    align-items: center;
    gap: .625rem;
    padding: .625rem 1rem;
    color: #212529;
    text-decoration: none;
    overflow: hidden;
}

.search-dropdown .search-suggestion:hover,
.search-dropdown .search-suggestion:focus {
    background: #f8f9fa;
}

.search-dropdown .search-suggestion .bi {
    flex: none;
    color: #6c757d;
}

.search-dropdown .search-suggestion .search-suggestion-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 992px) {
    .search-form {
        width: 320px;
        max-width: none;
    }
}

/* Solo móvil: logo + buscador + carrito en una misma fila */
@media (max-width: 991.98px) {
    .search-form {
        flex: 1 1 0;
        min-width: 120px;
        width: auto;
        max-width: none;
        margin: 0.25rem 0.5rem;
    }

    .search-box .search-input {
        font-size: 0.875rem;
        padding-right: 2.5rem;
    }

    .search-box .search-btn {
        padding: 0 0.75rem;
    }
}
