/* Mapa Container */
#comprar #map-container {
    height: 400px;
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background: var(--light-blue);
}

/* Mapa em si */
#comprar #map {
    height: 100%;
    width: 100%;
    z-index: 0 !important;
}

/* Formulário */
#comprar .contact-form {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: 100%;
}

#comprar .contact-form h4 {
    color: var(--dark-blue);
    margin-bottom: 25px;
    font-weight: 600;
    text-align: center;
}

/* Popups do mapa */
.leaflet-popup-content-wrapper {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(3, 101, 140, 0.1);
    border-color: var(--primary-blue);
}

.leaflet-popup-content {
    min-width: 250px;
    margin: 15px;
    font-family: 'Poppins', sans-serif;
}

.leaflet-popup-content h5 {
    color: var(--primary-blue);
    margin-bottom: 10px;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--light-blue);
    padding-bottom: 15px;
}

.leaflet-popup-content p {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
}

/* Botão Revendedores */
.rev-btn-submit {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border: none;
    color: var(--white);
    padding: 15px 30px;
    border-radius: 10px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rev-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(46, 134, 193, 0.3);
}

/* Loading animation Revendedores */
.rev-btn-submit .rev-loading {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: none;
}

/* Mensagens do sistema */
.revendedor-message {
    display: none;
    padding: 12px 20px;
    border-radius: 4px;
    margin: 15px 0;
    font-size: 14px;
    animation: fadeIn 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.revendedor-message.error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.revendedor-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}

.revendedor-message.info {
    background: #e3f2fd;
    color: #1565c0;
    border-left: 4px solid #1565c0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% {
        transform: translateY(-50%) rotate(0deg);
    }

    100% {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* Lista de Revendedores */
#lista-revendedores-container {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eaeaea;
}

.revendedor-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid rgba(3, 101, 140, 0.1);
    overflow: hidden;
}

.revendedor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-blue);
}

.revendedor-card .card-body {
    padding: 25px;
}

.revendedor-card .card-title {
    color: var(--primary-blue);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.revendedor-card .card-details {
    margin-bottom: 15px;
}

.revendedor-card .card-text {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 8px;
    line-height: 1.5;
}

.revendedor-card .card-text i {
    width: 16px;
    margin-right: 8px;
    color: var(--secondary-blue);
}

.revendedor-card .card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.revendedor-card .btn {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
}

.revendedor-card .btn i {
    margin-right: 5px;
}

.revendedor-card .btn-whatsapp {
    background-color: #25D366;
    color: white;
    border: none;
}

.revendedor-card .btn-whatsapp:hover {
    background-color: #128C7E;
    transform: scale(1.05);
}

.revendedor-card .btn-instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: white;
    border: none;
}

.revendedor-card .btn-instagram:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

/* Mensagem de contato com a fábrica */
.factory-contact-card {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 2rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.factory-contact-message h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 700;
}

.factory-contact-message>p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

.factory-contact-details {
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
}

.factory-contact-details strong {
    min-width: 120px;
    font-weight: 600;
    margin-right: 15px;
    color: rgba(255, 255, 255, 0.9);

}

.factory-contact-details a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.factory-contact-details a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.factory-contact-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.factory-contact-actions .btn {
    padding: 15px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.factory-contact-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.2);
}

.factory-contact-actions .btn-whatsapp:hover {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.factory-contact-actions .btn-email:hover {
    background: linear-gradient(135deg, #EA4335, #D14836);
}

.factory-contact-actions .btn-phone:hover {
    background: linear-gradient(135deg, #4285F4, #3367D6);
}

/* Sugestões de cidades */
.suggestions-container {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    
    margin-top: 2px;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* Botão Ver Todos */
.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 117, 125, 0.3);
    background: linear-gradient(135deg, #5a6268, #4e555b);
}

/* Melhorias no formulário */
#buscar-cidade {
    transition: all 0.3s ease;
}

#buscar-cidade:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

/* Indicador de tipo de busca */
.search-type-indicator {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 5px;
    font-style: italic;
}


/* Responsividade */
@media (max-width: 768px) {

    .lead,
    p {
        text-align: center;
    }

    #comprar #map-container {
        height: 380px;
    }

    #comprar .contact-form {
        padding: 20px;
    }

    .revendedor-card .card-actions {
        flex-direction: column;
    }

    .revendedor-card .btn {
        width: 100%;
        justify-content: center;
    }

    .factory-contact-actions {
        flex-direction: column;
    }

    .factory-contact-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .factory-contact-card {
        padding: 1.5rem;
    }

}