:root {
  --felt: #0f3d2e;
  --felt-dark: #0a2b20;
  --felt-light: #1b5a44;
  --brass: #c9a227;
  --brass-dark: #a8851a;
  --ink: #1c1f1e;
  --muted: #6b726f;
  --line: #e4e7e5;
  --bg: #f5f6f4;
  --card: #ffffff;
  --danger: #c0392b;
  --radius: 14px;
}

* { box-sizing: border-box; }
body {
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--felt-light); }
a:hover { color: var(--felt); }

/* ---------- Navbar ---------- */
.cm-nav {
  background: var(--felt-dark);
  border-bottom: 3px solid var(--brass);
  padding: 14px 0;
}
.cm-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.35rem; color: #fff !important;
  text-decoration: none; letter-spacing: -0.02em;
}
.cm-brand .ball {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #444 0%, #111 60%);
  display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.cm-brand .ball span {
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  color: #111; font-size: 10px; font-weight: 800; display: grid; place-items: center;
}
.cm-brand em { font-style: normal; color: var(--brass); }
.cm-nav .nav-link { color: rgba(255,255,255,.78) !important; font-weight: 500; padding: 8px 14px !important; border-radius: 8px; }
.cm-nav .nav-link:hover, .cm-nav .nav-link.active { color: #fff !important; background: rgba(255,255,255,.08); }
.cm-balance {
  background: rgba(201,162,39,.15); color: var(--brass) !important;
  border: 1px solid rgba(201,162,39,.4); font-weight: 700;
}
.navbar-toggler { border-color: rgba(255,255,255,.3); }
.navbar-toggler-icon { filter: invert(1); }

/* ---------- Buttons ---------- */
.btn { border-radius: 10px; font-weight: 600; padding: 10px 18px; }
.btn-sm { padding: 6px 12px; border-radius: 8px; }
.btn-brass { background: var(--brass); color: #1a1405; border: none; }
.btn-brass:hover { background: var(--brass-dark); color: #1a1405; }
.btn-felt { background: var(--felt); color: #fff; border: none; }
.btn-felt:hover { background: var(--felt-light); color: #fff; }
.btn-outline-felt { border: 1.5px solid var(--felt); color: var(--felt); background: transparent; }
.btn-outline-felt:hover { background: var(--felt); color: #fff; }
.btn-ghost-light { border: 1.5px solid rgba(255,255,255,.5); color: #fff; background: transparent; }
.btn-ghost-light:hover { background: #fff; color: var(--felt-dark); }

/* ---------- Hero ---------- */
.cm-hero {
  background:
    radial-gradient(ellipse at 80% 20%, rgba(201,162,39,.18), transparent 50%),
    linear-gradient(160deg, var(--felt) 0%, var(--felt-dark) 100%);
  color: #fff; padding: 64px 0 80px; position: relative; overflow: hidden;
}
.cm-hero::after {
  content: ""; position: absolute; right: -80px; bottom: -120px;
  width: 380px; height: 380px; border-radius: 50%;
  border: 40px solid rgba(255,255,255,.04);
}
.cm-hero h1 { font-weight: 800; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.03em; line-height: 1.15; }
.cm-hero h1 em { font-style: normal; color: var(--brass); }
.cm-hero p.lead { color: rgba(255,255,255,.75); max-width: 540px; }
.cm-search {
  background: #fff; border-radius: 14px; padding: 6px; display: flex; gap: 6px;
  max-width: 560px; box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.cm-search input { border: none; flex: 1; padding: 12px 14px; font-size: 1rem; outline: none; border-radius: 10px; }
.cm-trust { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 28px; color: rgba(255,255,255,.8); font-size: .92rem; }
.cm-trust div { display: flex; align-items: center; gap: 8px; }
.cm-trust .dot { width: 26px; height: 26px; border-radius: 50%; background: rgba(201,162,39,.2); color: var(--brass); display: grid; place-items: center; font-size: 13px; }

/* ---------- Section ---------- */
.cm-section { padding: 48px 0; }
.cm-section-title { font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; }
.cm-section-sub { color: var(--muted); margin-bottom: 24px; }

/* ---------- Product cards ---------- */
.cm-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); transition: transform .18s ease, box-shadow .18s ease;
  height: 100%; display: flex; flex-direction: column; text-decoration: none; color: inherit;
}
.cm-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(15,61,46,.12); color: inherit; }
.cm-card .thumb { aspect-ratio: 4/3; background: #eef1ef; position: relative; overflow: hidden; }
.cm-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cm-card .thumb .tag {
  position: absolute; top: 10px; left: 10px; background: rgba(10,43,32,.85); color: #fff;
  font-size: .72rem; font-weight: 600; padding: 4px 10px; border-radius: 20px;
}
.cm-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.cm-card .title { font-weight: 700; font-size: 1rem; margin-bottom: 4px; line-height: 1.35; }
.cm-card .meta { color: var(--muted); font-size: .85rem; margin-bottom: 10px; }
.cm-card .price { font-weight: 800; font-size: 1.15rem; color: var(--felt); margin-top: auto; }
.cm-card .seller { font-size: .8rem; color: var(--muted); margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.cm-noimg { width: 100%; height: 100%; display: grid; place-items: center; color: #b3bab6; }

.cm-empty {
  background: #fff; border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 48px 24px; text-align: center; color: var(--muted);
}

/* ---------- How it works ---------- */
.cm-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.cm-step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.cm-step .num {
  width: 38px; height: 38px; border-radius: 50%; background: var(--felt); color: var(--brass);
  font-weight: 800; display: grid; place-items: center; margin-bottom: 12px;
}
.cm-step h6 { font-weight: 700; }
.cm-step p { color: var(--muted); font-size: .9rem; margin: 0; }

/* ---------- Panels / forms ---------- */
.cm-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.cm-panel-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 16px; }
.form-control, .form-select { border-radius: 10px; padding: 11px 14px; border-color: #d6dbd8; }
.form-control:focus, .form-select:focus { border-color: var(--felt-light); box-shadow: 0 0 0 3px rgba(27,90,68,.15); }
.form-label { font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.form-hint { color: var(--muted); font-size: .8rem; margin-top: 4px; }

.cm-auth { min-height: calc(100vh - 160px); display: grid; place-items: center; padding: 40px 12px; }
.cm-auth-card { width: 100%; max-width: 440px; background: #fff; border-radius: 18px; border: 1px solid var(--line); padding: 32px; box-shadow: 0 10px 40px rgba(0,0,0,.05); }
.cm-auth-card h3 { font-weight: 800; letter-spacing: -0.02em; }
.cm-role { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.cm-role input { display: none; }
.cm-role label {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 12px; cursor: pointer;
  text-align: center; transition: all .15s;
}
.cm-role label strong { display: block; font-size: .95rem; }
.cm-role label small { color: var(--muted); font-size: .78rem; }
.cm-role input:checked + label { border-color: var(--felt); background: rgba(15,61,46,.05); box-shadow: inset 0 0 0 1px var(--felt); }

/* ---------- Product detail ---------- */
.cm-gallery-main { aspect-ratio: 4/3; background: #eef1ef; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.cm-gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.cm-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.cm-thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; cursor: pointer; border: 2px solid transparent; }
.cm-thumbs img.active { border-color: var(--felt); }
.cm-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.cm-specs div { background: var(--bg); border-radius: 10px; padding: 10px 14px; }
.cm-specs small { color: var(--muted); display: block; font-size: .75rem; }
.cm-specs strong { font-size: .95rem; }
.cm-price-big { font-size: 2rem; font-weight: 800; color: var(--felt); letter-spacing: -0.02em; }
.cm-guarantee { background: rgba(15,61,46,.05); border: 1px solid rgba(15,61,46,.15); border-radius: 12px; padding: 14px 16px; font-size: .88rem; }

/* ---------- Tables ---------- */
.cm-table { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.cm-table table { margin: 0; }
.cm-table th { background: #fafbfa; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); padding: 12px 16px; }
.cm-table td { padding: 14px 16px; vertical-align: middle; border-color: var(--line); }

/* ---------- Status pills ---------- */
.pill { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: .75rem; font-weight: 600; }
.pill-pending, .pill-awaiting_shipment { background: #fff4d6; color: #8a6400; }
.pill-approved, .pill-confirmed, .pill-completed { background: #dcf3e6; color: #146c3c; }
.pill-rejected, .pill-cancelled, .pill-disputed { background: #fbe1de; color: #9b2c1f; }
.pill-sold, .pill-hidden { background: #e8eae9; color: #555; }
.pill-shipped { background: #dfeaff; color: #1f4fa3; }

/* ---------- Wallet ---------- */
.cm-wallet-hero {
  background: linear-gradient(135deg, var(--felt) 0%, var(--felt-dark) 100%);
  color: #fff; border-radius: 18px; padding: 28px; position: relative; overflow: hidden;
}
.cm-wallet-hero small { color: rgba(255,255,255,.7); }
.cm-wallet-hero .amount { font-size: 2.2rem; font-weight: 800; color: var(--brass); letter-spacing: -0.02em; }
.cm-bankbox { background: var(--bg); border-radius: 12px; padding: 14px 16px; border: 1px dashed #c9cfcc; }
.cm-bankbox .acc { font-weight: 800; font-size: 1.05rem; color: var(--felt); }

/* ---------- Page header ---------- */
.cm-page-head { padding: 32px 0 20px; }
.cm-page-head h2 { font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.cm-page-head p { color: var(--muted); margin: 4px 0 0; }

/* ---------- Footer ---------- */
.cm-footer { background: var(--felt-dark); color: rgba(255,255,255,.65); padding: 40px 0 24px; margin-top: 60px; font-size: .9rem; }
.cm-footer h6 { color: #fff; font-weight: 700; margin-bottom: 12px; }
.cm-footer a { color: rgba(255,255,255,.65); text-decoration: none; }
.cm-footer a:hover { color: var(--brass); }
.cm-footer .bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 28px; padding-top: 18px; font-size: .8rem; }

/* ---------- Terms / prose ---------- */
.cm-prose h4 { font-weight: 800; font-size: 1.15rem; margin: 28px 0 10px; scroll-margin-top: 20px; color: var(--felt); }
.cm-prose h4:first-child { margin-top: 0; }
.cm-prose p, .cm-prose li { color: #3a403d; line-height: 1.7; }
.cm-prose ul { padding-left: 20px; }
.cm-prose li { margin-bottom: 6px; }
