/* Bearing detail page — extends bearing-common.css + bearing-layout.css (no bearing-catalog.css) */

/* ── Hero content ── */

.detail-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding: 40px 0 80px;
}

.detail-hero-grid > * {
  min-width: 0;
}

.detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  color: #626b76;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.detail-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(180deg, #64748b 0%, #334155 100%);
}

.detail-title {
  margin-top: 24px;
  font-size: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  line-height: 1.12;
}

.detail-model {
  display: block;
  margin-top: 12px;
  color: #3f4854;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.detail-lead {
  max-width: 640px;
  margin-top: 24px;
  color: var(--color-text-secondary);
  font-size: var(--font-lead);
  line-height: var(--leading-relaxed);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
}

.detail-actions .btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 10px 24px rgba(24, 24, 27, .18);
  transition: transform .15s, background .15s;
}

.detail-actions .btn.primary:hover {
  background: #27272a;
  transform: translateY(-2px);
}

.detail-actions .btn.pill:not(.primary):hover {
  background: #f8fafc;
}

/* Product image panel */

.detail-visual {
  position: relative;
}

.detail-visual-frame {
  border-radius: 36px;
  background: #fff;
  box-shadow: 0 20px 40px rgba(228, 228, 231, .8);
  overflow: hidden;
}


.detail-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.detail-photo-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #e5e7eb;
  opacity: .3;
}

.detail-photo-label {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 0 16px;
  text-align: center;
  color: #86909d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.detail-float-cards {
  position: absolute;
  right: 36px;
  bottom: 36px;
  display: grid;
  gap: 12px;
  width: 180px;
}

.detail-float-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
  backdrop-filter: blur(12px);
}

.detail-float-card-label {
  color: #86909d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.detail-float-card-value {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 700;
}

/* ── Main content ── */

.page-main > section + section {
  margin-top: 96px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
  min-width: 0;
}

.section-head > * {
  min-width: 0;
}

/* Capability grid */

.capability-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.capability-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #f8fafc;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.capability-img {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, #e8eaed 0%, #f4f5f7 24%, #d8dce0 48%, #eef0f2 62%, #f8f9fa 82%, #dfe3e7 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .9),
    inset 0 -10px 16px rgba(0, 0, 0, .04);
}

.capability-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.capability-name {
  margin-top: 16px;
  font-size: var(--font-body);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.capability-desc {
  margin-top: 8px;
  color: var(--color-text-secondary);
  font-size: var(--font-body);
  line-height: 1.5;
}

/* Engineering + Specs layout */

.engineering-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
}

.engineering-layout > * {
  min-width: 0;
}

.engineering-panel,
.specs-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(228, 228, 231, .6);
}

.specs-panel {
  overflow: hidden;
}

.engineering-panel {
  padding: 24px 32px;
}

#drawing-structure {
  scroll-margin-top: 32px;
}

.engineering-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.engineering-drawings {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
}

.drawing-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.drawing-frame-wrap {
  aspect-ratio: 1;
  width: 100%;
  max-width: 400px;
}

.drawing-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .9),
    inset 0 -10px 16px rgba(0, 0, 0, .04);
}

.drawing-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.drawing-frame.cover img {
  width: 100%;
  /* height: 100%; */
  max-width: none;
  max-height: none;
  object-fit: cover;
}

.drawing-name {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.drawing-desc {
  max-width: 400px;
  margin-top: 8px;
  text-align: center;
  color: #4f5a67;
  font-size: 14px;
  line-height: 1.5;
}

/* Grouped specifications */

.specs-header {
  flex-shrink: 0;
  padding: 28px 32px 26px;
  border-bottom: 1px solid var(--line);
}

.specs-header__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.specs-count {
  flex: none;
  padding: 6px 10px;
  border: 1px solid #d7ead7;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.specs-header .section-title {
  margin-top: 8px;
}

.specs-header .section-desc {
  margin-top: 10px;
}

.specs-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 20px;
  background: #f8fafc;
}

.specs-group {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(18, 28, 45, .03);
}

.specs-group__head {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #fff, #f7faff);
}

.specs-group__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.specs-group__head h3 {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.specs-group__head p {
  margin-top: 2px;
  color: var(--color-text-muted);
  font-size: 10px;
  line-height: 1.4;
}

.specs-list {
  margin: 0;
}

.specs-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}

.specs-row:last-child {
  border-bottom: 0;
}

.specs-row dt {
  min-width: 0;
  color: #343e4b;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
}

.specs-symbol {
  display: inline-flex;
  margin-left: 4px;
  color: var(--color-text-muted);
  font-size: 10px;
  font-weight: 600;
}

.specs-row dd {
  display: grid;
  grid-template-columns: minmax(42px, auto) 24px;
  gap: 6px;
  align-items: baseline;
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.specs-row dd strong {
  color: #172033;
  font-size: 12px;
  font-weight: 750;
}

.specs-row dd span {
  color: var(--color-text-muted);
  font-size: 9px;
  text-align: left;
}

.specs-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 12px;
  padding: 13px 14px;
  border-radius: 12px;
  background: #f3f6fa;
  color: var(--color-text-secondary);
  font-size: 11px;
  font-weight: 650;
}

