/* Greenfield Local Hub - Main Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #006e25;
    --secondary: #3b683d;
    --accent: #ee6189;
    --light-bg: #f5f5f5;
    --page-bg: #f9f9f9;
    --surface-bg: #ffffff;
    --dark-text: #191c1d;
    --muted-text: #666666;
    --border-color: #e1e3e4;
    --shadow-soft: rgba(0, 0, 0, 0.08);
    --shadow-strong: rgba(0, 0, 0, 0.12);
    --success: #28a745;
}

html, body {
    min-height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--page-bg);
    color: var(--dark-text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Navigation */
header {
    background: var(--surface-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--primary);
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--dark-text);
    font-size: 0.95rem;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: #005a1f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 110, 37, 0.2);
}

.btn-secondary {
    background-color: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background-color: var(--light-bg);
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 6rem 2rem;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Section */
section {
    padding: 4rem 0;
}

.featured-section {
    background-color: var(--light-bg);
    padding: 4rem 0;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--dark-text);
}

/* Cards */
.card {
    background: var(--surface-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px var(--shadow-soft);
    transition: box-shadow 0.3s, transform 0.3s;
    border: 1px solid var(--border-color);
}

.card:hover {
    box-shadow: 0 8px 24px var(--shadow-strong);
    transform: translateY(-4px);
}

.card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--dark-text);
}

.card p {
    color: var(--muted-text);
    font-size: 0.95rem;
}

/* Grid */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-text);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 110, 37, 0.1);
}

/* Messages */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

main {
    flex: 1 0 auto;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

footer h4 {
    font-weight: bold;
    margin-bottom: 1rem;
    color: white;
}

footer ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

footer a {
    color: #66df75;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.footer-copyright {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    margin: 0;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.main-wrapper {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
}

.sidebar {
    flex: 0 0 250px;
    background: var(--surface-bg);
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
    border: 1px solid var(--border-color);
}

.main-content {
    flex: 1;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.product-card {
    background: var(--surface-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow-soft);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px var(--shadow-strong);
}

.product-image {
    width: 100%;
    height: 200px;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 1rem;
}

.product-name {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.product-price {
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.product-description {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.product-producer {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .main-wrapper {
        flex-direction: column;
    }

    .sidebar {
        order: 2;
    }

    .main-content {
        order: 1;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .product-detail {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* Marketplace Styles */
.marketplace-header {
    padding: 2rem 0;
}

/* Product Detail Page */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.product-image-large {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #999;
}

.product-details h1 {
    margin-bottom: 1rem;
}

/* Static Prototype Helpers */
.demo-banner {
    background: #fff3cd;
    color: #856404;
    border-bottom: 1px solid #ffe69c;
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.95rem;
}

.page-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.page-intro {
    padding: 1rem 0 2rem;
}

.page-intro h1 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.page-intro p {
    color: var(--muted-text);
    max-width: 720px;
}

.panel,
.summary-card,
.table-card,
.info-card,
.auth-card,
.kpi-card {
    background: var(--surface-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px var(--shadow-soft);
}

.layout-two {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.layout-sidebar {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.stat-card {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}

.stat-card strong {
    display: block;
    font-size: 1.8rem;
    color: var(--primary);
}

.badge,
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-confirmed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-shipped,
.status-delivered {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.notice {
    background: #eef7f0;
    border: 1px solid #cfe8d4;
    border-radius: 8px;
    padding: 1rem;
    color: #234b2d;
}

.notice-warning {
    background: #fff8e1;
    border-color: #ffe082;
    color: #795c00;
}

.table-card table {
    width: 100%;
    border-collapse: collapse;
}

.table-card th,
.table-card td {
    padding: 0.85rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table-card th {
    background: var(--light-bg);
    color: var(--dark-text);
}

.muted {
    color: var(--muted-text);
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.cta-strip {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

.check-list {
    list-style: none;
    display: grid;
    gap: 0.75rem;
}

.check-list li::before {
    content: "✓ ";
    color: var(--primary);
    font-weight: bold;
}

.auth-card {
    max-width: 460px;
    margin: 3rem auto;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.order-card {
    background: var(--surface-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px var(--shadow-soft);
    margin-bottom: 1rem;
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.product-emoji {
    font-size: 4rem;
    line-height: 1;
}

.inline-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.prototype-nav a.current {
    color: var(--primary);
    font-weight: 700;
}

@media (max-width: 900px) {
    .layout-two,
    .layout-sidebar,
    .product-detail {
        grid-template-columns: 1fr;
    }
}

.product-price-large {
    font-size: 2rem;
    color: var(--primary);
    font-weight: bold;
    margin: 1rem 0;
}

.product-desc {
    margin-bottom: 2rem;
    line-height: 1.8;
}

.quantity-section {
    margin-bottom: 2rem;
}

.quantity-input {
    width: 100px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-left: 1rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Authentication Pages */
.auth-section {
    padding: 4rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    max-width: 500px;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 100%;
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.btn-block {
    width: 100%;
}

.auth-link {
    text-align: center;
    margin-top: 2rem;
}
