/* ==========================================================================
   Product detail page - machined editorial identity
   Media stage with three essential views (product / drawing / in-situ),
   blueprint stage background, mono codes, coded specs, fixed-teal guarantee
   panel. Entrance animations run once on load (no scroll engines).
   ========================================================================== */

.pdp {
  padding-block: 26px clamp(56px, 8vw, 96px);
  color: var(--ds-text);
  font-family: var(--font-body);
  background: var(--ds-bg);
  min-height: calc(100svh - var(--luann-h, 0px) - var(--mnav-row1, 64px));
}

.pdp-inner {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--container-pad, 24px);
}

/* ---------- breadcrumb ---------- */

.pdp-crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ds-text-muted);
  animation: pdpUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

.pdp-crumb a {
  color: var(--ds-text-muted);
  text-decoration: none;
  transition: color 140ms ease;
}

.pdp-crumb a:hover { color: var(--ds-primary); }

.pdp-crumb-sep { opacity: 0.5; }

.pdp-crumb-here {
  color: var(--ds-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40ch;
}

/* ---------- grid ---------- */

.pdp-grid {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: clamp(20px, 3vw, 34px);
  align-items: start;
}

/* ---------- media stage ---------- */

.pdp-stage {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--ds-border);
  background:
    radial-gradient(640px 300px at 50% -12%,
      color-mix(in srgb, var(--ds-primary) 7%, transparent), transparent 70%),
    var(--ds-surface);
  box-shadow: var(--shadow-1);
  padding: 18px 18px 16px;
  animation: pdpUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}

.pdp-stage-beam {
  position: absolute;
  inset-inline: 12%;
  top: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ds-primary) 60%, transparent), transparent);
  pointer-events: none;
}

.pdp-views { position: relative; }

.pdp-view {
  display: none;
  margin: 0;
}

.pdp-view.is-on {
  display: block;
  position: relative;
  animation: pdpViewIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* a view can hold several images: only the active one is shown */
.pdp-view .pdp-view-img { display: none; }
.pdp-view .pdp-view-img.is-on { display: block; }

/* ---- frame plate: gives every group its own visible surface so a
   drawing is never mistaken for a product photo ---- */
.pdp-frameplate {
  position: relative;
  border-radius: calc(var(--radius-lg) - 4px);
  overflow: hidden;
}

/* product shots are cut out on white, so the stage is white too and the
   image blends into it with no visible empty margin */
.pdp-frameplate-main,
.pdp-frameplate-situ {
  background: #ffffff;
}

/* drawings get the blueprint treatment: paper-white ground, a ruled
   border and a title block, so the tab label is not the only clue */
/* plain paper ground: the ruled grid I had here was a pattern used nowhere
   else on the site, so it read as a glitch rather than as blueprint paper */
.pdp-frameplate-drawing {
  background: #ffffff;
  border: 1px solid var(--ds-border);
  padding: 18px 18px 46px;
}

.pdp-frameplate-drawing .pdp-view-img {
  background: transparent;
  max-height: 430px;
  mix-blend-mode: multiply;
}

/* ruled corner ticks, echoing the old SVG sheet */
.pdp-plate-tick {
  position: absolute;
  inset: 8px;
  pointer-events: none;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 16px 1px no-repeat,
    linear-gradient(currentColor, currentColor) 0 0 / 1px 16px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 100% / 16px 1px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 100% / 1px 16px no-repeat;
  color: rgba(0, 0, 0, 0.32);
}

.pdp-plate-block {
  position: absolute;
  inset-inline: 8px;
  bottom: 8px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.16);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.62);
}

.pdp-plate-model { color: rgba(0, 0, 0, 0.82); }

@keyframes pdpViewIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.pdp-view-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 470px;
  object-fit: contain;
  border-radius: calc(var(--radius-lg) - 6px);
  background: #ffffff;
}

.pdp-view-img-cover {
  object-fit: cover;
}

.pdp-view-tag {
  position: absolute;
  top: 28px;
  inset-inline-start: 28px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ds-text-muted);
  background: color-mix(in srgb, var(--ds-surface) 84%, transparent);
  border: 1px solid var(--ds-border);
  border-radius: 999px;
  padding: 5px 11px;
  pointer-events: none;
}

/* ---------- technical drawing sheet ---------- */

.pdp-sheet {
  background:
    linear-gradient(180deg, var(--ds-surface) 0%, var(--ds-bg) 100%);
  border-radius: calc(var(--radius-lg) - 6px);
  padding: 8px;
}

.pdp-sheet-svg { display: block; width: 100%; height: auto; }

