/* Cal Gun Roster – homepage */
body.cgrsb-home { background: var(--cgrsb-bg, #0d0f12) !important; color: var(--cgrsb-text, #e8ecf0); margin: 0; overflow-x: hidden; }
body.cgrsb-home, body.cgrsb-home html { height: auto !important; overflow-y: visible !important; }
.cgrh { display: block; }
.cgrh-wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.cgrh a { color: inherit; }

/* Hero */
.cgrh-hero {
  padding: 48px 0 28px;
  background:
    radial-gradient(1200px 300px at 20% -10%, rgba(200,151,42,.16), transparent 60%),
    linear-gradient(180deg, #121a22 0%, #0d0f12 100%);
  border-bottom: 1px solid var(--cgrsb-line);
}
.cgrh-eyebrow { margin: 0 0 8px; color: var(--cgrsb-gold-hi); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.cgrh-hero h1 { margin: 0 0 10px; font-size: clamp(30px, 4.6vw, 48px); line-height: 1.08; letter-spacing: -.01em; color: #fff; font-weight: 800; }
.cgrh-lead { margin: 0 0 22px; max-width: 720px; font-size: 18px; line-height: 1.55; color: #c3ced8; }
.cgrh-hero-search { display: flex; gap: 8px; max-width: 720px; margin: 0 0 18px; }
.cgrh-hero-search input {
  flex: 1 1 auto; min-width: 0; padding: 15px 16px; font-size: 17px;
  background: #0b0e12; color: #fff; border: 1px solid #3a4450; border-radius: 10px;
}
.cgrh-hero-search input:focus { outline: 2px solid var(--cgrsb-gold); outline-offset: 0; border-color: var(--cgrsb-gold); }
.cgrh-hero-search button {
  flex: none; padding: 0 22px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--cgrsb-gold); color: #111; font-weight: 800; font-size: 16px;
}
.cgrh-hero-search button:hover { background: var(--cgrsb-gold-hi); }
.cgrh-stats { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--cgrsb-muted); font-size: 14px; }
.cgrh-stats strong { color: #fff; font-weight: 700; }
.cgrh-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cgrh-chips-l { color: var(--cgrsb-muted); font-size: 13px; margin-right: 2px; }
.cgrh-chips a {
  padding: 6px 12px; border-radius: 999px; font-size: 13px; text-decoration: none;
  background: rgba(255,255,255,.04); border: 1px solid var(--cgrsb-line); color: #dbe3ea;
}
.cgrh-chips a:hover { border-color: var(--cgrsb-gold); color: #fff; }

/* Sticky filter bar */
.cgrh-bar { position: sticky; top: 0; z-index: 50; background: rgba(13,15,18,.97); border-bottom: 1px solid var(--cgrsb-line); transition: box-shadow .2s; }
.cgrh-bar.is-stuck { box-shadow: 0 8px 20px rgba(0,0,0,.45); }
.cgrh-bar-in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 12px; padding-bottom: 12px; }
.cgrh-q {
  flex: 1 1 240px; min-width: 0; padding: 10px 12px; font-size: 15px;
  background: #0b0e12; color: #fff; border: 1px solid var(--cgrsb-line); border-radius: 8px;
}
.cgrh-q:focus, .cgrh-filters select:focus { outline: 2px solid var(--cgrsb-gold); outline-offset: 0; }
.cgrh-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.cgrh-filters select {
  padding: 10px 30px 10px 10px; font-size: 14px; max-width: 220px;
  background: #11161c url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239fb3c0' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: #e8ecf0; border: 1px solid var(--cgrsb-line); border-radius: 8px; -webkit-appearance: none; appearance: none;
}
.cgrh-count { margin: 0 0 0 auto; color: var(--cgrsb-muted); font-size: 14px; white-space: nowrap; }
.cgrh-reset, .cgrh-linkbtn { background: none; border: 0; padding: 0; color: var(--cgrsb-gold-hi); font-size: 14px; cursor: pointer; text-decoration: underline; }

/* Grid */
.cgrh-browse { padding-bottom: 32px; }
.cgrh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; padding-top: 18px; }
a.cgrh-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--cgrsb-panel); border: 1px solid var(--cgrsb-line); border-radius: 10px;
  text-decoration: none; color: inherit; transition: border-color .15s, transform .15s;
}
a.cgrh-card:hover { border-color: var(--cgrsb-gold); transform: translateY(-1px); }
a.cgrh-card:focus-visible { outline: 2px solid var(--cgrsb-gold); outline-offset: 2px; }
.cgrh-thumb { display: block; aspect-ratio: 3 / 2; background: #fff; overflow: hidden; }
.cgrh-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; padding: 8px; box-sizing: border-box; }
.cgrh-noimg {
  display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 100%; box-sizing: border-box; padding-bottom: 10%;
  background: #eef1f4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 40' width='64' height='40'%3E%3Cpath d='M4 10h44l4-4h8v8h-6l-2 4H30l-4 18H14l4-18H4z' fill='%23c9d0d7'/%3E%3C/svg%3E") no-repeat center 38% / 34% auto;
}
.cgrh-noimg span { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #8a96a1; font-weight: 600; }
.cgrh-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 12px 14px; flex: 1; }
.cgrh-card .cgr-card-make { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cgrsb-gold); }
.cgrh-card .cgr-card-model { font-size: 16px; font-weight: 700; line-height: 1.25; color: #fff; }
.cgrh-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.cgrh-tags span { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--cgrsb-line); color: #c3ced8; }
.cgrh-price { margin-top: auto; padding-top: 8px; font-weight: 700; color: #fff; font-size: 15px; }
.cgrh-price small { font-weight: 500; color: var(--cgrsb-muted); font-size: 11px; }
.cgrh-card .cgrsb-cmp-btn { top: 8px; right: 8px; background: rgba(17,22,28,.92); }
.cgrh-empty { padding: 30px 0; color: var(--cgrsb-muted); text-align: center; }
.cgrh-more-wrap { text-align: center; padding: 22px 0 0; }
.cgrh-more {
  display: inline-block; padding: 12px 22px; border-radius: 10px; text-decoration: none;
  border: 1px solid var(--cgrsb-gold); color: var(--cgrsb-gold-hi) !important; font-weight: 700;
}
.cgrh-more:hover { background: rgba(200,151,42,.12); }
.cgrh-more[hidden] { display: none; }

/* Roster changes */
.cgrh-changes { padding: 34px 0 40px; border-top: 1px solid var(--cgrsb-line); background: #0f141a; }
.cgrh-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.cgrh-sec-head h2 { margin: 0; font-size: 24px; color: #fff; }
.cgrh-sec-head a { color: var(--cgrsb-gold-hi); text-decoration: none; font-weight: 600; }
.cgrh-changes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.cgrh-changes h3 { margin: 0 0 10px; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--cgrsb-muted); }
.cgrh-list { list-style: none; margin: 0; padding: 0; }
.cgrh-list li { padding: 9px 0; border-bottom: 1px solid var(--cgrsb-line); display: flex; justify-content: space-between; gap: 12px; }
.cgrh-list a { color: #fff; text-decoration: none; font-weight: 600; }
.cgrh-list a:hover { color: var(--cgrsb-gold-hi); }
.cgrh-list span { color: var(--cgrsb-muted); font-size: 13px; white-space: nowrap; }
.cgrh-list-removed a { color: #c3ced8; }

/* Small screens */
@media (max-width: 900px) {
  body.cgrsb-home .cgrsb-search { display: none; }
}
@media (max-width: 640px) {
  .cgrh-hero { padding: 28px 0 20px; }
  .cgrh-lead { font-size: 16px; }
  .cgrh-hero-search input { font-size: 16px; padding: 13px 12px; }
  .cgrh-hero-search button { padding: 0 16px; }
  .cgrh-bar-in { gap: 8px; padding-top: 10px; padding-bottom: 10px; }
  .cgrh-q { flex-basis: 100%; font-size: 16px; }
  .cgrh-filters { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 2px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .cgrh-filters::-webkit-scrollbar { display: none; }
  .cgrh-filters select { flex: none; font-size: 14px; }
  .cgrh-count { margin-left: 0; font-size: 13px; }
  .cgrh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cgrh-body { padding: 10px; }
  .cgrh-card .cgr-card-model { font-size: 14.5px; }
  .cgrh-tags span:nth-child(n+3) { display: none; }
}

/* Theme / legacy-card overrides */
.cgrh a.cgrh-card { padding: 0 !important; margin: 0 !important; min-height: 0 !important; }
.cgrh .cgrh-bar { background: #0d0f12; }
.cgrh .cgrh-bar-in { flex-wrap: nowrap; }
.cgrh .cgrh-q, .cgrh .cgrh-hero-search input {
  background: #0b0e12 !important; color: #fff !important; border: 1px solid #3a4450 !important;
  box-shadow: none !important; margin: 0 !important;
}
.cgrh .cgrh-q { height: 42px; padding: 0 12px !important; font-size: 15px !important; border-radius: 8px !important; flex: 1 1 200px; }
.cgrh .cgrh-hero-search input { height: 54px; border-radius: 10px !important; padding: 0 16px !important; font-size: 17px !important; }
.cgrh .cgrh-filters { flex-wrap: nowrap; }
.cgrh .cgrh-filters select { width: auto !important; max-width: 180px; height: 42px; margin: 0 !important; line-height: 1.2; }
.cgrh .cgrh-q::placeholder, .cgrh .cgrh-hero-search input::placeholder { color: #7f8f9b; opacity: 1; }
@media (max-width: 1100px) {
  .cgrh .cgrh-bar-in { flex-wrap: wrap; }
  .cgrh .cgrh-q { flex-basis: 100%; }
}
@media (max-width: 640px) {
  .cgrh .cgrh-q { font-size: 16px !important; }
  .cgrh .cgrh-hero-search input { height: 50px; font-size: 16px !important; }
  .cgrh .cgrh-filters select { max-width: 160px; }
}

/* Archive pages */
.cgrh .cgrh-filters select[hidden] { display: none !important; }
.cgrh-glance { padding: 20px 0 18px; background: #0f141a; border-bottom: 1px solid var(--cgrsb-line); }
.cgrh-glance-in { display: grid; gap: 14px; }
.cgrh-desc { max-width: 860px; color: #c3ced8; font-size: 15.5px; line-height: 1.6; }
.cgrh-desc p { margin: 0 0 8px; }
.cgrh-facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.cgrh-facts > div { background: var(--cgrsb-panel); border: 1px solid var(--cgrsb-line); border-radius: 10px; padding: 10px 14px; min-width: 150px; }
.cgrh-facts dt { margin: 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--cgrsb-muted); }
.cgrh-facts dd { margin: 3px 0 0; font-size: 17px; font-weight: 700; color: #fff; }
.cgrh-facts dd a { color: #fff; text-decoration: none; border-bottom: 1px dotted var(--cgrsb-gold); }
.cgrh-facts dd small { font-weight: 500; color: var(--cgrsb-muted); font-size: 12px; }
.cgrh-mix p { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 13.5px; }
.cgrh-mix span { color: var(--cgrsb-muted); margin-right: 4px; min-width: 88px; }
.cgrh-mix a, .cgrh-mix b { font-weight: 500; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--cgrsb-line); color: #dbe3ea; text-decoration: none; }
.cgrh-mix a:hover { border-color: var(--cgrsb-gold); color: #fff; }
.cgrh-mix small { color: var(--cgrsb-muted); }
.cgrh-after { padding: 8px 0 0; }
.cgrh-after .cgrsb-alert-wide { margin: 8px auto 24px; }
body.cgrsb-archive .cgrsb-page-head { margin: 0; }

body.cgrsb-archive .cgrsb-page-head .cgrsb-inner { padding: 0 16px; box-sizing: border-box; }

/* ---------- Homepage v2 (1.8) ---------- */
body.cgrsb-home:not(.cgrsb-archive):not(.cgrsb-models) .cgrsb-search { display: none; }
.cgrh-thumb { position: relative; }
.cgrh-badge { position: absolute; top: 8px; left: 8px; z-index: 2; background: #1f9d55; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.cgrh-front .cgrh-hero { padding: 40px 0 36px; }
.cgrh-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.cgrh-live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; margin-right: 6px; box-shadow: 0 0 0 0 rgba(46,204,113,.6); animation: cgrhPulse 2s infinite; vertical-align: 1px; }
@keyframes cgrhPulse { 0% { box-shadow: 0 0 0 0 rgba(46,204,113,.55); } 70% { box-shadow: 0 0 0 8px rgba(46,204,113,0); } 100% { box-shadow: 0 0 0 0 rgba(46,204,113,0); } }
.cgrh-statbar { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 720px; }
.cgrh-statbar li { background: rgba(255,255,255,.04); border: 1px solid var(--cgrsb-line); border-radius: 10px; padding: 10px 12px; }
.cgrh-statbar strong { display: block; color: #fff; font-size: 22px; font-weight: 800; line-height: 1.1; }
.cgrh-statbar span { display: block; color: var(--cgrsb-muted); font-size: 12.5px; margin-top: 2px; }
.cgrh-hero-art { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 190px 130px 130px; gap: 10px; }
.cgrh-art { position: relative; display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 14px; overflow: hidden; text-decoration: none; border: 1px solid rgba(255,255,255,.08); transition: transform .15s, box-shadow .15s; }
.cgrh-art:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.45); }
.cgrh-art img { width: 100%; height: 100%; object-fit: contain; padding: 10px 12px 26px; box-sizing: border-box; }
.cgrh-art span { position: absolute; left: 10px; bottom: 8px; font-size: 12px; font-weight: 700; color: #11161c; background: rgba(255,255,255,.92); padding: 2px 8px; border-radius: 999px; }
.cgrh-art-1 { grid-column: 1 / -1; }
.cgrh-art-1 img { padding: 14px 24px 30px; }
.cgrh-sec { padding: 34px 0 6px; }
.cgrh-sec .cgrh-sec-head h2, .cgrh-browse-head h2 { font-size: 24px; }
.cgrh-model-grid, .cgrh-type-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cgrh-model-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cgrh-type-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cgrh-model, .cgrh-type { display: flex; flex-direction: column; height: 100%; background: var(--cgrsb-panel); border: 1px solid var(--cgrsb-line); border-radius: 12px; overflow: hidden; text-decoration: none; transition: border-color .15s, transform .15s; }
.cgrh-model:hover, .cgrh-type:hover { border-color: var(--cgrsb-gold); transform: translateY(-1px); }
.cgrh-model-img, .cgrh-type-img { display: flex; align-items: center; justify-content: center; background: #fff; height: 120px; }
.cgrh-model-img img, .cgrh-type-img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; box-sizing: border-box; }
.cgrh-model-name, .cgrh-type-name { padding: 10px 12px 0; color: #fff; font-weight: 700; font-size: 15px; line-height: 1.25; }
.cgrh-model-meta, .cgrh-type-meta { padding: 3px 12px 12px; color: var(--cgrsb-muted); font-size: 12.5px; }
.cgrh-type-img { height: 130px; }
.cgrh-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.cgrh-rail > a { scroll-snap-align: start; }
.cgrh-browse-head { padding-top: 40px; padding-bottom: 6px; }
.cgrh-browse-head h2 { margin: 0 0 4px; color: #fff; }
.cgrh-browse-head p { margin: 0; color: var(--cgrsb-muted); font-size: 14.5px; }
@media (max-width: 1100px) {
  .cgrh-model-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cgrh-type-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .cgrh-hero-grid { grid-template-columns: 1fr; gap: 22px; }
  .cgrh-hero-art { grid-template-rows: 170px 110px; }
  .cgrh-art-4, .cgrh-art-5 { display: none; }
}
@media (max-width: 640px) {
  .cgrh-statbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cgrh-statbar strong { font-size: 19px; }
  .cgrh-model-grid, .cgrh-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cgrh-model-img, .cgrh-type-img { height: 100px; }
  .cgrh-model-name, .cgrh-type-name { font-size: 14px; }
  .cgrh-rail { grid-auto-columns: 62%; }
  .cgrh-sec .cgrh-sec-head h2, .cgrh-browse-head h2 { font-size: 20px; }
  .cgrh-hero-art { grid-template-rows: 150px 100px; }
}
