/* 
 * Pedimos Algo - Estilos Frontend
 * Archivo: /assets/css/pa-frontend.css
 */

/* ===== COMPONENTE DE DIRECCIÓN ===== */
.pa-direccion-container {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    text-align: center;
}

.pa-direccion-title {
    color: #2C3E50;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.pa-direccion-input-group {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.pa-direccion-input {
    flex: 1;
    padding: 15px;
    border: 2px solid #E67E22;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.pa-direccion-input:focus {
    outline: none;
    border-color: #D35400;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
}

.pa-btn-buscar {
    background: #E67E22;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.pa-btn-buscar:hover {
    background: #D35400;
}

.pa-btn-buscar:disabled {
    background: #BDC3C7;
    cursor: not-allowed;
}

/* ===== LISTA DE NEGOCIOS ===== */
.pa-negocios-lista {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.pa-resultado-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.pa-resultado-header h3 {
    margin: 0 0 10px 0;
    font-size: 1.4em;
}

.pa-resultado-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1em;
}

/* ===== TARJETAS DE NEGOCIO ===== */
.pa-negocio-card {
    display: flex;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.pa-negocio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.pa-negocio-imagen {
    width: 250px;
    min-height: 180px;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.pa-negocio-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pa-negocio-card:hover .pa-negocio-imagen img {
    transform: scale(1.05);
}

.pa-negocio-sin-imagen {
    font-size: 3.5em;
    opacity: 0.2;
    color: #E67E22;
}

.pa-negocio-info {
    flex: 1;
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.pa-negocio-info h4 {
    margin: 0 0 12px 0;
    color: #2C3E50;
    font-size: 1.4em;
    font-weight: bold;
}

.pa-negocio-descripcion {
    color: #666;
    margin: 0 0 20px 0;
    line-height: 1.5;
    flex: 1;
}

/* ===== ESTADÍSTICAS DEL NEGOCIO ===== */
.pa-negocio-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pa-distancia, .pa-tiempo, .pa-envio {
    background: #f8f9fa;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #e9ecef;
}

.pa-distancia {
    border-left: 3px solid #27ae60;
}

.pa-tiempo {
    border-left: 3px solid #e74c3c;
}

.pa-envio {
    border-left: 3px solid #3498db;
}

/* ===== CATEGORÍAS Y MÉTODOS DE PAGO ===== */
.pa-negocio-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pa-categorias, .pa-metodos-pago {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pa-categoria-tag {
    background: #E67E22;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: bold;
}

.pa-metodo-pago {
    background: #2C3E50;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8em;
}

/* ===== ACCIONES DEL NEGOCIO ===== */
.pa-negocio-acciones {
    display: flex;
    gap: 12px;
    align-items: center;
}

.pa-btn-ver {
    background: #E67E22;
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pa-btn-ver:hover {
    background: #D35400;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

.pa-btn-whatsapp {
    background: #25D366;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.pa-btn-whatsapp:hover {
    background: #128C7E;
    color: white;
    transform: translateY(-2px);
}

/* ===== MENSAJES DEL SISTEMA ===== */
.pa-message {
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    text-align: center;
    font-size: 1.1em;
}

.pa-error {
    background: #ffe6e6;
    color: #d63031;
    border: 1px solid #ff7675;
}

.pa-success {
    background: #e6f7e6;
    color: #27ae60;
    border: 1px solid #2ecc71;
}

.pa-loading {
    background: #e3f2fd;
    color: #2980b9;
    border: 1px solid #3498db;
}

/* ===== ESTADOS DE NEGOCIO ===== */
.pa-negocio-cerrado {
    opacity: 0.6;
    position: relative;
}

.pa-negocio-cerrado::before {
    content: "🔒 CERRADO";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    z-index: 2;
}

/* ===== BADGES ESPECIALES ===== */
.pa-badge-popular {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e74c3c;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    z-index: 2;
}

.pa-badge-nuevo {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #27ae60;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    z-index: 2;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .pa-direccion-input-group {
        flex-direction: column;
    }
    
    .pa-negocio-card {
        flex-direction: column;
    }
    
    .pa-negocio-imagen {
        width: 100%;
        height: 200px;
    }
    
    .pa-negocio-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .pa-negocio-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .pa-negocio-acciones {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pa-btn-ver, .pa-btn-whatsapp {
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .pa-direccion-container {
        padding: 20px;
        margin: 10px;
    }
    
    .pa-negocios-lista {
        padding: 10px;
    }
    
    .pa-resultado-header {
        padding: 20px;
        margin: 10px;
    }
    
    .pa-negocio-info {
        padding: 20px;
    }
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pa-negocio-card {
    animation: fadeInUp 0.6s ease-out;
}

.pa-negocio-card:nth-child(even) {
    animation-delay: 0.1s;
}

.pa-negocio-card:nth-child(odd) {
    animation-delay: 0.2s;
}

/* ===== ESTILOS PARA AUTOCOMPLETADO ===== */
.pac-container {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: none;
    margin-top: 5px;
    z-index: 10000;
}

.pac-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.pac-item:hover {
    background: #f8f9fa;
}

.pac-icon {
    margin-right: 10px;
    color: #E67E22;
}

.pac-item-query {
    font-size: 14px;
    color: #2C3E50;
    font-weight: bold;
}

/* ===== ESTADO DE CARGA ===== */
.pa-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #E67E22;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}