.pdp-frame {
  fill: none;
  stroke: color-mix(in srgb, var(--ds-text) 30%, transparent);
  stroke-width: 1;
  rx: 6;
}

.pdp-tick {
  fill: none;
  stroke: var(--ds-primary);
  stroke-width: 2;
}

.pdp-line {
  fill: none;
  stroke: color-mix(in srgb, var(--ds-text) 62%, transparent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pdp-thin {
  fill: none;
  stroke: color-mix(in srgb, var(--ds-text) 28%, transparent);
  stroke-width: 1;
}

.pdp-ghost {
  fill: none;
  stroke: color-mix(in srgb, var(--ds-primary) 24%, transparent);
  stroke-width: 1;
  stroke-dasharray: 5 5;
}

.pdp-thinfill {
  fill: color-mix(in srgb, var(--ds-primary) 7%, transparent);
  stroke: color-mix(in srgb, var(--ds-text) 28%, transparent);
  stroke-width: 1;
}

.pdp-dim {
  stroke: var(--ds-primary);
  stroke-width: 1;
}

.pdp-dim-label {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--ds-primary);
  letter-spacing: 0.08em;
}

.pdp-block {
  font-family: var(--font-mono);
  font-size: 9.5px;
  fill: var(--ds-text-muted);
  letter-spacing: 0.12em;
}

.pdp-block-strong {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  fill: var(--ds-text);
  letter-spacing: 0.12em;
}

/* ---------- view tabs ---------- */

.pdp-viewtabs {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.pdp-viewtab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--ds-border);
  background: var(--ds-surface);
  color: var(--ds-text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.pdp-viewtab:hover {
  color: var(--ds-text);
  border-color: color-mix(in srgb, var(--ds-primary) 40%, var(--ds-border));
}

.pdp-viewtab.is-on {
  color: var(--ds-primary);
  border-color: color-mix(in srgb, var(--ds-primary) 55%, transparent);
  background: var(--ds-primary-soft);
}

/* ---------- info panel ---------- */

.pdp-info {
  display: grid;
  gap: 18px;
  animation: pdpUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.pdp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ds-primary);
}

.pdp-eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--ds-primary);
  border-radius: 2px;
}

.pdp-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(27px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.005em;
}

.pdp-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pdp-code-chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ds-text-muted);
  border: 1px solid var(--ds-border);
  border-radius: 6px;
  padding: 5px 10px;
  background: var(--ds-surface);
}

.pdp-code-chip.is-teal {
  color: var(--ds-primary);
  border-color: color-mix(in srgb, var(--ds-primary) 45%, transparent);
  background: var(--ds-primary-soft);
}

.pdp-variants {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pdp-variant {
  font-size: 11px;
  font-weight: 600;
  color: var(--ds-text-muted);
  border: 1px dashed var(--ds-border);
  border-radius: 999px;
  padding: 4px 11px;
}

/* guarantee: fixed brand palette panel (matches announcement bar) */

.pdp-guarantee {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 17px;
  border-radius: var(--radius-md);
  color: var(--lu-neutral-0);
  background: linear-gradient(135deg, var(--lu-deep-teal) 0%, var(--lu-teal-700) 100%);
  border: 1px solid color-mix(in srgb, var(--lu-mint) 28%, transparent);
  box-shadow: var(--shadow-1);
  position: relative;
  overflow: hidden;
}

.pdp-guarantee::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--lu-mint) 70%, transparent), transparent);
}

.pdp-guarantee-shield {
  flex: none;
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: var(--lu-mint);
  border: 1px solid color-mix(in srgb, var(--lu-mint) 40%, transparent);
  background: color-mix(in srgb, var(--lu-neutral-0) 8%, transparent);
}

.pdp-guarantee-shield b {
  position: absolute;
  bottom: 4px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.pdp-guarantee strong {
  display: block;
  font-size: 13.5px;
  letter-spacing: 0.01em;
}

.pdp-guarantee p {
  margin: 2px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: color-mix(in srgb, var(--lu-neutral-0) 76%, transparent);
}

.pdp-block-title {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ds-text-muted);
}

.pdp-desc p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ds-text);
}

/* coded specifications */

.pdp-specs { min-width: 0; }

.pdp-specs-list {
  margin: 0;
  border-top: 1px solid var(--ds-border);
}

.pdp-spec-row {
  display: grid;
  grid-template-columns: minmax(110px, 38%) 1fr;
  gap: 12px;
  padding: 9px 2px;
  border-bottom: 1px dashed var(--ds-border);
}

.pdp-spec-row dt {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ds-text-muted);
  padding-top: 2px;
}

