.rjxp-page {
  --rjxp-ink: #111318;
  --rjxp-muted: #667085;
  --rjxp-line: #e6e8ee;
  --rjxp-soft: #f6f7f9;
  --rjxp-panel: #ffffff;
  --rjxp-red: #e20d18;
  --rjxp-red-dark: #b70710;
  --rjxp-green: #087d55;
  --rjxp-blue: #2459d6;
  --rjxp-amber: #a15c00;
  --rjxp-shadow: 0 18px 50px rgba(17, 19, 24, 0.12);
  color: var(--rjxp-ink);
  font-family: inherit;
}

.rjxp-page *,
.rjxp-page *::before,
.rjxp-page *::after {
  box-sizing: border-box;
}

.rjxp-hero {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-radius: 8px;
  background: #14161b;
}

.rjxp-hero--compact {
  min-height: 300px;
  margin-bottom: 22px;
}

.rjxp-hero__media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 9, 12, 0.92) 0%, rgba(8, 9, 12, 0.64) 48%, rgba(8, 9, 12, 0.2) 100%),
    url("https://www.rawmotorsports.net/img/cms/background_rieju.png") center right / cover no-repeat;
}

.rjxp-hero__content {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 24px;
  color: #fff;
}

.rjxp-kicker {
  margin: 0 0 8px;
  color: var(--rjxp-red);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.rjxp-hero h1 {
  max-width: 760px;
  margin: 0 0 28px;
  color: #fff;
  font-size: clamp(34px, 7vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
  text-transform: uppercase;
}

.rjxp-selector,
.rjxp-band,
.rjxp-filters {
  display: grid;
  gap: 12px;
  align-items: end;
}

.rjxp-selector {
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
  max-width: 1020px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.rjxp-field,
.rjxp-search {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.rjxp-field span,
.rjxp-search span,
.rjxp-label {
  color: var(--rjxp-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.rjxp-selector .rjxp-field span {
  color: rgba(255, 255, 255, 0.72);
}

.rjxp-field select,
.rjxp-search input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--rjxp-line);
  border-radius: 6px;
  background: #fff;
  color: var(--rjxp-ink);
  font-size: 15px;
  padding: 0 13px;
}

.rjxp-field select:disabled {
  color: #98a2b3;
  background: #f1f3f6;
}

.rjxp-btn,
.rjxp-icon-btn {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
  text-align: center;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

.rjxp-btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  white-space: nowrap;
}

.rjxp-btn:hover,
.rjxp-icon-btn:hover {
  transform: translateY(-1px);
}

.rjxp-btn:disabled,
.rjxp-icon-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.rjxp-btn--primary,
.rjxp-btn--cart {
  background: var(--rjxp-red);
  color: #fff;
}

.rjxp-btn--primary:hover,
.rjxp-btn--cart:hover {
  background: var(--rjxp-red-dark);
  color: #fff;
}

.rjxp-btn--cart .fa {
  margin-right: 7px;
}

.rjxp-btn--ghost {
  border: 1px solid var(--rjxp-line);
  background: #fff;
  color: var(--rjxp-ink);
}

.rjxp-band,
.rjxp-eclates,
.rjxp-workspace {
  max-width: 1280px;
  margin: 22px auto 0;
}

.rjxp-bikebar {
  grid-template-columns: repeat(4, minmax(120px, 1fr)) auto;
  padding: 16px;
  border: 1px solid var(--rjxp-line);
  border-radius: 8px;
  background: var(--rjxp-panel);
  box-shadow: 0 12px 34px rgba(17, 19, 24, 0.06);
}

.rjxp-bikebar strong {
  display: block;
  color: var(--rjxp-ink);
  font-size: 16px;
}

.rjxp-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.rjxp-section-head h2 {
  margin: 0;
  color: var(--rjxp-ink);
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: 0;
}

.rjxp-count {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--rjxp-line);
  border-radius: 999px;
  background: #fff;
  color: var(--rjxp-muted);
  font-size: 13px;
  font-weight: 800;
}

.rjxp-eclate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 14px;
}

.rjxp-eclate-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--rjxp-line);
  border-radius: 8px;
  background: #fff;
  color: var(--rjxp-ink);
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(17, 19, 24, 0.05);
}

.rjxp-eclate-card:hover,
.rjxp-eclate-card.is-active {
  border-color: var(--rjxp-red);
  color: var(--rjxp-ink);
}

.rjxp-eclate-card__image {
  display: grid;
  height: 150px;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: var(--rjxp-soft);
}

.rjxp-eclate-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rjxp-eclate-card__body {
  display: grid;
  gap: 8px;
}

