:root {
    --bg: #ffffff;
    --bg-soft: #f4faf6;
    --green: #5b8c6f;
    --green-dark: #3c6b55;
    --green-light: #d8eedf;
    --green-pale: #eef8f1;
    --green-mid: #8bbfa2;
    --text: #1f3329;
    --text-muted: #5b6f62;
    --border: #dfece3;
    --accent: #3c6b55;
    --radius: 1rem;
    --radius-sm: 0.75rem;
    --shadow: 0 12px 40px rgba(60, 107, 85, 0.08);
    --shadow-sm: 0 4px 14px rgba(60, 107, 85, 0.05);
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Lato', 'Segoe UI', sans-serif;
}

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

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

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }

h1, h2, h3 { font-family: var(--font-heading); color: var(--green-dark); line-height: 1.2; }

img { max-width: 100%; display: block; }

.container {
    width: 92%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.site-header {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    flex-wrap: wrap;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--green-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo svg { width: 28px; height: 28px; fill: var(--green); }

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.main-nav a {
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.3rem 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--green);
    transition: width 0.2s;
}

.main-nav a:hover::after { width: 100%; }

.nav-tools {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: 0.5rem;
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--green-pale);
    color: var(--green-dark);
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.nav-icon svg { width: 20px; height: 20px; }

.nav-icon:hover {
    background: var(--green);
    color: #fff;
}

.user-menu {
    position: relative;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    min-width: 160px;
    padding: 0.5rem 0;
    z-index: 120;
}

.user-dropdown a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text);
    font-size: 0.9rem;
    border: none;
}

.user-dropdown a:hover {
    background: var(--green-pale);
    color: var(--green-dark);
}

.user-dropdown .logout {
    color: #c0392b;
}

.user-menu:hover .user-dropdown,
.user-menu:focus-within .user-dropdown {
    display: block;
}

/* Buttons */
.btn, .btn-small, .btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.85rem 1.8rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-align: center;
}

.btn {
    background: var(--green);
    color: #fff;
    box-shadow: 0 4px 14px rgba(45, 106, 79, 0.25);
}

.btn:hover {
    background: var(--green-dark);
    color: #fff;
    transform: translateY(-2px);
}

.btn-small { padding: 0.55rem 1.2rem; font-size: 0.9rem; }

.btn-outline {
    background: transparent;
    color: var(--green);
    border: 2px solid var(--green);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--green);
    color: #fff;
}

.btn-danger {
    background: #c0392b;
    color: #fff;
    box-shadow: none;
}

.btn-danger:hover { background: #a93226; }

/* Hero */
.hero {
    background: var(--bg-soft);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--green-pale);
    color: var(--green);
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.hero h1 {
    font-size: 3.4rem;
    margin-bottom: 1.25rem;
    color: var(--green-dark);
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }

.hero-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    color: var(--text-muted);
}

.hero-list li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.hero-list svg {
    width: 20px;
    height: 20px;
    color: var(--green);
    flex-shrink: 0;
}

.hero-visual {
    position: relative;
}

.hero-visual img {
    border-radius: 2rem;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 2;
}

.hero-visual::before {
    content: '';
    position: absolute;
    top: -1.5rem;
    right: -1.5rem;
    width: 90%;
    height: 100%;
    background: var(--green-light);
    border-radius: 2rem;
    z-index: 1;
}

/* Stats */
.stats {
    padding: 3.5rem 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    color: var(--green);
    line-height: 1;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.35rem;
}

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

.section-soft { background: var(--bg-soft); }

.section-title {
    font-size: 2.6rem;
    text-align: center;
    margin-bottom: 0.75rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 3rem;
    font-size: 1.05rem;
}

.section-lead {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 720px;
    text-align: center;
    margin: 0 auto 3rem;
}

/* Feature / product cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

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

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--green-pale);
}

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

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--green-dark);
}

.card-text {
    color: var(--text-muted);
    margin-bottom: 1rem;
    flex: 1;
    font-size: 0.95rem;
}

.card-price {
    font-weight: 700;
    color: var(--accent);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

/* Feature list */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feature-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    background: var(--green-pale);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green);
}

.feature-icon svg { width: 24px; height: 24px; }

.feature-item h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.feature-item p { font-size: 0.95rem; color: var(--text-muted); }

/* Forms */
.form {
    max-width: 520px;
    margin: 0 auto;
    background: var(--bg);
    padding: 2.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.form label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--green-dark);
}

.form input,
.form select,
.form textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    margin-bottom: 1.1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    background: #fff;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
    outline: none;
    border-color: var(--green-mid);
    box-shadow: 0 0 0 3px rgba(116, 198, 157, 0.15);
}

.form .error { color: #c0392b; margin-bottom: 1rem; font-size: 0.9rem; }

/* Tables */
.table-wrap {
    overflow-x: auto;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

table { width: 100%; border-collapse: collapse; }

th, td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

th { background: var(--bg-soft); color: var(--green-dark); font-weight: 700; }

/* Admin */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.admin-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border);
    text-align: center;
}

.admin-card strong { display: block; font-size: 2.2rem; color: var(--green); }
.admin-card span { color: var(--text-muted); font-size: 0.9rem; }

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.admin-nav a {
    padding: 0.5rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-nav a:hover { background: var(--green-pale); }

/* Footer */
.site-footer {
    background: var(--bg-soft);
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: auto;
    padding: 3.5rem 0;
}

.site-footer a { color: var(--green-dark); }
.site-footer a:hover { color: var(--green); }
.site-footer .footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; }
.site-footer strong { display: block; margin-bottom: 0.75rem; color: var(--green-dark); font-family: var(--font-heading); }
.site-footer .footer-grid a { display: block; margin-bottom: 0.5rem; font-size: 0.95rem; }

/* Cart & checkout */
.cart-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
}

.cart-total { text-align: right; font-size: 1.3rem; font-weight: 700; margin-top: 1.5rem; }

/* Two column content */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.two-col img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
}

/* Utility */
.text-center { text-align: center; }
.mt { margin-top: 1rem; }
.mb { margin-bottom: 1rem; }
.w-100 { width: 100%; }
.page-header { padding-top: 3rem; padding-bottom: 1rem; text-align: center; }

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.alert-success { background: var(--green-pale); color: var(--green-dark); }
.alert-error { background: #fbe8e6; color: #922b21; }

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

.product-detail img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Mobile */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--green-dark);
    border-radius: 2px;
}

@media (max-width: 900px) {
    .hero-grid, .two-col, .product-detail { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.4rem; }
    .nav-toggle { display: flex; }
    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        padding-top: 1rem;
        border-top: 1px solid var(--border);
        margin-top: 0.75rem;
    }
    body.nav-open .main-nav { display: flex; }
}
