/* assets/css/style.css - Mobile First */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --gray: #64748b;
    --light: #f8fafc;
    --border: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.5;
    padding-bottom: 80px; /* Espaço para bottom nav */
}

/* Header Mobile-first */
.header {
    background: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(145deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
}

.logo h1 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--dark);
}

.logo h1 span {
    background: linear-gradient(145deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Menu Toggle (mobile) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
}

/* Navegação Desktop */
.nav-menu ul {
    display: flex;
    align-items: center;
    gap: 1rem;
    list-style: none;
}

.nav-menu a {
    text-decoration: none;
    color: var(--gray);
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 0.8rem;
    border-radius: 30px;
    transition: 0.2s;
}

.nav-menu a:hover {
    color: var(--primary);
    background: #eef2ff;
}

.btn-primary, .btn-outline {
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(145deg, var(--primary), var(--secondary));
    color: white !important;
}

.btn-outline {
    border: 1.5px solid var(--border);
    color: var(--dark) !important;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: white;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        transition: left 0.3s ease;
        z-index: 1001;
        padding: 2rem 1rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .nav-menu a {
        width: 100%;
        padding: 1rem;
    }

    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
    }

    .overlay.active {
        display: block;
    }
}

/* Bottom Navigation (mobile) */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 0.5rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 999;
    border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
        justify-content: space-around;
    }
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--gray);
    font-size: 0.7rem;
    padding: 0.3rem 0;
    flex: 1;
    position: relative;
}

.bottom-nav-item i {
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item .badge {
    position: absolute;
    top: 0;
    right: 20px;
    background: var(--danger);
    color: white;
    font-size: 0.6rem;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
}

/* Hero Section Mobile */
.hero {
    padding: 2rem 1rem;
    background: linear-gradient(145deg, #eef2ff, white);
}

.hero h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 800;
    line-height: 1.2;
}

.hero h2 i {
    background: linear-gradient(145deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--gray);
    margin: 1rem 0;
    font-size: 1rem;
}

/* Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1rem;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    background: white;
    border-radius: 1.2rem;
    padding: 1.2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    border: 1px solid var(--border);
}

.stat-icon {
    width: 40px;
    height: 40px;
    background: #eef2ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 0.8rem;
}

.stat-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1rem;
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.product-card {
    background: white;
    border-radius: 1.2rem;
    overflow: hidden;
    border: 1px solid var(--border);
}

.product-image {
    height: 140px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
}

.product-info {
    padding: 1rem;
}

.product-info h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.product-price {
    font-weight: 800;
    color: var(--primary);
    font-size: 1.2rem;
}

/* Modal Mobile */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: flex-end;
}

@media (min-width: 768px) {
    .modal {
        align-items: center;
    }
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 2rem 2rem 0 0;
    padding: 2rem 1.5rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@media (min-width: 768px) {
    .modal-content {
        border-radius: 2rem;
        max-width: 500px;
        margin: 0 auto;
        animation: fadeIn 0.3s ease;
    }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Form Elements */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1.5px solid var(--border);
    border-radius: 30px;
    font-size: 1rem;
    font-family: inherit;
    -webkit-appearance: none;
}

.form-group input:focus {
    border-color: var(--primary);
    outline: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
    width: 100%;
}

@media (min-width: 768px) {
    .btn {
        width: auto;
    }
}

.btn-primary {
    background: linear-gradient(145deg, var(--primary), var(--secondary));
    color: white;
}

.btn-outline {
    background: white;
    border: 1.5px solid var(--border);
    color: var(--dark);
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: white;
    padding: 1rem 2rem;
    border-radius: 60px;
    font-weight: 600;
    z-index: 3000;
    animation: slideUp 0.3s ease;
    white-space: nowrap;
    max-width: 90%;
    white-space: normal;
    text-align: center;
}

@media (min-width: 768px) {
    .toast {
        bottom: 50px;
    }
}

/* Adicione estas regras ao final do style.css existente */

/* Dashboard */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1rem;
    background: white;
    border-bottom: 1px solid var(--border);
}

/* Store Cover */
.store-cover {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.cover-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 2rem 1rem 1rem;
}

.store-profile {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    color: white;
}

.store-logo {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    border: 3px solid white;
}

