:root {
  --brand-green: #0b4336;
  --brand-green-dark: #07352b;
  --brand-gold: #c9924d;
  --brand-gold-soft: #f2e7d8;
  --page-bg: #f6f4ef;
  --surface: #fff;
  --text: #262b28;
  --muted: #66706b;
  color: var(--text);
  background: var(--page-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page-bg); }
a { color: inherit; }
.topbar { position: sticky; top: 0; z-index: 2; padding: 9px 20px; border-bottom: 1px solid #e1dbd0; background: #ffffffed; color: var(--brand-green); box-shadow: 0 2px 12px #0b43360a; backdrop-filter: blur(10px); }
.topbar a { text-decoration: none; font-weight: 700; }
.brand { display: flex; align-items: center; width: min(100%, 720px); min-height: 52px; margin: auto; }
.brand-logo { display: block; width: auto; max-width: min(76vw, 285px); height: 52px; object-fit: contain; object-position: left center; }
main, footer { width: min(100%, 760px); margin: auto; padding: 20px; }
section { margin-bottom: 34px; }
.hero { padding: 30px 0 10px; }
.brand-hero { margin-top: 12px; padding: 26px 24px; border-left: 5px solid var(--brand-gold); border-radius: 0 16px 16px 0; background: linear-gradient(135deg, #fff 40%, var(--brand-gold-soft)); box-shadow: 0 8px 28px #07352b0a; }
.brand-hero h1 { margin: 18px 0 8px; color: var(--brand-green-dark); }
.brand-hero p { margin-bottom: 0; }
.notice { display: inline-block; padding: 7px 10px; border-radius: 6px; background: #fff2c6; color: #725500; font-size: 14px; }
h1 { font-size: 30px; line-height: 1.3; }
h2 { font-size: 23px; }
.page-heading { margin: 0 0 12px; color: var(--brand-green-dark); }
.page-heading::after { display: block; width: 46px; height: 4px; margin-top: 10px; border-radius: 2px; background: var(--brand-gold); content: ""; }
.section-heading { display: flex; align-items: center; gap: 10px; color: var(--brand-green-dark); }
.section-heading::before { width: 5px; height: 1.1em; border-radius: 3px; background: var(--brand-gold); content: ""; }
p { line-height: 1.75; }
.link-list { display: grid; gap: 12px; }
.catalog-link { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 14px 16px; border: 1px solid #e8e2d8; border-left: 5px solid var(--brand-green); border-radius: 10px; background: var(--surface); color: var(--brand-green-dark); text-decoration: none; box-shadow: 0 4px 14px #07352b0d; }
.catalog-link strong, .catalog-link small { display: block; }
.catalog-link strong { font-size: 18px; }
.catalog-link small { margin-top: 5px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.catalog-arrow { color: var(--brand-gold); font-size: 32px; line-height: 1; }
.crumb { margin: 8px 0 26px; color: var(--muted); line-height: 1.7; }
.crumb a { color: var(--brand-green); font-weight: 700; text-underline-offset: 3px; }
.details { overflow: hidden; border: 1px solid #e8e2d8; border-radius: 12px; background: var(--surface); }
.details div { display: grid; grid-template-columns: 80px 1fr; padding: 12px 15px; border-bottom: 1px solid #eee; }
.details div:last-child { border: 0; }
.details dt { color: var(--brand-green); font-weight: 700; }
.details dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.photos { display: grid; gap: 18px; }
.product-media { display: grid; gap: 18px; }
.product-media a, .product-media figure { overflow: hidden; margin: 0; border: 1px solid #e8e2d8; border-radius: 12px; background: var(--surface); color: inherit; text-decoration: none; }
.product-media img, .product-media video { display: block; width: 100%; background: #101614; }
.product-media img { background: var(--surface); }
.product-media span, .product-media figcaption { display: block; min-height: 44px; padding: 11px 14px; color: var(--muted); }
.photos a { overflow: hidden; border: 1px solid #e8e2d8; border-radius: 12px; background: var(--surface); color: inherit; text-decoration: none; }
.photos img, .single-image img { display: block; width: 100%; height: auto; border-radius: 10px; background: var(--surface); }
.photos img { border-radius: 0; }
.photos span { display: block; min-height: 44px; padding: 11px 14px; color: var(--muted); }
.single-image > p { color: var(--muted); }
.location, footer { border-top: 1px solid #d8d5cc; }
.location { padding-top: 12px; }
.nav-button { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 18px; border-radius: 10px; background: var(--brand-green); color: white; text-align: center; text-decoration: none; font-weight: 700; box-shadow: 0 5px 14px #0b43362b; }
.nav-button.disabled { background: #a9ada9; }
footer { color: var(--muted); font-size: 14px; }

@media (hover: hover) {
  .catalog-link:hover { border-left-color: var(--brand-gold); background: #fffdf9; }
  .nav-button:hover { background: var(--brand-green-dark); }
}

a:focus-visible { outline: 3px solid var(--brand-gold); outline-offset: 3px; }

@media (max-width: 520px) {
  main, footer { padding: 16px; }
  h1 { font-size: 26px; }
  .brand-hero { margin-top: 4px; padding: 22px 18px; }
}

.admin-body { background: #eef0ed; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; background: #18382e; color: white; }
.admin-topbar a { color: white; text-decoration: none; font-weight: 700; }
.admin-topbar form { margin: 0; }
.link-button { padding: 4px; border: 0; background: transparent; color: white; font: inherit; text-decoration: underline; cursor: pointer; }
.admin-main { width: min(100%, 920px); }
.admin-panel, .admin-list { padding: 22px; border-radius: 12px; background: white; }
.admin-panel.narrow { max-width: 560px; margin: 25px auto; }
.admin-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.admin-form { display: grid; gap: 18px; }
.admin-form label { display: grid; gap: 7px; font-weight: 700; }
.admin-form input, .admin-form textarea, .admin-form select { width: 100%; padding: 12px; border: 1px solid #aeb6b1; border-radius: 7px; background: white; font: inherit; }
.admin-form textarea.product-parameter { min-height: 96px; line-height: 1.55; resize: vertical; }
.admin-form .check-label { display: flex; align-items: center; gap: 10px; }
.admin-form .check-label input { width: auto; }
.primary-button, .admin-actions a, .admin-actions button, .danger-button { display: inline-block; padding: 11px 16px; border: 0; border-radius: 7px; background: #18382e; color: white; font: inherit; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; }
.primary-button.secondary { background: #68736e; }
.danger-button, .admin-actions .danger-link { background: #a22d27; }
.error { padding: 12px; border-radius: 7px; background: #ffe8e5; color: #8a1e18; }
.success { padding: 12px; border-radius: 7px; background: #dff2e8; color: #1c6043; }
.help { margin-top: -12px; color: #666; font-size: 14px; }
.admin-item { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 0; border-bottom: 1px solid #ddd; }
.admin-item:last-child { border: 0; }
.admin-item h2 { margin: 0; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-actions form { margin: 0; }
.status { display: inline-block; padding: 4px 8px; border-radius: 5px; font-size: 14px; }
.status.visible { background: #dff2e8; color: #1c6043; }
.status.hidden { background: #eee; color: #555; }
.admin-thumbnail { width: 120px; height: 90px; border-radius: 8px; object-fit: cover; background: #eee; }
.admin-item-content { flex: 1; }
.admin-preview { display: block; width: 100%; height: auto; margin: 15px 0; border-radius: 8px; }
.admin-video-preview { width: 180px; max-width: 100%; border-radius: 8px; background: #101614; }
.category-cover-preview { aspect-ratio: 4 / 3; object-fit: cover; }
.logo-preview { max-height: 160px; padding: 12px; object-fit: contain; background: #f5f4ef; }

@media (max-width: 650px) {
  .admin-heading, .admin-item { align-items: stretch; flex-direction: column; }
  .admin-heading .primary-button { width: 100%; }
}
