/**
 * Plinth Lot — product detail instrument
 * Unique to product.php · Bodoni Moda + Manrope
 * Independent of a36-pdp AND Specimen Desk patterns
 */

:root {
  --pl-stone: #e6e9ee;
  --pl-panel: #f7f8fa;
  --pl-ink: #111318;
  --pl-mute: #616975;
  --pl-gilt: #b8953b;
  --pl-night: #1c2430;
  --pl-line: rgba(17, 19, 24, 0.1);
  --pl-display: "Bodoni Moda", Georgia, serif;
  --pl-body: "Manrope", "Segoe UI", sans-serif;
  --pl-mono: "Martian Mono", ui-monospace, monospace;
  --pl-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pl-max: 1140px;
}

*,
*::before,
*::after { box-sizing: border-box; }

body.pl-pdp {
  margin: 0;
  min-height: 100vh;
  font-family: var(--pl-body);
  color: var(--pl-ink);
  background: var(--pl-stone);
  -webkit-font-smoothing: antialiased;
}

body.pl-pdp a { color: inherit; text-decoration: none; }
body.pl-pdp button,
body.pl-pdp input { font: inherit; color: inherit; }
body.pl-pdp .pl-root button:not(.pl-btn) {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}
body.pl-pdp button.pl-btn {
  cursor: pointer;
  border: none;
}

.pl-root {
  position: relative;
  min-height: 100vh;
  overflow-x: visible;
  padding-bottom: calc(var(--kb-keybed-h, 132px) + 2.5rem);
}

.pl-hall {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 50% 35% at 50% 0%, rgba(184, 149, 59, 0.14), transparent 60%),
    linear-gradient(185deg, #dde2e9 0%, var(--pl-stone) 40%, #e9ecf1 100%);
}

.pl-hall::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

/* Mast */
.pl-mast {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--pl-max);
  margin: 0 auto;
  padding: clamp(1.2rem, 3.5vw, 2.1rem) clamp(1.1rem, 4vw, 2rem) 0;
}

.pl-brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.pl-brand-mark {
  font-family: var(--pl-mono);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pl-gilt);
}

.pl-brand strong {
  font-family: var(--pl-display);
  font-size: clamp(1.55rem, 4.2vw, 2.55rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 14ch;
  overflow-wrap: anywhere;
}

.pl-brand em {
  font-style: italic;
  font-family: var(--pl-display);
  font-size: 0.95rem;
  color: var(--pl-mute);
  font-weight: 500;
}

.pl-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  justify-content: flex-end;
  font-size: 0.8rem;
  color: var(--pl-mute);
  max-width: min(22rem, 48vw);
  min-width: 0;
}

.pl-crumb a:hover { color: var(--pl-gilt); }
.pl-crumb [aria-current="page"] {
  color: var(--pl-ink);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 16rem;
}

/* Exhibition layout */
.pl-exhibit {
  position: relative;
  z-index: 2;
  max-width: var(--pl-max);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.1rem, 4vw, 2rem) 1.75rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.pl-label {
  min-width: 0;
  color: var(--pl-ink);
}

.pl-label h1,
.pl-price,
.pl-field-head strong {
  color: var(--pl-ink);
}

/* Circular orbit gallery */
.pl-orbit-wrap {
  display: flex;
  justify-content: center;
  padding: 0.75rem 0 2rem;
  overflow: visible;
}

.pl-orbit {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
  overflow: visible;
}

.pl-orbit-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(17, 19, 24, 0.18);
  pointer-events: none;
}

.pl-orbit-ring:nth-child(2) {
  inset: 8%;
  border-style: solid;
  border-color: rgba(184, 149, 59, 0.25);
}

.pl-pedestal {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--pl-night);
  box-shadow:
    0 30px 60px rgba(17, 19, 24, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  z-index: 1;
}

.pl-pedestal img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 10%;
  display: block;
  background: radial-gradient(circle at 50% 42%, #2a3444 0%, var(--pl-night) 70%);
  transition: object-position 0.5s var(--pl-ease), filter 0.5s, transform 0.7s var(--pl-ease);
}

.pl-orbit[data-view="0"] .pl-pedestal img { object-position: 50% 50%; filter: none; }
.pl-orbit[data-view="1"] .pl-pedestal img { object-position: 25% 35%; filter: contrast(1.08) saturate(1.1); }
.pl-orbit[data-view="2"] .pl-pedestal img { object-position: 75% 55%; filter: sepia(0.12) brightness(1.04); }
.pl-orbit[data-view="3"] .pl-pedestal img { object-position: 45% 75%; filter: grayscale(0.15) contrast(1.1); }

