/* Reset e configurações base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variáveis CSS - Paleta de cores */
:root {
    --primary-green: #6B8E6B;
    --light-green: #A4C3A4;
    --beige: #F5F1E8;
    --light-beige: #FAF8F3;
    --silver-gray: #C0C0C0;
    --dark-gray: #888888;
    --white: #FFFFFF;
    --text-dark: #333333;
    --text-light: #666666;
    --success: #5cb85c;
    --warning: #f0ad4e;
    --danger: #d9534f;
    --shadow: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-beige);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h1 {
    color: var(--white);
    font-size: 1.8rem;
    font-weight: 700;
}

.logo i {
    color: var(--beige);
    margin-right: 0.5rem;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--beige);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(107, 142, 107, 0.8), rgba(164, 195, 164, 0.8)), 
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><rect fill="%23F5F1E8" width="1000" height="1000"/><circle fill="%23A4C3A4" cx="250" cy="250" r="50" opacity="0.3"/><circle fill="%236B8E6B" cx="750" cy="750" r="30" opacity="0.3"/><circle fill="%23C0C0C0" cx="500" cy="500" r="40" opacity="0.2"/></svg>');
    background-size: cover;
    background-position: center;
    color: var(--white);
    text-align: center;
    padding: 8rem 0;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-green), var(--light-green));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(107, 142, 107, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 142, 107, 0.4);
}

.btn-secondary {
    background-color: var(--silver-gray);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background-color: var(--dark-gray);
    color: var(--white);
}

.btn-danger {
    background-color: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background-color: #c9302c;
}

/* Products Section */
.products-section {
    padding: 4rem 0;
    background-color: var(--white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-green);
    margin-bottom: 3rem;
    font-weight: 700;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.product-card {
    background-color: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid var(--beige);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(45deg, var(--beige), var(--light-beige));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--primary-green);
    position: relative;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
}

.product-image img {
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle fill="%23A4C3A4" cx="20" cy="20" r="5" opacity="0.3"/><circle fill="%236B8E6B" cx="80" cy="80" r="3" opacity="0.3"/><circle fill="%23C0C0C0" cx="50" cy="50" r="4" opacity="0.2"/></svg>');
    background-size: 50px 50px;
    opacity: 0.1;
}

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}

.product-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    background-color: var(--silver-gray);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    color: var(--text-dark);
    transition: background-color 0.3s ease;
}

.quantity-btn:hover {
    background-color: var(--dark-gray);
    color: var(--white);
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: 2px solid var(--beige);
    border-radius: 5px;
    padding: 0.25rem;
    font-weight: 600;
}

.add-to-cart {
    flex: 1;
    background: linear-gradient(45deg, var(--primary-green), var(--light-green));
    color: var(--white);
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-to-cart:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(107, 142, 107, 0.3);
}

/* Forms */
.form-container {
    max-width: 500px;
    margin: 2rem auto;
    background-color: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--beige);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-green);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--text-dark), var(--dark-gray));
    color: var(--white);
    padding: 2rem 0 1rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
    flex: 1 1 250px;
    min-width: 200px;
}

.footer-section h3 {
    color: var(--beige);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--white);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--light-green);
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--dark-gray);
    opacity: 0.8;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive Design */

/* Tablets e telas médias */
@media (max-width: 1024px) {
    .products-grid { gap: 1.5rem; }
    .product-card { flex: 1 1 280px; max-width: 320px; }
}

/* Tablets pequenos */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .hero-content h2 { font-size: 2rem; }
    .products-grid { grid-template-columns: 1fr; }
    .container { padding: 0 10px; }
}

/* Loading states */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Table styles */
.table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow);
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--beige);
}

.table th {
    background-color: var(--primary-green);
    color: var(--white);
    font-weight: 600;
}

.table tr:hover {
    background-color: var(--light-beige);
}

/* Cart styles */
.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--white);
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px var(--shadow);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, var(--beige), var(--light-beige));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-green);
    font-size: 2rem;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 0.25rem;
}

.cart-item-price {
    color: var(--text-light);
    font-size: 0.9rem;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-summary {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
    margin-top: 2rem;
}

.cart-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green);
    text-align: center;
    margin-bottom: 1rem;
}

/* Modal de Login */
.login-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.login-modal.show {
    display: flex;
}

.login-modal-content {
    background: linear-gradient(135deg, var(--white), var(--light-beige));
    padding: 2.5rem;
    border-radius: 20px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(107, 142, 107, 0.2);
    position: relative;
    animation: slideIn 0.3s ease;
    border: 2px solid var(--beige);
}

.login-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.login-modal-close:hover {
    color: var(--danger);
}

.login-modal-icon {
    font-size: 4rem;
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.login-modal h3 {
    color: var(--primary-green);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.login-modal p {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.login-modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.login-modal-buttons .btn {
    min-width: 120px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}
