/*
// =============================================================
// HYJ parts browse — branded left rail (overrides customize.css)
// =============================================================
*/

.cp-hyjPartsBrowsePage {
  --hyj-rail-w: 16rem;
  --hyj-teal: #1f9e9e;
  --hyj-orange: #e8913a;
  --hyj-browse-ink: #e8eef6;
  --hyj-browse-muted: rgba(232, 238, 246, 0.62);
  --hyj-browse-line: rgba(255, 255, 255, 0.1);
  --hyj-browse-bg: #0b1228;
  --hyj-browse-panel: rgba(18, 28, 58, 0.92);
  --hyj-browse-well: rgba(4, 8, 28, 0.55);
  --hyj-browse-accent: var(--hyj-orange);
  --hyj-browse-accent-2: var(--hyj-teal);
  --hyj-rail-top: 5.5rem;
}

@media (min-width: 961px) {
  .cp-hyjPartsBrowsePage .ec-layoutRole__contents {
    padding-left: calc(var(--hyj-rail-w) + 1.15rem);
  }
}

.cp-hyjPartsBrowse {
  border: 0 !important;
  border-right: 1px solid var(--hyj-browse-line) !important;
  border-radius: 0 14px 14px 0;
  height: auto !important;
  max-height: calc(100vh - var(--hyj-rail-top) - 0.75rem) !important;
  background:
    radial-gradient(120% 70% at 0% 0%, rgba(31, 158, 158, 0.28), transparent 55%),
    radial-gradient(90% 55% at 100% 100%, rgba(232, 145, 58, 0.16), transparent 50%),
    linear-gradient(180deg, #121c3a 0%, #0a1024 48%, #070b1a 100%) !important;
  color: var(--hyj-browse-ink) !important;
  box-shadow:
    6px 0 28px rgba(0, 0, 0, 0.35),
    inset -1px 0 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.cp-hyjPartsBrowse::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--hyj-teal), var(--hyj-orange));
  pointer-events: none;
  z-index: 2;
}

.cp-hyjPartsBrowse::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: soft-light;
  z-index: 0;
}

.cp-hyjPartsBrowse,
.cp-hyjPartsBrowse h2,
.cp-hyjPartsBrowse h3,
.cp-hyjPartsBrowse p,
.cp-hyjPartsBrowse li,
.cp-hyjPartsBrowse span,
.cp-hyjPartsBrowse summary,
.cp-hyjPartsBrowse button,
.cp-hyjPartsBrowse a,
.cp-hyjPartsBrowse a:link,
.cp-hyjPartsBrowse a:visited,
.cp-hyjPartsBrowse a:hover,
.cp-hyjPartsBrowse a:active {
  color: var(--hyj-browse-ink) !important;
}

.cp-hyjPartsBrowse__head {
  position: relative;
  z-index: 1;
  padding: 0.9rem 0.85rem 0.85rem 1rem !important;
  border-bottom: 1px solid var(--hyj-browse-line) !important;
  background: linear-gradient(180deg, rgba(31, 158, 158, 0.18), rgba(8, 14, 36, 0.35)) !important;
}

.cp-hyjPartsBrowse__headRow {
  align-items: flex-start;
}

.cp-hyjPartsBrowse__headText {
  min-width: 0;
}

.cp-hyjPartsBrowse__eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hyj-teal) !important;
}

.cp-hyjPartsBrowse__title {
  font-size: 1.05rem !important;
  color: #fff !important;
  letter-spacing: 0.03em;
  line-height: 1.25;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

.cp-hyjPartsBrowse__lead {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--hyj-browse-muted) !important;
}

.cp-hyjPartsBrowse__close {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  width: 1.8rem;
  height: 1.8rem;
  align-items: center;
  justify-content: center;
  color: var(--hyj-browse-ink) !important;
}

.cp-hyjPartsBrowse__close:hover {
  background: rgba(255, 255, 255, 0.16);
}

.cp-hyjPartsBrowse__scroll {
  position: relative;
  z-index: 1;
  padding: 0.55rem 0.55rem 0.9rem !important;
  background: transparent !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(31, 158, 158, 0.55) transparent;
}

.cp-hyjPartsBrowse__scroll::-webkit-scrollbar {
  width: 6px;
}

.cp-hyjPartsBrowse__scroll::-webkit-scrollbar-thumb {
  background: rgba(31, 158, 158, 0.45);
  border-radius: 999px;
}

.cp-hyjPartsBrowse__branch {
  margin: 0 0 0.55rem;
  border: 1px solid var(--hyj-browse-line) !important;
  border-radius: 10px;
  background: rgba(10, 16, 40, 0.55) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  border-bottom: 0 !important;
}

.cp-hyjPartsBrowse__branchTitle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.72rem 0.7rem !important;
  font-size: 0.84rem !important;
  color: #fff !important;
  background: linear-gradient(90deg, rgba(31, 158, 158, 0.14), transparent 70%) !important;
  transition: background 0.15s ease;
}

.cp-hyjPartsBrowse__branchIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 8px;
  background: rgba(31, 158, 158, 0.18);
  color: var(--hyj-teal) !important;
  box-shadow: inset 0 0 0 1px rgba(31, 158, 158, 0.35);
  font-size: 0.78rem;
}

.cp-hyjPartsBrowse__branchIcon i {
  color: inherit !important;
}

.cp-hyjPartsBrowse__branchLabel {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.3;
}

.cp-hyjPartsBrowse__branchTitle::after {
  content: '+';
  float: none;
  flex: 0 0 auto;
  margin-left: auto;
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--hyj-browse-muted) !important;
}

