/* Concept R5 — Detail Page (Concept 4): 3-Column Stage + 360 Orbit Ring + 5-Cell Ink Spec Bar */
:root {
  --r5-paper: #F3F0E8;
  --r5-ink: #141C33;
  --r5-cobalt: #2340C0;
  --r5-cobalt-dark: #192E94;
  --r5-orange: #D2401E;
  --r5-line: rgba(20, 28, 51, 0.18);
}

body[data-rreako-geo="product"] {
  background: var(--r5-paper) !important;
  color: var(--r5-ink) !important;
}

body[data-rreako-geo="product"] .story {
  --site07-linear-workbench: 0 !important;
  display: block !important;
}

/* Hide old duplicate static appearance pair so there is ONE clean hero center */
body[data-rreako-geo="product"] .product-appearance,
body[data-rreako-geo="product"] .workbench-label,
body[data-rreako-geo="product"] .down {
  display: none !important;
}

body[data-rreako-geo="product"] .model-track {
  position: relative !important;
  min-height: 0 !important;
  height: auto !important;
  background: var(--r5-paper) !important;
  overflow: hidden;
}

body[data-rreako-geo="product"] .sticky {
  position: relative !important;
  top: auto !important;
  inset: auto !important;
  min-height: clamp(540px, calc(100svh - var(--bar-height, 64px) - 148px), 688px) !important;
  height: auto !important;
  max-width: 1680px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: clamp(20px, 2.4vw, 34px) clamp(20px, 4.4vw, 64px) clamp(24px, 2.8vw, 38px) !important;
  display: grid !important;
  grid-template-columns: minmax(260px, 0.92fr) minmax(320px, 1.24fr) minmax(240px, 0.84fr) !important;
  grid-template-rows: 1fr !important;
  grid-template-areas: none !important;
  gap: clamp(18px, 2.8vw, 40px) !important;
  align-items: center !important;
}

body[data-rreako-geo="product"] .sticky > .intro,
body[data-rreako-geo="product"] .sticky > .model-frame,
body[data-rreako-geo="product"] .sticky > .stage-tools {
  grid-area: auto !important;
  grid-column: auto !important;
  grid-row: auto !important;
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  opacity: 1 !important;
  margin: 0 !important;
}

/* Giant Background Model Watermark */
.r5-detail-watermark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-46%, -52%);
  font-size: clamp(220px, 36vw, 640px);
  font-weight: 900;
  letter-spacing: -0.09em;
  line-height: 0.9;
  color: #e7e3d7;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

/* Left Column: Crumb + Giant Model Code + Benefit + Mode Switch */
body[data-rreako-geo="product"] .intro {
  position: relative;
  z-index: 3;
  max-width: 420px;
  inert: none;
}

body[data-rreako-geo="product"] .intro .eyebrow {
  display: none !important;
}

body[data-rreako-geo="product"] .intro .crumb {
  margin: 0 0 18px !important;
  font: 600 13px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace !important;
}

body[data-rreako-geo="product"] .intro .crumb a {
  color: var(--r5-ink);
  text-decoration: underline;
}

body[data-rreako-geo="product"] .intro h1 {
  margin: 0 !important;
  font-size: clamp(64px, 7.6vw, 114px) !important;
  letter-spacing: -0.07em !important;
  line-height: 0.86 !important;
  font-weight: 900 !important;
  color: var(--r5-ink) !important;
}

body[data-rreako-geo="product"] .intro .product-benefit {
  margin: 18px 0 0 !important;
  font-size: clamp(26px, 2.7vw, 40px) !important;
  line-height: 1.0 !important;
  letter-spacing: -0.045em !important;
  font-weight: 900 !important;
  color: var(--r5-ink) !important;
}

body[data-rreako-geo="product"] .intro .format {
  margin: 14px 0 0 !important;
  font-size: 15.5px !important;
  line-height: 1.5 !important;
  color: #3b4258 !important;
  font-weight: 500 !important;
}

