/* Coplost Enterprises — Specimen Desk (product.php only)
   Independent spx-* system. Not pd-* / bloom-copy / a67-tile product patterns. */

.page-product.spx-product {
  --spx-ink: #12141a;
  --spx-slate: #374151;
  --spx-fog: #e8ecf2;
  --spx-paper: #f3f5f8;
  --spx-line: rgba(18, 20, 26, 0.12);
  --spx-cyan: #22d3ee;
  --spx-cyan-ink: #083344;
  --spx-pink: #f472b6;
  --spx-display: "IBM Plex Serif", Georgia, serif;
  --spx-sans: "Oxanium", "Segoe UI", sans-serif;
  --spx-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spx-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
}

.page-product.spx-product.a67-body {
  margin: 0;
  color: var(--spx-ink);
  font-family: var(--spx-sans);
  background: var(--spx-paper);
}

.page-product .a67-root-bare {
  padding: 0;
  overflow: visible;
}

.page-product .a67-main {
  overflow: visible;
}

.spx-world {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  padding: 1.15rem clamp(1rem, 3vw, 2.2rem) 2.5rem;
  overflow-x: clip;
}

.spx-sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 95% 0%, rgba(244, 114, 182, 0.14), transparent 55%),
    radial-gradient(ellipse 45% 35% at 0% 20%, rgba(34, 211, 238, 0.14), transparent 50%),
    linear-gradient(165deg, #fafbfd 0%, var(--spx-fog) 50%, #dce3ec 100%);
}

.spx-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.45;
  animation: spx-drift 16s ease-in-out infinite alternate;
}

.spx-glow-a {
  width: min(40vw, 24rem);
  height: min(40vw, 24rem);
  top: -8%;
  right: -6%;
  background: rgba(34, 211, 238, 0.25);
}

.spx-glow-b {
  width: min(34vw, 20rem);
  height: min(34vw, 20rem);
  bottom: 12%;
  left: -8%;
  background: rgba(244, 114, 182, 0.2);
  animation-delay: -5s;
}

.spx-grid {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(18, 20, 26, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 20, 26, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 55% at 40% 25%, #000 15%, transparent 75%);
}

/* Topbar */
.spx-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
  animation: spx-rise 0.5s var(--spx-ease) both;
}

.spx-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
}

.spx-mark-seal {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  background: var(--spx-ink);
  color: var(--spx-cyan);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  clip-path: polygon(0 18%, 18% 0, 100% 0, 100% 82%, 82% 100%, 0 100%);
  transition: transform 0.35s var(--spx-spring);
}

.spx-mark:hover .spx-mark-seal {
  transform: rotate(-8deg) scale(1.06);
}

.spx-mark-name {
  font-family: var(--spx-display);
  font-size: 1.1rem;
  font-weight: 600;
}

.spx-top-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.95rem;
}

.spx-top-nav a {
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--spx-slate);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.spx-top-nav a:hover {
  color: var(--spx-ink);
}

.spx-top-cta {
  padding: 0.45rem 0.85rem !important;
  border-radius: 0.45rem;
  background: var(--spx-ink) !important;
  color: var(--spx-cyan) !important;
}

.spx-alert {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  background: #fce7f3;
  color: #9d174d;
  font-weight: 650;
  font-size: 0.92rem;
}

/* Desk */
.spx-desk {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1.25rem;
  align-items: start;
  animation: spx-rise 0.55s var(--spx-ease) 0.05s both;
}

/* Gallery */
.spx-gallery {
  display: grid;
  gap: 0.75rem;
}

.spx-viewport {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  background: var(--spx-ink);
  aspect-ratio: 4 / 5;
  border: 1.5px solid var(--spx-line);
  box-shadow: 0 22px 48px rgba(18, 20, 26, 0.12);
}

.spx-viewport img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--spx-ease), filter 0.5s;
}

.spx-viewport[data-mode="frame"] img {
  transform: scale(1);
  filter: none;
}

.spx-viewport[data-mode="macro"] img {
  transform: scale(1.45) translate(-6%, -4%);
  filter: contrast(1.08) saturate(1.12);
}

.spx-viewport[data-mode="foil"] img {
  transform: scale(1.05);
  filter: saturate(0.85) brightness(1.05);
}

.spx-viewport[data-mode="foil"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(125deg, transparent 35%, rgba(34, 211, 238, 0.18) 48%, transparent 62%),
    linear-gradient(rgba(18, 20, 26, 0.15), transparent 40%);
  pointer-events: none;
  mix-blend-mode: screen;
}

.spx-lens {
  position: absolute;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(18, 20, 26, 0.25), 0 12px 28px rgba(18, 20, 26, 0.25);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  background-repeat: no-repeat;
  transition: opacity 0.2s;
  z-index: 2;
  display: none;
}

