/* Shared product-detail styles. The legacy URL is retained for compatibility. */

/* Page and typography */
.pdp-page {
  --pdp-radius: 12px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 40px 72px;
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.pdp-page * { box-sizing: border-box; }
.pdp-page [id] { scroll-margin-top: 100px; }
.pdp-page .eyebrow {
  margin: 0 0 16px;
  font-size: 12px;
  letter-spacing: .08em;
  line-height: 1.4;
}

/* Lower content and sticky inquiry form (the hero stays outside this grid). */
.pdp-lower-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 56px;
  align-items: start;
}
.pdp-lower-content { min-width: 0; }
.pdp-lower-contact {
  position: sticky;
  top: 100px;
  align-self: start;
  margin-top: 72px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--pdp-radius);
  padding: 22px;
  min-height: 0;
  /* Let the full form determine card height; never create an inner scrollbar. */
  max-height: none;
  overflow: visible;
}
/* A tall sticky card on a short screen can become difficult to reach. */
@media (min-width:1024px) and (max-height:820px) {
  .pdp-lower-contact { position: static; }
}
.pdp-lower-contact > .eyebrow { margin-bottom: 10px; }
.pdp-lower-contact > h2 { font-size: 30px; line-height: 1.12; margin-bottom: 12px; }
.pdp-lower-contact > p:not(.eyebrow) {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.4;
}
.pdp-contact-form { display: flex; flex-direction: column; gap: 5px; }
.pdp-contact-form label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}
.pdp-contact-form input,
.pdp-contact-form textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--canvas);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.4;
  padding: 8px 10px;
  margin-bottom: 4px;
}
.pdp-contact-form textarea { resize: vertical; min-height: 88px; }
.pdp-contact-form input:focus,
.pdp-contact-form textarea:focus {
  border-color: var(--primary-deep);
  outline: 2px solid var(--primary-soft);
  outline-offset: 1px;
}
.pdp-contact-form .button { width: 100%; justify-content: center; margin-top: 4px; }
.pdp-contact-form > .inquiry-status,
.pdp-contact-form > .inquiry-fallback { margin: 2px 0 0; font-size: 13px; line-height: 1.35; }

.pdp-page h1 {
  font-size: 48px;
  line-height: 1.12;
  letter-spacing: -.024em;
  font-weight: 600;
  margin: 0 0 24px;
  max-width: 18ch;
}
.pdp-page h2 {
  font-size: 36px;
  line-height: 1.16;
  letter-spacing: -.02em;
  font-weight: 600;
  margin: 0 0 20px;
}
.pdp-page h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.008em;
  margin: 0 0 16px;
}
.pdp-page p { font-size: 16px; line-height: 1.65; color: var(--ink-secondary); }
.pdp-page :is(.pdp-spec-kicker, .pdp-procedure-kicker, .pdp-feature-kicker) {
  margin: 0 0 12px;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: .04em;
}
.pdp-page .pdp-feature-kicker { width: 100%; margin: 0; }
.pdp-page a { overflow-wrap: anywhere; }
.pdp-page :is(a, button):focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }

/* Breadcrumb and hero */
.pdp-breadcrumb { margin: 0 0 24px; }
.pdp-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--ink-secondary);
  font-size: 14px;
}
.pdp-breadcrumb li { display: flex; align-items: center; gap: 12px; }
.pdp-breadcrumb li + li::before { content: "/"; color: var(--ink-muted); }
.pdp-breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; }
.pdp-breadcrumb [aria-current] { font-weight: 500; color: var(--ink); }
.pdp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  padding: 0 0 56px;
}
.pdp-hero > * { min-width: 0; }
.pdp-hero-stage {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
}
.pdp-hero-image {
  display: block;
  background: var(--surface);
  border-radius: var(--pdp-radius);
  border: 1px solid var(--border);
  padding: 24px;
  min-width: 0;
}
.pdp-hero-image img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }

/* Gallery navigation: identical hit areas and one centered, five-slot strip. */
.pdp-gallery-arrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 56px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--primary-deep);
  cursor: pointer;
}
.pdp-gallery-arrow::before {
  content: "";
  display: block;
  width: 21px;
  height: 21px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  transform: rotate(var(--pdp-arrow-angle));
  transition: color .2s ease, transform .2s ease;
}
.pdp-gallery-prev { --pdp-arrow-angle: -135deg; }
.pdp-gallery-next { --pdp-arrow-angle: 45deg; }
.pdp-gallery-prev::before { margin-left: 8px; }
.pdp-gallery-next::before { margin-right: 8px; }
.pdp-gallery-arrow:active::before { transform: scale(.9) rotate(var(--pdp-arrow-angle)); }
.pdp-thumbnails {
  --pdp-thumb-gap: 12px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--pdp-thumb-count,5) - 1)*var(--pdp-thumb-gap))/var(--pdp-thumb-count,5));
  gap: var(--pdp-thumb-gap);
  width: calc(var(--pdp-thumb-count,5)*68px + (var(--pdp-thumb-count,5) - 1)*var(--pdp-thumb-gap));
  max-width: 100%;
  min-width: 0;
  margin: 16px auto 0;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.pdp-thumbnails::-webkit-scrollbar { display: none; }
.pdp-thumbnail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 4px;
  padding: 6px;
  font-family: inherit;
  cursor: pointer;
  scroll-snap-align: start;
}
.pdp-page .pdp-thumbnail:focus-visible { outline-offset: -4px; }
.pdp-thumbnail img { display: block; width: 54px; max-width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.pdp-thumbnail[aria-pressed="true"] {
  border: 2px solid var(--primary-deep);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px var(--primary-deep);
}
.pdp-page .pdp-lead { font-size: 18px; line-height: 1.65; margin: 0; max-width: 48ch; }
.pdp-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0;
}
.pdp-highlights > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border-radius: var(--pdp-radius);
  padding: 16px;
  min-width: 0;
}
.pdp-highlights dt {
  order: 2;
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-muted);
  line-height: 1.5;
}
.pdp-highlights dd {
  order: 1;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  color: var(--primary-deep);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pdp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.pdp-text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--primary-deep);
  font-size: 14px;
  font-weight: 500;
}
.pdp-text-link:hover,
.pdp-breadcrumb a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Detail sections share one image-card implementation. */
.pdp-band { padding: 72px 0 0; min-width: 0; }
.pdp-section-heading { max-width: 720px; margin-bottom: 32px; }
.pdp-feature-band {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 24px;
}
.pdp-feature-band h2 { width: 100%; margin: 0; text-align: left; }
.pdp-figure { width: 100%; margin: 0 auto; min-width: 0; }
.pdp-figure .pdp-media-link {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--pdp-radius);
  padding: var(--pdp-media-padding, 20px);
}
.pdp-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  margin: 0 auto;
}
.pdp-media-link { cursor: zoom-in; }
.pdp-procedure-band .pdp-section-heading { margin-bottom: 24px; }
.pdp-procedure-figure { display: flex; justify-content: center; width: 100%; }
.pdp-tips-figure { width: 100%; margin: 0 auto; }

