.detail-page {
  position: relative;
  z-index: 2;
  padding: 20px 0 48px;
}

#particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.85;
}

.container {
  width: min(1420px, calc(100% - 48px));
  margin: 0 auto;
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  margin-bottom: 30px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
}

.brand-mark:hover,
.back-btn:hover {
  text-decoration: none;
}

.logo {
  display: block;
  width: 150px;
  height: 150px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffd700;
  font-size: 1.08rem;
}

.main-content {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.78fr);
  gap: 68px;
  margin-bottom: 70px;
}

.gallery {
  position: relative;
}

.gallery-heading,
.panel-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.current-version-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.detail-kicker {
  margin: 0;
  color: rgba(255, 215, 0, 0.68);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.panel-heading h3,
.panel-heading h2 {
  margin: 0;
  font-size: 1.32rem;
  color: #f3ead4;
}

.panel-heading-compact {
  margin-bottom: 16px;
}

.current-version-title {
  margin: 0;
  font-size: clamp(1.7rem, 2.6vw, 2.25rem);
  line-height: 1.08;
  color: #f3ead4;
}

.adult-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 4px 10px;
  border: 1px solid rgba(255, 214, 117, 0.48);
  border-radius: 999px;
  background: rgba(25, 10, 42, 0.88);
  color: #ffd675;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.adult-badge[hidden] {
  display: none !important;
}

.main-image {
  display: block;
  width: min(100%, 464px);
  height: auto;
  aspect-ratio: 4 / 5;
  margin-inline: auto;
  object-fit: contain;
  border-radius: 16px;
  border: 2px solid rgba(212, 160, 23, 0.3);
  background: rgba(40, 25, 80, 0.4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  cursor: zoom-in;
  transition: transform 0.4s ease, border-color 0.3s ease, box-shadow 0.3s ease, opacity 0.15s ease;
}

.main-image:hover {
  transform: scale(1.02);
  border-color: #ffd700;
  box-shadow: 0 30px 70px rgba(255, 215, 0, 0.25);
}

.thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  justify-content: center;
}

.thumb {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.75;
  transition: transform 0.3s ease, border-color 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
}

.thumb.active,
.thumb:hover {
  border-color: #ffd700;
  opacity: 1;
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.info-copy h1 {
  margin-bottom: 8px;
  font-size: clamp(2.4rem, 5vw, 2.8rem);
  color: #ffd700;
  text-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
}

.subtitle {
  margin: 10px 0 18px;
  color: rgba(196, 181, 253, 0.82);
  font-size: 1.05rem;
  line-height: 1.5;
}

.price {
  font-size: clamp(1.45rem, 4vw, 2rem);
  color: #ffd700;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.versions-panel,
.details-panel,
.order-form {
  padding: 28px;
  border-radius: 18px;
  backdrop-filter: blur(8px);
}

.versions-panel {
  border: 1px solid rgba(212, 160, 23, 0.18);
  background: rgba(34, 24, 67, 0.4);
}

.details-panel {
  border: 1px solid rgba(212, 160, 23, 0.12);
  background: rgba(20, 14, 40, 0.42);
}

.order-form {
  border: 1px solid rgba(212, 160, 23, 0.28);
  background: rgba(40, 25, 80, 0.5);
}

.version-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
  gap: 12px;
  align-items: stretch;
}

.version-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(212, 160, 23, 0.3);
  border-radius: 12px;
  background: rgba(20, 10, 40, 0.72);
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.version-item:hover,
.version-item.active {
  transform: translateY(-2px);
  border-color: rgba(255, 215, 0, 0.62);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
}

.version-item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.version-item p,
.version-name {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.82rem;
  line-height: 1.35;
}

.version-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 6px;
  overflow-wrap: anywhere;
}

