/* RS Top Coder — Product category detail (catalog / datasheet layout) */

.rstc-pd {
    --rstc-green: #8BC53F;
    --rstc-green-deep: #5f8a22;
    --rstc-green-soft: #edf5e3;
    --rstc-ink: #152024;
    --rstc-muted: #5a686d;
    --rstc-line: rgba(21, 32, 36, 0.1);
    --rstc-panel: #f4f8ef;
    font-family: "Be Vietnam Pro", sans-serif;
    color: var(--rstc-ink);
}

/* ── Product hero: dark field + WebGL model ── */
.rstc-px {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 72% 46%, rgba(198, 242, 90, 0.14), transparent 26%),
        #07180c;
    color: #f3f6ee;
}

.rstc-px__beam {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 42px;
    z-index: 2;
    height: 2px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(198, 242, 90, 0), #c6f25a 48%, #f4ffb0 52%, transparent);
    background-size: 34% 100%;
    background-repeat: no-repeat;
    animation: rstcPxBeam 6.5s linear infinite;
}

.rstc-px__copy {
    position: relative;
    z-index: 1;
    max-width: 700px;
    padding: 36px 0 28px;
}

.rstc-px__view {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 46px;
    left: 62%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: max(24px, 4vw);
}

.rstc-px__app {
    width: min(340px, 100%);
    border-radius: 16px;
    background: #0c2214;
    border: 1px solid rgba(198, 242, 90, 0.28);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    animation: rstcPxFloat 5.5s ease-in-out infinite;
}

.rstc-px__app-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #07180c;
    color: rgba(243, 246, 238, 0.7);
    font-size: 12px;
    font-weight: 650;
}

.rstc-px__app-bar i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(198, 242, 90, 0.45);
}

