:root {
    --primary-green: #198754;
    --dark-green: #146c43;
    --light-green: #e9f7ef;
    --accent-orange: #fd7e14;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --white: #ffffff;
    --border-color: #dee2e6;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #f8f9fa;
    color: var(--text-dark);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: var(--white);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i { color: var(--primary-green); }

.nav-actions { display: flex; gap: 15px; align-items: center; }

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary:hover { background-color: var(--dark-green); }

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

.btn-outline-light {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

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

.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
}

.full-width { width: 100%; justify-content: center; }

/* Hero Section */
.hero {
    background-color: #2E8B57; /* Deep green */
    background: linear-gradient(135deg, #2E8B57 0%, #198754 100%);
    color: var(--white);
    padding-top: 60px;
    position: relative;
    text-align: center;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-orange);
    border-radius: 50%;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    font-weight: 800;
}

.hero .highlight { color: #fcc419; }

.hero p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding-bottom: 60px;
}

.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

.shape-fill { fill: #f8f9fa; }

/* Promo Section */
.promo-section { margin-top: 40px; margin-bottom: 60px; }

.promo-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.promo-text h2 { font-size: 1.8rem; margin-bottom: 20px; }

.check-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
}

.check-list i { color: var(--primary-green); font-size: 1.2rem; }

.promo-action {
    background: #f1f3f5;
    padding: 25px;
    border-radius: var(--radius);
    min-width: 300px;
}

.join-text {
    color: var(--primary-green);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.sub-text { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 15px; }

/* Marketplace Section */
.marketplace { padding-bottom: 80px; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.subtitle { color: var(--text-muted); margin-top: 5px; }

.search-bar {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 350px;
}

.search-bar input {
    border: none;
    outline: none;
    flex: 1;
}

.search-bar select {
    border: none;
    border-left: 1px solid var(--border-color);
    padding-left: 10px;
    outline: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.product-card-link { display: block; }

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
    height: 100%;
}

.product-card:hover { transform: translateY(-5px); }

.card-image {
    height: 220px;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tag {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--white);
}

.tag-produce { background-color: var(--primary-green); }
.tag-service { background-color: #82c91e; }

.card-details { padding: 20px; }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.card-header h3 { font-size: 1.1rem; max-width: 70%; }

.price {
    font-weight: 700;
    color: var(--primary-green);
    font-size: 1.1rem;
}

.description {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    line-height: 1.4;
}

.location {
    font-size: 0.85rem;
    color: #adb5bd;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* --- PRODUCT PAGE STYLES --- */

.product-page { padding-top: 30px; padding-bottom: 60px; max-width: 800px; }

.product-hero-image {
    width: 100%;
    height: 350px;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 25px;
}

.product-hero-image img { width: 100%; height: 100%; object-fit: cover; }

.product-info-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
}

.product-info-header h1 { font-size: 2rem; margin: 10px 0; }

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--white);
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-left: 10px;
    transition: 0.2s;
}

.icon-btn:hover { background: #f8f9fa; color: var(--text-dark); }
.icon-btn.active { color: #e03131; border-color: #e03131; }

.price-box {
    background: var(--white);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 30px;
}

.price-large { font-size: 1.8rem; font-weight: 700; color: var(--primary-green); }
.unit { color: var(--text-muted); margin-left: 5px; font-size: 0.9rem; }

.description-section { margin-bottom: 30px; }
.description-section h3 { margin-bottom: 10px; }
.description-section p { color: var(--text-muted); line-height: 1.6; }

.seller-card {
    background: #f8f9fa; /* Slight grey background */
    padding: 15px 20px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.seller-info { display: flex; align-items: center; gap: 15px; }

.avatar {
    width: 45px;
    height: 45px;
    background: #e9f7ef;
    color: var(--primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.verified-badge { font-size: 0.8rem; color: var(--primary-green); font-weight: 500; display: flex; align-items: center; gap: 4px; }

.btn-small-outline {
    padding: 6px 12px;
    border: 1px solid var(--primary-green);
    color: var(--primary-green);
    background: transparent;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

.action-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.btn-large {
    padding: 15px;
    font-size: 1rem;
    justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .promo-card { flex-direction: column; text-align: center; }
    .check-list li { justify-content: center; }
    .search-bar { width: 100%; margin-top: 10px; }
    .product-info-header { flex-direction: column; gap: 15px; }
    .action-buttons-grid { grid-template-columns: 1fr; }
}

/* --- Glassmorphism Modal Styles --- */

/* The Dark Overlay Background */
.auth-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Darkens the background site */
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px); /* Blurs the website behind the modal */
}

/* The Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.75); /* Semi-transparent white */
    backdrop-filter: blur(16px); /* Strong blur for the glass effect */
    -webkit-backdrop-filter: blur(16px); /* Safari support */
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
    border-radius: 20px;
    padding: 40px;
    width: 400px;
    max-width: 90%;
    position: relative;
    text-align: center;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Close Button */
.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.2s;
}

.close-modal:hover { color: var(--text-dark); }

/* Tabs (Login vs SignUp) */
.auth-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    color: var(--text-muted);
    position: relative;
    font-weight: 500;
}

.tab-btn.active {
    color: var(--primary-green);
    font-weight: 700;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-green);
}

/* Forms */
.auth-form { display: none; }
.auth-form.active-form { display: block; }

.auth-form h2 { margin-bottom: 5px; color: var(--text-dark); }
.auth-form p { color: var(--text-muted); margin-bottom: 25px; font-size: 0.9rem; }

/* Input Fields */
.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-green);
}

.input-group input {
    width: 100%;
    padding: 12px 15px 12px 40px; /* Space for icon */
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    outline: none;
    transition: 0.2s;
}

.input-group input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px rgba(25, 135, 84, 0.1);
}