.version-price {
  color: #ffd700;
  font-size: 0.88rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.version-price-unavailable {
  color: rgba(255, 255, 255, 0.64);
  font-weight: 400;
}

.adult-badge-inline {
  width: fit-content;
  padding: 4px 10px;
  font-size: 0.72rem;
}

.version-item-locked,
.version-item-locked:hover {
  cursor: default;
  transform: none;
  box-shadow: none;
}

.locked-version-preview {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.locked-version-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  text-shadow: 0 2px 8px #000;
}

.version-lock-note {
  color: #c4b5fd;
  font-size: 0.75rem;
  line-height: 1.4;
}

.adult-consent {
  margin-top: 20px;
  color: #e0d4ff;
  line-height: 1.6;
}

.adult-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.adult-consent-actions button {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(212, 160, 23, 0.5);
  border-radius: 10px;
  background: #24163f;
  color: #f3ead4;
  font: inherit;
  cursor: pointer;
}

.adult-consent-actions button[value="adult"] {
  background: #ffd700;
  color: #24163f;
}

.adult-consent-actions button:focus-visible {
  outline: 3px solid #ffd700;
  outline-offset: 3px;
}

.restricted-figure-panel {
  max-width: 760px;
  margin: 24px auto;
}

.details-panel {
  color: #e0d4ff;
  line-height: 1.7;
}

.details p {
  margin: 0;
}

.details ul {
  margin-top: 12px;
  padding-left: 0;
  list-style: none;
}

.details li {
  position: relative;
  padding-left: 22px;
}

.details li + li {
  margin-top: 10px;
}

.details li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: #ffd700;
}

.order-form form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-form label {
  color: #c4b5fd;
  font-weight: 500;
}

.order-form input[type="email"] {
  width: 100%;
  padding: 14px;
  border: 1px solid #7c3aed;
  border-radius: 10px;
  background: rgba(20, 10, 40, 0.7);
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.order-form input[type="email"]:focus {
  border-color: #ffd700;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.selected-version-copy {
  margin: 0;
  color: #e9ddff;
  font-size: 0.95rem;
}

.selected-version-copy strong {
  color: #ffd700;
}

.order-form button {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #d4a017, #ffd700);
  color: #1a0f2e;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(212, 160, 23, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.order-form button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(255, 215, 0, 0.5);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(10, 6, 20, 0.88);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.image-lightbox.open {
  transition: opacity 0.25s ease;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.image-lightbox-img {
  max-width: min(96vw, 1400px);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 18px;
  border: 2px solid rgba(255, 215, 0, 0.45);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
}

.image-lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: rgba(40, 25, 80, 0.9);
  color: #ffd700;
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
}

.hp-field {
  position: absolute;
  left: -9999px;
}

.site-footer {
  padding: 40px 20px;
  border-top: 1px solid rgba(212, 160, 23, 0.15);
  color: #a78bfa;
  text-align: center;
  font-size: 0.9rem;
}

@media (max-width: 1120px) {
  .main-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 720px) {
  .detail-page {
    padding-top: 16px;
  }

  .container {
    width: min(100% - 20px, 1420px);
  }

  .detail-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .logo {
    width: 150px;
    height: 150px;
  }

  .info-copy h1 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .versions-panel,
  .details-panel,
  .order-form {
    padding: 22px;
  }

  .thumb {
    width: 78px;
    height: 78px;
  }
}

@media (max-width: 480px) {
  .thumbnails {
    justify-content: flex-start;
  }

  .version-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .back-btn {
    width: 100%;
  }
}


button.version-item {
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.version-item:focus-visible, .thumb:focus-visible, .main-image:focus-visible {
  outline: 3px solid #ffd700;
  outline-offset: 4px;
}

.version-name { display: block; }

.related-figures, .restricted-versions { margin-bottom: 24px; }
.related-figures a { display: inline-block; padding: 12px 4px; }
.restricted-versions button, .restricted-versions input { min-height: 44px; padding: 10px 16px; }
.restricted-versions button { cursor: pointer; margin: 8px 0; }
