:root {
    --primary-dark: #1b3b2b;
    --primary-green: #2d6a4f;
    --light-sage: #52b788;
    --bg-light: #f2f7f4;
    --card-bg: #ffffff;
    --text-dark: #222222;
    --text-muted: #556b60;
    --accent-gold: #d4a373;
    --whatsapp-green: #25d366;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary-dark);
    padding: 1rem 5%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-links a {
    text-decoration: none;
    color: #d1e0d7;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: #ffffff;
}

.btn-nav-login {
    background: var(--primary-green);
    padding: 6px 14px;
    border-radius: 20px;
    color: white !important;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-green));
    color: white;
    text-align: center;
    padding: 3rem 1rem 2.5rem;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.hero-sub {
    color: #d1e0d7;
    font-size: 1rem;
}

.controls {
    margin-top: 1.8rem;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.controls input, .controls select {
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    width: 280px;
    max-width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* User Welcome Bar */
.user-bar {
    max-width: 1200px;
    margin: 1.5rem auto 0;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: var(--primary-dark);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 22px;
    padding: 2rem 5%;
    max-width: 1300px;
    margin: 0 auto;
}

.product-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border: 1px solid #e0ebe3;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.product-card.is-sold {
    opacity: 0.65;
}

.product-image {
    width: 100%;
    height: 210px;
    object-fit: cover;
    background-color: #eaf0ec;
}

.product-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-info h3 {
    font-size: 1.15rem;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.price {
    font-size: 1.35rem;
    color: var(--primary-green);
    font-weight: 700;
    margin-bottom: 8px;
}

.category-tag {
    display: inline-block;
    align-self: flex-start;
    background: #e8f4ed;
    color: var(--primary-green);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-desc {
    font-size: 0.88rem;
    color: #444;
    margin-bottom: 12px;
    line-height: 1.4;
    flex-grow: 1;
}

.seller-badge {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: #f7fbf8;
    padding: 8px;
    border-radius: 6px;
    border: 1px dashed #c8dcd0;
    margin-bottom: 12px;
}

.btn-whatsapp {
    display: block;
    text-align: center;
    background: var(--whatsapp-green);
    color: white;
    text-decoration: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.btn-sell {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: 6px;
    background: #d9534f;
    color: white;
    cursor: pointer;
    font-weight: 600;
}

.btn-sold {
    width: 100%;
    padding: 8px;
    background: #a0a0a0;
    color: white;
    border: none;
    border-radius: 6px;
}

/* Forms & Auth */
.form-container, .about-container {
    max-width: 580px;
    margin: 2.5rem auto;
    background: white;
    padding: 2.2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid #e0ebe3;
}

.form-desc {
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-dark);
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
}

.image-preview-box img {
    max-width: 100%;
    max-height: 180px;
    border-radius: 8px;
    margin-top: 10px;
    object-fit: cover;
}

.btn-primary {
    background: var(--primary-green);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* Tabs */
.auth-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e0ebe3;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
}

.tab-btn.active {
    color: var(--primary-green);
    border-bottom: 3px solid var(--primary-green);
}

.hidden {
    display: none;
}