.spx-viewport[data-mode="macro"] .spx-lens {
  display: block;
}

.spx-viewport.is-lensing .spx-lens {
  opacity: 1;
}

.spx-viewport-tag {
  position: absolute;
  left: 0.9rem;
  bottom: 0.9rem;
  z-index: 3;
  padding: 0.35rem 0.65rem;
  border-radius: 0.4rem;
  background: rgba(18, 20, 26, 0.82);
  color: var(--spx-cyan);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.spx-film {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.spx-film-cell {
  appearance: none;
  border: 1.5px solid var(--spx-line);
  background: #fff;
  border-radius: 1rem;
  padding: 0.45rem;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: transform 0.3s var(--spx-spring), border-color 0.2s, box-shadow 0.3s;
  animation: spx-rise 0.45s var(--spx-ease) both;
  animation-delay: calc(0.08s + var(--i, 0) * 50ms);
}

.spx-film-cell:hover {
  transform: translateY(-3px);
}

.spx-film-cell.is-on {
  border-color: var(--spx-ink);
  box-shadow: 0 10px 24px rgba(18, 20, 26, 0.1);
}

.spx-film-thumb {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 0.7rem;
  overflow: hidden;
  background: var(--spx-fog);
}

.spx-film-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spx-film-thumb.mode-macro img {
  transform: scale(1.5) translate(-8%, -5%);
}

.spx-film-thumb.mode-foil {
  position: relative;
}

.spx-film-thumb.mode-foil::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, transparent 40%, rgba(34, 211, 238, 0.3) 50%, transparent 60%);
}

.spx-film-cell em {
  display: block;
  margin-top: 0.4rem;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--spx-slate);
  padding: 0 0.15rem 0.15rem;
}

.spx-film-cell.is-on em {
  color: var(--spx-ink);
}

/* Sheet */
.spx-sheet {
  padding: 0.25rem 0 0;
}

.spx-kicker {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--spx-slate);
}

.spx-kicker a {
  color: var(--spx-pink);
  text-decoration: none;
}

.spx-kicker a:hover {
  text-decoration: underline;
}

.spx-sheet h1 {
  margin: 0;
  font-family: var(--spx-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.spx-variant {
  margin: 0.45rem 0 0;
  display: inline-block;
  padding: 0.3rem 0.65rem;
  border-radius: 0.4rem;
  background: rgba(244, 114, 182, 0.12);
  color: #9d174d;
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.spx-lede {
  margin: 0.85rem 0 0;
  color: var(--spx-slate);
  font-family: var(--spx-display);
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 40ch;
}

.spx-dials {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.spx-dials li {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.95rem;
  background: #fff;
  border: 1.5px solid var(--spx-line);
}

.spx-dials span {
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--spx-slate);
}

.spx-dials strong {
  font-size: 0.95rem;
  font-weight: 750;
  word-break: break-word;
}

/* Buy panel */
.spx-buy {
  margin-top: 1.35rem;
  padding: 1.2rem 1.15rem 1.3rem;
  border-radius: 1.4rem;
  background: var(--spx-ink);
  color: #f8fafc;
  clip-path: polygon(0 0, 100% 0, 100% 92%, 94% 100%, 0 100%);
}

.spx-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 0.85rem;
  margin-bottom: 1.1rem;
}

.spx-price-label {
  display: block;
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.78);
}

.spx-price {
  margin: 0.15rem 0 0;
  font-family: var(--spx-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--spx-cyan);
}

.spx-badge {
  padding: 0.35rem 0.65rem;
  border-radius: 0.4rem;
  background: rgba(34, 211, 238, 0.15);
  color: var(--spx-cyan);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.spx-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(248, 250, 252, 0.75);
}

.spx-rating i {
  width: 0.7rem;
  height: 0.7rem;
  background: var(--spx-pink);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.spx-packs {
  margin: 0;
  padding: 0;
  border: 0;
}

.spx-packs legend {
  padding: 0;
  margin: 0 0 0.55rem;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.82);
}

.spx-pack-rails {
  display: grid;
  gap: 0.45rem;
}

.spx-pack {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.3s var(--spx-spring);
}

.spx-pack input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.spx-pack:hover {
  transform: translateX(3px);
}

.spx-pack.is-on,
.spx-pack:has(input:checked) {
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.55);
}

.spx-pack-qty {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.7rem;
  background: #fff;
  color: var(--spx-ink);
  font-size: 1.05rem;
  font-weight: 800;
}

.spx-pack-copy strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 750;
}

.spx-pack-copy small {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.78rem;
  color: rgba(248, 250, 252, 0.82);
}

