:root {
  --green: #0b8457;
  --green-2: #0fa36b;
  --bg: #f5f7f6;
  --ink: #14211c;
  --muted: #6b7a73;
  --card: #ffffff;
  --line: #e4eae7;
  --rx: #d93636;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 64px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

.nav {
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}
.brand b { color: var(--green); }
.cross {
  display: inline-block;
  background: var(--green);
  color: white;
  width: 26px; height: 26px;
  text-align: center;
  line-height: 24px;
  border-radius: 6px;
  font-weight: 700;
  margin-right: 4px;
}
.nav nav { display: flex; gap: 20px; align-items: center; }
.nav nav a { color: var(--ink); }
.badge {
  background: var(--green);
  color: white;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 12px;
  margin-left: 2px;
}
.admin-link { color: var(--muted) !important; font-size: 13px; }

.hero {
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: white;
  padding: 36px 28px;
  border-radius: 16px;
  margin-bottom: 28px;
}
.hero h1 { margin: 0 0 8px; font-size: 30px; }
.hero p { margin: 0 0 18px; opacity: 0.92; }
.search { display: flex; gap: 8px; }
.search input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
}
.search button {
  padding: 0 18px;
  border: none;
  background: white;
  color: var(--green);
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
}

.layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
@media (max-width: 720px) { .layout { grid-template-columns: 1fr; } }
.cats {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  height: fit-content;
}
.cats h3 { margin: 0 0 8px; font-size: 14px; text-transform: uppercase; color: var(--muted); }
.cats ul { list-style: none; margin: 0; padding: 0; }
.cats li a {
  display: block;
  padding: 7px 10px;
  color: var(--ink);
  border-radius: 8px;
}
.cats li a.active, .cats li a:hover { background: #e9f5ef; color: var(--green); text-decoration: none; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
}
.thumb {
  position: relative;
  aspect-ratio: 1/1;
  background: #f0f5f2;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 10px;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.ph { font-size: 48px; opacity: 0.5; }
.ph.big { font-size: 120px; }
.rx {
  position: absolute;
  top: 8px; right: 8px;
  background: var(--rx);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}
.rx.inline { position: static; display: inline-block; margin-bottom: 8px; }
.card h4 { margin: 4px 0; font-size: 15px; }
.card h4 a { color: var(--ink); }
.row {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
}
.price { font-weight: 700; color: var(--green); font-size: 17px; }
.price.big { font-size: 28px; margin: 8px 0; }

.btn {
  background: var(--green);
  color: white;
  border: none;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
}
.btn:hover { background: var(--green-2); text-decoration: none; color: white; }
.btn:disabled { background: #c7d2cc; cursor: not-allowed; }
.btn.big { padding: 13px 22px; font-size: 16px; }
.btn.ghost { background: white; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: #f5f7f6; color: var(--ink); }
.link { background: none; border: none; color: var(--rx); cursor: pointer; padding: 0; }
.link:hover { text-decoration: underline; }

.back { display: inline-block; margin-bottom: 14px; color: var(--muted); }
.detail { display: grid; grid-template-columns: 340px 1fr; gap: 32px; }
@media (max-width: 720px) { .detail { grid-template-columns: 1fr; } }
.big-thumb {
  background: #f0f5f2;
  border-radius: 14px;
  aspect-ratio: 1/1;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.big-thumb img { width: 100%; height: 100%; object-fit: cover; }
.buy { margin-top: 16px; }

table { width: 100%; border-collapse: collapse; background: white; border-radius: 10px; overflow: hidden; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: #f0f5f2; font-size: 13px; text-transform: uppercase; color: var(--muted); }
tfoot td { border: none; background: #f0f5f2; }
.cart input[type=number] { width: 70px; padding: 6px; }
.actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.checkout {
  background: white;
  padding: 24px;
  border-radius: 12px;
  max-width: 520px;
  display: grid;
  gap: 14px;
}
.checkout label, .form-box label { display: grid; gap: 5px; font-size: 14px; color: var(--muted); }
.checkout input, .checkout textarea, .form-box input, .form-box textarea, .form-box select {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  color: var(--ink);
  font-family: inherit;
}
.checkout textarea, .form-box textarea { min-height: 80px; }
.total { font-size: 18px; }
.errors { background: #fde8e8; color: #a11; padding: 10px 14px; border-radius: 8px; }
.ok { background: #e0f5e9; color: #076b3f; padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }

.thanks { text-align: center; padding: 60px 20px; }
.thanks h1 { font-size: 32px; }

.foot {
  text-align: center;
  padding: 30px;
  color: var(--muted);
  font-size: 13px;
}

/* Admin */
body.admin { background: #eff2f0; }
.admin-nav nav a { font-size: 14px; }
.login-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: var(--bg); margin: 0;
}
.login {
  background: white; padding: 32px; border-radius: 14px;
  width: 320px; display: grid; gap: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.06);
}
.login h1 { margin: 0; font-size: 22px; text-align: center; color: var(--green); }
.login label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.login input { padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.form-box {
  background: white; padding: 24px; border-radius: 12px;
  max-width: 640px; display: grid; gap: 14px;
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chk { display: flex !important; gap: 8px; align-items: center; color: var(--ink) !important; }
.preview { max-width: 120px; border-radius: 8px; }
.list a { margin-right: 10px; }
.inline-form { display: inline-flex; gap: 8px; align-items: center; }
.inline-form input { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; }
.status { padding: 2px 8px; border-radius: 6px; font-size: 12px; background: #eee; }
.status.new { background: #fff3cd; color: #7a5b00; }
.status.confirmed { background: #d1e7ff; color: #004a9e; }
.status.delivered { background: #d4edda; color: #155724; }
.status.cancelled { background: #f8d7da; color: #721c24; }
.order-info {
  background: white; padding: 16px; border-radius: 10px;
  margin-bottom: 16px; display: grid; gap: 6px;
}
