/* Reset e estilos globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Container principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ========== HEADER ========== */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo img {
    display: block;
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.user-menu {
    position: relative;
}

.user-icon {
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    transition: transform 0.2s;
}

.user-icon:hover {
    transform: scale(1.1);
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    border-radius: 8px;
    min-width: 180px;
    margin-top: 10px;
    overflow: hidden;
}

.dropdown-menu.active {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
}

/* ========== FOOTER ========== */
footer {
    background-color: #fff;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-info {
    font-size: 14px;
    color: #666;
}

.cart-icon {
    position: relative;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    transition: transform 0.2s;
}

.cart-icon:hover {
    transform: scale(1.1);
}

.cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #ff4444;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* ========== INDEX - MENU E PRODUTOS ========== */
.main-content {
    padding: 20px 15px 100px;
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: hidden;
}

.menu-categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
}

.menu-item {
    text-align: center;
    cursor: pointer;
    padding: 15px;
    border-radius: 10px;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.menu-item:hover {
    background-color: #f5f5f5;
    transform: translateY(-2px);
}

.menu-item.active {
    border-color: #ff4444;
    background-color: #fff5f5;
}

.menu-item img {
    display: block;
    margin: 0 auto 10px;
}

.menu-item span {
    display: block;
    font-weight: bold;
    color: #333;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

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

.product-info {
    padding: 15px;
}

.product-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.product-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 20px;
    font-weight: bold;
    color: #ff4444;
}

/* ========== MODAL PRODUTO ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 20px;
}

.modal-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    background-color: #f5f5f5;
}

.modal-body {
    padding: 20px;
}

.modal-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.modal-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.modal-price {
    font-size: 28px;
    font-weight: bold;
    color: #ff4444;
    margin-bottom: 20px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.quantity-label {
    font-weight: bold;
    margin-right: 15px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    border: 2px solid #ff4444;
    background-color: #fff;
    color: #ff4444;
    font-size: 20px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background-color: #ff4444;
    color: #fff;
}

.quantity-value {
    font-size: 20px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.observation-field {
    margin-bottom: 20px;
}

.observation-field label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
}

.observation-field textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
}

.modal-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
}

.btn-cancel {
    background-color: #ddd;
    color: #333;
}

.btn-cancel:hover {
    background-color: #ccc;
}

.btn-add {
    background-color: #ff4444;
    color: #fff;
}

.btn-add:hover {
    background-color: #dd3333;
}

/* ========== CARRINHO ========== */
.cart-container {
    padding: 20px 15px 100px;
    max-width: 900px;
    margin: 0 auto;
}

.cart-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
}

.cart-items {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.cart-item-observation {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-bottom: 5px;
}

.cart-item-quantity {
    font-size: 14px;
    color: #666;
}

.cart-item-price {
    font-size: 18px;
    font-weight: bold;
    color: #ff4444;
}

.cart-summary {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background-color: #ff4444;
    color: #fff;
}

.btn-primary:hover {
    background-color: #dd3333;
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.empty-cart p {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

/* ========== LOGIN/CADASTRO ========== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background-color: #fff;
    border-radius: 15px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.login-logo img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background-color: #ffe0e0;
    color: #cc0000;
    border: 1px solid #ffcccc;
}

.alert-success {
    background-color: #e0ffe0;
    color: #008800;
    border: 1px solid #ccffcc;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ========== ADMIN HEADER ========== */
.admin-header {
    background-color: #2c3e50;
    color: #fff;
}

.admin-header .header-content {
    padding: 15px 20px;
}

.admin-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.admin-nav a {
    color: #fff;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.admin-nav a:hover {
    background-color: #34495e;
}

.btn-site {
    background-color: #3498db;
}

.btn-site:hover {
    background-color: #2980b9;
}

/* ========== ADMIN PÁGINAS ========== */
.admin-container {
    padding: 30px 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.admin-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 30px;
    color: #2c3e50;
}

.admin-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.admin-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #2c3e50;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
}

.products-table th,
.products-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.products-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.products-table img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
}

.btn-edit {
    background-color: #3498db;
    color: #fff;
    padding: 6px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
}

.btn-edit:hover {
    background-color: #2980b9;
}

.btn-delete {
    background-color: #e74c3c;
    color: #fff;
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
}

.btn-delete:hover {
    background-color: #c0392b;
}

/* ========== RESPONSIVO ========== */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    .header-content {
        padding: 10px 15px;
    }
    
    .logo img {
        width: 75px;
        height: 75px;
    }
}
    
    .main-content {
        padding: 15px 10px 100px;
        width: 100%;
    }
    
    .menu-categories {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 10px;
        margin-bottom: 20px;
        width: 100%;
    }
    
    .menu-item {
        padding: 8px 4px;
    }
    
    .menu-item img {
        width: 50px;
        height: 50px;
    }
    
    .menu-item span {
        font-size: 11px;
        word-break: break-word;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .product-card {
        font-size: 14px;
    }
    
    .product-image {
        height: 150px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-name {
        font-size: 16px;
    }
    
    .product-price {
        font-size: 18px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .modal-image {
        height: 200px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .modal-price {
        font-size: 24px;
    }
    
    .cart-item-image {
        width: 60px;
        height: 60px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-table {
        font-size: 12px;
    }
    
    .products-table th,
    .products-table td {
        padding: 8px;
    }
}
	.login-logo img {
        width: 100px;
        height: 100px;
    }
}

@media (min-width: 769px) {
    .menu-item img {
        width: 100px;
        height: 100px;
    }
}
/* ========== LISTA DE PRODUTOS VERTICAL (ADICIONAR AO style.css) ========== */

/* Lista de produtos - Layout vertical */
.products-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #fff;
    border-radius: 10px;
    padding: 15px;
}

.product-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background-color: #fff;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #f0f0f0;
}

.product-item:hover {
    background-color: #f9f9f9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateX(5px);
}

.product-item-image {
    width: 80px;
    height: 80px;
    min-width: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.product-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.product-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 5px;
}

.product-item-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    line-height: 1.3;
}