.r5-mode-slot {
  margin-top: 24px;
}

body[data-rreako-geo="product"] .mode-switch {
  display: inline-flex !important;
  border: 2px solid var(--r5-ink) !important;
  background: transparent !important;
  padding: 0 !important;
  gap: 0 !important;
}

body[data-rreako-geo="product"] .mode-switch[hidden] {
  display: none !important;
}

body[data-rreako-geo="product"] .mode-switch button {
  appearance: none;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 11px 18px !important;
  min-height: 44px;
  font: 700 14px/1.1 RreakoBar, Inter, Arial, sans-serif !important;
  background: transparent !important;
  color: var(--r5-ink) !important;
  cursor: pointer;
}

body[data-rreako-geo="product"] .mode-switch button[aria-pressed="true"] {
  background: var(--r5-ink) !important;
  color: #fff !important;
}

/* Center Stage: Interactive 3D Canvas / Reference + Dashed Cobalt 360 Ring */
body[data-rreako-geo="product"] .model-frame {
  position: relative !important;
  z-index: 2;
  width: 100% !important;
  height: clamp(400px, 52svh, 520px) !important;
  min-height: 400px !important;
  max-height: 520px !important;
  aspect-ratio: auto !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 0 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body[data-rreako-geo="product"] .model-frame canvas {
  position: relative !important;
  inset: auto !important;
  transform: scale(1.22) !important;
  transform-origin: center 52% !important;
  z-index: 3;
  width: 100% !important;
  height: 100% !important;
  max-height: 490px;
  cursor: grab;
}

body[data-rreako-geo="product"] .model-frame canvas:active {
  cursor: grabbing;
}

/* Native 1:1 Retina framing for G2 STEP exterior WebGL stage */
body[data-product="g2"].r5-g2-step-active .model-frame canvas {
  transform: none !important;
  max-height: none !important;
}

/* G2 STEP-derived exterior metadata & static documented heads list */
.r5-step-meta {
  margin-bottom: 14px;
}

.r5-step-badge {
  display: inline-block;
  margin: 0 0 10px !important;
  padding: 5px 10px;
  background: var(--r5-cobalt);
  color: #fff;
  font: 700 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.r5-step-note {
  margin: 8px 0 14px !important;
  font-size: 13px !important;
  line-height: 1.48 !important;
  color: #464e63 !important;
}

.r5-doc-heads-label {
  margin: 0 0 6px !important;
  font: 700 11px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #555e73;
}

.r5-doc-heads ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--r5-line);
}

.r5-doc-heads li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 2px;
  border-top: 1px solid var(--r5-line);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--r5-ink);
}

.r5-doc-heads li.is-shown {
  color: var(--r5-cobalt);
  font-weight: 800;
}

.r5-doc-heads li.is-shown em {
  font: 700 10.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 7px;
  border: 1.5px solid var(--r5-cobalt);
  color: var(--r5-cobalt);
}

body[data-rreako-geo="product"] .model-frame .reference {
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  z-index: 3;
  max-height: 86% !important;
  max-width: 86% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  filter: drop-shadow(0 24px 32px rgba(20, 28, 51, 0.22));
}

body[data-rreako-geo="product"] .model-frame .orbit {
  display: block !important;
  position: absolute !important;
  top: auto !important;
  left: 8% !important;
  right: 8% !important;
  bottom: 18px !important;
  width: auto !important;
  height: 102px !important;
  transform: none !important;
  border: 2px dashed var(--r5-cobalt) !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: none;
  z-index: 1;
}

body[data-rreako-geo="product"] .model-frame .orbit::before,
body[data-rreako-geo="product"] .model-frame .orbit::after {
  position: absolute;
  top: 36px;
  font: 900 22px/1 Inter, Arial, sans-serif;
  color: var(--r5-cobalt);
  background: var(--r5-paper);
  padding: 2px 4px;
}

