/* =============================================================================
   VALKYRIE CORPORATION — Product Detail Page (Corporate Layout)
   Scope: semua selector diawali .pp- supaya tidak bentrok dengan valkyrie.css.
   Memakai design token yang sudah ada (--bg-card, --text-*, --accent-red, dst.)
   sehingga mode dark dan light otomatis mengikuti.
   ============================================================================= */

.pp-page { padding-top: 2.25rem; padding-bottom: 5rem; }

/* ---- Breadcrumb ---- */
.pp-crumbs {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    font-size: .8125rem; color: var(--text-muted); margin-bottom: 1.75rem;
}
.pp-crumbs a { color: var(--text-secondary); text-decoration: none; transition: color .15s; }
.pp-crumbs a:hover { color: var(--text-white); }
.pp-crumbs .sep { opacity: .4; }
.pp-crumbs .current { color: var(--text-white); font-weight: 600; }

/* ---- Page header ---- */
.pp-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 1.5rem; flex-wrap: wrap;
    padding-bottom: 1.75rem; margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-card);
}
.pp-header-main { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.pp-badge {
    width: 52px; height: 52px; flex-shrink: 0; border-radius: 12px; overflow: hidden;
    border: 1px solid var(--border-card); background: var(--bg-card);
}
.pp-badge img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-eyebrow {
    font-size: .6875rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--text-muted); margin-bottom: 4px;
}
.pp-title {
    font-family: var(--font-heading); font-weight: 800; letter-spacing: -.02em;
    font-size: clamp(1.625rem, 3vw, 2.25rem); line-height: 1.15; margin: 0;
    color: var(--text-white);
}
.pp-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pp-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: var(--radius-pill);
    font-size: .75rem; font-weight: 600; line-height: 1;
    border: 1px solid var(--border-card); background: var(--bg-card); color: var(--text-secondary);
}
.pp-chip svg, .pp-chip img { width: 14px; height: 14px; flex-shrink: 0; }
.pp-chip.is-ok { color: var(--status-active); border-color: color-mix(in srgb, var(--status-active) 35%, transparent); }
.pp-chip.is-warn { color: var(--status-failed); border-color: color-mix(in srgb, var(--status-failed) 40%, transparent); }

/* ---- Maintenance notice ---- */
.pp-notice {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 16px; margin-bottom: 1.75rem; border-radius: var(--radius-md);
    border: 1px solid color-mix(in srgb, var(--status-failed) 40%, transparent);
    background: color-mix(in srgb, var(--status-failed) 8%, transparent);
    color: var(--text-primary); font-size: .875rem; line-height: 1.55;
}
.pp-notice svg { flex-shrink: 0; margin-top: 2px; color: var(--status-failed); }
.pp-notice strong { display: block; color: var(--status-failed); letter-spacing: .04em; margin-bottom: 2px; }

/* ---- Two-column layout ---- */
.pp-layout {
    display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 2.5rem; align-items: start;
}
.pp-main { min-width: 0; display: flex; flex-direction: column; gap: 2rem; }
.pp-aside { position: sticky; top: calc(var(--header-height, 72px) + 20px); }