.pdp-spec-row dd {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
}

.pdp-spec-note {
  margin: 10px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--ds-text-muted);
}

.pdp-spec-note svg { color: var(--ds-primary); flex: none; }

/* actions */

.pdp-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.pdp-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--ds-primary);
  color: var(--ds-primary-text);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: var(--shadow-1);
  transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.pdp-cta:hover {
  background: var(--ds-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

.pdp-back {
  font-size: 12px;
  font-weight: 600;
  color: var(--ds-text-muted);
  text-decoration: none;
  transition: color 140ms ease;
}

.pdp-back:hover { color: var(--ds-primary); }

[dir="rtl"] .pdp-cta svg { transform: scaleX(-1); }

.pdp-quote-note {
  margin: 0;
  font-size: 11px;
  color: var(--ds-text-muted);
}

/* ---------- entrance ---------- */

@keyframes pdpUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .pdp-grid { grid-template-columns: 1fr; }
  .pdp-view-img { max-height: 380px; }
}

@media (max-width: 620px) {
  .pdp { padding-block: 18px 56px; }
  .pdp-stage { padding: 12px 12px 12px; }
  .pdp-view-tag { top: 20px; inset-inline-start: 20px; }
  .pdp-viewtab { padding: 8px 12px; font-size: 9px; }
  .pdp-cta { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .pdp-crumb,
  .pdp-stage,
  .pdp-info,
  .pdp-view.is-on { animation: none; }
  .pdp-cta,
  .pdp-viewtab,
  .pdp-back,
  .pdp-crumb a { transition: none; }
}


/* ---------- multi-image controls inside a view ---------- */

.pdp-slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--ds-border);
  background: color-mix(in srgb, var(--ds-surface) 88%, transparent);
  color: var(--ds-text);
  cursor: pointer;
  opacity: 0;
  transition: opacity 180ms ease, background 180ms ease, border-color 180ms ease;
}

.pdp-view:hover .pdp-slide-nav,
.pdp-slide-nav:focus-visible {
  opacity: 1;
}

.pdp-slide-nav:hover {
  background: var(--ds-surface);
  border-color: color-mix(in srgb, var(--ds-primary) 55%, var(--ds-border));
}

.pdp-slide-prev { inset-inline-start: 14px; }
.pdp-slide-next { inset-inline-end: 14px; }

.pdp-slide-dots {
  position: absolute;
  bottom: 16px;
  inset-inline: 0;
  display: flex;
  justify-content: center;
  gap: 7px;
}

.pdp-slide-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--ds-border);
  background: color-mix(in srgb, var(--ds-surface) 80%, transparent);
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.pdp-slide-dot.is-on {
  background: var(--ds-primary);
  transform: scale(1.35);
}

.pdp-view-count {
  margin-inline-start: 8px;
  opacity: 0.75;
}

/* touch devices have no hover: keep the arrows visible */
@media (hover: none) {
  .pdp-slide-nav { opacity: 1; }
}


/* ---- view tabs: always present, so the group a picture belongs to is
   readable at a glance even when a product has only one group ---- */
.pdp-viewtab.is-on {
  color: var(--ds-text);
  border-color: var(--ds-text);
  background: var(--ds-surface);
}

/* small badge showing how many images the group holds */
.pdp-viewtab-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--ds-bg);
  border: 1px solid var(--ds-border);
  font-size: 9px;
  line-height: 1;
}

.pdp-viewtab.is-on .pdp-viewtab-n {
  background: var(--ds-text);
  border-color: var(--ds-text);
  color: var(--ds-surface);
}


/* ---- thumbnail strip under the stage ---- */
.pdp-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pdp-thumb {
  position: relative;
  width: 64px;
  height: 64px;
  padding: 0;
  flex: 0 0 auto;
  border: 1px solid var(--ds-border);
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.62;
  transition: opacity 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.pdp-thumb:hover,
.pdp-thumb:focus-visible {
  opacity: 1;
  transform: translateY(-2px);
}

.pdp-thumb.is-on {
  opacity: 1;
  border-color: var(--ds-text);
  box-shadow: 0 0 0 1px var(--ds-text);
}

.pdp-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* drawings keep their paper ground so the thumb still reads as a drawing */
.pdp-view[data-pdp-view="drawing"] .pdp-thumb { background: #fdfdfb; }
.pdp-view[data-pdp-view="drawing"] .pdp-thumb-img {
  object-fit: contain;
  mix-blend-mode: multiply;
  padding: 4px;
}

@media (max-width: 560px) {
  .pdp-thumb { width: 54px; height: 54px; }
}