.pl-sat {
  position: absolute;
  width: 58px;
  height: 58px;
  margin: -29px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 8px 20px rgba(17, 19, 24, 0.18);
  cursor: pointer;
  padding: 0;
  background: #cfd5de;
  z-index: 3;
  transition: transform 0.3s var(--pl-ease), box-shadow 0.3s;
}

.pl-sat img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 10%;
  display: block;
  background: #1a222c;
}

.pl-sat[data-view="1"] img { object-position: 25% 35%; }
.pl-sat[data-view="2"] img { object-position: 75% 55%; }
.pl-sat[data-view="3"] img { object-position: 45% 75%; }

.pl-sat:nth-child(3) { top: 6%; left: 50%; }
.pl-sat:nth-child(4) { top: 50%; right: 2%; left: auto; margin-right: -29px; margin-left: 0; }
.pl-sat:nth-child(5) { bottom: 6%; top: auto; left: 50%; margin-top: 0; margin-bottom: -29px; }
.pl-sat:nth-child(6) { top: 50%; left: 2%; }

.pl-sat:hover { transform: scale(1.08); }
.pl-sat.is-on {
  box-shadow: 0 0 0 3px var(--pl-gilt), 0 8px 20px rgba(17, 19, 24, 0.2);
  transform: scale(1.1);
}

.pl-orbit-caption {
  position: absolute;
  left: 50%;
  bottom: -1.35rem;
  transform: translateX(-50%);
  font-family: var(--pl-mono);
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pl-mute);
  white-space: nowrap;
  z-index: 4;
}

/* Label column */
.pl-kicker {
  margin: 0 0 0.5rem;
  font-family: var(--pl-mono);
  font-size: 0.55rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pl-gilt);
}

.pl-blurb {
  margin: 0 0 1.1rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--pl-mute);
  max-width: 42ch;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pl-label h1 {
  margin: 0 0 0.75rem;
  font-family: var(--pl-display);
  font-size: clamp(1.65rem, 3.6vw, 2.55rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.pl-tagline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--pl-line);
}

.pl-price {
  font-family: var(--pl-display);
  font-size: clamp(1.9rem, 3.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.pl-price s {
  font-size: 1rem;
  color: var(--pl-mute);
  margin-right: 0.4rem;
}

.pl-stock {
  font-family: var(--pl-mono);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pl-mute);
}

.pl-stock.is-out { color: #c0392b; }

.pl-error {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  background: rgba(192, 57, 43, 0.08);
  border: 1px solid rgba(192, 57, 43, 0.25);
  color: #8b2e24;
  font-weight: 600;
  font-size: 0.9rem;
}

.pl-field {
  margin-bottom: 1.25rem;
}

.pl-field-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  font-family: var(--pl-mono);
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pl-mute);
}

.pl-field-head strong {
  font-family: var(--pl-display);
  font-size: 1.05rem;
  font-style: italic;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--pl-ink);
  font-weight: 600;
}

/* Plinth steps — size */
.pl-plinths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: end;
}

.pl-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  padding: 0.85rem 0.4rem 0.7rem;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--pl-mute);
  transition: color 0.25s;
}

.pl-step input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pl-step-block {
  width: 100%;
  border-radius: 6px 6px 2px 2px;
  background: rgba(17, 19, 24, 0.08);
  transition: background 0.3s, height 0.35s var(--pl-ease), box-shadow 0.3s;
}

.pl-step:nth-child(1) .pl-step-block { height: 28px; }
.pl-step:nth-child(2) .pl-step-block { height: 44px; }
.pl-step:nth-child(3) .pl-step-block { height: 60px; }

