.ai-food-search-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px 20px;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    color: #333;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* TÍTULO PRINCIPAL */
.search-title {
    text-align: center;
    color: #e91e63;
    font-size: 1.8em;
    font-weight: 600;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #e91e63, #ff9800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-subtitle {
    text-align: center;
    color: #666;
    font-style: italic;
    margin-bottom: 25px;
    font-size: 1.1em;
}

/* FORMULARIO */
.search-form {
    background: #fef8f4;
    padding: 25px;
    border-radius: 14px;
    border: 1px solid #f0e6dc;
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.08);
}

#ai-search-input {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    border: 2px solid #ffccbc;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.3s ease;
    background: white;
}

#ai-search-input:focus {
    border-color: #e91e63;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

/* === UBICACIÓN: Input con botón integrado === */
.location-group {
    margin: 15px 0;
}

.location-group label {
    display: block;
    font-size: 14px;
    color: #555;
    margin-bottom: 6px;
}

.location-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.location-input-wrapper input {
    width: 100%;
    padding: 12px 40px 12px 14px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    outline: none;
    box-sizing: border-box;
}

.location-input-wrapper button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #ffccbc;
    color: #d81b60;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.location-input-wrapper button:hover {
    background: #ff9800;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.location-input-wrapper button:active {
    transform: translateY(-50%) scale(0.95);
}

.location-section {
    margin: 15px 0;
}

.location-section label {
    display: block;
    font-size: 14px;
    color: #555;
    margin-bottom: 6px;
}

#user-location {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
}

#use-current-location {
    background: #ff9800;
    color: white;
    border: none;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 6px;
    transition: background 0.3s;
}

#use-current-location:hover {
    background: #f57c00;
}

#search-btn {
    background: #e91e63;
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 17px;
    font-weight: 500;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    box-shadow: 0 4px 10px rgba(233, 30, 99, 0.3);
}

#search-btn:hover:not(:disabled) {
    background: #c2185b;
    transform: translateY(-1px);
}

#search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#loading {
    text-align: center;
    color: #e91e63;
    font-weight: 500;
    margin: 15px 0;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#loading::before {
    content: "🤖";
    font-size: 1.3em;
}

/* RESULTADOS */
.search-results {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.result-item {
    display: flex;
    gap: 16px;
    background: white;
    padding: 16px;
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    align-items: center;
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    border-color: #ffebee;
}

.result-item img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #ffebee;
}

.result-item-content h3 {
    margin: 0 0 6px 0;
    color: #d81b60;
    font-size: 1.2em;
    font-weight: 600;
}

.result-item-content p {
    margin: 4px 0;
    color: #555;
    font-size: 14px;
    line-height: 1.4;
}

.result-item a.button {
    display: inline-block;
    background: #4caf50;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 6px;
    transition: background 0.3s;
}

.result-item a.button:hover {
    background: #388e3c;
}

.result-item .ai-opinion {
    font-size: 14px;
    color: #1976d2;
    margin: 8px 0;
    padding: 8px;
    background: #e3f2fd;
    border-radius: 6px;
    border-left: 3px solid #1976d2;
    font-style: normal;
}

/* RECOMENDACIÓN DE IA */
.ai-recommendation {
    background: #e8f5e8;
    padding: 18px;
    border-radius: 12px;
    margin: 20px 0;
    font-style: italic;
    color: #2e7d32;
    border-left: 5px solid #4caf50;
    line-height: 1.6;
    font-size: 1.05em;
}

.ai-recommendation em {
    font-weight: 500;
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .ai-food-search-container {
        margin: 20px 10px;
        padding: 20px;
    }

    .result-item {
        flex-direction: column;
        text-align: center;
    }

    .result-item img {
        width: 100px;
        height: 100px;
    }

    #search-btn {
        font-size: 16px;
        padding: 14px;
    }
}