.product-item-price {
    font-size: 16px;
    font-weight: bold;
    color: #4A90E2;
    white-space: nowrap;
    min-width: 60px;
    text-align: right;
}

.product-item-description {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsivo para telas menores */
@media (max-width: 768px) {
    .products-list {
        padding: 10px;
        gap: 10px;
    }
    
    .product-item {
        padding: 10px;
        gap: 10px;
    }
    
    .product-item-image {
        width: 70px;
        height: 70px;
        min-width: 70px;
    }
    
    .product-item-name {
        font-size: 14px;
    }
    
    .product-item-price {
        font-size: 14px;
        min-width: 50px;
    }
    
    .product-item-description {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .product-item-image {
        width: 60px;
        height: 60px;
        min-width: 60px;
    }
    
    .product-item-name {
        font-size: 13px;
    }
    
    .product-item-price {
        font-size: 13px;
    }
    
    .product-item-description {
        font-size: 11px;
    }
}
/* Para telas menores (mobile) */
@media (max-width: 768px) {
    .modal-image {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .modal-image {
        max-height: 250px;
    }
}
/* ========== ÍCONES DO HEADER (CARRINHO + USUÁRIO) ========== */
/* Adicione este CSS ao seu style.css */

/* Container dos ícones do header */
.header-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Ícone do carrinho no header */
.header-icons .cart-icon {
    position: relative;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    transition: transform 0.2s;
}

.header-icons .cart-icon:hover {
    transform: scale(1.1);
}

/* Badge do carrinho no header */
.header-icons .cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #ff4444;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Ajuste no footer - remover padding extra se necessário */
footer .footer-content {
    justify-content: center;
}

/* Responsivo */
@media (max-width: 768px) {
    .header-icons {
        gap: 15px;
    }
    
    .header-icons .cart-icon {
        font-size: 22px;
        padding: 6px;
    }
}
/* ========== PÁGINA DE PERFIL ========== */
/* Adicione este CSS ao seu style.css */

.perfil-container {
    max-width: 800px;
    margin: 0 auto;
}

.perfil-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 25px;
    color: #333;
}

.perfil-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.perfil-card h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.perfil-card h4 {
    font-size: 16px;
    margin-top: 20px;
    margin-bottom: 15px;
    color: #666;
}

/* Avatar */
.avatar-section {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.avatar-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    font-size: 60px;
    color: #ccc;
}

.avatar-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.avatar-form input[type="file"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

/* Formulários */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4A90E2;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* Botões */
.perfil-card .btn {
    margin-top: 10px;
}

/* Responsivo */
@media (max-width: 768px) {
    .perfil-container {
        padding: 10px;
    }
    
    .perfil-title {
        font-size: 24px;
    }
    
    .perfil-card {
        padding: 20px 15px;
    }
    
    .perfil-card h3 {
        font-size: 18px;
    }
    
    .avatar-section {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .avatar-preview {
        width: 100px;
        height: 100px;
    }
    
    .avatar-placeholder {
        font-size: 50px;
    }
    
    .avatar-form {
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}
/* ========== AVATAR DO USUÁRIO NO HEADER ========== */
/* Adicione este CSS ao seu style.css */

/* Avatar do usuário */
.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f0f0;
    transition: transform 0.2s, border-color 0.2s;
    cursor: pointer;
}

.user-avatar:hover {
    transform: scale(1.05);
    border-color: #4A90E2;
}

/* Placeholder do avatar quando não há foto */
.user-avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-avatar-placeholder:hover {
    transform: scale(1.05);
    background-color: #e0e0e0;
}

/* Ajuste no ícone do usuário para comportar o avatar */
.user-menu .user-icon {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsivo */
@media (max-width: 768px) {
    .user-avatar {
        width: 40px;
        height: 40px;
    }
    
    .user-avatar-placeholder {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}