.pl-step b {
  font-family: var(--pl-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: inherit;
}

.pl-step.is-on,
.pl-step:has(input:checked) {
  color: var(--pl-ink);
}

.pl-step.is-on b,
.pl-step:has(input:checked) b {
  color: var(--pl-ink);
}

.pl-step.is-on .pl-step-block,
.pl-step:has(input:checked) .pl-step-block {
  background: var(--pl-night);
  box-shadow: 0 10px 24px rgba(17, 19, 24, 0.18);
}

/* Origin plaques */
.pl-plaques {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pl-plaque {
  position: relative;
  padding: 0.65rem 0.95rem;
  border: 1px solid var(--pl-line);
  background: var(--pl-panel);
  cursor: pointer;
  font-family: var(--pl-display);
  font-size: 0.92rem;
  font-style: italic;
  font-weight: 500;
  color: var(--pl-mute);
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--pl-ease);
}

.pl-plaque input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pl-plaque:hover {
  transform: translateY(-1px);
  border-color: rgba(184, 149, 59, 0.45);
}

.pl-plaque.is-on,
.pl-plaque:has(input:checked) {
  background: var(--pl-gilt);
  border-color: var(--pl-gilt);
  color: var(--pl-ink);
}

/* Qty + actions */
.pl-buy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.pl-qty {
  display: inline-grid;
  grid-template-columns: 2.5rem 3.5rem 2.5rem;
  border: 1px solid var(--pl-line);
  background: var(--pl-panel);
  align-self: stretch;
}

.pl-qty button {
  height: 100%;
  min-height: 2.85rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--pl-ink);
  transition: background 0.2s;
}

.pl-qty button:hover { background: rgba(184, 149, 59, 0.15); }

.pl-qty input {
  width: 100%;
  height: 100%;
  min-height: 2.85rem;
  border: none;
  border-left: 1px solid var(--pl-line);
  border-right: 1px solid var(--pl-line);
  text-align: center;
  font-family: var(--pl-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--pl-ink);
  background: transparent;
  -moz-appearance: textfield;
}

.pl-qty input::-webkit-outer-spin-button,
.pl-qty input::-webkit-inner-spin-button { -webkit-appearance: none; }

.pl-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  flex: 1 1 14rem;
  min-width: min(100%, 14rem);
}

body.pl-pdp .pl-btn,
.pl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.9rem 1.1rem;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 8px;
  color: var(--pl-ink);
  transition: transform 0.25s var(--pl-ease), background 0.25s, opacity 0.25s;
}

body.pl-pdp .pl-btn:hover:not(.is-disabled),
.pl-btn:hover:not(.is-disabled) { transform: translateY(-1px); }

body.pl-pdp .pl-btn--night,
.pl-btn--night {
  background: #1c2430 !important;
  color: #ffffff !important;
}

body.pl-pdp .pl-btn--night:hover:not(.is-disabled),
.pl-btn--night:hover:not(.is-disabled) {
  background: #121820 !important;
}

body.pl-pdp .pl-btn--gilt,
.pl-btn--gilt {
  background: #b8953b !important;
  color: #111318 !important;
}

body.pl-pdp .pl-btn--gilt:hover:not(.is-disabled),
.pl-btn--gilt:hover:not(.is-disabled) {
  background: #c9a84a !important;
}

body.pl-pdp .pl-btn--ghost,
.pl-btn--ghost {
  background: #f7f8fa !important;
  box-shadow: inset 0 0 0 1.5px var(--pl-line);
  color: #111318 !important;
}

body.pl-pdp .pl-btn.is-disabled,
.pl-btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.pl-meta {
  font-family: var(--pl-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pl-mute);
}

/* Wall captions — not tabs/folios */
.pl-wall {
  position: relative;
  z-index: 2;
  max-width: var(--pl-max);
  margin: 0 auto 1.75rem;
  padding: 0 clamp(1.1rem, 4vw, 2rem);
}

.pl-wall-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.pl-caption {
  padding: 1.25rem 1.2rem;
  background: var(--pl-panel);
  border-top: 3px solid var(--pl-gilt);
  min-height: 100%;
  color: var(--pl-ink);
}

.pl-caption h2 {
  margin: 0 0 0.65rem;
  font-family: var(--pl-display);
  font-size: 1.15rem;
  font-weight: 600;
  font-style: italic;
  letter-spacing: -0.02em;
  color: var(--pl-ink);
}

.pl-caption ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--pl-mute);
  font-size: 0.92rem;
  line-height: 1.5;
}

.pl-caption li { margin-bottom: 0.3rem; color: var(--pl-mute); }

.pl-caption li strong {
  color: var(--pl-ink);
  font-weight: 700;
}

.pl-caption table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.pl-caption th,
.pl-caption td {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--pl-line);
  text-align: left;
}

.pl-caption th {
  font-family: var(--pl-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pl-mute);
  font-weight: 600;
  width: 42%;
}

.pl-caption td {
  font-weight: 600;
  color: var(--pl-ink);
}

