/* ===== Design tokens ===== */
:root {
  --color-bg: #f4f3ed;
  --color-surface: #ffffff;
  --color-border: rgba(17, 18, 15, 0.14);
  --color-text: #11120f;
  --color-text-muted: #6d6a60;
  --color-primary: #11120f;
  --color-primary-dark: #15160f;
  --color-primary-hover: #39382e;
  --color-accent: #c8ae72;
  --color-accent-deep: #91794b;
  --color-cta-bg: #e8e4d8;
  --color-dark-text-muted: #bcbcaf;
  --color-success: #2f7d43;
  --color-error: #b0402c;
  --radius: 0px;
  --shadow-sm: 0 1px 2px rgba(17, 18, 15, 0.06);
  --shadow-md: 0 6px 20px rgba(17, 18, 15, 0.1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: Georgia, "Songti SC", "STSong", "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 243, 237, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: none;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 10px 0;
  flex-wrap: wrap;
  gap: 10px;
}
.brand {
  color: var(--color-text);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.brand span {
  color: var(--color-text-muted);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-left: 10px;
}
.main-nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: flex-end; row-gap: 8px; }
.main-nav a { color: var(--color-text); font-size: 14px; padding-bottom: 4px; border-bottom: 1px solid transparent; }
.main-nav a:hover, .main-nav a.active { color: var(--color-text); text-decoration: none; border-color: var(--color-text); }
.main-nav a.nav-cta {
  background: var(--color-text);
  color: var(--color-bg);
  padding: 9px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  border-bottom: none;
}
.main-nav a.nav-cta:hover { background: var(--color-primary-hover); border-color: transparent; }

.link-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.link-btn:hover { color: var(--color-text); text-decoration: underline; }
.inline-form { display: inline; margin: 0; }

/* ===== Layout ===== */
.main-content { padding: 32px 24px 64px; min-height: calc(100vh - 200px); }
.site-footer {
  background: var(--color-primary-dark);
  color: var(--color-dark-text-muted);
  padding: 32px 0;
  font-size: 13px;
  text-align: center;
}
.site-footer p { color: inherit; }

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 56px 32px 40px;
  margin: 0 0 8px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 15% 20%, rgba(201, 162, 39, 0.16), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(15, 61, 99, 0.12), transparent 50%),
    linear-gradient(180deg, #ffffff 0%, #ece9df 100%);
  border: 1px solid var(--color-border);
}
.hero h1 { font-size: 34px; margin-bottom: 10px; color: var(--color-primary-dark); letter-spacing: -0.3px; }
.hero-sub { color: var(--color-text-muted); font-size: 16px; margin-bottom: 32px; max-width: 640px; margin-left: auto; margin-right: auto; }
.page-header { text-align: left; padding: 32px 0 16px; }
.page-header h1 { font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.02em; font-size: clamp(32px, 4vw, 52px); color: var(--color-text); margin: 12px 0 8px; }
.page-header .hero-sub { margin-left: 0; margin-right: 0; }

.trust-stats {
  display: flex;
  justify-content: center;
  gap: 64px;
  flex-wrap: wrap;
}
.trust-stat { text-align: center; }
.trust-number { font-size: clamp(42px, 5vw, 64px); font-weight: 700; color: var(--color-primary); font-family: var(--font-serif); line-height: 1; }
.trust-label { font-size: 16px; font-weight: 500; color: var(--color-text-muted); margin-top: 10px; letter-spacing: 0.01em; }

