:root {
  --green-dark: #4C7A2E;
  --green: #7FA84D;
  --green-mid: #93B863;
  --green-light: #C3D9A0;
  --yellow: #E9DE8E;
  --yellow-light: #F5F1D0;
  --ink: #1A1B16;
  --ink-soft: #4A4B42;
  --bg: #FFFFFF;
  --bg-soft: #FAFAF5;
  --bg-card: #F5F4EC;
  --line: #E7E5D8;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(26, 27, 22, 0.18);
  --shadow-sm: 0 4px 14px -6px rgba(26, 27, 22, 0.12);
  --ff: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--ff);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 28px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--green-dark); background: var(--yellow-light);
  border: 1px solid var(--green-light); padding: 6px 14px; border-radius: 999px;
}

h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.02em; margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; font-weight: 700; font-size: 0.92rem;
  border: 1px solid transparent; cursor: pointer; transition: all 0.2s ease;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--green); color: var(--green-dark); }
.btn-danger { background: #fff; color: #B3261E; border-color: #F2C9C5; }
.btn-danger:hover { background: #FDECEA; }
.btn-sm { padding: 9px 16px; font-size: 0.82rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Top bar (simple, shared) ---------- */
.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.9);
  position: sticky; top: 0; z-index: 20;
}
.topbar .container {
  display: flex; align-items: center; justify-content: space-between; height: 72px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; }
.brand .logo-mark { width: 32px; height: 32px; }
.brand span.flow { color: var(--green-dark); }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-size: 0.9rem; font-weight: 600; color: var(--ink-soft);
  position: relative; padding: 4px 0; transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--ink); }

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

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.25s ease, opacity 0.25s ease; }

.mobile-panel {
  display: none; flex-direction: column; gap: 4px;
  background: #fff; border-top: 1px solid var(--line); padding: 10px 28px 22px;
}
.mobile-panel a {
  padding: 12px 0; font-weight: 600; border-bottom: 1px solid var(--line); color: var(--ink-soft);
}
.mobile-panel .btn { margin-top: 14px; width: 100%; }

body.nav-open .mobile-panel { display: flex; }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 720px) {
  .nav-links, .nav-actions .btn-ghost { display: none; }
  .nav-toggle { display: flex; }
}

/* ---------- Catalogue ---------- */
.catalog-hero { padding: 56px 0 20px; text-align: center; }
.catalog-hero p { color: var(--ink-soft); max-width: 520px; margin: 14px auto 0; font-size: 1.02rem; }

.catalog-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  padding: 40px 0 90px;
}
@media (max-width: 980px) { .catalog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .catalog-grid { grid-template-columns: 1fr; } }

.product-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-photo { aspect-ratio: 1/1; background: var(--bg-card); position: relative; overflow: hidden; }
.product-photo img { width: 100%; height: 100%; object-fit: cover; }
.product-photo .sold-ribbon {
  position: absolute; top: 14px; right: -34px; transform: rotate(40deg);
  background: var(--ink); color: #fff; font-size: 0.72rem; font-weight: 800;
  padding: 5px 40px; letter-spacing: 0.06em;
}
.product-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-body h3 { font-size: 1.05rem; }
.product-price { font-weight: 800; color: var(--green-dark); font-size: 1.05rem; }
.product-body p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; flex: 1; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-soft); }

/* ---------- Admin ---------- */
.admin-wrap { padding: 40px 0 80px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; gap: 16px; flex-wrap: wrap; }

.admin-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.admin-table th, .admin-table td { padding: 14px 16px; text-align: left; font-size: 0.9rem; border-bottom: 1px solid var(--line); }
.admin-table th { background: var(--bg-card); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--bg-card); }
.badge-sold { background: var(--ink); color: #fff; font-size: 0.7rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.badge-live { background: var(--yellow-light); color: var(--green-dark); font-size: 0.7rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.row-actions { display: flex; gap: 8px; }
.row-actions form { display: inline; }

.form-card {
  max-width: 560px; margin: 0 auto; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px;
}
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label { font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); }
.field input[type="text"], .field input[type="number"], .field textarea {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px;
  font-family: var(--ff); font-size: 0.92rem; color: var(--ink);
}
.field textarea { resize: vertical; }

.file-upload { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.file-upload input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.file-upload-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-family: var(--ff); font-weight: 700; font-size: 0.85rem;
  padding: 10px 18px; border-radius: 999px; cursor: pointer; transition: all 0.2s ease;
}
.file-upload-btn:hover { border-color: var(--green); color: var(--green-dark); }
.file-upload-name { font-size: 0.85rem; color: var(--ink-soft); }
.field-checkbox { display: flex; align-items: center; gap: 10px; flex-direction: row; }
.field-checkbox input { width: 18px; height: 18px; }
.current-photo { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.current-photo img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.form-error {
  background: #FDECEA; border: 1px solid #F2C9C5; color: #B3261E;
  border-radius: var(--radius-sm); padding: 12px 16px; font-size: 0.88rem; margin-bottom: 18px;
}

/* ---------- Login ---------- */
.login-wrap { min-height: calc(100vh - 72px); display: flex; align-items: center; justify-content: center; background: var(--bg-soft); }
.login-card { width: 100%; max-width: 380px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; text-align: center; box-shadow: var(--shadow-sm); }
.login-card h1 { font-size: 1.3rem; margin: 4px 0 6px; }
.login-card p { color: var(--ink-soft); font-size: 0.9rem; margin: 0 0 24px; }
.login-card form { text-align: left; }