/* Fixed-layout semantic specification tables. */
.pdp-spec-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.pdp-spec-group { min-width: 0; }
.pdp-spec-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
}
.pdp-spec-table th,
.pdp-spec-table td {
  text-align: left;
  vertical-align: top;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
  line-height: 1.6;
}
.pdp-spec-table th { width: 39%; font-size: 14px; color: var(--ink-muted); font-weight: 500; }
.pdp-spec-table td { font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Native dialog image viewer. */
.pdp-lightbox {
  padding: 20px;
  border: 0;
  border-radius: 8px;
  color: var(--ink-inverse);
  background: #101c24;
  width: calc(100% - 40px);
  max-width: 1200px;
  height: calc(100dvh - 40px);
  max-height: calc(100dvh - 40px);
  overflow: hidden;
}
.pdp-lightbox::backdrop { background: rgba(16,28,36,.92); }
.pdp-lightbox[open] { display: flex; flex-direction: column; }
.pdp-lightbox-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex: 0 0 auto;
  margin-bottom: 16px;
}
.pdp-lightbox-toolbar p { margin: 0; color: var(--ink-inverse); }
.pdp-lightbox-toolbar button {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--ink-inverse);
  min-width: 70px;
  min-height: 44px;
  font: 500 14px system-ui;
  cursor: pointer;
}
.pdp-lightbox-scroll { flex: 1; min-height: 0; overflow: auto; background: var(--surface); overscroll-behavior: contain; }
.pdp-lightbox-scroll img { display: block; max-width: none; width: auto; height: auto; margin: 0 auto; }
.pdp-page .pdp-lightbox-note { margin: 12px 0 0; color: var(--ink-inverse); font-size: 12px; }

/* Tablet: stack hero and lower content independently. */
@media (max-width:1023px) {
  .pdp-page { padding: 20px 24px 56px; }
  .pdp-lower-layout { grid-template-columns: minmax(0,1fr); gap: 40px; }
  .pdp-lower-contact {
    position: relative;
    top: auto;
    order: 2;
    margin-top: 0;
    max-height: none;
    overflow: visible;
  }
  .pdp-hero { grid-template-columns: minmax(0,1fr); gap: 32px; }
  .pdp-gallery { width: 100%; max-width: 500px; margin: 0 auto; }
  .pdp-page h1 { max-width: 22ch; }
  .pdp-feature-band { gap: 28px; }
}

/* Phone: preserve existing sizes and the highlights graphic's 20px inset. */
@media (max-width:639px) {
  .pdp-page { padding: 12px 20px 48px; --pdp-media-padding: 12px; }
  .pdp-page h1 { font-size: 32px; margin-bottom: 20px; }
  .pdp-page h2 { font-size: 28px; }
  .pdp-breadcrumb { margin-bottom: 16px; }
  .pdp-hero { padding-bottom: 32px; gap: 28px; }
  .pdp-hero-image { padding: 12px; }
  .pdp-highlights { grid-template-columns: minmax(0,1fr); gap: 8px; margin-block: 24px; }
  .pdp-highlights > div { flex-direction: row; align-items: center; justify-content: space-between; padding: 12px 16px; }
  .pdp-highlights dt { order: 0; }
  .pdp-highlights dd { font-size: 28px; }
  .pdp-page .pdp-lead { font-size: 16px; }
  .pdp-actions { align-items: flex-start; flex-direction: column; gap: 8px; }
  .pdp-thumbnails { --pdp-thumb-gap: 8px; }
  .pdp-thumbnail img { width: 44px; }
  .pdp-band { padding-top: 48px; }
  .pdp-feature-band { gap: 24px; --pdp-media-padding: 20px; }
  .pdp-spec-grid { grid-template-columns: minmax(0,1fr); gap: 24px; }
  .pdp-spec-table th, .pdp-spec-table td { padding: 12px 10px; }
  .pdp-spec-table th { width: 38%; }
  .pdp-lightbox {
    width: calc(100% - 16px);
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
    padding: 12px;
  }
  .pdp-lightbox-toolbar p { font-size: 14px; }
}
/* Pressure monitors share the same long-value typography. */
.pdp-page:is([data-product-slug="bp-jc312"], [data-product-slug="bp-363a"], [data-product-slug="bp-168w"]) .pdp-highlights dd {
  font-size: clamp(17px, 1.4vw, 21px);
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (max-width:639px) {
  .pdp-page:is([data-product-slug="bp-jc312"], [data-product-slug="bp-363a"], [data-product-slug="bp-168w"]) .pdp-highlights dd { font-size: 19px; }
}
@media (prefers-reduced-motion:reduce) {
  .pdp-page * { scroll-behavior: auto!important; transition: none!important; }
}
