/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

:root {
    --primary: #1e293b; /* Dark slate */
    --primary-hover: #334155;
    --accent: #f59e0b; /* Amber */
    --accent-hover: #d97706;
    --bg: #f8fafc;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --radius: 0.5rem;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* Header */
header {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4.5rem;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--accent);
}

nav ul {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

nav a {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.95rem;
}

nav a:hover, nav a.active {
    color: var(--primary);
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-accent {
    background-color: var(--accent);
    color: white;
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: var(--bg);
}

/* Cards */
.card {
    background-color: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--text-main);
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; letter-spacing: -0.025em; }
h2 { font-size: 2rem; margin-bottom: 1rem; letter-spacing: -0.025em; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }

/* Main Content */
main {
    flex: 1;
    padding: 3rem 0;
}

/* Footer */
footer {
    background-color: var(--primary);
    color: #cbd5e1;
    padding: 4rem 0 1.5rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-col a {
    color: #94a3b8;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.text-muted { color: var(--text-muted); }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.w-100 { width: 100%; }

/* Responsive Header Adjustments */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
}

@media (max-width: 900px) {
    .header-content {
        height: 4rem;
        padding: 0 1rem;
    }

    .logo img {
        max-height: 35px !important;
    }

    .mobile-menu-toggle { 
        display: block; 
        order: 3;
        padding: 0.5rem;
    }
    
    nav#mainNav {
        position: fixed;
        top: 4rem;
        left: -100%;
        width: 100%;
        height: calc(100vh - 4rem);
        background: white;
        transition: 0.3s ease-in-out;
        z-index: 100;
        padding: 2rem;
        box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    }

    nav#mainNav.active { left: 0; }

    nav#mainNav ul {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .header-actions {
        order: 2;
        gap: 0.5rem;
    }

    .header-actions .btn {
        padding: 0.5rem;
        font-size: 0.85rem;
        min-width: 40px;
    }

    .hide-mobile { display: none; }
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-cols-4 { grid-template-columns: repeat(3, 1fr); }
    .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-3, .grid-cols-2 { grid-template-columns: 1fr; }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
}

@media (max-width: 480px) {
    .grid-cols-4 { grid-template-columns: 1fr; }
}

/* Product Image Box */
.product-img-box {
    width: 100%;
    aspect-ratio: 1;
    background-color: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.product-img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.card:hover .product-img-box img {
    transform: scale(1.05);
}

.product-content {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.6rem;
}

.product-family {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

/* Cart Badge */
.cart-badge {
    background: var(--accent);
    color: white;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    margin-left: 0.25rem;
    font-weight: 700;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.2s;
    background-color: #f8fafc;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-info {
    background-color: #eff6ff;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
}
.alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.alert-warning {
    background-color: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}
.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}
.status-pendente { background: #fef3c7; color: #92400e; }
.status-finalizado { background: #dcfce7; color: #166534; }
.status-cancelado { background: #fee2e2; color: #991b1b; }

/* Hero Section */
.hero {
    background-color: var(--primary);
    color: white;
    padding: 5rem 0;
    text-align: center;
    border-radius: var(--radius);
    margin-bottom: 3rem;
}

.hero h1 {
    color: white;
    font-size: 3rem;
}

.hero p {
    color: #94a3b8;
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Shop Layout */
.shop-container {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

.shop-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 6rem;
}

.shop-main {
    flex: 1;
}

@media (max-width: 1024px) {
    .shop-container {
        flex-direction: column;
    }
    
    .shop-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 2rem;
    }
}

/* Product Detail Layout */
.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

@media (max-width: 900px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Checkout Layout */
.checkout-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }
}

/* Cart Item Layout */
.cart-item {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 600px) {
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .cart-item-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* Index/Home responsiveness */
@media (max-width: 768px) {
    .hero { padding: 3rem 1rem; }
    .hero h1 { font-size: 2.25rem; }
}