/* ===== Sections ===== */
.section { margin-top: 48px; }
.section-title {
  font-size: 20px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-border);
  color: var(--color-primary-dark);
}
.section-title.no-border { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.section-link { font-size: 13px; font-weight: 600; color: var(--color-primary); }

/* ===== Filter bar ===== */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.filter-bar input[type="text"],
.filter-bar select {
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
}
.filter-bar input[type="text"] { flex: 1; min-width: 200px; }

/* ===== Cards ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, transform 0.15s;
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  position: relative;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.card h3 { margin: 8px 0; font-size: 16px; color: var(--color-primary-dark); }
.card-summary { color: var(--color-text-muted); font-size: 13px; flex: 1; }
.card-format-icon {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  width: fit-content;
}
.card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 1;
}
.free-badge { background: #e6f4ea; color: var(--color-success); }
.new-badge { background: var(--color-error); color: #fff; letter-spacing: 0.5px; }
.new-badge-inline { background: var(--color-error); color: #fff; font-weight: 700; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tag-chip {
  background: #eae7dc;
  color: var(--color-primary);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
}
.card-footer { margin-top: 12px; display: flex; justify-content: space-between; align-items: center; }
.price { font-weight: 700; color: var(--color-accent-deep); font-size: 16px; }
.empty-state { color: var(--color-text-muted); padding: 32px 0; text-align: center; grid-column: 1 / -1; }

/* Cover images on marketplace/product cards */
.card-cover {
  width: calc(100% + 40px);
  margin: -20px -20px 12px;
  aspect-ratio: 16 / 9;
  background-color: #eae7dc;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius) var(--radius) 0 0;
}
.card-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #eae7dc, #d6d2c2);
}

/* Recently-added horizontal rail */
.rail { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.rail-card { flex: 0 0 220px; scroll-snap-align: start; padding: 0 0 16px; }
.rail-card .card-cover { width: 100%; margin: 0 0 12px; border-radius: var(--radius) var(--radius) 0 0; }
.rail-card-body { padding: 0 16px; }
.rail-card-body h3 { font-size: 14px; margin: 0 0 8px; line-height: 1.4; }

/* News cards */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.news-grid-compact { grid-template-columns: repeat(3, 1fr); }
.news-card { padding: 0 0 18px; overflow: hidden; }
.news-card-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #eae7dc;
  background-size: cover;
  background-position: center;
  margin-bottom: 14px;
}
.news-card-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: linear-gradient(135deg, #eae7dc, #d6d2c2);
}
.news-card-body { padding: 0 18px; }
.news-card-body h3 { font-size: 15px; margin: 4px 0 6px; line-height: 1.4; }
.news-date { color: var(--color-text-muted); font-size: 12px; }
.read-more-link { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--color-primary); }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-align: center;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); text-decoration: none; }
.btn-secondary { background: #eae7dc; color: var(--color-primary); }
.btn-block { display: block; width: 100%; }
.btn-disabled { background: #ddd8c8; color: #a29d8c; cursor: not-allowed; }

/* ===== Forms ===== */
.auth-panel {
  max-width: 420px;
  margin: 40px auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.auth-panel h1 { text-align: center; margin-bottom: 24px; font-size: 22px; }
.auth-form label, .admin-form label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; color: var(--color-text-muted); }
.auth-form input, .admin-form input[type="text"], .admin-form input[type="number"],
.admin-form input[type="email"], .admin-form select, .admin-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
}
.auth-switch { text-align: center; margin-top: 16px; font-size: 13px; color: var(--color-text-muted); }
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fdecea; color: var(--color-error); }
.alert-success { background: #e6f4ea; color: var(--color-success); }

/* ===== Product detail ===== */
.product-detail { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }
.detail-block { margin-top: 28px; }
.detail-block h2 { font-size: 17px; color: var(--color-primary-dark); margin-bottom: 10px; }
.rich-text { color: var(--color-text); font-size: 14px; }
.meta-table, .preview-table, .tx-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.meta-table th, .meta-table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--color-border); }
.meta-table th { width: 160px; color: var(--color-text-muted); font-weight: 600; }
.table-scroll { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius); }
.preview-table th, .preview-table td, .tx-table th, .tx-table td {
  padding: 10px 14px; border-bottom: 1px solid var(--color-border); white-space: nowrap;
}
.preview-table th, .tx-table th { background: #ece9df; text-align: left; color: var(--color-text-muted); }

.product-hero-cover {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
}

/* ===== News detail ===== */
.news-detail { display: grid; grid-template-columns: 1fr 260px; gap: 32px; align-items: start; margin-top: 8px; }
.back-link { display: inline-block; margin-bottom: 16px; font-size: 13px; color: var(--color-text-muted); }
.news-main h1 { font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.02em; font-size: clamp(28px, 4vw, 44px); color: var(--color-text); margin: 4px 0 16px; }
.news-body { font-size: 16px; line-height: 1.8; color: var(--color-text); max-width: 680px; }
.news-detail-cover { width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--radius); margin: 16px 0; border: 1px solid var(--color-border); }
.news-sidebar { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 20px; position: sticky; top: 24px; }
.related-news-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.related-news-list li { display: flex; flex-direction: column; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--color-border); }
.related-news-list li:last-child { border-bottom: none; padding-bottom: 0; }
.related-news-list a { font-size: 13px; font-weight: 600; color: var(--color-text); }
.related-news-list a:hover { color: var(--color-primary); }