.cp-hyjPartsBrowse__branch[open] > .cp-hyjPartsBrowse__branchTitle::after {
  content: '−';
}

.cp-hyjPartsBrowse__branch[open] > .cp-hyjPartsBrowse__branchTitle {
  background: linear-gradient(90deg, rgba(232, 145, 58, 0.2), rgba(31, 158, 158, 0.08)) !important;
  box-shadow: inset 3px 0 0 var(--hyj-orange);
}

.cp-hyjPartsBrowse__branch[open] > .cp-hyjPartsBrowse__branchTitle .cp-hyjPartsBrowse__branchIcon {
  background: rgba(232, 145, 58, 0.18);
  color: var(--hyj-orange) !important;
  box-shadow: inset 0 0 0 1px rgba(232, 145, 58, 0.4);
}

.cp-hyjPartsBrowse__branchBody {
  background: transparent !important;
  padding: 0 0 0.15rem;
}

.cp-hyjPartsBrowse__step {
  margin: 0 0.45rem 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px;
  background: var(--hyj-browse-well) !important;
  overflow: hidden;
  border-bottom: 0 !important;
}

.cp-hyjPartsBrowse__stepTitle {
  padding: 0.48rem 0.55rem !important;
  font-size: 0.72rem !important;
  background: rgba(255, 255, 255, 0.03) !important;
  color: var(--hyj-browse-ink) !important;
}

.cp-hyjPartsBrowse__stepTitle::after {
  color: var(--hyj-browse-muted) !important;
}

.cp-hyjPartsBrowse__step.is-done:not([open]) > .cp-hyjPartsBrowse__stepTitle {
  background: rgba(31, 158, 158, 0.1) !important;
}

.cp-hyjPartsBrowse__stepValue {
  color: var(--hyj-orange) !important;
}

.cp-hyjPartsBrowse__stepNum {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.05rem;
  height: 1.05rem;
  margin-right: 0.28rem;
  padding: 0 0.2rem;
  border-radius: 999px;
  background: rgba(232, 145, 58, 0.2);
  color: var(--hyj-orange) !important;
  font-size: 0.65rem;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(232, 145, 58, 0.35);
}

.cp-hyjPartsBrowse__stepLabel {
  color: rgba(232, 238, 246, 0.88) !important;
}

/* Nested under 車両から探す (after 世代・型式), always visible */
.cp-hyjPartsBrowse__branch--nested {
  margin: 0.35rem 0.45rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.16) !important;
  overflow: hidden;
}

.cp-hyjPartsBrowse__branch--nested > .cp-hyjPartsBrowse__branchTitle {
  padding: 0.55rem 0.65rem !important;
}

.cp-hyjPartsBrowse__branch--nested > .cp-hyjPartsBrowse__branchTitle .cp-hyjPartsBrowse__stepValue {
  margin-left: 0.35rem;
  font-weight: 500;
}

.cp-hyjPartsBrowse__partsNested {
  padding: 0.15rem 0 0.25rem;
}

.cp-hyjPartsBrowse__partsNested > .cp-hyjPartsBrowse__step {
  margin-left: 0.45rem;
  margin-right: 0.45rem;
}

.cp-hyjPartsBrowse__partsNested > .cp-hyjPartsBrowse__reset {
  width: calc(100% - 0.9rem) !important;
  margin: 0.4rem 0.45rem 0.55rem !important;
}

.cp-hyjPartsBrowse__reset {
  width: calc(100% - 0.9rem) !important;
  margin: 0.35rem 0.45rem 0.55rem !important;
  padding: 0.42rem 0.5rem !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--hyj-browse-ink) !important;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.cp-hyjPartsBrowse__reset:hover {
  border-color: rgba(31, 158, 158, 0.55) !important;
  background: rgba(31, 158, 158, 0.12) !important;
}

.cp-hyjPartsBrowse__list {
  border-top: 1px solid rgba(255, 255, 255, 0.07) !important;
  background: rgba(0, 0, 0, 0.18) !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(31, 158, 158, 0.4) transparent;
}

.cp-hyjPartsBrowse__list li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.cp-hyjPartsBrowse__link {
  padding: 0.4rem 0.6rem !important;
  color: rgba(232, 238, 246, 0.92) !important;
  background: transparent !important;
  transition: background 0.12s ease, color 0.12s ease;
}

.cp-hyjPartsBrowse__link:hover {
  background: rgba(31, 158, 158, 0.16) !important;
  color: #fff !important;
}

.cp-hyjPartsBrowse__link.is-active {
  background: rgba(232, 145, 58, 0.18) !important;
  box-shadow: inset 3px 0 0 var(--hyj-orange);
  color: #fff !important;
}

.cp-hyjPartsBrowse__hint,
.cp-hyjPartsBrowse__empty {
  color: var(--hyj-browse-muted) !important;
  background: transparent !important;
}

@media (max-width: 960px) {
  .cp-hyjPartsBrowsePage {
    --hyj-rail-w: min(19rem, 90vw);
  }

  .cp-hyjPartsBrowse__backdrop {
    background: rgba(4, 8, 24, 0.62);
    backdrop-filter: blur(2px);
  }

  .cp-hyjPartsBrowse {
    border-radius: 0 16px 16px 0;
    box-shadow: 8px 0 36px rgba(0, 0, 0, 0.45);
    /* モバイルドロワーは従来どおり画面高 */
    height: 100vh !important;
    max-height: none !important;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }

  .cp-hyjPartsBrowse.is-open {
    transform: translateX(0) !important;
  }

  .cp-hyjPartsBrowse__close {
    display: inline-flex;
  }
}
