/* /assets/css/header.css (Versión Corregida) */

body {
    padding-top: 82px;
}

body > header { /* <-- CAMBIO CLAVE AQUÍ */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1003;
    background-color: var(--color-header-bg, rgba(0, 0, 0, 0.9));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 243, 243, 0.08);
    box-sizing: border-box; 
}

.header-content {
    display: grid;
    grid-template-columns: auto 1fr auto; 
    align-items: center;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- Bloque Izquierdo: Logo y Nombre --- */
.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.logo-img { height: 50px; width: 50px; object-fit: contain; border-radius: 8px; }
.business-name { font-size: 1.5rem; font-weight: 700; color: var(--color-header-text-main, #f6f6f6); letter-spacing: -0.5px; }

/* --- Bloque Central: Barra de Búsqueda --- */
.search-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}
#aesthetic-search-bar {
    width: 100%;
    padding: 12px 20px;
    font-size: 1rem;
    color: #ffffff;
    background-color: var(--color-header-search-bg, rgba(255, 255, 255, 0.2));
    border: 2px solid rgb(255, 255, 255);
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-sizing: border-box;
}
#aesthetic-search-bar::placeholder { color: rgba(255, 255, 255, 0.7); }
#aesthetic-search-bar:focus {
    background-color: rgba(255, 255, 255, 0.442);
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

#search-results {
    position: absolute; 
    top: 110%; 
    left: 0; 
    width: 100%;
    background-color: rgb(255, 255, 255); 
    backdrop-filter: blur(10px);
    border-radius: 20px; 
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden; 
    display: none;
    z-index: 1011; /* Asegura que se muestre por encima de otros elementos */
}
.search-result-item { 
    display: flex; 
    align-items: center; 
    padding: 10px 15px; 
    color: #000000; 
    text-decoration: none; 
    border-bottom: 1px solid rgba(0, 0, 0, 0.1); 
    transition: background-color 0.2s; 
}
.search-result-item:last-child { 
    border-bottom: none; 
}
.search-result-item:hover { 
    background-color: rgba(0, 0, 0, 0.05); 
}
.search-result-item img { 
    width: 40px; 
    height: 40px; 
    object-fit: cover; 
    border-radius: 8px; 
    margin-right: 15px; 
}
.result-info span { 
    display: block; 
    font-weight: 600; 
}
.result-info small { 
    font-size: 0.85em; 
    opacity: 0.8; 
    color: #555; 
}

.header-action-buttons {
    display: flex;
    gap: 50px;
}
.header-fab {
    width: 70px;
    height: 70px;
    background-color: #00000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.header-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}
.header-fab img {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

/* ====== INICIO: RESPONSIVE CORREGIDO ====== */

@media (max-width: 768px) {
    body {
        /* Se reduce el padding superior para un header más compacto */
        padding-top: 120px; 
    }
    
    header {
        padding: 10px 15px;
    }

    .header-content {
        grid-template-columns: 1fr; /* Una sola columna para apilar los elementos */
        gap: 10px;
        justify-items: center; /* Centra los items horizontalmente */
    }

    .logo-container {
        grid-row: 1; /* Primera fila */
        justify-content: center; /* Centra el logo y nombre */
    }

    .logo-img {
        width: 50px;
        height: 50px;
        border-radius: 50%; /* Logo circular */
    }
    
    .search-container {
        grid-row: 2; /* Segunda fila */
        width: 100%;
        max-width: none;
    }

    #aesthetic-search-bar {
        font-size: 0.9rem;
        padding: 10px 15px;
    }

    .header-action-buttons {
        display: none; /* Ocultamos los botones de acción del header en móvil */
    }
}
/* ====== FIN: RESPONSIVE CORREGIDO ====== */
.header-fab-svg {
    width: 70px;
    height: 70px;
    background-color: #00000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.header-fab-svg:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

/* Estilo para el SVG dentro del nuevo botón */
.header-fab-svg svg {
    width: 70%;
    height: 70%;
    /* Usa el color personalizado (pasado por la variable CSS) o blanco por defecto */
    fill: var(--icon-color, #FFF);
}