.rjxp-eclate-card__title {
  display: block;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.rjxp-eclate-card__type {
  color: var(--rjxp-muted);
  font-size: 12px;
  font-weight: 700;
}

.rjxp-eclate-card__cta {
  color: var(--rjxp-red);
  font-size: 13px;
  font-weight: 900;
}

.rjxp-list-hero,
.rjxp-draw-title {
  border: 1px solid var(--rjxp-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(17, 19, 24, 0.06);
}

.rjxp-list-hero {
  margin-bottom: 18px;
  padding: 20px 22px;
}

.rjxp-list-hero h2,
.rjxp-draw-title h2 {
  margin: 0;
  color: var(--rjxp-ink);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 0;
}

.rjxp-list-hero p:not(.rjxp-kicker) {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--rjxp-muted);
  font-size: 15px;
  line-height: 1.45;
}

.rjxp-list-hero__meta,
.rjxp-draw-title__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rjxp-list-hero__meta {
  margin-top: 14px;
}

.rjxp-list-hero__meta span,
.rjxp-draw-title__meta span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--rjxp-line);
  border-radius: 999px;
  background: var(--rjxp-soft);
  color: var(--rjxp-muted);
  font-size: 12px;
  font-weight: 900;
}

.rjxp-draw-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 18px;
}

.rjxp-workspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.rjxp-nav {
  position: sticky;
  top: 12px;
  display: grid;
  gap: 6px;
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--rjxp-line);
  border-radius: 8px;
  background: #fff;
}

.rjxp-nav__back,
.rjxp-nav__item {
  display: flex;
  min-height: 40px;
  align-items: center;
  border-radius: 6px;
  color: var(--rjxp-ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
}

.rjxp-nav__back {
  justify-content: center;
  margin-bottom: 8px;
  border: 1px solid var(--rjxp-line);
}

.rjxp-nav__item {
  padding: 8px 10px;
}

.rjxp-nav__item:hover,
.rjxp-nav__item.is-active {
  background: #ffecee;
  color: var(--rjxp-red-dark);
}

.rjxp-main {
  min-width: 0;
}

.rjxp-viewer {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rjxp-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--rjxp-shadow);
}

.rjxp-viewer__toolbar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

.rjxp-icon-btn {
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--rjxp-line);
  background: #fff;
  color: var(--rjxp-ink);
  font-size: 13px;
}

.rjxp-viewer__canvas {
  display: grid;
  min-height: 520px;
  place-items: center;
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
}

.rjxp-viewer__canvas.is-dragging {
  cursor: grabbing;
}

.rjxp-viewer__canvas img {
  max-width: 100%;
  max-height: 76vh;
  transform-origin: center;
  transition: transform 0.12s ease;
  user-select: none;
  will-change: transform;
}

.rjxp-viewer__canvas.is-touching img {
  transition: none;
}

.rjxp-parts {
  margin-top: 20px;
}

.rjxp-filters {
  grid-template-columns: minmax(240px, 1fr) 200px auto;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--rjxp-line);
  border-radius: 8px;
  background: var(--rjxp-soft);
}

.rjxp-toggle {
  display: inline-flex;
  height: 46px;
  align-items: center;
  gap: 8px;
  color: var(--rjxp-ink);
  font-weight: 800;
}

.rjxp-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--rjxp-red);
}

.rjxp-table-wrap {
  overflow: auto;
  border: 1px solid var(--rjxp-line);
  border-radius: 8px;
  background: #fff;
}

.rjxp-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.rjxp-table th,
.rjxp-table td {
  padding: 12px;
  border-bottom: 1px solid var(--rjxp-line);
  vertical-align: middle;
}

.rjxp-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8f9fb;
  color: var(--rjxp-muted);
  font-size: 12px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

.rjxp-table td small {
  display: block;
  margin-top: 4px;
  color: var(--rjxp-muted);
  font-size: 12px;
  line-height: 1.25;
}

.rjxp-pin {
  display: inline-flex;
  min-width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #111318;
  color: #fff;
  font-weight: 900;
}

.rjxp-stock {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.rjxp-stock--raw {
  background: #e7f8f1;
  color: var(--rjxp-green);
}

.rjxp-stock--factory {
  background: #eef3ff;
  color: var(--rjxp-blue);
}

.rjxp-stock--substitute {
  background: #fff4df;
  color: var(--rjxp-amber);
}

.rjxp-stock--none {
  background: #f1f3f6;
  color: #667085;
}

.rjxp-qty {
  display: inline-grid;
  grid-template-columns: 34px 50px 34px;
  height: 38px;
  overflow: hidden;
  border: 1px solid var(--rjxp-line);
  border-radius: 6px;
  background: #fff;
}

.rjxp-qty button,
.rjxp-qty input {
  border: 0;
  background: #fff;
  color: var(--rjxp-ink);
  text-align: center;
  font-weight: 900;
}

.rjxp-qty button {
  cursor: pointer;
}

.rjxp-qty input {
  width: 100%;
  border-left: 1px solid var(--rjxp-line);
  border-right: 1px solid var(--rjxp-line);
  -moz-appearance: textfield;
}

.rjxp-qty input::-webkit-outer-spin-button,
.rjxp-qty input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.rjxp-actions {
  text-align: right;
  white-space: nowrap;
}

.rjxp-card-list {
  display: none;
}

.rjxp-part-card {
  padding: 14px;
  border: 1px solid var(--rjxp-line);
  border-radius: 8px;
  background: #fff;
}

.rjxp-part-card__top,
.rjxp-part-card__meta,
.rjxp-part-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rjxp-part-card h3 {
  margin: 12px 0 4px;
  color: var(--rjxp-ink);
  font-size: 16px;
  line-height: 1.25;
}

.rjxp-part-card p,
.rjxp-part-card__meta span {
  margin: 0;
  color: var(--rjxp-muted);
  font-size: 13px;
}

.rjxp-part-card__meta {
  align-items: flex-start;
  margin-top: 12px;
}

.rjxp-part-card__actions {
  margin-top: 14px;
  flex-wrap: wrap;
}

.rjxp-empty {
  padding: 28px;
  border: 1px dashed #cfd4dc;
  border-radius: 8px;
  background: var(--rjxp-soft);
  color: var(--rjxp-muted);
  text-align: center;
  font-weight: 800;
}

.rjxp-drawer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

.rjxp-drawer[aria-hidden="false"] {
  pointer-events: auto;
}

.rjxp-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 19, 24, 0.46);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.rjxp-drawer[aria-hidden="false"] .rjxp-drawer__overlay {
  opacity: 1;
}

