/* ===================================================
   BUSCADOR AVANZADO - MODO PANTALLA COMPLETA
   =================================================== */

/* Overlay de búsqueda (fondo oscuro) */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-overlay.active {
    display: block;
    opacity: 1;
}

/* Panel de búsqueda a pantalla completa */
.search-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 2000;
    display: none;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.search-fullscreen.active {
    display: flex;
    transform: translateY(0);
}

/* Header del modo búsqueda */
.search-fullscreen-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 10;
}

.btn-back-search {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.btn-back-search:active {
    background: #f0f0f0;
}

.search-fullscreen-input-wrapper {
    flex: 1;
    position: relative;
}

.search-fullscreen-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    font-size: 1rem;
    background: #f5f5f5;
    outline: none;
    transition: all 0.2s;
}

.search-fullscreen-input:focus {
    border-color: #FF5A00;
    background: white;
    box-shadow: 0 0 0 2px rgba(255,90,0,0.1);
}

.btn-clear-search {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-clear-search:active {
    background: #f0f0f0;
}

/* Contenido del panel de búsqueda */
.search-fullscreen-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* Secciones */
.search-section {
    margin-bottom: 24px;
}

.search-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-section-title i {
    font-size: 0.8rem;
}

/* Historial */
.historial-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.historial-item-full {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.historial-item-full:active {
    background: #e8e8e8;
}

.historial-item-full .icon {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FF5A00;
}

.historial-item-full .text {
    flex: 1;
    font-size: 0.9rem;
    color: #333;
}

.historial-item-full .delete {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
}

.historial-item-full .delete:active {
    background: #fee2e2;
    color: #ef4444;
}

/* Sugerencias en tiempo real */
.sugerencias-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sugerencia-item-full {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.sugerencia-item-full:active {
    background: #e8e8e8;
}

.sugerencia-item-full .icon {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.sugerencia-item-full .icon.negocio { color: #FF5A00; }
.sugerencia-item-full .icon.producto { color: #10b981; }
.sugerencia-item-full .icon.rubro { color: #3b82f6; }

.sugerencia-item-full .info {
    flex: 1;
}

.sugerencia-item-full .titulo {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
}

.sugerencia-item-full .subtitulo {
    font-size: 0.7rem;
    color: #999;
}

.sugerencia-resaltado {
    background: #FFF3CD;
    color: #FF5A00;
    font-weight: 600;
    padding: 0 2px;
    border-radius: 3px;
}

/* Loading */
.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 30px;
    color: #999;
}

.search-loading .spinner-small {
    width: 24px;
    height: 24px;
    border: 2px solid #f0f0f0;
    border-top-color: #FF5A00;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Sin resultados */
.search-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.search-empty i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: #ddd;
}

.search-empty p {
    font-size: 0.85rem;
}

/* Ocultar contenido principal durante búsqueda */
body.search-mode .main-content,
body.search-mode .hero,
body.search-mode .banners-section,
body.search-mode .footer {
    opacity: 0.3;
    pointer-events: none;
}

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

/* Responsive - Escritorio */
@media (min-width: 769px) {
    .search-fullscreen {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%) translateY(100%);
        border-radius: 0 0 20px 20px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    }
    
    .search-fullscreen.active {
        transform: translateX(-50%) translateY(0);
    }
}