body[data-rreako-geo="product"] .model-frame .orbit::before {
  content: "←";
  left: -14px;
}

body[data-rreako-geo="product"] .model-frame .orbit::after {
  content: "→";
  right: -14px;
}

.r5-drag-pill {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 4;
  background: var(--r5-cobalt);
  color: #fff;
  font: 800 13px/1 RreakoBar, Inter, Arial, sans-serif;
  padding: 10px 18px;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
}

/* Right Column: Choose a brush head + compact zoom/reset controls */
body[data-rreako-geo="product"] .stage-tools {
  position: relative !important;
  z-index: 3;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  align-self: center;
}

.r5-head-picker {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.r5-head-picker-title {
  margin: 0 0 12px;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--r5-ink);
}

.r5-head-picker li {
  border-top: 1px solid var(--r5-line);
}

.r5-head-picker button {
  appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 12px 4px;
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  font: 600 14.5px/1.25 RreakoBar, Inter, Arial, sans-serif;
  color: var(--r5-ink);
  cursor: pointer;
}

.r5-head-picker button::before {
  content: "";
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #2b2f3a;
  box-shadow: inset 0 -5px 0 #777d8c;
}

.r5-head-picker button[aria-pressed="true"] {
  color: var(--r5-cobalt);
  font-weight: 800;
}

.r5-head-picker button[aria-pressed="true"]::before {
  outline: 3px solid var(--r5-cobalt);
  outline-offset: 3px;
}

/* Keep native select accessible for fallback/AT while visual list drives it */
body[data-rreako-geo="product"].r5-heads-enhanced .head-label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
}

body[data-rreako-geo="product"] .adjust {
  display: inline-flex !important;
  gap: 6px;
  margin-top: 6px;
}

body[data-rreako-geo="product"] .adjust button {
  min-width: 38px;
  min-height: 38px;
  padding: 0 10px;
  border: 1.5px solid var(--r5-line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--r5-ink);
  font-weight: 700;
  cursor: pointer;
}

body[data-rreako-geo="product"] #hint {
  margin-top: 10px !important;
  font-size: 12px !important;
  color: #5c6375 !important;
}

/* Full-Width 5-Column Dark Ink Spec & Quote Bar (Concept R5 bottom strip) */
.r5-spec-strip {
  background: var(--r5-ink);
  color: #fff;
  display: grid;
  grid-template-columns: 1.08fr 0.96fr 1.18fr 0.96fr 1.38fr;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.r5-spec-strip > div {
  padding: clamp(22px, 2.4vw, 32px) clamp(16px, 2.1vw, 28px);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.r5-spec-strip b {
  display: block;
  font-size: clamp(24px, 2.45vw, 36px);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.06;
  white-space: nowrap;
}

.r5-spec-strip b em {
  font-style: normal;
  color: var(--r5-orange);
}

.r5-spec-strip span {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.68);
}

.r5-spec-strip .r5-spec-cta {
  padding: 0;
  border-right: 0;
  display: flex;
}

.r5-spec-strip .r5-spec-cta a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  background: var(--r5-cobalt);
  color: #fff;
  text-decoration: none;
  font-size: clamp(17px, 1.55vw, 22px);
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
  transition: background-color .15s;
}

.r5-spec-strip .r5-spec-cta a:hover,
.r5-spec-strip .r5-spec-cta a:focus-visible {
  background: var(--r5-cobalt-dark);
}

@media (max-width: 1024px) {
  body[data-rreako-geo="product"] .sticky {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  body[data-rreako-geo="product"] .intro {
    max-width: none;
  }
  body[data-rreako-geo="product"] .model-frame {
    height: 390px !important;
    min-height: 360px !important;
  }
  .r5-spec-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .r5-spec-strip > div {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }
  .r5-spec-strip .r5-spec-cta {
    grid-column: 1 / -1;
    border-bottom: 0;
  }
}