.store-header-info h1 {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.store-info-bar {
    display: flex;
    justify-content: space-around;
    padding: 1rem;
    background: white;
    border-bottom: 1px solid var(--border);
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    color: var(--gray);
    font-size: 0.9rem;
}

.info-item i {
    font-size: 1.2rem;
    color: var(--primary);
}

/* Products List */
.products-list {
    padding: 1rem;
}

.product-list-item {
    display: flex;
    background: white;
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.product-list-image {
    width: 80px;
    height: 80px;
    background: var(--light);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    margin-right: 1rem;
}

.product-list-info {
    flex: 1;
}

.product-list-info h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.product-list-info p {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.product-list-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-list-price {
    font-weight: 700;
    color: var(--primary);
}

.product-list-status {
    font-size: 0.8rem;
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
}

.product-list-status.active {
    background: #d1fae5;
    color: #059669;
}

.product-list-status.inactive {
    background: #fee2e2;
    color: var(--danger);
}

.product-list-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-list-actions button,
.product-list-actions a {
    width: 40px;
    height: 40px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.btn-edit {
    background: #eef2ff;
    color: var(--primary);
}

.btn-toggle {
    background: #fef3c7;
    color: var(--warning);
}

.btn-delete {
    background: #fee2e2;
    color: var(--danger);
}

/* Orders */
.status-filters {
    display: flex;
    overflow-x: auto;
    padding: 1rem;
    gap: 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.status-filter {
    padding: 0.5rem 1.2rem;
    background: white;
    border-radius: 30px;
    text-decoration: none;
    color: var(--gray);
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid var(--border);
}

.status-filter.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.order-card {
    background: white;
    border-radius: 1rem;
    padding: 1rem;
    margin: 1rem;
    border: 1px solid var(--border);
    cursor: pointer;
}

.order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.order-id {
    font-weight: 700;
    color: var(--primary);
}

.order-status {
    padding: 0.2rem 1rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pendente { background: #fef3c7; color: #92400e; }
.status-confirmado { background: #dbeafe; color: #1e40af; }
.status-preparando { background: #e0e7ff; color: #3730a3; }
.status-saiu_entrega { background: #d1fae5; color: #065f46; }
.status-entregue { background: #dcfce7; color: #166534; }
.status-cancelado { background: #fee2e2; color: #991b1b; }

.order-info {
    display: flex;
    justify-content: space-between;
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.order-total {
    color: var(--primary);
    font-size: 1.2rem;
}

/* Admin Tables */
.admin-table {
    overflow-x: auto;
    background: white;
    border-radius: 1rem;
    padding: 1rem;
}

.admin-table table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    text-align: left;
    padding: 1rem 0.5rem;
    color: var(--gray);
    font-weight: 600;
    border-bottom: 2px solid var(--border);
}

.admin-table td {
    padding: 1rem 0.5rem;
    border-bottom: 1px solid var(--border);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* CTA Section Centralizado */
.cta-section.centered {
    background: linear-gradient(145deg, #eef2ff, #ffffff);
    padding: 4rem 1rem;
    text-align: center;
    margin: 3rem 0;
    border-radius: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.cta-section.centered .container {
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h3 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.cta-content p {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.btn-large {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 60px;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: 0.3s;
}

.btn-primary {
    background: linear-gradient(145deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    box-shadow: 0 10px 20px rgba(99,102,241,0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(99,102,241,0.4);
}

.btn-outline {
    background: white;
    color: #1e293b;
    border: 2px solid #e2e8f0;
}

.btn-outline:hover {
    border-color: #6366f1;
    color: #6366f1;
    transform: translateY(-3px);
}

/* Benefícios mini (opcional) */
.benefits-mini {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    color: #64748b;
    font-size: 0.95rem;
}

.benefits-mini i {
    color: #22c55e;
    margin-right: 0.3rem;
}

/* Responsivo */
@media (max-width: 768px) {
    .cta-section.centered {
        padding: 3rem 1rem;
        margin: 2rem 0;
        border-radius: 1.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        padding: 0 1rem;
    }
    
    .btn-large {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }
    
    .benefits-mini {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }
}

/* Container centralizado */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header da seção centralizado */
.section-header.centered {
    text-align: center;
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.section-header.centered h2 {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.section-header.centered h2 i {
    font-size: 1.8rem;
}

.section-header.centered .see-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.6rem 1.8rem;
    border: 2px solid #6366f1;
    border-radius: 40px;
    transition: all 0.3s ease;
    background: transparent;
}

.section-header.centered .see-all:hover {
    background: #6366f1;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99,102,241,0.2);
}

.section-header.centered .see-all i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.section-header.centered .see-all:hover i {
    transform: translateX(5px);
}

/* Grid de lojas (se for usar) */
.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Responsivo */
@media (max-width: 768px) {
    .section-header.centered {
        gap: 1rem;
    }
    
    .section-header.centered h2 {
        font-size: 1.6rem;
    }
    
    .section-header.centered .see-all {
        padding: 0.5rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .stores-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 0.5rem;
    }
}

@media (max-width: 480px) {
    .section-header.centered h2 {
        font-size: 1.4rem;
    }
    
    .section-header.centered h2 i {
        font-size: 1.4rem;
    }
}