.purchase-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 24px;
  box-shadow: var(--shadow-sm);
}
.price-display { font-size: 28px; font-weight: 700; color: var(--color-accent-deep); margin-bottom: 12px; }
.balance-line { font-size: 13px; color: var(--color-text-muted); margin-bottom: 12px; }
.purchase-note { font-size: 12px; color: var(--color-text-muted); margin-top: 12px; }

/* ===== Assets ===== */
.asset-list { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.asset-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.asset-meta { font-size: 13px; color: var(--color-text-muted); margin: 2px 0; }
.asset-status { font-size: 13px; font-weight: 600; margin-top: 6px; }
.status-active { color: var(--color-success); }
.status-expired { color: var(--color-error); }
.status-ready { color: var(--color-text-muted); }

/* ===== Wallet ===== */
.wallet-balances { display: flex; gap: 20px; margin: 24px 0 32px; flex-wrap: wrap; }
.balance-card {
  flex: 1;
  min-width: 200px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
}
.balance-card.bonus { border-color: var(--color-accent); }
.balance-card.total { background: var(--color-primary-dark); color: var(--color-bg); }
.balance-label { font-size: 13px; color: var(--color-text-muted); }
.balance-card.total .balance-label { color: var(--color-dark-text-muted); }
.balance-value { font-size: 24px; font-weight: 700; margin-top: 6px; }
.amount-positive { color: var(--color-success); }
.amount-negative { color: var(--color-error); }

/* ===== Admin ===== */
.admin-layout { display: grid; grid-template-columns: 200px 1fr; gap: 32px; }
.admin-sidebar { display: flex; flex-direction: column; gap: 4px; }
.admin-sidebar a {
  padding: 10px 14px;
  border-radius: var(--radius);
  color: var(--color-text);
  font-size: 14px;
}
.admin-sidebar a:hover { background: #eae7dc; text-decoration: none; }
.admin-sidebar a.active { background: var(--color-primary); color: #fff; }
.admin-content-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin: 20px 0 36px; }
.stat-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.stat-value { font-size: 26px; font-weight: 700; color: var(--color-primary); }
.stat-label { font-size: 13px; color: var(--color-text-muted); margin-top: 4px; }
.table-actions a, .table-actions .link-btn { margin-right: 12px; font-size: 13px; }
.link-btn-danger { color: var(--color-error) !important; }
.status-pill { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 12px; }
.status-published { background: #e6f4ea; color: var(--color-success); }
.status-unpublished { background: #e6e3d7; color: var(--color-text-muted); }

.thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; display: block; }
.thumb-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: #eae7dc; color: var(--color-primary); font-weight: 700; font-size: 14px;
}
.field-hint { display: inline-block; font-size: 12px; font-weight: 400; color: var(--color-text-muted); margin-left: 6px; }
.cover-preview { max-width: 220px; max-height: 140px; object-fit: cover; border-radius: var(--radius); margin-top: 10px; border: 1px solid var(--color-border); display: block; }
.inline-add-form { max-width: none; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--color-border); }
.inline-add-form .form-row { grid-template-columns: 1fr 1fr auto; align-items: end; }
.form-row-btn .btn { width: 100%; }

.admin-form { max-width: 640px; }
.admin-form textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.checkbox-label.inline { display: inline-flex; margin-right: 16px; font-size: 13px; }

.toggle-row { display: flex; align-items: flex-start; gap: 12px; }
.toggle-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: 0 0 auto; }
.toggle-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.toggle-switch .toggle-track {
  position: absolute; inset: 0; background: var(--color-border); border-radius: 999px; transition: background 0.15s ease;
}
.toggle-switch .toggle-track::before {
  content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  background: var(--color-surface); border-radius: 50%; transition: transform 0.15s ease;
  box-shadow: 0 1px 2px rgba(17, 18, 15, 0.3);
}
.toggle-switch input:checked + .toggle-track { background: var(--color-primary); }
.toggle-switch input:checked + .toggle-track::before { transform: translateX(18px); }
.toggle-switch input:focus-visible + .toggle-track { outline: 2px solid var(--color-accent-deep); outline-offset: 2px; }
.toggle-label-text { font-weight: 500; }
.tag-picker { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 12px; }
.tag-group { margin-bottom: 10px; }
.tag-group strong { display: block; font-size: 12px; color: var(--color-text-muted); margin-bottom: 6px; }
.admin-form button.btn { margin-top: 20px; }