.rstc-px__app-bar i:first-child { background: #c6f25a; }
.rstc-px__app-bar span { margin-left: 8px; }
.rstc-px__app-bar em {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(198, 242, 90, 0.16);
    color: #c6f25a;
    font-style: normal;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.rstc-px__kpis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px 12px 0;
}

.rstc-px__kpis p {
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(198, 242, 90, 0.08);
}

.rstc-px__kpis b {
    display: block;
    color: #c6f25a;
    font-size: 22px;
    line-height: 1;
    letter-spacing: -0.04em;
}

.rstc-px__kpis span {
    display: block;
    margin-top: 4px;
    color: rgba(243, 246, 238, 0.62);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rstc-px__chart-label {
    display: flex;
    justify-content: space-between;
    margin: 10px 14px 0;
    color: rgba(243, 246, 238, 0.5);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rstc-px__chart {
    display: block;
    width: calc(100% - 24px);
    height: 52px;
    margin: 4px 12px 0;
}

.rstc-px__chart path {
    fill: none;
    stroke: #c6f25a;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 420;
    animation: rstcPxDraw 4.8s ease-in-out infinite;
}

.rstc-px__feed {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.rstc-px__feed li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-top: 1px solid rgba(198, 242, 90, 0.12);
    color: rgba(243, 246, 238, 0.78);
    font-size: 13px;
    font-weight: 650;
}

.rstc-px__feed li span {
    flex: none;
    color: rgba(198, 242, 90, 0.55);
    font-size: 11px;
    letter-spacing: 0.06em;
}

.rstc-px__feed li strong {
    min-width: 0;
    overflow: hidden;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rstc-px__feed li.is-on {
    background: rgba(198, 242, 90, 0.14);
    color: #c6f25a;
}

.rstc-px__kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: #c6f25a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.rstc-px__kicker::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c6f25a;
    box-shadow: 0 0 0 0 rgba(198, 242, 90, 0.7);
    animation: rstcPxPulse 1.8s ease-out infinite;
}

.rstc-px__title {
    margin: 0 0 10px;
    max-width: none;
    color: #f7faf2;
    font-size: clamp(30px, 2.5vw, 42px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.rstc-px__word.is-hot {
    background-image: linear-gradient(#c6f25a, #c6f25a);
    background-repeat: no-repeat;
    background-position: 0 92%;
    background-size: 100% 0.14em;
}

.rstc-px__desc {
    margin: 0;
    max-width: 62ch;
    color: rgba(243, 246, 238, 0.72);
    font-size: 15px;
    line-height: 1.55;
}

.rstc-px__now {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin: 12px 0 0;
}

.rstc-px__now span {
    color: #c6f25a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.rstc-px__now b {
    color: #f7faf2;
    font-size: 15px;
    transition: opacity 0.18s ease;
}

.rstc-px__metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 28px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.rstc-px__metrics b {
    display: block;
    color: #c6f25a;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
}

.rstc-px__metrics li:last-child b {
    max-width: 11em;
    font-size: 16px;
    line-height: 1.3;
    letter-spacing: 0;
}

.rstc-px__metrics span {
    display: block;
    margin-top: 6px;
    color: rgba(243, 246, 238, 0.55);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.rstc-px__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.rstc-px__btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.rstc-px__btn--solid {
    background: #c6f25a;
    color: #10210f;
}

.rstc-px__btn--solid:hover { color: #10210f; }

.rstc-px__btn--ghost {
    border: 1px solid rgba(198, 242, 90, 0.45);
    color: #f3f6ee;
}

.rstc-px__btn--ghost:hover { color: #c6f25a; }

.rstc-px__run {
    position: relative;
    z-index: 1;
    overflow: hidden;
    margin-top: 18px;
    padding: 12px 0;
    background: #102816;
}

.rstc-px__run div {
    display: flex;
    width: max-content;
    animation: rstcPxRun 28s linear infinite;
}

.rstc-px__run span {
    flex: none;
    white-space: nowrap;
    padding: 0 18px;
    color: #f3f6ee;
    font-size: 13px;
    font-weight: 700;
}

.rstc-px__run span::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 18px;
    background: #c6f25a;
    transform: rotate(45deg);
}

@keyframes rstcPxBeam {
    from { background-position: -40% 0; }
    to { background-position: 150% 0; }
}

@keyframes rstcPxRun {
    to { transform: translateX(-50%); }
}

@keyframes rstcPxPulse {
    70% { box-shadow: 0 0 0 7px rgba(198, 242, 90, 0); }
}

@keyframes rstcPxFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes rstcPxDraw {
    0% { stroke-dashoffset: 420; }
    45%, 100% { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .rstc-px__beam,
    .rstc-px__run div,
    .rstc-px__kicker::before,
    .rstc-px__app,
    .rstc-px__chart path { animation: none; }
}

.rstc-pd-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rstc-pd-btn--solid {
    background: var(--rstc-green);
    color: #142010;
    box-shadow: 0 6px 18px rgba(139, 197, 63, 0.3);
}

.rstc-pd-btn--solid:hover {
    transform: translateY(-2px);
    color: #142010;
}

.rstc-pd-btn--line {
    border: 1px solid var(--rstc-line);
    background: #fff;
    color: var(--rstc-ink);
}

.rstc-pd-btn--line:hover {
    border-color: rgba(139, 197, 63, 0.45);
    color: var(--rstc-green-deep);
}

/* Type sibling nav */
.rstc-pd-type-nav {
    background: #fff;
    border-bottom: 1px solid var(--rstc-line);
}

.rstc-pd-type-nav__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.rstc-pd-type-nav__inner::-webkit-scrollbar {
    display: none;
}

.rstc-pd-type-nav__label {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rstc-muted);
}

.rstc-pd-type-nav__link {
    flex: 0 0 auto;
    padding: 7px 14px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: var(--rstc-panel);
    color: var(--rstc-muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.rstc-pd-type-nav__link:hover {
    color: var(--rstc-green-deep);
    border-color: rgba(139, 197, 63, 0.3);
}

.rstc-pd-type-nav__link.is-active {
    background: var(--rstc-green);
    color: #142010;
}

/* Main layout: content + sticky brief */
.rstc-pd-body {
    padding: 40px 0 72px;
    background: #fff;
}

.rstc-pd-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
    align-items: start;
}

.rstc-pd-main {
    min-width: 0;
}

.rstc-pd-section {
    margin-bottom: 48px;
}

.rstc-pd-section__head {
    margin-bottom: 22px;
}

.rstc-pd-section__kicker {
    margin: 0 0 6px;
    color: var(--rstc-green-deep);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.rstc-pd-section__head h2 {
    margin: 0 0 8px;
    font-size: clamp(24px, 2.5vw, 30px);
    font-weight: 700;
    line-height: 1.2;
}

.rstc-pd-section__head p {
    margin: 0;
    color: var(--rstc-muted);
    font-size: 14px;
    line-height: 1.6;
}

.rstc-pd-content {
    padding: 26px 28px;
    border-radius: 14px;
    background: var(--rstc-panel);
    border: 1px solid var(--rstc-line);
    line-height: 1.75;
    color: #3d4a4f;
}

.rstc-pd-content h2,
.rstc-pd-content h3 {
    color: var(--rstc-ink);
}

.rstc-pd-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.rstc-pd-gallery img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--rstc-line);
}

.rstc-pd-video {
    margin-top: 16px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--rstc-line);
}

.rstc-pd-video iframe {
    width: 100%;
    height: 420px;
    border: 0;
    display: block;
}

/* Product lineup scroll */
.rstc-pd-lineup {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}

.rstc-pd-lineup__chip {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--rstc-line);
    background: #fff;
    text-decoration: none;
    color: inherit;
    min-width: 180px;
    max-width: 220px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.rstc-pd-lineup__chip:hover {
    border-color: rgba(139, 197, 63, 0.45);
    box-shadow: 0 6px 16px rgba(95, 138, 34, 0.1);
}

.rstc-pd-lineup__num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--rstc-green-soft);
    color: var(--rstc-green-deep);
    font-size: 12px;
    font-weight: 700;
    line-height: 32px;
    text-align: center;
}

.rstc-pd-lineup__chip strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--rstc-ink);
}

.rstc-pd-lineup__chip span {
    display: block;
    font-size: 11px;
    color: var(--rstc-muted);
}

/* Accordion catalog */
.rstc-pd-catalog {
    display: grid;
    gap: 10px;
}

.rstc-pd-catalog__item {
    border-radius: 12px;
    border: 1px solid var(--rstc-line);
    background: #fff;
    overflow: hidden;
}

.rstc-pd-catalog__item summary {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
}

.rstc-pd-catalog__item summary::-webkit-details-marker {
    display: none;
}

.rstc-pd-catalog__index {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--rstc-green-soft);
    color: var(--rstc-green-deep);
    font-size: 13px;
    font-weight: 700;
    line-height: 36px;
    text-align: center;
}

.rstc-pd-catalog__title strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--rstc-ink);
    line-height: 1.35;
}