/* ---- Gallery ---- */
.pp-gallery-main {
    position: relative; overflow: hidden; border-radius: var(--radius-lg);
    border: 1px solid var(--border-card); background: #0b0b0e; aspect-ratio: 16 / 9;
}
.pp-gallery-main img, .pp-gallery-main video {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.pp-gallery-main .card-banner-gradient { position: absolute; inset: 0; pointer-events: none; opacity: .55; }
.pp-gallery-main.is-maint .pp-media { filter: blur(3px); opacity: .55; }
.pp-gallery-main .pp-maint-label {
    position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center;
    font-family: var(--font-heading); font-weight: 800; letter-spacing: .24em; color: #fff;
    background: rgba(8, 8, 11, .45); pointer-events: none;
}
.pp-media { width: 100%; height: 100%; }
.pp-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-top: 12px; }
.pp-thumbs .gallery-thumb-item {
    position: relative; aspect-ratio: 16 / 10; padding: 0; overflow: hidden; cursor: pointer;
    border-radius: var(--radius-sm); border: 1px solid var(--border-card); background: var(--bg-card);
    opacity: .7; transition: opacity .15s, border-color .15s;
}
.pp-thumbs .gallery-thumb-item img, .pp-thumbs .gallery-thumb-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-thumbs .gallery-thumb-item:hover { opacity: 1; }
.pp-thumbs .gallery-thumb-item.active { opacity: 1; border-color: var(--accent-red); box-shadow: 0 0 0 1px var(--accent-red); }
.pp-thumbs .gallery-thumb-item:focus-visible { outline: 2px solid var(--accent-red); outline-offset: 2px; }

/* ---- Section blocks ---- */
.pp-section { }
.pp-section-title {
    font-family: var(--font-heading); font-size: 1.125rem; font-weight: 700; letter-spacing: -.01em;
    color: var(--text-white); margin: 0 0 1rem; display: flex; align-items: center; gap: 10px;
}
.pp-section-title::after { content: ""; flex: 1; height: 1px; background: var(--border-card); }
.pp-lead { font-size: .9375rem; line-height: 1.75; color: var(--text-secondary); margin: 0; }

/* ---- Feature grid ---- */
.pp-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pp-feature {
    display: flex; gap: 14px; padding: 18px; border-radius: var(--radius-md);
    background: var(--bg-card); border: 1px solid var(--border-card);
    transition: border-color .15s, transform .15s;
}
.pp-feature:hover { border-color: var(--border-hover); }
.pp-feature-icon {
    width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-red-subtle); color: var(--accent-red);
}
.pp-feature h4 { margin: 0 0 4px; font-size: .9375rem; font-weight: 700; color: var(--text-white); }
.pp-feature p { margin: 0; font-size: .8125rem; line-height: 1.6; color: var(--text-secondary); }

/* ---- Spec table ---- */
.pp-spec {
    border: 1px solid var(--border-card); border-radius: var(--radius-md);
    background: var(--bg-card); overflow: hidden;
}
.pp-spec-row {
    display: grid; grid-template-columns: 200px 1fr; gap: 1rem; padding: 14px 18px;
    font-size: .875rem; border-bottom: 1px solid var(--border-card);
}
.pp-spec-row:last-child { border-bottom: 0; }
.pp-spec-row dt { color: var(--text-muted); font-weight: 500; margin: 0; }
.pp-spec-row dd { color: var(--text-primary); margin: 0; line-height: 1.6; }
.pp-spec { margin: 0; }

/* ---- Purchase panel ---- */
.pp-panel {
    border-radius: var(--radius-lg); border: 1px solid var(--border-card);
    background: var(--bg-card); box-shadow: var(--shadow-card); overflow: hidden;
}
.pp-panel-head { padding: 22px 22px 0; }
.pp-panel-head h2 { font-family: var(--font-heading); font-size: 1.0625rem; font-weight: 700; margin: 0 0 4px; color: var(--text-white); }
.pp-panel-head p { margin: 0; font-size: .8125rem; color: var(--text-muted); }
.pp-panel-body { padding: 18px 22px 22px; }

