:root {
    --primary: #10b981;
    --primary-dark: #065f46;
    --secondary: #fbbf24;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg: #f3f4f6;
    --surface: #ffffff;
    --text: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
    --container-padding: 2rem; /* Aumentado para dar mais respiro lateral */
}

@media (max-width: 480px) {
    :root {
        --container-padding: 2.25rem !important;
    }
    .container {
        padding-left: var(--container-padding) !important;
        padding-right: var(--container-padding) !important;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    padding-bottom: 4rem; /* For footer */
}

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ── Navbar ─────────────────────────────────── */
.navbar {
    background-color: var(--primary-dark);
    color: white;
    padding: 1.5rem var(--container-padding);
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 800;
}

.navbar-tagline {
    font-size: 0.75rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

.back-link {
    position: absolute;
    left: 1rem;
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
}

/* ── Hero ───────────────────────────────────── */
.hero {
    background: linear-gradient(rgba(6, 95, 70, 0.8), rgba(6, 95, 70, 0.8)), 
                url('https://images.unsplash.com/photo-1542838132-92c53300491e?auto=format&fit=crop&q=80&w=800');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 3.5rem var(--container-padding);
    text-align: center;
}

.hero-content h1 {
    font-size: 1.75rem;
    line-height: 1.2;
    margin: 1rem 0;
}

.hero-content p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.highlight {
    color: var(--secondary);
}

/* ── Market Hero (Tabloid) ───────────────────── */
.market-hero {
    background-color: var(--surface);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
}

.market-hero-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.market-hero-icon {
    width: 64px;
    height: 64px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.market-hero-inner h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.market-hero-inner p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ── Sections ────────────────────────────────── */
.section {
    padding: 2rem 0;
}

.section-top {
    margin-bottom: 1.5rem;
}

.section-top h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.text-muted {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ── Grids ───────────────────────────────────── */
.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.markets-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

/* ── Product Card ────────────────────────────── */
.product-card {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    border-left: 4px solid transparent;
}

.card-critical { border-left-color: var(--danger); }
.card-warning { border-left-color: var(--warning); }

.discount-ribbon {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--danger);
    color: white;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 800;
    border-bottom-left-radius: var(--radius-md);
}

.product-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.product-icon {
    width: 40px;
    height: 40px;
    background-color: #f3f4f6;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-muted);
}

.product-header h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.1rem;
}

.product-category {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.days-pill {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 2rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.pill-critical { background-color: var(--danger-light); color: var(--danger); }
.pill-warning { background-color: var(--warning-light); color: var(--warning); }

.product-stock {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.price-original {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.price-discount {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
}

.product-market {
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.product-market i {
    font-size: 1.1rem;
    color: var(--primary);
}

/* ── Market Card ─────────────────────────────── */
.market-card {
    background-color: var(--surface);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.market-card:active {
    transform: scale(0.98);
}

.market-icon {
    width: 48px;
    height: 48px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.market-info {
    flex: 1;
}

.market-info strong {
    display: block;
    font-size: 1rem;
}

.market-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.market-arrow {
    color: var(--border);
}

/* ── States ──────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.skeleton-card {
    height: 150px;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: var(--radius-lg);
}

.skeleton-hero {
    min-height: 100px;
}

@keyframes shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

/* ── Footer ──────────────────────────────────── */
.footer {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}