.spx-multiplier {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-top: 0.95rem;
}

.spx-multiplier-label {
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.82);
}

.spx-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
}

.spx-stepper button {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.25s var(--spx-spring);
}

.spx-stepper button:hover {
  background: var(--spx-cyan);
  color: var(--spx-cyan-ink);
  transform: scale(1.06);
}

.spx-stepper input {
  width: 2.4rem;
  border: 0;
  background: transparent;
  text-align: center;
  font: inherit;
  font-weight: 750;
  color: #fff;
  outline: none;
  -moz-appearance: textfield;
}

.spx-stepper input::-webkit-outer-spin-button,
.spx-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.spx-line-total {
  margin: 0 0 0 auto;
  font-size: 0.88rem;
  color: rgba(248, 250, 252, 0.82);
}

.spx-line-total strong {
  color: var(--spx-cyan);
  font-size: 1.05rem;
}

.spx-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.2rem;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  border-radius: 0.9rem;
  transition: transform 0.3s var(--spx-spring), background 0.2s;
}

.spx-btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.spx-btn-fill {
  background: var(--spx-ink);
  color: var(--spx-cyan);
}

.spx-btn-cart {
  width: 100%;
  margin-top: 1.1rem;
  justify-content: space-between;
  background: var(--spx-cyan);
  color: var(--spx-cyan-ink);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 94% 100%, 0 100%);
  padding: 1rem 1.15rem;
}

.spx-btn-cart:hover {
  background: #67e8f9;
}

.spx-fine {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  color: rgba(248, 250, 252, 0.78);
  line-height: 1.4;
}

/* Related specimens */
.spx-kin {
  margin-top: 2.5rem;
  animation: spx-rise 0.55s var(--spx-ease) 0.1s both;
}

.spx-kin-head {
  margin-bottom: 1rem;
}

.spx-kin-head h2 {
  margin: 0.25rem 0 0;
  font-family: var(--spx-display);
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.spx-kin-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(11rem, 14rem);
  gap: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}

.spx-kin-card {
  display: grid;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s var(--spx-spring);
  animation: spx-rise 0.45s var(--spx-ease) both;
  animation-delay: calc(0.05s + var(--i, 0) * 40ms);
}

.spx-kin-card:hover {
  transform: translateY(-5px);
}

.spx-kin-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: 1.15rem;
  overflow: hidden;
  background: #fff;
  border: 1.5px solid var(--spx-line);
}

.spx-kin-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--spx-ease);
}

.spx-kin-card:hover .spx-kin-media img {
  transform: scale(1.08);
}

.spx-kin-media em {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  padding: 0.25rem 0.45rem;
  border-radius: 0.3rem;
  background: var(--spx-ink);
  color: var(--spx-cyan);
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.spx-kin-body {
  display: grid;
  gap: 0.2rem;
  padding: 0 0.15rem;
}

.spx-kin-body strong {
  font-family: var(--spx-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

.spx-kin-body span {
  font-size: 0.88rem;
  font-weight: 750;
  color: var(--spx-slate);
}

/* Miss */
.spx-miss-world {
  display: grid;
  align-content: start;
}

.spx-miss {
  max-width: 26rem;
  margin: 3rem auto;
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: 1.4rem;
  background: #fff;
  border: 1.5px solid var(--spx-line);
}

.spx-miss h1 {
  margin: 0.35rem 0 0;
  font-family: var(--spx-display);
  font-size: 1.85rem;
  font-weight: 700;
}

.spx-miss > p {
  margin: 0.45rem 0 1.15rem;
  color: var(--spx-slate);
}

/* Foot */
.spx-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 2.5rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--spx-line);
  color: var(--spx-slate);
  font-size: 0.82rem;
  font-weight: 600;
}

.spx-foot p { margin: 0; }

.spx-foot nav {
  display: flex;
  gap: 0.85rem;
}

.spx-foot a {
  color: var(--spx-ink);
  font-weight: 700;
  text-decoration: none;
}

.spx-foot a:hover {
  color: var(--spx-pink);
}

@keyframes spx-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes spx-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-4%, 6%) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .spx-topbar,
  .spx-desk,
  .spx-kin,
  .spx-film-cell,
  .spx-kin-card,
  .spx-glow {
    animation: none !important;
  }
}

@media (max-width: 960px) {
  .spx-desk {
    grid-template-columns: 1fr;
  }

  .spx-buy {
    clip-path: none;
  }
}

@media (max-width: 560px) {
  .spx-dials {
    grid-template-columns: 1fr;
  }

  .spx-line-total {
    margin-left: 0;
    width: 100%;
  }

  .spx-world {
    padding-bottom: 4.5rem;
  }
}
