/* ==========================================================================
   ARChatok — Plugin Product Page
   Loads only on /plugins/{slug}/. Reuses every existing design token.
   ========================================================================== */

/* ---------- Breadcrumb ---------- */
.pg-topbar { padding: 108px 0 0; position: relative; z-index: 2; }
.pg-breadcrumb ol { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; font-size: 0.86rem; }
.pg-breadcrumb a { color: var(--dim); text-decoration: none; transition: color 0.2s ease; }
.pg-breadcrumb a:hover { color: var(--accent-2); }
.pg-breadcrumb [aria-current="page"] { color: var(--muted); font-weight: 500; }
.pg-bc-sep { color: var(--accent); opacity: 0.6; }

/* ---------- Hero ---------- */
.pg-hero { position: relative; padding: 44px 0 64px; overflow: hidden; }
.pg-hero-glow {
    position: absolute; top: -160px; right: -120px; width: 760px; height: 620px; pointer-events: none;
    background: radial-gradient(ellipse, color-mix(in srgb, var(--accent) 13%, transparent), transparent 65%);
}
.pg-hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
.pg-icon {
    position: relative; width: 128px; height: 128px; border-radius: 30px; overflow: visible;
    display: grid; place-items: center; margin-bottom: 24px;
    background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 22%, transparent), rgba(255, 255, 255, 0.04));
    border: 1px solid var(--border-strong); box-shadow: 0 0 44px -10px var(--accent-glow), var(--shadow);
    backdrop-filter: blur(8px); color: var(--accent-2);
}
.pg-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.pg-icon .icon { width: 52px; height: 52px; }
.pg-icon-badge {
    position: absolute; right: -10px; bottom: -10px; width: 36px; height: 36px; border-radius: 12px;
    display: grid; place-items: center; background: var(--grad-btn); color: #fff;
    box-shadow: 0 6px 18px -6px var(--accent-glow);
}
.pg-icon-badge .icon { width: 18px; height: 18px; }
.pg-icon-sm { width: 84px; height: 84px; border-radius: 22px; margin: 0; font-family: var(--font-head); font-weight: 800; font-size: 2rem; color: #fff; background: var(--grad-btn); border: none; flex: none; }
.pg-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.pg-title { font-size: clamp(2.1rem, 4.5vw, 3.2rem); font-weight: 800; line-height: 1.1; margin: 0 0 14px; }
.pg-lead { color: var(--muted); font-size: 1.12rem; line-height: 1.75; max-width: 52ch; margin: 0 0 30px; }
.pg-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.pg-actions .icon-btn-row { margin-left: 4px; display: inline-flex; gap: 8px; }

/* Browser frame preview */
.pg-hero-visual { position: relative; }
.pg-browser {
    border: 1px solid var(--border-strong); border-radius: 18px; overflow: hidden;
    background: rgba(10, 10, 20, 0.7); backdrop-filter: blur(10px);
    box-shadow: var(--shadow), 0 0 60px -18px var(--accent-glow);
    transform: rotateY(-2deg) rotateX(1deg);
    transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.pg-hero-visual:hover .pg-browser { transform: rotateY(0) rotateX(0); }
.pg-browser-bar {
    display: flex; align-items: center; gap: 6px; padding: 11px 14px;
    border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, 0.03);
}
.pg-browser-bar span { width: 10px; height: 10px; border-radius: 50%; background: #2c2c42; }
.pg-browser-bar span:first-child { background: color-mix(in srgb, var(--accent) 65%, transparent); }
.pg-browser-bar em { margin-left: auto; font-style: normal; font-size: 0.7rem; color: var(--dim); background: var(--surface-2); border: 1px solid var(--border); padding: 3px 10px; border-radius: 999px; }
.pg-browser-body { aspect-ratio: 16 / 10; }
.pg-browser-body img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-browser-empty {
    width: 100%; height: 100%; display: grid; place-content: center; justify-items: center; gap: 12px;
    background: linear-gradient(160deg, #16112b, var(--bg-2)); color: var(--accent);
}
.pg-browser-empty .icon { width: 54px; height: 54px; opacity: 0.55; }
.pg-browser-empty span { color: var(--dim); font-size: 0.85rem; }

/* ---------- Quick info ---------- */
.pg-quickinfo { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, 0.015); }
.pg-quickinfo-row { display: flex; flex-wrap: wrap; gap: 20px 44px; padding: 26px 0; margin: 0; }
.pg-qi { display: flex; align-items: center; gap: 12px; }
.pg-qi-icon { width: 38px; height: 38px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); }
.pg-qi-icon .icon { width: 17px; height: 17px; }
.pg-qi dt { font-size: 0.72rem; color: var(--dim); text-transform: uppercase; letter-spacing: 0.1em; }
.pg-qi dd { margin: 0; font-weight: 600; font-size: 0.95rem; color: var(--text); }

/* ---------- Feature cards ---------- */
.pg-section { padding: 84px 0 0; }
.pg-features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pg-feature-card {
    position: relative; padding: 26px 22px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border); overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.pg-feature-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.7), 0 0 26px -10px var(--accent-glow); }
