﻿.detail-main {
  padding: 2.4rem 0 3rem;
}

.detail-hero {
  padding-top: 1.2rem;
}

.detail-hero .container,
.detail-section .container {
  width: min(var(--container), calc(100% - 2.2rem));
  margin-inline: auto;
}

.detail-panel {
  border-radius: var(--radius-xl);
  border: 1px solid rgba(246, 216, 162, 0.44);
  box-shadow: var(--panel-shadow);
  background:
    radial-gradient(circle at 15% 12%, rgba(255, 255, 255, 0.33), transparent 36%),
    radial-gradient(circle at 84% 76%, rgba(178, 126, 48, 0.12), transparent 48%),
    repeating-linear-gradient(108deg, rgba(130, 94, 36, 0.035) 0px, rgba(130, 94, 36, 0.035) 1px, transparent 2px, transparent 5px),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-strong) 100%);
  padding: clamp(1.2rem, 2.8vw, 1.9rem);
}

.detail-kicker {
  margin: 0 0 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-family: var(--font-title);
  color: #83561a;
}

.detail-summary {
  max-width: 72ch;
  font-size: 1rem;
}

.detail-grid {
  display: grid;
  gap: 1rem;
}

.detail-section {
  padding: 1.1rem 0;
}

.detail-note {
  margin-top: 0.9rem;
  font-size: 0.92rem;
}

.detail-list {
  display: grid;
  gap: 0.9rem;
}

.detail-list .card,
.detail-list .pillar,
.detail-list .price-card {
  background: rgba(255, 250, 238, 0.86);
}

@media (min-width: 760px) {
  .detail-grid.two-col,
  .detail-list.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-grid.three-col,
  .detail-list.three-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ================================================================
   DETAIL PAGE — STANDARD WEB MODE DIFFERENTIATION
   These pages intentionally feel different from the storybook:
   lighter background, no book textures, clean & functional.
   ================================================================ */

.detail-page {
  /* Lighter, cleaner background — away from the dark storybook world */
  background:
    radial-gradient(ellipse at 50% 0%, rgba(244, 231, 202, 0.12), transparent 60%),
    linear-gradient(180deg, #111e33 0%, #0e1a2f 40%, #081321 100%);
}

.detail-page .site-header {
  background: linear-gradient(180deg, rgba(14, 26, 47, 0.95), rgba(14, 26, 47, 0.88));
  border-bottom: 1px solid rgba(183, 146, 86, 0.2);
}

/* Softer panel styling — no heavy paper texture */
.detail-page .detail-panel {
  border: 1px solid rgba(183, 146, 86, 0.25);
  background:
    linear-gradient(180deg, rgba(244, 231, 202, 0.95) 0%, rgba(239, 223, 187, 0.92) 100%);
  box-shadow: 0 12px 36px rgba(6, 13, 28, 0.2);
}

.detail-page .card,
.detail-page .pillar,
.detail-page .price-card {
  border: 1px solid rgba(183, 146, 86, 0.2);
  background: rgba(255, 250, 238, 0.92);
  box-shadow: 0 6px 18px rgba(6, 13, 28, 0.1);
}

/* Section divider using shield image */
.detail-page .detail-section + .detail-section::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  margin: 0 auto 1.2rem;
  background: url('../assets/images/shield.png') center / contain no-repeat;
  opacity: 0.3;
}

/* ── Back to Story Button ─────────────────────────────────────── */
.back-to-story {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(183, 146, 86, 0.4);
  background: linear-gradient(180deg, rgba(14, 26, 47, 0.92), rgba(8, 19, 33, 0.96));
  color: #f5deb0;
  font-family: var(--font-title);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(6, 13, 28, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  backdrop-filter: blur(6px);
}

.back-to-story:hover,
.back-to-story:focus-visible {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 8px 28px rgba(6, 13, 28, 0.5);
  border-color: rgba(183, 146, 86, 0.6);
}

/* ── Page Transition (shared with main — reused class names) ──── */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: #081321;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.page-transition.is-active {
  opacity: 1;
  pointer-events: auto;
}

.transition-logo {
  width: 100px;
  height: auto;
  opacity: 0;
  transform: scale(0.85);
  filter: drop-shadow(0 0 30px rgba(255, 200, 80, 0.5));
  transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
}

.page-transition.is-active .transition-logo {
  opacity: 1;
  transform: scale(1);
}

/* ── Detail page entrance animation ──────────────────────────── */
.detail-page .detail-main {
  animation: detailEntrance 0.6s ease-out both;
  animation-delay: 0.1s;
}

@keyframes detailEntrance {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Heart decoration in footer ──────────────────────────────── */
.detail-page .site-footer::before {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  margin: 0 auto 1rem;
  background: url('../assets/images/heart.png') center / contain no-repeat;
  opacity: 0.25;
}

/* ── Mobile adjustments ──────────────────────────────────────── */
@media (max-width: 768px) {
  .back-to-story {
    bottom: 14px;
    padding: 0.45rem 0.9rem;
    font-size: 0.72rem;
  }

  .detail-page .detail-panel {
    padding: clamp(1rem, 3vw, 1.5rem);
  }

  .detail-page .detail-main {
    padding-bottom: 4rem; /* space for fixed back button */
  }
}