.rstc-pd-catalog__title span {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: var(--rstc-muted);
    line-height: 1.45;
}

.rstc-pd-catalog__meta {
    font-size: 11px;
    font-weight: 700;
    color: var(--rstc-green-deep);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.rstc-pd-catalog__body {
    padding: 0 18px 18px 68px;
    border-top: 1px dashed var(--rstc-line);
}

.rstc-pd-catalog__features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding-top: 16px;
}

.rstc-pd-catalog__feature {
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--rstc-panel);
    border: 1px solid rgba(21, 32, 36, 0.06);
}

.rstc-pd-catalog__feature strong {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--rstc-ink);
    line-height: 1.35;
}

.rstc-pd-catalog__feature span {
    display: block;
    font-size: 11px;
    line-height: 1.5;
    color: var(--rstc-muted);
}

/* Sticky brief panel (RIGHT side — not left sidebar) */
.rstc-pd-brief {
    position: sticky;
    top: 88px;
    display: grid;
    gap: 16px;
}

.rstc-pd-brief__card {
    padding: 20px 18px;
    border-radius: 14px;
    border: 1px solid var(--rstc-line);
    background: #fff;
    box-shadow: 0 8px 24px rgba(21, 32, 36, 0.05);
}

.rstc-pd-brief__card h3 {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 700;
}

