/**
 * Estilos Globais - Meunegocio.bio
 */

:root {
    --primary-color: #6366F1;
    --success-color: #22C55E;
    --danger-color: #F97316;
    --dark-color: #1F2937;
    --light-color: #F9FAFB;
    --gray-color: #6B7280;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
}

/* Utilitários */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.text-success-custom {
    color: var(--success-color) !important;
}

.bg-success-custom {
    background-color: var(--success-color) !important;
}

.text-danger-custom {
    color: var(--danger-color) !important;
}

.bg-danger-custom {
    background-color: var(--danger-color) !important;
}

.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    background-color: #4F46E5;
    border-color: #4F46E5;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.btn-success-custom {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: white;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-success-custom:hover {
    background-color: #16A34A;
    border-color: #16A34A;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.btn-danger-custom {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-danger-custom:hover {
    background-color: #EA580C;
    border-color: #EA580C;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

/* Cards */
.card-custom {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
}

.card-custom:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Formulários */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    padding: 12px 16px;
    font-size: 14px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--dark-color);
}

/* Alertas */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 16px 20px;
}

.alert-success {
    background-color: rgba(34, 197, 94, 0.1);
    color: #16A34A;
}

.alert-danger {
    background-color: rgba(249, 115, 22, 0.1);
    color: #EA580C;
}

.alert-info {
    background-color: rgba(99, 102, 241, 0.1);
    color: #4F46E5;
}

/* Navbar/Header */
.navbar-custom {
    background-color: white;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    padding: 16px 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 24px;
    color: var(--primary-color) !important;
}

/* Footer */
.footer-custom {
    background-color: white;
    border-top: 1px solid #E5E7EB;
    padding: 24px 0;
    margin-top: 48px;
    text-align: center;
    color: var(--gray-color);
}

/* Página de Login/Registro */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #8B5CF6 100%);
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    padding: 40px;
    max-width: 450px;
    width: 100%;
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo h1 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 32px;
    margin-bottom: 8px;
}

.auth-logo p {
    color: var(--gray-color);
    font-size: 14px;
}

/* Dashboard */
.dashboard-sidebar {
    background-color: white;
    min-height: calc(100vh - 76px);
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
    padding: 24px 0;
}

.dashboard-sidebar .nav-link {
    color: var(--dark-color);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.dashboard-sidebar .nav-link:hover {
    background-color: rgba(99, 102, 241, 0.05);
    border-left-color: var(--primary-color);
}

.dashboard-sidebar .nav-link.active {
    background-color: rgba(99, 102, 241, 0.1);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

.dashboard-content {
    padding: 32px;
}

/* Card de Produto */
.product-card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card .card-body {
    padding: 20px;
    position: relative;
}

.product-card .product-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.product-card .product-description {
    font-size: 14px;
    color: var(--gray-color);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .product-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--success-color);
    margin-bottom: 16px;
}

.product-card .product-actions {
    display: flex;
    gap: 8px;
    position: relative;
    z-index: 10;
}

.product-card .btn {
    flex: 1;
    padding: 10px;
    font-size: 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    z-index: 10;
}

/* Botões redondos */
.btn-rounded {
    border-radius: 50px !important;
    padding: 10px 20px !important;
}

.product-card .btn-rounded {
    border-radius: 50px !important;
    padding: 10px 16px !important;
    font-size: 14px;
}

.profile-social-links .btn-rounded {
    border-radius: 50px !important;
}

/* Modal de produto */
.product-modal-images img {
    border-radius: var(--border-radius);
    transition: transform 0.3s ease;
}

.product-modal-images img:hover {
    transform: scale(1.02);
}

.product-modal-actions .btn {
    border-radius: 50px !important;
    padding: 12px 24px !important;
    font-weight: 500;
}

/* Perfil Público */
.profile-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #8B5CF6 100%);
    padding: 60px 0 100px 0;
    position: relative;
    overflow: hidden;
}

.profile-header-cover {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background-size: cover;
    background-position: center;
    opacity: 0.2;
}

.profile-info {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    margin: 0 auto 16px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.profile-name {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.profile-bio {
    font-size: 16px;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto 24px;
}

.profile-social-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.profile-social-links .btn {
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-products {
    margin-top: -50px;
    position: relative;
    z-index: 2;
}

/* Stats Cards */
.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--box-shadow);
    text-align: center;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 14px;
    color: var(--gray-color);
}

/* Upload de Imagem */
.image-upload-preview {
    width: 100%;
    max-width: 300px;
    height: 200px;
    border: 2px dashed #D1D5DB;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.image-upload-preview:hover {
    border-color: var(--primary-color);
    background-color: rgba(99, 102, 241, 0.05);
}

.image-upload-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.image-upload-placeholder {
    text-align: center;
    color: var(--gray-color);
}

/* Responsividade */
@media (max-width: 768px) {
    .dashboard-sidebar {
        min-height: auto;
        margin-bottom: 24px;
    }
    
    .dashboard-content {
        padding: 16px;
    }
    
    .profile-header {
        padding: 40px 0 80px 0;
    }
    
    .profile-avatar {
        width: 100px;
        height: 100px;
    }
    
    .profile-name {
        font-size: 24px;
    }
    
    .product-card .product-actions {
        flex-direction: column;
    }
    
    .product-card .btn {
        min-height: 44px; /* Área de toque mínima recomendada para mobile */
        padding: 12px;
    }
    
    /* Modal melhorado para mobile */
    .modal-dialog {
        margin: 10px;
    }
    
    .modal-content {
        border-radius: 12px;
    }
    
    .modal-body {
        padding: 16px;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .product-modal-images {
        margin-bottom: 16px;
    }
    
    .product-modal-images img {
        max-height: 300px;
    }
    
    .auth-card {
        padding: 24px;
    }
}

/* Loading Spinner */
.spinner-custom {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(99, 102, 241, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Drag and Drop */
.sortable-ghost {
    opacity: 0.4;
}

.sortable-drag {
    cursor: move;
}

/* Pricing Section */
.pricing-section .card-custom {
    transition: all 0.3s ease;
}

.pricing-section .card-custom:hover {
    transform: translateY(-8px);
}

.pricing-section .list-unstyled li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.pricing-section .list-unstyled li i {
    flex-shrink: 0;
    margin-top: 2px;
}

.pricing-section .badge {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.pricing-section .display-4 {
    line-height: 1;
}

