/* Reset e Variáveis */
:root {
    --primary: #e75480;
    --secondary: #000000;
    --accent: #ffd700;
    --text: #333333;
    --light: #ffffff;
    --gray: #f5f5f5;
    --border: #dddddd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: var(--light);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo h1 {
    color: var(--secondary);
    font-size: 24px;
}

.logo span {
    color: var(--primary);
    font-size: 12px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 20px;
}

.cart-icon span {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 150px 0 100px;
    text-align: center;
    margin-top: 60px;
}

.hero-content h2 {
    font-size: 3em;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

.btn-primary {
    background: var(--accent);
    color: var(--secondary);
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #ffed4a;
}

/* Categorias */
.categories {
    padding: 80px 0;
    background: var(--gray);
}

.categories h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2em;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    background: white;
    padding: 40px 20px;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.category-card i {
    font-size: 2.5em;
    color: var(--primary);
    margin-bottom: 15px;
}

/* Produtos */
.featured-products {
    padding: 80px 0;
}

.featured-products h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2em;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 200px;
    background: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image i {
    font-size: 3em;
    color: #ccc;
}

.product-info {
    padding: 20px;
}

.product-price {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary);
    margin: 10px 0;
}

/* Estoque do produto */
.product-stock {
    color: #666;
    font-size: 12px;
    margin: 5px 0;
}

.btn-add-cart {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}

.btn-add-cart:hover {
    background: #d44a70;
}

.btn-add-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Carrinho Lateral */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s;
    z-index: 1001;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.cart-items {
    padding: 20px;
    height: calc(100vh - 200px);
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.cart-item-info h4 {
    margin-bottom: 5px;
}

/* Controles do carrinho */
.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.cart-item-controls button {
    background: var(--primary);
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-controls span {
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

.cart-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.cart-item-price {
    color: var(--primary);
    font-weight: bold;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #ff4444;
    cursor: pointer;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
}

.cart-total {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

/* Footer */
footer {
    background: var(--secondary);
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 15px;
    color: var(--accent);
}

.footer-section p {
    margin-bottom: 10px;
}

.footer-section i {
    margin-right: 10px;
    color: var(--primary);
}

/* Mensagens */
.message-popup {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 15px 20px;
    border-radius: 5px;
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Carrinho vazio */
.empty-cart {
    text-align: center;
    color: #666;
    padding: 20px;
}

/* Status dos pedidos */
.status-pendente {
    background: #fff3cd;
    color: #856404;
}

.status-confirmado {
    background: #cce7ff;
    color: #004085;
}

.status-enviado {
    background: #d1ecf1;
    color: #0c5460;
}

.status-entregue {
    background: #d4edda;
    color: #155724;
}

.status-cancelado {
    background: #f8d7da;
    color: #721c24;
}

/* Select de status */
.status-select {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ddd;
    font-size: 12px;
}

/* ========== ADMIN STYLES ========== */
.admin-body {
    margin: 0;
    background: #f5f5f5;
    font-family: 'Arial', sans-serif;
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: var(--secondary);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-logo {
    padding: 30px 20px;
    border-bottom: 1px solid #333;
}

.admin-logo h2 {
    margin: 0;
    color: var(--accent);
}

.admin-logo span {
    font-size: 12px;
    color: #ccc;
}

.admin-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover,
.nav-item.active {
    background: #333;
    color: white;
    border-left-color: var(--primary);
}

.nav-item i {
    margin-right: 10px;
    width: 20px;
}

.admin-main {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
}

.admin-header {
    background: white;
    padding: 20px 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    font-size: 2em;
    margin: 0;
    color: var(--primary);
}

.stat-card p {
    margin: 10px 0 0;
    color: #666;
}

/* Pedidos recentes */
.orders-list {
    margin-top: 20px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.order-info h4 {
    margin: 0;
    color: var(--secondary);
}

.order-info p {
    margin: 5px 0 0;
    color: #666;
    font-size: 14px;
}

/* Tables */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.products-table,
.orders-table,
.customers-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--secondary);
}

/* Buttons */
.btn-edit, .btn-delete, .btn-view {
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 2px;
    font-size: 14px;
}

.btn-edit {
    background: #4CAF50;
    color: white;
}

.btn-delete {
    background: #f44336;
    color: white;
}

.btn-view {
    background: #2196F3;
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 5% auto;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-modal {
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-form {
    padding: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 30px;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

/* Product Image Admin */
.product-image-admin {
    width: 40px;
    height: 40px;
    background: var(--gray);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-admin i {
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h2 {
        font-size: 2em;
    }
    
    nav ul {
        display: none;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Admin Responsive */
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .admin-nav {
        display: flex;
        overflow-x: auto;
    }
    
    .nav-item {
        flex-shrink: 0;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .nav-item.active {
        border-left: none;
        border-bottom-color: var(--primary);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}