:root {
    --green-950: #12372a;
    --green-800: #1f5d42;
    --green-600: #3d8b5d;
    --green-100: #e7f3eb;
    --cream: #f8f4e8;
    --gold: #e8ad45;
    --ink: #203029;
    --muted: #6d7d75;
    --white: #fff;
    --danger: #b53c3c;
    --shadow: 0 16px 40px rgba(18, 55, 42, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: #fbfcf9;
    font: 15px/1.6 "Segoe UI", Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1120px, calc(100% - 32px)); margin: auto; }
.topbar {
    position: sticky; top: 0; z-index: 20;
    background: rgba(255,255,255,.94); backdrop-filter: blur(12px);
    border-bottom: 1px solid #e5ece7;
}
.nav { position: relative; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; color: var(--green-950); }
.brand-mark {
    display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px;
    color: white; background: linear-gradient(145deg, var(--green-800), var(--green-600));
}
.nav-links { display: flex; align-items: center; gap: 22px; font-weight: 600; }
.public-menu-toggle {
    display: none; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 12px;
    color: white; background: var(--green-800); cursor: pointer;
}
.public-menu-toggle span {
    display: block; width: 22px; height: 2px; margin: 4px auto; border-radius: 2px;
    background: currentColor; transition: transform .2s, opacity .2s;
}
.public-menu-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.public-menu-toggle.open span:nth-child(2) { opacity: 0; }
.public-menu-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 42px; padding: 9px 18px; border: 0; border-radius: 12px;
    font: inherit; font-weight: 700; cursor: pointer;
}
.btn-primary { color: white; background: var(--green-800); }
.btn-soft { color: var(--green-800); background: var(--green-100); }
.btn-danger { color: white; background: var(--danger); }
.btn-small { min-height: 34px; padding: 6px 11px; border-radius: 9px; font-size: 13px; }
.hero {
    overflow: hidden; padding: 86px 0 72px;
    background: radial-gradient(circle at 85% 20%, #cde9c7 0, transparent 28%), linear-gradient(135deg, var(--cream), #eef6ec);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 64px; }
.eyebrow { color: var(--green-600); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }
h1, h2, h3 { margin: 0 0 14px; line-height: 1.15; }
h1 { font-size: clamp(40px, 6vw, 68px); color: var(--green-950); letter-spacing: -.04em; }
h2 { font-size: clamp(28px, 4vw, 42px); color: var(--green-950); }
.lead { color: var(--muted); font-size: 18px; max-width: 650px; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-card {
    min-height: 410px; padding: 30px; border-radius: 34px; color: white;
    background: linear-gradient(160deg, #173f2f, #388b59); box-shadow: var(--shadow);
    display: flex; flex-direction: column; justify-content: flex-end; position: relative;
}
.hero-card:before {
    content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%;
    border: 34px solid rgba(255,255,255,.08); right: 22px; top: 22px;
}
.harvest-chip { padding: 12px 14px; border-radius: 13px; background: rgba(255,255,255,.12); margin-top: 10px; }
.section { padding: 76px 0; }
.section-soft { background: var(--cream); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.section-link { color: var(--green-800); font-weight: 800; }
.section-link:hover { text-decoration: underline; }
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { display: flex; flex-direction: column; border: 1px solid #e1e9e3; border-radius: 20px; background: white; box-shadow: 0 8px 24px rgba(18,55,42,.06); overflow: hidden; }
.card-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 20px; }
.card-body p { flex: 1; }
.product-image, .gallery-image, .news-image {
    width: 100%; height: 210px; object-fit: cover; background: linear-gradient(145deg, #dcebd9, #9cc89d);
}
.product-gallery-trigger {
    position: relative; display: block; width: 100%; padding: 0; border: 0;
    color: inherit; background: transparent; cursor: zoom-in; overflow: hidden;
}
.product-gallery-trigger .product-image { transition: transform .25s; }
.product-gallery-trigger:hover .product-image { transform: scale(1.035); }
.product-photo-count, .product-zoom-label {
    position: absolute; right: 12px; bottom: 12px; padding: 5px 9px; border-radius: 999px;
    color: white; background: rgba(18,55,42,.82); font-size: 12px; font-weight: 800;
}
.product-detail-main { border-radius: 20px; background: #edf4ee; box-shadow: var(--shadow); }
.product-detail-main img { width: 100%; height: 430px; object-fit: contain; }
.product-thumbnails { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 12px; }
.product-thumbnails .product-gallery-trigger { border: 2px solid transparent; border-radius: 10px; background: #edf4ee; }
.product-thumbnails img { width: 100%; height: 76px; object-fit: cover; }
body.modal-open { overflow: hidden; }
.product-modal { position: fixed; inset: 0; z-index: 100; display: none; padding: 24px; }
.product-modal.open { display: grid; place-items: center; }
.product-modal-backdrop { position: absolute; inset: 0; background: rgba(8,23,17,.86); }
.product-modal-dialog {
    position: relative; z-index: 1; display: flex; flex-direction: column;
    width: min(1000px, 100%); max-height: calc(100vh - 48px); overflow: hidden;
    border-radius: 20px; background: white; box-shadow: 0 25px 80px rgba(0,0,0,.35);
}
.product-modal-head, .product-modal-footer {
    display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 18px;
}
.product-modal-close {
    width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
    color: var(--green-950); background: var(--green-100); font-size: 28px; cursor: pointer;
}
.product-modal-stage { position: relative; display: grid; place-items: center; min-height: 300px; background: #101c16; }
.product-modal-stage > img { width: 100%; height: min(68vh, 650px); object-fit: contain; }
.product-modal-nav {
    position: absolute; z-index: 2; top: 50%; width: 46px; height: 46px; padding: 0;
    border: 0; border-radius: 50%; color: white; background: rgba(18,55,42,.78);
    font-size: 25px; cursor: pointer; transform: translateY(-50%);
}
.product-modal-nav.previous { left: 16px; }
.product-modal-nav.next { right: 16px; }
.product-modal-thumbnails { display: flex; gap: 8px; overflow-x: auto; }
.product-modal-thumbnails button { flex: 0 0 auto; padding: 2px; border: 2px solid transparent; border-radius: 8px; background: transparent; cursor: pointer; }
.product-modal-thumbnails button.active { border-color: var(--green-600); }
.product-modal-thumbnails img { width: 54px; height: 44px; object-fit: cover; border-radius: 5px; }
.news-detail-image {
    display: block; width: auto; max-width: min(100%, 640px); max-height: 440px;
    margin: 28px auto; object-fit: contain; border: 1px solid #e1e9e3;
    border-radius: 18px; background: white; box-shadow: 0 8px 24px rgba(18,55,42,.08);
}
.price { color: var(--green-800); font-size: 20px; font-weight: 800; }
.badge { display: inline-flex; padding: 4px 9px; border-radius: 999px; background: var(--green-100); color: var(--green-800); font-size: 12px; font-weight: 800; }
.schedule { display: flex; gap: 18px; align-items: center; padding: 18px 0; border-bottom: 1px solid #dce7de; }
.date-box { min-width: 64px; padding: 9px; border-radius: 14px; text-align: center; color: white; background: var(--green-800); font-weight: 800; }
.footer { padding: 50px 0; color: #dbe9df; background: var(--green-950); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.empty { padding: 38px; text-align: center; color: var(--muted); border: 1px dashed #bfcfc3; border-radius: 18px; }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 34px; flex-wrap: wrap; }
.page-link {
    display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px;
    border: 1px solid #d6e2d9; border-radius: 10px; color: var(--green-800);
    background: white; font-weight: 700;
}
.page-link:hover, .page-link.active { color: white; border-color: var(--green-800); background: var(--green-800); }
.page-link.disabled { color: #9baba1; pointer-events: none; background: #f1f4f1; }

.admin-body { background: #f3f6f3; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 255px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 25px 18px; color: #dce9e0; background: var(--green-950); overflow-y: auto; }
.sidebar .brand { color: white; margin: 0 8px 28px; }
.side-label { padding: 18px 12px 7px; color: #8fb19e; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.side-link { display: flex; padding: 10px 12px; margin: 3px 0; border-radius: 10px; font-weight: 600; }
.side-link:hover { background: rgba(255,255,255,.09); color: white; }
.admin-main { min-width: 0; }
.admin-top { height: 72px; padding: 0 28px; background: white; border-bottom: 1px solid #e0e7e2; display: flex; align-items: center; justify-content: space-between; }
.admin-content { padding: 28px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; }
.page-head h1 { font-size: 30px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 24px; }
.stat { padding: 21px; border-radius: 18px; background: white; border: 1px solid #e1e8e3; }
.stat strong { display: block; margin-top: 6px; color: var(--green-950); font-size: 25px; }
.panel { margin-bottom: 22px; padding: 22px; border: 1px solid #e1e8e3; border-radius: 18px; background: white; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 13px; border-bottom: 1px solid #e7ece8; text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.actions { display: flex; gap: 6px; white-space: nowrap; }
.actions form { margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
label { font-weight: 700; color: #34483e; }
input, select, textarea {
    width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #cdd9d1;
    border-radius: 10px; color: var(--ink); background: white; font: inherit;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(61,139,93,.14); border-color: var(--green-600); }
.image-upload { display: grid; gap: 10px; }
.image-preview-wrap {
    position: relative; display: grid; place-items: center; width: min(100%, 420px);
    min-height: 220px; overflow: hidden; border: 2px dashed #c5d4ca; border-radius: 16px;
    background: #f5f8f5;
}
.image-preview { width: 100%; height: 260px; object-fit: contain; background: white; }
.image-preview.is-empty { display: none; }
.image-placeholder { padding: 24px; color: var(--muted); text-align: center; }
.image-placeholder.is-hidden { display: none; }
.table-image {
    width: 76px; height: 58px; object-fit: cover; border: 1px solid #d9e3dc;
    border-radius: 10px; background: #f2f5f2;
}
.image-empty-label { color: var(--muted); font-size: 12px; white-space: nowrap; }
.multi-image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.stored-image {
    position: relative; display: flex; flex-direction: column; gap: 7px; padding: 8px;
    border: 1px solid #d9e3dc; border-radius: 12px; background: #f8faf8; cursor: pointer;
}
.stored-image img { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; background: white; }
.stored-image span { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.stored-image input { width: auto; min-height: auto; }
.stored-image strong {
    position: absolute; top: 14px; left: 14px; padding: 3px 7px; border-radius: 999px;
    color: white; background: var(--green-800); font-size: 10px;
}
.alert { margin-bottom: 18px; padding: 12px 16px; border-radius: 12px; font-weight: 600; }
.alert-success { color: #205f3d; background: #dcf3e5; }
.alert-error { color: #8e3030; background: #f8dddd; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg, var(--green-950), var(--green-600)); }
.login-card { width: min(430px, 100%); padding: 34px; border-radius: 24px; background: white; box-shadow: var(--shadow); }
.login-card .brand { margin-bottom: 28px; }
.login-card .form-group { margin-bottom: 16px; }
.login-card .btn { width: 100%; margin-top: 8px; }
.mobile-toggle { display: none; }

@media (max-width: 900px) {
    .hero-grid, .footer-grid { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .admin-shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; left: -270px; z-index: 50; width: 255px; transition: .2s; }
    .sidebar.open { left: 0; box-shadow: 15px 0 40px rgba(0,0,0,.2); }
    .mobile-toggle { display: inline-flex; }
}
@media (max-width: 640px) {
    .nav { min-height: 72px; }
    .public-menu-toggle { display: block; flex: 0 0 auto; }
    .nav-links {
        position: absolute; top: calc(100% + 1px); left: 0; right: 0;
        display: none; align-items: stretch; gap: 4px; padding: 12px;
        border: 1px solid #dce6df; border-top: 0; border-radius: 0 0 16px 16px;
        background: rgba(255,255,255,.98); box-shadow: 0 18px 30px rgba(18,55,42,.16);
    }
    .nav-links.open { display: flex; flex-direction: column; }
    .nav-links a {
        display: flex; align-items: center; min-height: 46px; padding: 10px 14px;
        border-radius: 10px; color: var(--green-950);
    }
    .nav-links a:not(.btn):hover, .nav-links a:not(.btn):focus { background: var(--green-100); }
    .nav-links .btn { margin-top: 4px; color: white; }
    .news-detail-image { max-height: 320px; margin: 22px auto; border-radius: 14px; }
    .product-detail-main img { height: 300px; }
    .product-thumbnails { grid-template-columns: repeat(4, 1fr); }
    .product-thumbnails img { height: 62px; }
    .product-modal { padding: 10px; }
    .product-modal-dialog { max-height: calc(100vh - 20px); border-radius: 14px; }
    .product-modal-stage > img { height: 62vh; }
    .product-modal-nav { width: 40px; height: 40px; }
    .product-modal-nav.previous { left: 8px; }
    .product-modal-nav.next { right: 8px; }
    .product-modal-footer { align-items: flex-start; flex-direction: column; }
    .hero { padding-top: 54px; }
    .hero-card { min-height: 320px; }
    .grid-3, .grid-4, .stat-grid, .form-grid { grid-template-columns: 1fr; }
    .admin-content { padding: 18px; }
    .admin-top { padding: 0 18px; }
    .page-head, .section-head { align-items: flex-start; flex-direction: column; }
    .form-group.full { grid-column: auto; }
}
@media print {
    .sidebar, .admin-top, .page-head .btn, .no-print, form { display: none !important; }
    .admin-shell { display: block; }
    .admin-content { padding: 0; }
    .panel { border: 0; padding: 0; }
}