.pp-plans { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.pp-plan {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px; cursor: pointer;
    border-radius: var(--radius-md); border: 1px solid var(--border-card);
    background: transparent; transition: border-color .15s, background .15s;
    text-align: left;
}
.pp-plan:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }
.pp-plan:focus-visible { outline: 2px solid var(--accent-red); outline-offset: 2px; }
.pp-plan .pp-radio {
    width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%;
    border: 2px solid var(--border-hover); position: relative; transition: border-color .15s;
}
.pp-plan .pp-radio::after {
    content: ""; position: absolute; inset: 3px; border-radius: 50%;
    background: var(--accent-red); transform: scale(0); transition: transform .15s;
}
.pp-plan.selected { border-color: var(--accent-red); background: var(--accent-red-subtle); }
.pp-plan.selected .pp-radio { border-color: var(--accent-red); }
.pp-plan.selected .pp-radio::after { transform: scale(1); }
.pp-plan-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pp-plan-info .plan-flat-name { font-size: .9375rem; font-weight: 600; color: var(--text-white); }
.pp-plan-info .plan-flat-duration { font-size: .75rem; color: var(--text-muted); }
.pp-plan-price { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .9375rem; color: var(--text-white); white-space: nowrap; }
.pp-plan-empty { padding: 14px; border: 1px dashed var(--border-card); border-radius: var(--radius-md); font-size: .875rem; color: var(--text-muted); text-align: center; }

.pp-total {
    display: flex; align-items: baseline; justify-content: space-between;
    padding: 16px 0; margin-bottom: 16px; border-top: 1px solid var(--border-card);
}
.pp-total span { font-size: .8125rem; color: var(--text-muted); }
.pp-total strong { font-family: var(--font-heading); font-size: 1.625rem; font-weight: 800; letter-spacing: -.02em; color: var(--text-white); font-variant-numeric: tabular-nums; }

.pp-cta { display: flex; gap: 10px; }
.pp-btn-buy {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 48px; padding: 0 20px; border: 0; border-radius: var(--radius-sm); cursor: pointer;
    font-family: var(--font-body); font-size: .9375rem; font-weight: 700; color: #fff;
    background: var(--accent-red); transition: background .15s, transform .1s;
}
.pp-btn-buy:hover { background: var(--accent-red-hover); }
.pp-btn-buy:active { transform: translateY(1px); }
.pp-btn-buy:focus-visible { outline: 2px solid var(--text-white); outline-offset: 2px; }
.pp-btn-buy:disabled { background: var(--bg-elevated); color: var(--text-muted); cursor: not-allowed; border: 1px solid var(--border-card); }
.pp-btn-icon {
    width: 48px; height: 48px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); border: 1px solid var(--border-card); background: transparent;
    color: var(--text-secondary); cursor: pointer; transition: border-color .15s, color .15s;
}
.pp-btn-icon:hover { border-color: var(--border-hover); color: var(--text-white); }
.pp-btn-icon.active { color: var(--accent-red); border-color: var(--accent-red); }
.pp-btn-icon.active svg { fill: currentColor; }

.pp-assure { list-style: none; margin: 18px 0 0; padding: 18px 0 0; border-top: 1px solid var(--border-card); display: flex; flex-direction: column; gap: 12px; }
.pp-assure li { display: flex; align-items: flex-start; gap: 12px; font-size: .8125rem; line-height: 1.5; color: var(--text-secondary); }
.pp-assure svg { flex-shrink: 0; margin-top: 1px; color: var(--text-muted); }
.pp-assure strong { display: block; color: var(--text-primary); font-weight: 600; }

.pp-help {
    margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-md);
    border: 1px solid var(--border-card); font-size: .8125rem; color: var(--text-muted); line-height: 1.55;
}
.pp-help a { color: var(--text-white); font-weight: 600; text-decoration: none; }
.pp-help a:hover { text-decoration: underline; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .pp-layout { grid-template-columns: 1fr; gap: 2rem; }
    .pp-aside { position: static; order: -1; }
}
@media (max-width: 640px) {
    .pp-page { padding-top: 1.25rem; }
    .pp-features { grid-template-columns: 1fr; }
    .pp-spec-row { grid-template-columns: 1fr; gap: 2px; }
    .pp-header-main { align-items: flex-start; }
    .pp-badge { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
    .pp-feature, .pp-plan, .pp-btn-buy, .pp-btn-icon, .pp-thumbs .gallery-thumb-item { transition: none; }
}