.dropzone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  color: var(--color-text-muted);
  position: relative;
  cursor: pointer;
}
.dropzone.dragover { border-color: var(--color-primary); background: #ece9df; }
.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.dropzone-filename { font-size: 13px; color: var(--color-primary); font-weight: 600; margin-top: 8px; }

.richtext-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border: 1px solid var(--color-border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 8px;
  background: var(--color-surface);
}
.richtext-toolbar button {
  border: 1px solid var(--color-border);
  background: #fff;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 13px;
  line-height: 1.3;
  cursor: pointer;
  color: var(--color-text);
}
.richtext-toolbar button:hover { background: #ece9df; }
.richtext-editor {
  min-height: 260px;
  max-height: 640px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.6;
  background: #fff;
}
.richtext-editor:focus { outline: none; border-color: var(--color-primary); }
.richtext-editor img { max-width: 100%; border-radius: 4px; display: block; margin: 10px 0; }

.adjust-form { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 20px; margin-bottom: 36px; }

.panel.error-panel {
  max-width: 480px;
  margin: 64px auto;
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 40px;
}

/* ===== Alert & Settings Form ===== */
.alert.success { background: #e6f0e8; color: var(--color-success); border: 1px solid #c9ddc9; }
.alert.error   { background: #f5e5e0; color: var(--color-error); border: 1px solid #e6c6ba; }

.settings-form { max-width: 720px; }
.settings-form fieldset {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
}
.settings-form legend {
  font-weight: 600;
  font-size: 16px;
  padding: 0 8px;
  color: var(--color-text);
  font-family: var(--font-serif);
}
.settings-form .form-group { margin-bottom: 16px; }
.settings-form label { display: block; font-weight: 500; font-size: 14px; margin-bottom: 4px; color: var(--color-text-muted); }
.settings-form input[type="text"],
.settings-form input[type="email"],
.settings-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.settings-form input:focus,
.settings-form textarea:focus {
  outline: none;
  border-color: var(--color-text);
  box-shadow: 0 0 0 3px rgba(17, 18, 15, 0.08);
}
.settings-form textarea { font-family: inherit; resize: vertical; }
.settings-form .form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.settings-form .form-actions { margin-top: 8px; }
.settings-form .btn {
  background: var(--color-text);
  color: var(--color-bg);
  border: none;
  padding: 13px 32px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.settings-form .btn:hover { background: var(--color-primary-hover); }

/* ===== Footer contact ===== */
.footer-contact { font-size: 13px; color: var(--color-dark-text-muted); margin-top: 4px; }

/* ===== Language Switcher ===== */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(17, 18, 15, 0.05);
  padding: 3px;
  border-radius: 20px;
  margin-left: 12px;
  border: 1px solid var(--color-border);
}
.lang-btn {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted) !important;
  border-radius: 16px;
  transition: all 0.2s ease;
  text-decoration: none !important;
}
.lang-btn:hover {
  color: var(--color-text) !important;
  background: rgba(17, 18, 15, 0.08);
}
.lang-btn.active {
  background: var(--color-text);
  color: var(--color-bg) !important;
  font-weight: 700;
}

/* ===== Homepage editor (admin settings) ===== */
.settings-section-title {
  font-size: 20px;
  color: var(--color-primary-dark);
  margin: 8px 0 -4px;
  padding-top: 8px;
  border-top: 2px solid var(--color-border);
}

/* =====================================================
   Landing page (homepage) - editorial styling
   ===================================================== */
.landing h1, .landing h2, .landing h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--color-primary-dark);
}

.landing-hero { padding: 16px 0 28px; min-height: 52vh; display: flex; align-items: center; }
.landing-hero-text { text-align: left; max-width: 760px; }
.landing-hero-text h1 { font-size: clamp(40px, 6.5vw, 92px); margin: 0 0 18px; letter-spacing: -0.03em; text-align: left; }
.landing-hero-text p { font-size: 20px; color: var(--color-text-muted); max-width: 620px; margin: 0; line-height: 1.7; text-align: left; }

.landing-hero-visual {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  height: 380px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  transition: height 0.15s ease-out;
}
.landing-hero-visual.no-image {
  background:
    radial-gradient(circle at 20% 25%, rgba(200, 174, 114, 0.35), transparent 45%),
    radial-gradient(circle at 82% 75%, rgba(17, 18, 15, 0.55), transparent 55%),
    linear-gradient(135deg, #15160f, #2a2b21);
}
.landing-hero-visual:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10, 20, 30, 0.35), transparent 60%);
}