.rjxp-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(440px, 92vw);
  height: 100%;
  overflow: auto;
  padding: 22px;
  background: #fff;
  box-shadow: var(--rjxp-shadow);
  transform: translateX(102%);
  transition: transform 0.22s ease;
}

.rjxp-drawer[aria-hidden="false"] .rjxp-drawer__panel {
  transform: translateX(0);
}

.rjxp-drawer__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--rjxp-line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-weight: 900;
}

.rjxp-drawer__image {
  display: grid;
  min-height: 190px;
  margin: 28px 0 18px;
  place-items: center;
  border-radius: 8px;
  background: var(--rjxp-soft);
}

.rjxp-drawer__image img {
  max-width: 100%;
  max-height: 190px;
  object-fit: contain;
}

.rjxp-drawer__panel h2 {
  margin: 0 0 16px;
  color: var(--rjxp-ink);
  font-size: 24px;
  line-height: 1.18;
}

.rjxp-drawer__details {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}

.rjxp-drawer__details div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rjxp-line);
}

.rjxp-drawer__details dt {
  color: var(--rjxp-muted);
  font-weight: 800;
}

.rjxp-drawer__details dd {
  margin: 0;
  text-align: right;
  font-weight: 900;
}

.rjxp-drawer__shipping {
  color: var(--rjxp-muted);
  line-height: 1.45;
}

.rjxp-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10000;
  max-width: 360px;
  padding: 13px 16px;
  border-radius: 8px;
  background: #111318;
  color: #fff;
  font-weight: 800;
  box-shadow: var(--rjxp-shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.rjxp-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.rjxp-part-row.is-hidden,
.rjxp-part-card.is-hidden {
  display: none;
}

@media (max-width: 1024px) {
  .rjxp-selector,
  .rjxp-bikebar,
  .rjxp-filters,
  .rjxp-workspace {
    grid-template-columns: 1fr;
  }

  .rjxp-nav {
    position: static;
    grid-auto-flow: column;
    grid-auto-columns: minmax(180px, 1fr);
    max-height: none;
    overflow-x: auto;
  }

  .rjxp-viewer__canvas {
    min-height: 390px;
  }
}

@media (max-width: 767px) {
  .rjxp-hero {
    min-height: auto;
    border-radius: 0;
    margin-left: -15px;
    margin-right: -15px;
  }

  .rjxp-hero__media {
    background:
      linear-gradient(180deg, rgba(8, 9, 12, 0.88) 0%, rgba(8, 9, 12, 0.74) 100%),
      url("https://www.rawmotorsports.net/img/cms/background_rieju.png") center / cover no-repeat;
  }

  .rjxp-hero__content {
    padding: 32px 16px;
  }

  .rjxp-hero h1 {
    font-size: 38px;
  }

  .rjxp-eclate-grid {
    grid-template-columns: 1fr 1fr;
  }

  .rjxp-eclate-card__image {
    height: 120px;
  }

  .rjxp-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .rjxp-table-wrap {
    display: none;
  }

  .rjxp-card-list {
    display: grid;
    gap: 10px;
  }

  .rjxp-viewer__canvas {
    min-height: 300px;
  }

  .rjxp-viewer__toolbar {
    top: 8px;
    right: 8px;
  }

  .rjxp-actions,
  .rjxp-part-card__actions {
    justify-content: flex-start;
  }
}

/* A selected drawing takes priority over the model selection banner. */
.rjxp-hero--selected { min-height: auto; }
.rjxp-hero--selected .rjxp-hero__content { padding: 24px; }
.rjxp-hero--selected h1 { font-size: clamp(24px, 3vw, 38px); line-height: 1.15; }
.rjxp-nav__item { flex-direction: column; align-items: flex-start; gap: 4px; }
.rjxp-nav__item small { color: var(--rjxp-muted); }
.rjxp-toast:not(.is-visible) { pointer-events: none; }
.rjxp-page a:focus-visible, .rjxp-page button:focus-visible,
.rjxp-page select:focus-visible { outline: 3px solid var(--rjxp-red); outline-offset: 3px; }

@media (min-width: 1025px) { .rjxp-nav { top: 90px; max-height: calc(100vh - 110px); } }
