/* Loja Online - Estilos */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #5CB85C;
    --primary-dark: #4CA84C;
    --primary-color: #5CB85C;
    --secondary: #3b82f6;
    --secondary-color: #FFAB40;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1f2937;
    --text-color: #333;
    --light: #f9fafb;
    --bg-light: #f5f5f5;
    --gray: #6b7280;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

html {
    scroll-behavior: smooth;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: 'Open Sans', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: #f9fafb;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 700;
    margin-bottom: 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Menu - Header fixo sempre visível */
.menu-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    background: var(--white);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: background 0.3s, box-shadow 0.3s;
    z-index: 1000;
    overflow: visible;
}

.menu-wrapper.scrolled {
    background: var(--white);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.menu-wrapper .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    overflow: visible;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}

.logo a:hover img {
    opacity: 0.9;
    transition: opacity 0.3s;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin: 0;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    overflow: visible;
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.menu-trigger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-trigger span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: all 0.3s;
}

/* Cart button no menu */
.main-nav .cart-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    position: relative;
    font-size: 0.9rem;
}

.main-nav .cart-btn:hover {
    background: var(--primary-dark);
}

/* User Button Styles */
.user-btn, .login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #111827;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.user-btn:hover, .login-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.user-icon {
    font-size: 16px;
}

.login-btn {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.login-btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* User Menu Dropdown */
.user-menu-item {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #111827;
    transition: all 0.2s;
    font-weight: 500;
}

.user-menu-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.user-menu-btn .dropdown-arrow {
    font-size: 10px;
    transition: transform 0.2s;
}

.user-menu-btn[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 10000;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-section {
    padding: 12px 0;
}

.dropdown-section h3 {
    padding: 0 16px;
    margin: 0 0 8px 0;
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #111827;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #f9fafb;
}

.dropdown-item .icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 4px 0;
}

.logout-btn {
    color: #dc2626;
    font-weight: 600;
}

.logout-btn:hover {
    background: #fef2f2;
}

.cart-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    position: relative;
}

.cart-btn:hover {
    background: var(--primary-dark);
}

.main-nav {
    overflow: visible;
}

@media (max-width: 768px) {
    .menu-trigger {
        display: flex;
    }
    
    .main-nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: var(--white);
        transition: left 0.3s;
        box-shadow: var(--shadow);
    }
    
    .main-nav.open {
        left: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
    }
}
.cart-btn:hover {
    background: var(--primary-dark);
}

.cart-count {
    background: white;
    color: var(--primary);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #5CB85C 0%, #4CA84C 100%);
    color: white;
    padding: 100px 0 60px 0;
    text-align: center;
    margin-top: 80px;
}

.hero h2 {
    font-size: 42px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
}

/* Filters */
.filters {
    background: white;
    padding: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.filters-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    background: white;
    border: 2px solid #e5e7eb;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Products */
.products {
    padding: 40px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: #f3f4f6;
}

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 12px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.product-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1f2937;
}

.product-description {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.product-stock {
    font-size: 13px;
    color: #6b7280;
}

.product-stock.low {
    color: var(--warning);
}

.product-stock.out {
    color: var(--danger);
}

.add-to-cart-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    width: 100%;
    transition: background 0.2s;
}

.add-to-cart-btn:hover {
    background: var(--primary-dark);
}

.add-to-cart-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 16px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s;
}

.cart-sidebar.active {
    right: 0;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.cart-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.cart-header {
    padding: 25px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 20px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 5px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.empty-cart p:first-child {
    font-size: 64px;
    margin-bottom: 15px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #f3f4f6;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    background: #f3f4f6;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--gray);
    font-size: 14px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.qty-btn {
    background: #f3f4f6;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
}

.qty-btn:hover {
    background: #e5e7eb;
}

.qty-display {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 20px;
    margin-left: auto;
}

.cart-footer {
    padding: 25px;
    border-top: 1px solid #e5e7eb;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f4f6;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alert */
.alert {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    max-width: 400px;
}

.alert.active {
    opacity: 1;
    pointer-events: all;
}

.alert.success {
    border-left: 4px solid var(--primary);
    color: var(--primary);
}

.alert.error {
    border-left: 4px solid var(--danger);
    color: var(--danger);
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .filters-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* Footer */
.footer {
    background: #3a3a3a;
    color: #fff;
    padding: 50px 0 0 0;
}

.footer-content {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
}

.footer-section {
    flex: 0 0 auto;
    min-width: 180px;
    max-width: 220px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 1.2em;
    color: #fff;
    font-weight: 600;
}

.footer-section p {
    margin: 0 0 12px 0;
    color: #b8b8b8;
    font-size: 0.95em;
    line-height: 1.6;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.footer-icon {
    color: var(--primary);
    flex-shrink: 0;
}

.footer-section a {
    color: #b8b8b8;
    text-decoration: none !important;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--primary);
    text-decoration: none !important;
}

/* Lista de links no footer */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links li a {
    color: #b8b8b8;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-block;
}

.footer-links li a:hover {
    color: var(--primary);
}

/* Ícones sociais */
.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #4a4a4a;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: #b8b8b8;
}

.social-icon:hover {
    background: #5a5a5a;
    color: var(--primary);
    transform: translateY(-3px);
}

.social-icon svg {
    width: 24px;
    height: 24px;
}

/* Copyright */
.footer-bottom {
    padding: 25px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #4a4a4a;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    margin: 0;
    color: #7a7a7a;
    font-size: 0.85em;
}

.footer-bottom p:first-child {
    text-align: left;
}

.made-by {
    font-size: 0.85em !important;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.made-by a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.made-by a:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-section {
        max-width: 100%;
    }
    
    .footer {
        padding: 40px 0 0 0;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .made-by {
        margin-left: 0;
    }
}