/* Also on view */
.pl-also {
  position: relative;
  z-index: 2;
  max-width: var(--pl-max);
  margin: 0 auto 1.5rem;
  padding: 0 clamp(1.1rem, 4vw, 2rem);
}

.pl-also h2 {
  margin: 0 0 0.9rem;
  font-family: var(--pl-display);
  font-size: 1.35rem;
  font-style: italic;
  font-weight: 600;
}

.pl-also-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.pl-also-item {
  display: grid;
  gap: 0.5rem;
}

.pl-also-item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  object-position: center;
  padding: 10%;
  background: linear-gradient(160deg, #e8ebf0, #d5dae2);
  filter: none;
  transition: transform 0.4s var(--pl-ease), box-shadow 0.35s;
}

.pl-also-item:hover img {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(17, 19, 24, 0.12);
}

.pl-also-item strong {
  font-family: var(--pl-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--pl-ink);
  overflow-wrap: anywhere;
}

.pl-also-item span {
  font-size: 0.85rem;
  color: var(--pl-mute);
}

.pl-notes {
  position: relative;
  z-index: 2;
  max-width: var(--pl-max);
  margin: 0 auto 1.5rem;
  padding: 0 clamp(1.1rem, 4vw, 2rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--pl-line);
}

.pl-note {
  background: var(--pl-panel);
  padding: 1rem 1.1rem;
}

.pl-note b {
  display: block;
  font-family: var(--pl-display);
  font-style: italic;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--pl-ink);
}

.pl-note p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--pl-mute);
  line-height: 1.45;
}

.pl-miss {
  position: relative;
  z-index: 2;
  max-width: 28rem;
  margin: 0 auto;
  padding: clamp(3rem, 10vw, 5rem) 1.25rem;
  text-align: center;
}

.pl-miss h1 {
  margin: 0 0 0.5rem;
  font-family: var(--pl-display);
  font-size: 2.1rem;
  font-style: italic;
}

.pl-miss p {
  margin: 0 0 1.25rem;
  color: var(--pl-mute);
}

.pl-colophon {
  position: relative;
  z-index: 2;
  max-width: var(--pl-max);
  margin: 0 auto;
  padding: 1.25rem clamp(1.1rem, 4vw, 2rem) 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  border-top: 1px solid var(--pl-line);
  font-size: 0.85rem;
  color: var(--pl-mute);
}

.pl-colophon strong {
  font-family: var(--pl-display);
  font-style: italic;
  font-weight: 600;
  color: var(--pl-ink);
}

[data-pl-rise] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--pl-ease), transform 0.6s var(--pl-ease);
  transition-delay: calc(var(--pl-delay, 0) * 80ms);
}

[data-pl-rise].is-in {
  opacity: 1;
  transform: none;
}

/* Failsafe if JS is delayed — never leave the lot blank */
.pl-root[data-pl-ready="0"] [data-pl-rise] {
  animation: pl-rise-fallback 0.01s linear 1.4s forwards;
}

@keyframes pl-rise-fallback {
  to { opacity: 1; transform: none; }
}

body.pl-pdp .a77-bare-main {
  display: block;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

@media (max-width: 920px) {
  .pl-exhibit {
    grid-template-columns: 1fr;
  }

  .pl-orbit-wrap {
    padding-bottom: 2.25rem;
  }

  .pl-orbit {
    width: min(100%, 340px);
  }

  .pl-crumb {
    max-width: 100%;
  }

  .pl-wall-rail,
  .pl-notes {
    grid-template-columns: 1fr;
  }

  .pl-also-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .pl-mast {
    flex-direction: column;
    align-items: flex-start;
  }

  .pl-brand strong {
    max-width: none;
    font-size: clamp(1.45rem, 7vw, 2rem);
  }

  .pl-crumb { justify-content: flex-start; }

  .pl-buy-row {
    flex-direction: column;
    align-items: stretch;
  }

  .pl-qty { width: 100%; max-width: 12rem; }

  .pl-actions { grid-template-columns: 1fr; width: 100%; }

  .pl-sat {
    width: 48px;
    height: 48px;
    margin: -24px;
  }

  .pl-sat:nth-child(4) { margin-right: -24px; margin-left: 0; }
  .pl-sat:nth-child(5) { margin-bottom: -24px; margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  [data-pl-rise],
  .pl-pedestal img,
  .pl-also-item img {
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}