.pg-feature-card h3 { font-size: 1rem; font-weight: 600; margin: 0; line-height: 1.4; }
.pg-feature-icon {
    width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 16px;
    background: var(--accent-soft); color: var(--accent-2); transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.pg-feature-card:hover .pg-feature-icon { box-shadow: var(--glow); transform: translateY(-2px); }
.pg-feature-icon .icon { width: 22px; height: 22px; }

/* Shared card spotlight (delegated via plugin.js → --mx/--my) */
.pg-spot { position: relative; }
.pg-spot::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
    background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 9%, transparent), transparent 65%);
    opacity: 0; transition: opacity 0.35s ease;
}
.pg-spot:hover::after { opacity: 1; }

/* ---------- Showcase ---------- */
.pg-showcase { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 44px; align-items: start; }
.pg-showcase.has-one { grid-template-columns: minmax(0, 1fr); }
.pg-showcase .pg-side { position: sticky; top: 100px; }

/* Carousel */
.pg-carousel-viewport {
    position: relative; border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--border-strong); background: rgba(10, 10, 20, 0.7);
    box-shadow: var(--shadow), 0 0 60px -18px var(--accent-glow);
}
.pg-carousel-track { display: flex; transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1); }
.pg-shot { flex: 0 0 100%; margin: 0; }
.pg-shot img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.pg-car-btn {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border-strong);
    background: rgba(6, 6, 11, 0.65); backdrop-filter: blur(6px); color: #fff; cursor: pointer;
    display: grid; place-items: center; opacity: 0; transition: opacity 0.25s ease, border-color 0.2s ease, background 0.2s ease;
}
.pg-carousel:hover .pg-car-btn, .pg-carousel:focus-within .pg-car-btn { opacity: 1; }
.pg-car-btn:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 35%, transparent); }
.pg-prev { left: 14px; } .pg-next { right: 14px; }
.pg-carousel-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.pg-dots { display: flex; gap: 7px; }
.pg-dot { width: 8px; height: 8px; padding: 0; border: none; border-radius: 999px; background: var(--border-strong); cursor: pointer; transition: width 0.25s ease, background 0.25s ease; }
.pg-dot.is-active { width: 22px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.pg-thumbs { display: flex; gap: 8px; }
.pg-thumb {
    width: 62px; height: 42px; padding: 0; border-radius: 9px; overflow: hidden; cursor: pointer;
    border: 1px solid var(--border); background: var(--bg-2); opacity: 0.55;
    transition: opacity 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.pg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-thumb:hover { opacity: 0.85; transform: translateY(-2px); }
.pg-thumb.is-active { opacity: 1; border-color: var(--accent); box-shadow: 0 0 14px -4px var(--accent-glow); }

/* Sidebar reuse: .side-card/.specs already exist in main.css */
.pg-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pg-links a {
    display: flex; align-items: center; gap: 11px; padding: 10px 12px; margin: 0 -12px; border-radius: 11px;
    color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 500;
    transition: color 0.2s ease, background 0.2s ease;
}
.pg-links a > .icon:first-child { color: var(--accent); }
.pg-links a .icon:last-child { margin-left: auto; width: 14px; height: 14px; opacity: 0; transform: translate(-4px, 4px); transition: opacity 0.2s ease, transform 0.2s ease; }
.pg-links a:hover { color: var(--text); background: var(--surface-2); }
.pg-links a:hover .icon:last-child { opacity: 1; transform: none; }

/* ---------- Content blocks & tab nav ---------- */
.pg-content { padding: 84px 0 0; }
.pg-tabnav {
    position: sticky; top: 90px; z-index: 40; margin-bottom: 44px;
    background: rgba(6, 6, 11, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border); border-radius: 999px; padding: 6px;
}
.pg-tabnav ul { display: flex; gap: 4px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; justify-content: center; }
.pg-tabnav a {
    display: block; padding: 9px 20px; border-radius: 999px; color: var(--muted);
    font-size: 0.88rem; font-weight: 600; text-decoration: none; transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.pg-tabnav a:hover { color: var(--text); }
.pg-tabnav a.active { color: #fff; background: var(--grad-btn); box-shadow: 0 6px 20px -8px var(--accent-glow); }
.pg-block { margin-bottom: 64px; scroll-margin-top: 170px; }
.pg-block-title { font-size: 1.5rem; padding-left: 16px; position: relative; margin: 0 0 22px; }
.pg-block-title::before { content: ""; position: absolute; left: 0; top: 5px; bottom: 5px; width: 4px; border-radius: 4px; background: linear-gradient(180deg, var(--accent), var(--accent-2)); }
.pg-sub { font-size: 1.1rem; margin: 30px 0 14px; }
.pg-steps { counter-reset: pg-step; list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pg-steps li {
    position: relative; counter-increment: pg-step; padding: 14px 16px 14px 58px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--muted);
}
.pg-steps li::before {
    content: counter(pg-step); position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
    background: var(--accent-soft); color: var(--accent-2); font-family: var(--font-head); font-weight: 700; font-size: 0.85rem;
}

/* FAQ — native details/summary (zero JS, accessible) */
.pg-faq { display: grid; gap: 10px; }
.pg-faq-item {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.pg-faq-item[open] { border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 0 24px -10px var(--accent-glow); }
.pg-faq-item summary {
    padding: 16px 20px; cursor: pointer; font-weight: 600; font-family: var(--font-head); font-size: 0.97rem;
    list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.pg-faq-item summary::-webkit-details-marker { display: none; }
.pg-faq-item summary::after {
    content: "+"; color: var(--accent-2); font-size: 1.3rem; line-height: 1; flex: none;
    transition: transform 0.25s ease;
}
.pg-faq-item[open] summary::after { transform: rotate(45deg); }
.pg-faq-item p { margin: 0; padding: 0 20px 18px; color: var(--muted); line-height: 1.7; }

/* ---------- Author card ---------- */
.pg-author {
    display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
    padding: 36px; border-radius: var(--radius);
    background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 9%, transparent), rgba(255, 255, 255, 0.02) 50%);
    border: 1px solid var(--border);
}
.pg-author-main { display: flex; gap: 24px; align-items: center; }
.pg-author-name { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; margin: 0 0 2px; }
.pg-author-role { color: var(--accent-ink); font-size: 0.9rem; font-weight: 600; margin: 0 0 8px; }
.pg-author-bio { color: var(--muted); font-size: 0.92rem; line-height: 1.65; margin: 0; max-width: 52ch; }
.pg-author-actions { display: grid; gap: 14px; justify-items: end; }

/* ---------- Bottom CTA ---------- */
.pg-cta {
    position: relative; overflow: hidden; text-align: center;
    padding: 56px 40px; border-radius: 28px; border: 1px solid var(--border);
    background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 12%, transparent), rgba(255, 255, 255, 0.02) 45%);
}
.pg-cta::before { content: ""; position: absolute; top: -40%; left: 50%; transform: translateX(-50%); width: 560px; height: 480px; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 20%, transparent), transparent 65%); pointer-events: none; }
.pg-cta-copy { position: relative; }
.pg-cta .sec-desc { margin-top: 4px; }
.pg-cta-actions { position: relative; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

/* Related mini-card row */
.pg-related { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .pg-hero-grid { grid-template-columns: 1fr; gap: 48px; }
    .pg-hero-visual { max-width: 560px; }
    .pg-features-grid { grid-template-columns: repeat(2, 1fr); }
    .pg-showcase { grid-template-columns: minmax(0, 1fr); }
    .pg-showcase .pg-side { position: static; }
}
@media (max-width: 640px) {
    .pg-topbar { padding-top: 96px; }
    .pg-section, .pg-content { padding-top: 64px; }
    .pg-features-grid { grid-template-columns: 1fr; }
    .pg-icon { width: 100px; height: 100px; border-radius: 24px; }
    .pg-actions .btn { width: 100%; justify-content: center; }
    .pg-actions .icon-btn-row { margin-left: 0; }
    .pg-quickinfo-row { gap: 16px 28px; }
    .pg-tabnav { top: 84px; border-radius: 20px; }
    .pg-tabnav ul { justify-content: flex-start; }
    .pg-author { padding: 26px 22px; }
    .pg-author-main { flex-direction: column; align-items: flex-start; }
    .pg-author-actions { justify-items: start; }
    .pg-carousel-nav { flex-direction: column; align-items: center; }
    .float-chip.chip-1 { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .pg-browser, .pg-feature-card, .pg-thumb, .pg-carousel-track { transition: none; }
    .pg-hero-glow, .pg-cta::before { animation: none; }
}