.rstc-pd-brief__stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--rstc-line);
    font-size: 13px;
}

.rstc-pd-brief__stat:last-of-type {
    border-bottom: 0;
}

.rstc-pd-brief__stat strong {
    font-size: 18px;
    color: var(--rstc-green-deep);
}

.rstc-pd-brief__stat span {
    color: var(--rstc-muted);
}

.rstc-pd-brief__actions {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.rstc-pd-brief__actions .rstc-pd-btn {
    justify-content: center;
    width: 100%;
}

.rstc-pd-brief__links {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rstc-pd-brief__links a {
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    background: var(--rstc-panel);
    color: var(--rstc-green-deep);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.rstc-pd-brief__links a.is-active {
    background: var(--rstc-green-soft);
    color: var(--rstc-ink);
}

/* FAQ grid */
.rstc-pd-faq {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.rstc-pd-faq__item {
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid var(--rstc-line);
    background: var(--rstc-panel);
}

.rstc-pd-faq__num {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--rstc-green-deep);
}

.rstc-pd-faq__item h4 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.rstc-pd-faq__item p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--rstc-muted);
}

/* Internal links */
.rstc-pd-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rstc-pd-links a {
    padding: 7px 12px;
    border-radius: 6px;
    border: 1px dashed rgba(95, 138, 34, 0.35);
    background: #fff;
    color: var(--rstc-green-deep);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

/* Related horizontal strip */
.rstc-pd-related {
    padding-top: 40px;
    border-top: 1px solid var(--rstc-line);
}

.rstc-pd-related__track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

.rstc-pd-related__card {
    flex: 0 0 240px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--rstc-line);
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rstc-pd-related__card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(21, 32, 36, 0.1);
}

.rstc-pd-related__card img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
}

.rstc-pd-related__card-body {
    padding: 14px 16px;
}

.rstc-pd-related__card-body h4 {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.rstc-pd-related__card-body p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--rstc-muted);
}

/* CTA band */
.rstc-pd-cta {
    margin-top: 40px;
    padding: 32px 28px;
    border-radius: 16px;
    text-align: center;
    background: linear-gradient(135deg, var(--rstc-green-soft), #fff);
    border: 1px solid rgba(139, 197, 63, 0.25);
}

.rstc-pd-cta h3 {
    margin: 0 0 8px;
    font-size: 24px;
}

.rstc-pd-cta p {
    margin: 0 0 18px;
    color: var(--rstc-muted);
}

@media (max-width: 991px) {
    .rstc-px { min-height: 0; display: flex; flex-direction: column; }
    .rstc-px__view {
        position: relative;
        order: 2;
        left: auto;
        right: auto;
        bottom: auto;
        width: 100%;
        height: auto;
        justify-content: stretch;
        padding: 0 16px 16px;
    }
    .rstc-px__app { width: 100%; animation: none; }
    .rstc-px__copy { max-width: none; padding: 8px 0 16px; }
    .rstc-px__beam { bottom: 40px; }

    .rstc-pd-layout {
        grid-template-columns: 1fr;
    }

    .rstc-pd-brief {
        position: static;
        grid-template-columns: repeat(2, 1fr);
    }

    .rstc-pd-catalog__features {
        grid-template-columns: 1fr;
    }

    .rstc-pd-faq {
        grid-template-columns: 1fr;
    }

    .rstc-pd-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .rstc-px__title { font-size: 2rem; }
    .rstc-px__metrics b { font-size: 26px; }
    .rstc-pd-brief {
        grid-template-columns: 1fr;
    }

    .rstc-pd-catalog__item summary {
        grid-template-columns: auto 1fr;
    }

    .rstc-pd-catalog__meta {
        display: none;
    }

    .rstc-pd-catalog__body {
        padding-left: 18px;
    }

    .rstc-pd-gallery {
        grid-template-columns: 1fr;
    }
}
