@font-face { font-family: BoBo; src: url("/fonts/BeVietnamPro-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: BoBo; src: url("/fonts/BeVietnamPro-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: BoBo; src: url("/fonts/BeVietnamPro-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
:root {
  --ink: #132f27; --muted: #4e665d; --line: #dce8df; --green: #68bc00; --gold: #fbbb25;
  --bg: #f7faf5; --soft: #edf6e6; --paper: #fff; --deep: #0e382c;
  --shadow: 0 10px 28px #153b2710;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.65 BoBo, "Segoe UI", sans-serif; }
a { color: inherit; }
h1, h2, h3, p { margin: 0 0 12px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.035em; }
h2 { font-size: clamp(23px, 3vw, 32px); }
h3 { font-size: 17px; }
.wrap { width: min(1180px, calc(100% - 36px)); margin-inline: auto; }
.top { background: #fff; border-bottom: 1px solid var(--line); }
.bar, .row, .catalog-intro { display: flex; align-items: center; justify-content: space-between; gap: 15px; flex-wrap: wrap; }
.bar { min-height: 66px; }
.brand { font-size: 24px; font-weight: 700; letter-spacing: -.055em; text-decoration: none; }
.brand b { color: #38720d; }
.bar nav, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.bar nav a { padding: 4px; font-weight: 600; text-decoration: none; }
.cart-button { background: var(--soft); border-color: #b5d19f; box-shadow: none; }
#cart-count { display: inline-grid; place-items: center; min-width: 23px; height: 23px; margin-left: 4px; border-radius: 99px; background: var(--deep); color: white; }
.hero {
  display: grid; grid-template-columns: .93fr 1fr; align-items: stretch; min-height: 400px; margin: 25px 0 38px;
  color: white; background: var(--deep); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow);
}
.hero-copy { padding: clamp(22px, 5vw, 60px); align-self: center; }
.hero h1 { margin-bottom: 16px; font-size: clamp(37px, 5.7vw, 70px); letter-spacing: -.064em; line-height: 1.03; }
.label { color: #b5ec84; font-weight: 600; }
.hero p:not(.label) { max-width: 44ch; color: #dbecdf; }
.hero .actions { margin-top: 21px; }
.hero .button { background: var(--gold); border-color: #fbbb25; }
.hero .secondary { background: #ffffff12; border-color: #ffffff58; color: white; }
.hero-photo { position: relative; min-height: 280px; margin: 0; overflow: hidden; }
.hero-photo img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #0e382c28, transparent 35%); pointer-events: none; }
.hero-photo figcaption { position: absolute; z-index: 1; right: 12px; bottom: 10px; padding: 2px 8px; border-radius: 5px; background: #11291bdc; color: #fff; font-size: 10px; }
.hero-photo figcaption a { text-decoration: none; }
.button, button {
  display: inline-flex; justify-content: center; align-items: center; gap: 4px; min-height: 42px; padding: 9px 14px;
  border: 1px solid #91bd65; border-radius: 10px; background: linear-gradient(#a6d973, #85c64a);
  color: #17330b; font: 600 13px/1.35 BoBo, sans-serif; text-decoration: none; cursor: pointer;
}
.button:hover, button:hover { filter: brightness(1.045); }
button:disabled { opacity: .55; cursor: wait; }
.secondary { background: #fff; border-color: #cbdace; color: var(--ink); }
.catalog { padding-bottom: 38px; scroll-margin-top: 16px; }
.catalog-intro { margin-bottom: 12px; align-items: end; }
.catalog-intro h2 { margin-bottom: 4px; }
.catalog-intro p { margin-bottom: 0; color: var(--muted); }
.search { width: min(100%, 280px); margin: 0; }
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.filters button { min-height: 36px; border-color: var(--line); background: white; color: var(--ink); }
.filters button[aria-pressed=true] { border-color: #a9c98f; background: var(--soft); }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.card { padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); box-shadow: var(--shadow); }
.product-card { display: flex; flex-direction: column; min-width: 0; padding: 0; overflow: hidden; }
.product-media { display: block; width: 100%; aspect-ratio: 1.45; overflow: hidden; background: #ecf5e8; }
.product-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.placeholder { display: grid; place-items: center; color: #426151; background: radial-gradient(ellipse at 75% 30%, #dcebd5, transparent 70%), #eef4ec; font-weight: 600; }
.product-body { display: flex; flex: 1; flex-direction: column; gap: 5px; padding: 13px; }
.product-body h3, .product-body p { margin: 0; }
.product-body h3 { overflow-wrap: anywhere; }
.product-group { color: #426a2d; font-size: 11px; font-weight: 700; }
.product-meta { color: var(--muted); font-size: 12px; }
.product-price { padding: 5px 0; font-weight: 700; }
.product-body .buy { align-self: stretch; margin-top: auto; }
.photo-credit { display: inline-block; width: fit-content; margin-top: 2px; color: var(--muted); font-size: 10px; }
.product-status { margin: 12px 0 0; color: var(--muted); }
label { display: block; margin: 8px 0; font-weight: 600; }
input, textarea, select { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid #b9cfc2; border-radius: 9px; background: #fff; color: inherit; font: inherit; }
textarea { resize: vertical; }
dialog { width: min(520px, calc(100% - 22px)); max-height: 90vh; padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: inherit; box-shadow: 0 20px 60px #10251f60; }
dialog::backdrop { background: #173b2e72; }
.dialog-heading { padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.dialog-heading h2 { margin: 0; font-size: 22px; }
#basket li { margin: 9px 0; }
#basket input { display: inline-block; width: 64px; margin: 0 7px; }
.checkout-note { color: var(--muted); }
.admin { padding: 26px 0; }
.admin h1 { font-size: clamp(32px, 6vw, 48px); }
.admin section { margin: 16px 0; }
.admin .card { margin: 8px 0; }
.admin .row h3 { margin: 0; }
.edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
details summary { cursor: pointer; font-weight: 700; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 17px 0 78px; border-top: 1px solid var(--line); color: var(--muted); }
:focus-visible { outline: 2px solid #527a2a; outline-offset: 3px; }
[hidden] { display: none !important; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 650px) {
  .wrap { width: calc(100% - 24px); }
  .hero { grid-template-columns: 1fr; margin: 12px 0 25px; border-radius: 17px; min-height: auto; }
  .hero-photo { min-height: 200px; aspect-ratio: 1.65; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .product-body { padding: 10px; }
  .edit-grid { grid-template-columns: 1fr; }
}
@media (max-width: 335px) { .grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: no-preference) { button, .button { transition: filter .16s ease; } }
.cart-toast{position:fixed;right:18px;bottom:75px;z-index:3;max-width:min(340px,calc(100vw - 36px));padding:11px 15px;border-radius:12px;background:#10392d;color:white;box-shadow:var(--shadow);font-weight:600}
.cart-pulse{animation:cart-pulse .45s ease both}
@keyframes cart-pulse{35%{transform:scale(1.28);background:#68bc00;color:#162c0d}100%{transform:none}}
@media (prefers-reduced-motion:reduce){.cart-pulse{animation:none}}
.pay-panel{padding:10px 0 0}.pay-steps{display:flex;flex-wrap:wrap;gap:7px;padding:0;margin:0 0 15px;list-style:none}.pay-steps li{padding:5px 8px;border-radius:20px;background:#eef3ee;color:#566858;font-size:11px}.pay-steps [aria-current=step]{background:#d9efc5;color:#1e4d20;font-weight:700}
.pay-qr{display:block;width:min(220px,100%);aspect-ratio:1;object-fit:contain;margin:0 auto 10px;padding:6px;border:1px solid var(--line);border-radius:12px;background:white}
.pay-data{background:#f1f6ee;border-radius:10px;padding:8px 10px}.pay-data div{display:flex;justify-content:space-between;gap:8px;padding:4px 0}.pay-data dd{margin:0;text-align:right;font-weight:700;overflow-wrap:anywhere}.pay-hint{color:var(--muted);font-size:12px;margin:8px 0;overflow-wrap:anywhere}.pay-toggle{display:flex;align-items:center;gap:8px}.pay-toggle input{width:auto;margin:0}
.login-card { max-width: 440px; padding: 23px; }
.login-card h2 { margin: 9px 0 2px; }
.login-card > p { color: var(--muted); margin-bottom: 19px; }
.login-card button { width: 100%; margin-top: 12px; }
.login-brand { display:grid; place-items:center; width:42px; height:42px; border-radius:12px; background:#daefc9; color:#214716; font-size:22px; font-weight:700; }
#security-admin .card { max-width: 500px; }
