/* =========================================================
   TUOTESIVU (package.html)
   ========================================================= */
.pd { padding: 28px 0 40px; }

.pd-back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; margin-bottom: 18px; transition: color .2s; }
.pd-back strong { color: var(--text); font-weight: 600; margin-left: -4px; }
.pd-back svg { width: 16px; height: 16px; color: var(--text); transition: transform .2s; }
.pd-back:hover svg { transform: translateX(-3px); }

.pd-top { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.pd-media { position: sticky; top: 86px; }

/* ---------- Mediakaruselli ---------- */
.pd-viewer { position: relative; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; background: #000; border: 1px solid var(--line-2); }
.pd-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.pd-slide.active { opacity: 1; pointer-events: auto; }
.pd-slide > img, .pd-slide > .cover-fallback { width: 100%; height: 100%; object-fit: cover; }
.pd-slide .cover-fallback span { font-size: 34px; }
.pd-slide iframe { width: 100%; height: 100%; border: 0; }
.pd-play { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; background: rgba(0,0,0,.2); transition: background .2s; }
.pd-play:hover { background: rgba(0,0,0,.05); }
.pd-play i { width: 72px; height: 72px; border-radius: 50%; background: rgba(255,255,255,.2); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.35); display: grid; place-items: center; transition: transform .2s; }
.pd-play:hover i { transform: scale(1.08); }
.pd-play svg { width: 28px; height: 28px; fill: #fff; stroke: none; margin-left: 4px; }
.pd-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 36px; height: 36px; display: grid; place-items: center; color: #fff; filter: drop-shadow(0 2px 6px rgba(0,0,0,.8)); transition: transform .2s; }
.pd-nav:hover { transform: translateY(-50%) scale(1.15); }
.pd-nav.prev { left: 8px; }
.pd-nav.next { right: 8px; }
.pd-nav svg { width: 24px; height: 24px; stroke-width: 2.5; }
.pd-expand { position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.45); backdrop-filter: blur(6px); }
.pd-expand svg { width: 17px; height: 17px; }

.pd-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.pd-thumbs::-webkit-scrollbar { display: none; }
.pd-thumb { position: relative; flex: 0 0 auto; width: 118px; aspect-ratio: 16/9; border-radius: 9px; overflow: hidden; border: 2px solid var(--line-2); opacity: .6; transition: opacity .2s, border-color .2s; background: var(--card); }
.pd-thumb:hover { opacity: .85; }
.pd-thumb.active { opacity: 1; border-color: var(--cta); }
.pd-thumb > img, .pd-thumb > .cover-fallback { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb .cover-fallback span { font-size: 8px; }
.pd-thumb .mini-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.35); }
.pd-thumb .mini-play svg { width: 18px; height: 18px; fill: #fff; stroke: none; }

.pd-lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 40px; cursor: zoom-out; animation: fadein .2s; }
.pd-lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; }

/* ---------- Ostotiedot ---------- */
.pd-info { display: flex; flex-direction: column; gap: 14px; }
.pd-info h1 { font-size: clamp(28px, 3vw, 38px); font-weight: 800; letter-spacing: -.015em; line-height: 1.2; overflow-wrap: anywhere; }
.pd-short { color: var(--text-2); font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.pd-price { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.pd-price strong { font-size: 34px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.pd-price s { color: var(--muted); font-size: 16px; }
.pd-price b { padding: 3px 8px; border-radius: 6px; background: #ef2b3c; color: #fff; font-size: 13px; }
.pd-price em { font-style: normal; color: var(--muted); font-size: 14px; }
#buyBtn { width: 100%; height: 52px; justify-content: center; font-size: 16px; }
.pd-perks { display: grid; gap: 10px; margin: 6px 0; list-style: none; }
.pd-perks li { display: flex; align-items: center; gap: 12px; color: var(--text-2); }
.pd-perks svg { flex: none; width: 18px; height: 18px; color: var(--accent); fill: none; stroke: currentColor; stroke-width: 2; }
.pd-perks a { color: var(--accent); font-weight: 600; }
.pd-specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line-2); border-radius: 14px; background: var(--card); }
.pd-spec { padding: 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pd-spec:nth-child(3n) { border-right: 0; }
.pd-spec:nth-child(n+4) { border-bottom: 0; }
.pd-spec small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.pd-spec small svg { width: 14px; height: 14px; color: var(--accent); fill: none; stroke: currentColor; stroke-width: 2; }
.pd-spec strong, .pd-spec a { display: block; margin-top: 8px; font-size: 15.5px; font-weight: 700; }
.pd-spec a { color: var(--accent); }

.pd-watch { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--text-2); font-size: 13px; font-weight: 700; letter-spacing: .12em; cursor: pointer; }
.pd-watch i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); }
.pd-watch svg { width: 12px; height: 12px; fill: var(--cta-text); stroke: none; }
.pd-watch:hover { color: var(--text); }