.landing-visual-caption {
  display: flex;
  justify-content: space-between;
  padding: 14px 0 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.landing-section { padding: 72px 0; border-top: 1px solid var(--color-border); }
.landing-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; }
.landing-heading h2 { font-size: clamp(28px, 3.4vw, 44px); margin: 0; }
.landing-heading .landing-textlink { white-space: nowrap; }

.landing-eyebrow { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-text-muted); font-weight: 400; margin-bottom: 18px; }

.landing-textlink { display: inline-flex; gap: 14px; align-items: center; border-bottom: 1px solid currentColor; padding-bottom: 4px; font-size: 14px; font-weight: 600; color: var(--color-text); }
.landing-textlink:hover { text-decoration: none; color: var(--color-primary-hover); }
.landing-textlink span { font-size: 17px; }

.landing-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.landing-feature { padding-top: 22px; border-top: 1px solid var(--color-border); }
.landing-index { display: block; font-size: 13px; color: var(--color-accent-deep); font-weight: 400; margin-bottom: 14px; letter-spacing: 0.04em; }
.landing-feature-image {
  height: 160px;
  background-size: cover;
  background-position: center;
  background-color: #eae7dc;
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.landing-feature h3 { font-size: 30px; margin: 0 0 12px; }
.landing-feature p { color: var(--color-text-muted); font-size: 15px; line-height: 1.7; min-height: 110px; margin: 0; }

.landing-dark {
  background: var(--color-primary-dark);
  color: var(--color-bg);
  border-top: none;
  border-radius: var(--radius);
}
.landing-dark .landing-eyebrow { color: var(--color-dark-text-muted); }
.landing-dark h2 { color: var(--color-bg); }
.landing-dark p { color: var(--color-dark-text-muted); max-width: 480px; }
.landing-dark .landing-textlink { color: var(--color-bg); }
.landing-dark .landing-textlink:hover { color: var(--color-accent); }

.landing-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 56px; }
.landing-picture { background-size: cover; background-position: center; position: relative; border-radius: var(--radius); overflow: hidden; }
.landing-about-image { height: 340px; filter: saturate(0.55); }
.landing-about-image.no-image, .landing-card .landing-picture.no-image {
  background: linear-gradient(135deg, #e5e2d6, #d6d2c2);
  filter: none;
}

.landing-rail { display: flex; gap: 24px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x proximity; }
.landing-rail .landing-card { flex: 0 0 260px; scroll-snap-align: start; }

.landing-grid { display: grid; gap: 24px; }
.landing-grid-3 { grid-template-columns: repeat(3, 1fr); }
.landing-grid-4 { grid-template-columns: repeat(4, 1fr); }

.landing-card { display: block; color: var(--color-text); position: relative; }
.landing-card .landing-picture { height: 170px; margin-bottom: 14px; background-color: #eae7dc; transition: filter 0.25s; }
.landing-card:hover .landing-picture { filter: brightness(1.05); }
.landing-card:hover { text-decoration: none; }
.landing-card-meta { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: 6px; }
.landing-card h3 { font-size: 19px; margin: 0 0 8px; line-height: 1.3; }

.landing-filter-bar { margin-bottom: 28px; }

.landing-cta {
  margin-top: 8px;
  padding: 64px 56px;
  background: var(--color-cta-bg);
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.landing-cta h2 { font-size: clamp(30px, 3.6vw, 50px); margin: 0 0 8px; }
.landing-cta p { margin: 0; color: var(--color-text-muted); }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .product-detail { grid-template-columns: 1fr; }
  .news-detail { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .inline-add-form .form-row { grid-template-columns: 1fr; }
  .news-grid-compact { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .header-inner { flex-direction: column; height: auto; padding: 12px 0; gap: 10px; }
  .main-nav { flex-wrap: wrap; justify-content: center; row-gap: 10px; }

  .landing-hero { min-height: 0; }
  .landing-hero-visual { height: 220px; }
  .landing-split { grid-template-columns: 1fr; padding: 28px; gap: 24px; }
  .landing-about-image { height: 220px; }
  .landing-features { grid-template-columns: 1fr; gap: 24px; }
  .landing-feature p { min-height: 0; }
  .landing-grid-3, .landing-grid-4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .landing-rail .landing-card { flex-basis: 78%; }
  .landing-cta { flex-direction: column; align-items: flex-start; padding: 32px 24px; }
  .landing-heading { flex-wrap: wrap; }
}

/* =====================================================
   Inner pages (About / Services / Careers / Contact)
   ===================================================== */
.page-hero {
  height: 440px;
  margin-top: -32px;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  position: relative;
  background-size: cover;
  background-position: center 42%;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
.page-hero:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(16, 17, 14, 0.86), rgba(16, 17, 14, 0.1) 65%);
}
.page-hero.no-image { background-color: var(--color-primary-dark); }
.page-hero-inner { position: relative; z-index: 1; padding: 0 24px 48px; max-width: 1360px; margin: 0 auto; width: 100%; box-sizing: border-box; }
.page-hero .landing-eyebrow { color: #e8ddbf; margin-bottom: 16px; }
.page-hero h1 { color: #fff; font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.02em; line-height: 1.08; font-size: clamp(38px, 5.5vw, 68px); margin: 0; }

.page-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding: 64px 0; }
.page-columns .landing-eyebrow { margin-bottom: 16px; }
.page-columns h2 { margin: 0 0 14px; }
.page-columns p { color: var(--color-text-muted); font-size: 16px; line-height: 1.75; margin: 0; max-width: 460px; }

.page-history { background: var(--color-cta-bg); padding: 56px 48px; border-radius: var(--radius); max-width: 720px; }
.page-history h2 { margin: 0 0 14px; }
.page-history p { color: var(--color-text-muted); font-size: 17px; line-height: 1.75; margin: 0; }

.services-full { display: grid; grid-template-columns: 70px 1fr 1.1fr; gap: 32px; padding: 40px 0; border-top: 1px solid var(--color-border); align-items: start; }
.services-full:first-child { border-top: none; }
.services-full .landing-index { margin-bottom: 0; }
.services-full h2 { margin: 0; font-size: 32px; }
.services-full p { color: var(--color-text-muted); font-size: 15px; line-height: 1.75; margin: 0; max-width: 520px; }

.careers-text { max-width: 640px; padding: 64px 0; }
.careers-text h2 { font-size: clamp(32px, 4vw, 48px); margin: 0 0 20px; }
.careers-text p { color: var(--color-text-muted); font-size: 17px; line-height: 1.75; margin: 0 0 18px; }
.careers-text .field-note { font-size: 13px; color: var(--color-text-muted); margin: 0 0 24px; }

.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 80px; padding: 64px 0; }
.contact-grid h2 { margin: 0 0 14px; }
.contact-grid > div > p { color: var(--color-text-muted); font-size: 16px; line-height: 1.7; max-width: 420px; }
.contact-details { margin: 0; }
.contact-details div { border-top: 1px solid var(--color-border); padding: 20px 0; }
.contact-details div:first-child { border-top: none; }
.contact-details dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--color-text-muted); margin: 0; }
.contact-details dd { margin: 8px 0 0; font-size: 16px; }

.inner-cta { margin: 0; border-radius: 0; }

@media (max-width: 860px) {
  .page-hero { height: 320px; margin: -32px -24px 0; }
  .page-columns, .contact-grid { grid-template-columns: 1fr; gap: 32px; padding: 40px 0; }
  .services-full { grid-template-columns: 40px 1fr; padding: 28px 0; }
  .services-full h2 { grid-column: 2; }
  .services-full p { grid-column: 2; }
}

