/* ============================================================
   DETAIL PAGE TEMPLATE (DB-pattern: title, subtitle, cover, body, gallery)
   ============================================================ */

/* ---------- Cover hero ---------- */
.detail-hero {
  position: relative; color: #fff; overflow: hidden;
  background: var(--space-grad);
  background-image: linear-gradient(rgba(10,14,42,.62), rgba(10,14,42,.84)), url('../assets/space-bg.png');
  background-size: cover; background-position: center;
  padding: 56px 0 90px;
}
.detail-hero .hero-stars { position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(2px 2px at 15% 30%, #fff, transparent), radial-gradient(1.5px 1.5px at 65% 18%, #cfe, transparent), radial-gradient(2px 2px at 85% 55%, #fff, transparent), radial-gradient(1.5px 1.5px at 40% 75%, #fef, transparent);
  animation: twinkle 4s ease-in-out infinite; }
.detail-hero .container { position: relative; z-index: 2; }
.detail-hero .breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; color: #97A0D6; margin-bottom: 18px; }
.detail-hero .breadcrumb a { color: #B9C6FF; } .detail-hero .breadcrumb a:hover { color: #fff; }
.detail-hero .breadcrumb span { color: #6973A8; }
.detail-cat { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 600; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #fff; padding: 6px 15px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); }
.detail-hero h1 { font-size: clamp(30px, 4.4vw, 52px); font-weight: 800; color: #fff; margin: 18px 0 14px; max-width: 880px; }
.detail-hero .subtitle { font-size: 19px; color: #C7CEF5; max-width: 720px; }

/* ---------- Cover image (overlapping card) ---------- */
.detail-cover {
  position: relative; z-index: 3; margin-top: -56px;
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg);
  aspect-ratio: 24/9; display: grid; place-items: center; color: #fff; border: 1px solid rgba(255,255,255,.1);
}
.detail-cover::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(2px 2px at 18% 30%, rgba(255,255,255,.5), transparent), radial-gradient(1.5px 1.5px at 72% 60%, rgba(255,255,255,.45), transparent), radial-gradient(1.5px 1.5px at 50% 80%, rgba(255,255,255,.4), transparent); }
.detail-cover .cover-ico { position: relative; z-index: 2; width: 120px; height: 120px; display: grid; place-items: center; }
.detail-cover .cover-ico svg { width: 90px; height: 90px; filter: drop-shadow(0 10px 20px rgba(0,0,0,.3)); }
.detail-cover .cover-penguin { position: absolute; right: 5%; bottom: 0; width: 150px; z-index: 2; filter: drop-shadow(0 14px 26px rgba(0,0,0,.35)); }
.detail-cover img.cover-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Body: article + sidebar ---------- */
.detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 48px; align-items: start; }
.article h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; margin: 36px 0 14px; }
.article h2:first-child { margin-top: 0; }
.article h3 { font-size: 20px; font-weight: 700; margin: 26px 0 10px; }
.article p { color: var(--text); font-size: 16.5px; line-height: 1.8; margin-bottom: 16px; }
.article .lead { font-size: 19px; color: var(--muted); line-height: 1.7; }
.article ul.ticks { display: grid; gap: 12px; margin: 8px 0 22px; }
.article ul.ticks li { display: flex; gap: 11px; align-items: flex-start; font-size: 16px; }
.article ul.ticks svg { width: 22px; height: 22px; color: #22C55E; flex: none; margin-top: 3px; }
.article .callout { background: var(--bg-soft); border: 1px solid var(--line); border-left: 4px solid var(--purple); border-radius: 14px; padding: 20px 24px; margin: 24px 0; }
.article .callout p { margin: 0; color: var(--muted); }
.article .callout b { color: var(--text); }

.detail-side { position: sticky; top: 104px; display: grid; gap: 18px; }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.side-card h4 { font-size: 17px; margin-bottom: 14px; }
.side-card.price-card2 { background: var(--space-grad); color: #fff; border: 0; text-align: center; }
.side-card.price-card2 .sp-label { color: #B9C6FF; font-size: 14px; }
.side-card.price-card2 .sp-amt { font-family: var(--font-display); font-weight: 800; font-size: 38px; background: var(--grad-cube); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 4px 0 6px; }
.side-card.price-card2 .sp-unit { color: #97A0D6; font-size: 13px; margin-bottom: 18px; }
.side-card.price-card2 .btn { width: 100%; margin-bottom: 10px; }
.side-list a { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--text); transition: color .15s; }
.side-list a:last-child { border-bottom: 0; }
.side-list a:hover { color: var(--blue); }
.side-list a .dot { width: 8px; height: 8px; border-radius: 2px; flex: none; transform: rotate(45deg); background: var(--grad-cube); }
.side-contact { display: grid; gap: 10px; }
.side-contact a { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text); }
.side-contact a svg { width: 18px; height: 18px; color: var(--blue); }

/* ---------- Scrollable gallery ---------- */
.gallery-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.gallery-head h2 { font-size: clamp(24px, 3vw, 36px); font-weight: 800; }
.gallery-head p { color: var(--muted); margin-top: 8px; }
.gallery-nav { display: flex; gap: 10px; }
.gallery-nav button { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; transition: .2s; }
.gallery-nav button:hover { border-color: var(--purple); background: var(--purple); color: #fff; }
.gallery-nav button svg { width: 20px; height: 20px; }
.gallery-scroller { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 16px; scroll-behavior: smooth; -ms-overflow-style: none; scrollbar-width: thin; }
.gallery-scroller::-webkit-scrollbar { height: 8px; }
.gallery-scroller::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }
.gallery-item { flex: 0 0 clamp(260px, 32%, 360px); scroll-snap-align: start; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/3; position: relative; cursor: pointer; }
.gallery-item .gi-bg { position: absolute; inset: 0; display: grid; place-items: end start; padding: 20px; color: #fff; }
.gallery-item .gi-bg .t { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.gallery-item .gi-bg .s { font-size: 12.5px; opacity: .85; }
.gallery-item::before { content: ''; position: absolute; inset: 0; z-index: 1; background-image: radial-gradient(1.5px 1.5px at 25% 25%, rgba(255,255,255,.5), transparent), radial-gradient(1.5px 1.5px at 70% 55%, rgba(255,255,255,.4), transparent); }

/* ---------- Related ---------- */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.related-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; display: flex; flex-direction: column; }
.related-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.related-thumb { aspect-ratio: 16/9; display: grid; place-items: center; color: #fff; position: relative; }
.related-thumb svg { width: 44px; height: 44px; filter: drop-shadow(0 6px 12px rgba(0,0,0,.25)); }
.related-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.related-body .rc-tag { font-family: var(--font-display); font-weight: 600; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); }
.related-body h3 { font-size: 17px; margin: 4px 0 10px; flex: 1; }
.related-body .rc-link { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--blue); display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Article meta (news) ---------- */
.article-meta { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; color: #B9C6FF; font-size: 14.5px; margin-top: 4px; }
.article-meta .am-dot { width: 4px; height: 4px; border-radius: 50%; background: #6973A8; }
.article-figure { border-radius: 14px; overflow: hidden; margin: 8px 0 24px; aspect-ratio: 16/9; display: grid; place-items: center; color: #fff; position: relative; }
.article-figure svg { width: 64px; height: 64px; }

@media (max-width: 980px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-side { position: static; grid-template-columns: 1fr 1fr; display: grid; }
  .detail-cover { aspect-ratio: 24/11; }
}
@media (max-width: 760px) {
  .related-grid { grid-template-columns: 1fr; }
  .detail-side { grid-template-columns: 1fr; }
  .detail-cover { aspect-ratio: 16/10; }
  .detail-cover .cover-penguin { width: 100px; }
}
