/* Position context for the autocomplete dropdown */
.kiosko-header-search-categorias .wp-block-search {
    position: relative;
}

.kiosko-pac {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
    max-height: 400px;
    overflow-y: auto;
}
.kiosko-pac.kiosko-pac-hidden {
    display: none;
}

.kiosko-pac-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f0f0f0;
}
.kiosko-pac-item:last-of-type {
    border-bottom: none;
}
.kiosko-pac-item:hover,
.kiosko-pac-item:focus {
    background: #f5f5f5;
    outline: none;
}

.kiosko-pac-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.kiosko-pac-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.kiosko-pac-name {
    font-size: .875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kiosko-pac-price {
    font-size: .8rem;
    color: #555;
}

.kiosko-pac-footer {
    display: block;
    padding: 8px 12px;
    text-align: center;
    font-size: .8rem;
    color: #0073aa;
    text-decoration: none;
    border-top: 1px solid #eee;
}
.kiosko-pac-footer:hover {
    text-decoration: underline;
}

@media (max-width: 782px) {
    .kiosko-pac {
        max-height: min(45vh, 280px); /* stays above virtual keyboard */
    }

    .kiosko-pac-item {
        min-height: 48px;             /* Google touch target */
        padding: 10px 12px;
        gap: 8px;
    }

    .kiosko-pac-item img {
        width: 36px;
        height: 36px;
    }

    .kiosko-pac-footer {
        min-height: 44px;
        padding: 10px 12px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