.specs-summary strong {
  color: var(--ink);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.specs-summary small {
  color: var(--color-text-muted);
  font-size: 9px;
  font-weight: 600;
}

/* Quality / Applications */

.quality-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
}

.quality-panel {
  min-width: 0;
  padding: 24px 32px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(228, 228, 231, .6);
}

.mini-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.mini-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #f8fafc;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.mini-card-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, #e8eaed 0%, #f4f5f7 24%, #d8dce0 48%, #eef0f2 62%, #f8f9fa 82%, #dfe3e7 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .9),
    inset 0 -10px 16px rgba(0, 0, 0, .04);
}

.mini-card-visual .overlay {
  position: absolute;
  inset: 0;
  background: #e5e7eb;
  opacity: .3;
}

.mini-card-visual span {
  position: relative;
  z-index: 1;
  max-width: 100%;
  padding: 0 16px;
  text-align: center;
  color: #86909d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.mini-card-name {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mini-card-desc {
  margin-top: 8px;
  color: #4f5a67;
  font-size: 14px;
  line-height: 1.5;
}

/* Related products */

.related-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

/* CTA banner */

.detail-cta-wrap {
  min-width: 0;
  padding-bottom: 64px;
}

.detail-cta {
  position: relative;
  overflow: hidden;
  padding: 48px 32px;
  border: 1px solid var(--line);
  border-radius: 35px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 48%, #e2e8f0 100%);
  box-shadow: 0 10px 30px rgba(228, 228, 231, .8);
}

.detail-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .3;
  background-image:
    linear-gradient(rgba(0, 0, 0, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, .04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.detail-cta-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.detail-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.detail-cta-actions .btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  transition: transform .15s, background .15s;
}

.detail-cta-actions .btn.primary:hover {
  background: #27272a;
  transform: translateY(-2px);
}

.detail-cta-actions .btn.pill:not(.primary):hover {
  background: #fff;
}

/* ── Responsive ── */

@media (min-width: 640px) {
  .capability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mini-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .detail-hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  }

  .section-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .capability-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .engineering-layout {
    grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
  }

  .engineering-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .engineering-head .section-desc {
    max-width: 340px;
  }

  .quality-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .detail-cta-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .drawing-frame-wrap {
    max-width: 420px;
  }

  .drawing-desc {
    max-width: 420px;
  }
}

@media (max-width: 720px) {
  .detail-hero-grid {
    gap: 32px;
    padding: 24px 0 48px;
  }

  .detail-badge {
    max-width: 100%;
    font-size: 9px;
    letter-spacing: .14em;
  }

  .detail-title {
    font-size: clamp(28px, 8vw, 36px);
  }

  .detail-lead {
    font-size: 15px;
    line-height: 1.65;
  }

  .detail-stat-label {
    letter-spacing: .1em;
    font-size: 9px;
  }

  .detail-stat-value {
    font-size: 13px;
  }

  .detail-actions {
    flex-direction: column;
  }

  .detail-actions .btn {
    width: 100%;
    white-space: normal;
  }

  .detail-visual-frame {
    border-radius: 24px;
  }

  .detail-photo {
    border-radius: 18px;
  }

  .detail-photo-label {
    font-size: 9px;
    letter-spacing: .16em;
  }

  .detail-float-cards {
    position: static;
    width: 100%;
    margin-top: 12px;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .detail-float-card {
    padding: 12px 14px;
  }

  .page-main > section + section {
    margin-top: 56px;
  }

  .section-head {
    margin-bottom: 28px;
  }

  .section-title {
    font-size: clamp(24px, 6.5vw, 30px);
  }

  .section-eyebrow {
    font-size: 10px;
    letter-spacing: .18em;
  }

  .engineering-panel,
  .quality-panel {
    padding: 20px 16px;
    border-radius: 24px;
  }

  .specs-header {
    padding: 20px 16px;
  }

  .specs-panel {
    border-radius: 24px;
  }

  .specs-groups {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }

  .specs-row {
    padding: 10px 14px;
  }

  .engineering-drawings {
    gap: 24px;
  }

  .drawing-frame-wrap {
    max-width: none;
  }

  .drawing-desc {
    max-width: none;
  }

  .mini-card-visual span {
    font-size: 9px;
    letter-spacing: .14em;
  }

  .detail-cta {
    padding: 28px 20px;
    border-radius: 24px;
  }

  .detail-cta-actions {
    flex-direction: column;
  }

  .detail-cta-actions .btn {
    width: 100%;
    white-space: normal;
  }
}

@media (min-width: 721px) and (max-width: 1023px) {
  .detail-float-cards {
    position: static;
    width: 100%;
    margin-top: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.mini-card-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