/* ---------- Kuvaus ---------- */
.pd-about { margin-top: 72px; }
.pd-about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.pd-main, .pd-side { padding: 28px 32px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--card); }
.pd-aside { display: grid; gap: 14px; }
.pd-side { padding: 22px; }
.pd-side h3 { margin-bottom: 14px; font-size: 17px; }
.pd-ship { display: grid; gap: 12px; list-style: none; color: var(--text-2); font-size: 14px; }
.pd-ship li { display: flex; gap: 10px; }
.pd-ship svg { flex: none; width: 18px; height: 18px; color: var(--accent); fill: none; stroke: currentColor; stroke-width: 2; }
.pd-ship a, .pd-help a { color: var(--accent); font-weight: 700; }
.pd-help { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 700; }

.pd-desc { color: var(--text-2); font-size: 15px; line-height: 1.7; }
.pd-desc h1, .pd-desc h2, .pd-desc h3, .pd-desc h4 { color: var(--text); font-size: 18px; font-weight: 800; margin: 24px 0 8px; }
.pd-desc > :first-child { margin-top: 0; }
.pd-desc p { margin-bottom: 10px; }
.pd-desc ul, .pd-desc ol { padding-left: 20px; margin-bottom: 10px; }
.pd-desc a { color: var(--accent-soft); text-decoration: underline; }
.pd-desc, .pd-list li, .pd-req li, .pd-section p { overflow-wrap: anywhere; min-width: 0; }

.pd-list { display: grid; gap: 9px; margin-top: 16px; list-style: none; color: var(--text-2); font-size: 15px; line-height: 1.55; }
.pd-list li { position: relative; padding-left: 14px; }
.pd-list li::before { content: ""; position: absolute; top: .6em; left: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.pd-list strong { color: var(--text); font-weight: 700; }

.pd-req { margin-top: 24px; }
.pd-req h4 { font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--muted); margin-bottom: 8px; }
.pd-req ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.pd-req li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.pd-req li::before { content: ""; width: 5px; height: 5px; flex-shrink: 0; border-radius: 50%; background: var(--accent); }

/* ---------- Valinnaiset osiot (config.js) ---------- */
.pd-stats { margin-top: 64px; padding: 44px 32px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.pd-stats-row { display: flex; gap: 80px; flex-wrap: wrap; justify-content: center; }
.pd-stats strong { display: block; font-family: var(--display); font-size: 52px; font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.pd-stats span { color: var(--muted); font-size: 14px; }
.pd-stats p { font-weight: 700; }

.pd-sections { margin-top: 64px; display: flex; flex-direction: column; gap: 56px; }
.pd-section { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.pd-section:nth-child(even) .pd-section-img { order: 2; }
.pd-section.text-only { grid-template-columns: 1fr; max-width: 760px; }
.pd-section-img { aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: var(--card); }
.pd-section-img img { width: 100%; height: 100%; object-fit: cover; }
.pd-section h3 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 12px; }
.pd-section p { color: var(--text-2); font-size: 15.5px; line-height: 1.7; }

.pd-related { margin-top: 72px; }
.pd-related-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.pd-related-head h2 { font-family: var(--display); font-size: 26px; font-weight: 900; letter-spacing: -.02em; }
.pd-more { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; transition: color .2s; }
.pd-more svg { width: 14px; height: 14px; }
.pd-more:hover { color: var(--text); }

.pd-empty { padding: 80px 20px; text-align: center; border: 1px dashed var(--line-2); border-radius: 14px; }
.pd-empty h1 { font-size: 24px; margin-bottom: 8px; }
.pd-empty p { color: var(--muted); margin-bottom: 18px; }

/* ---------- Kiinteä ostopalkki ---------- */
.pd-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; background: rgba(20, 16, 13, .95); backdrop-filter: blur(16px); border-top: 1px solid var(--line-2); transform: translateY(100%); transition: transform .3s var(--ease); }
.pd-bar.show { transform: none; }
.pd-bar .h-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.pd-bar strong { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-bar div div { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.pd-bar em { font-style: normal; color: var(--text-2); font-weight: 700; }
.pd-bar .h-btn { height: 38px; font-size: 13.5px; padding: 0 16px; }

/* ---------- Mobiili ---------- */
@media (max-width: 980px) {
  .pd-top { grid-template-columns: minmax(0, 1fr); }
  .pd-media { position: static; }
  .pd-about-grid { grid-template-columns: minmax(0, 1fr); }
  .pd-section { grid-template-columns: 1fr; gap: 20px; }
  .pd-section:nth-child(even) .pd-section-img { order: 0; }
}
@media (max-width: 640px) {
  .pd { padding-top: 18px; }
  .pd-main { padding: 20px 18px; }
  .pd-thumb { width: 92px; }
  .pd-stats-row { gap: 32px; }
  .pd-stats strong { font-size: 38px; }
  .pd-play i { width: 58px; height: 58px; }
  .pd-related-head h2 { font-size: 21px; }
}
