/* RustCore item detail page — scoped to item pages only. */

.rc-item-page {
    --rc-item-panel: var(--rc-surface, #171d22);
    --rc-item-panel-raised: var(--rc-surface-raised, #1d252b);
    --rc-item-border: var(--rc-border, rgba(255,255,255,.09));
    --rc-item-text: var(--rc-text, #f2f5f4);
    --rc-item-muted: var(--rc-muted, #a2aeaa);
    --rc-item-accent: var(--rc-accent, #a7d85a);
    --rc-item-radius: 18px;
    width: 100%;
    max-width: 1180px;
    margin-inline: auto;
    padding: clamp(20px, 3vw, 40px) 0 64px;
    color: var(--rc-item-text);
}

.rc-item-page,
.rc-item-page * {
    box-sizing: border-box;
}

.rc-item-page .rc-container {
    width: 100%;
    max-width: none;
}

.rc-item-page .rc-item-hero {
    display: grid;
    grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
    gap: clamp(22px, 4vw, 48px);
    align-items: center;
    padding: clamp(22px, 4vw, 44px);
    overflow: hidden;
    border: 1px solid var(--rc-item-border);
    border-radius: 24px;
    background:
        radial-gradient(
            ellipse at 12% 0%,
            rgba(167,216,90,.11),
            transparent 48%
        ),
        linear-gradient(
            135deg,
            var(--rc-item-panel-raised),
            var(--rc-item-panel)
        );
    box-shadow: 0 18px 48px rgba(0,0,0,.16);
}

.rc-item-page .rc-item-image {
    display: grid;
    place-items: center;
    min-width: 0;
    aspect-ratio: 1 / 1;
    padding: 20px;
    border: 1px solid var(--rc-item-border);
    border-radius: 20px;
    background: rgba(0,0,0,.18);
}

.rc-item-page .rc-item-image img {
    display: block;
    width: 100%;
    max-width: 300px;
    max-height: 300px;
    object-fit: contain;
    filter: drop-shadow(0 16px 20px rgba(0,0,0,.28));
}

.rc-item-page .rc-item-main {
    min-width: 0;
}

.rc-item-page .rc-item-heading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 24px;
}

.rc-item-page .rc-item-eyebrow,
.rc-item-page .rc-item-heading .rc-item-eyebrow {
    display: block;
    margin: 0 0 10px;
    color: var(--rc-item-accent);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.rc-item-page .rc-item-eyebrow span {
    padding-inline: 4px;
    color: var(--rc-item-muted);
}

.rc-item-page .rc-item-title {
    margin: 0 0 6px;
    color: var(--rc-item-text);
    font-size: clamp(20px, 3.2vw, 34px);
    line-height: 1.18;
    letter-spacing: -.02em;
    font-weight: 800;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.rc-item-page .rc-item-short {
    display: inline-flex;
    margin: 12px 0 0;
    padding: 7px 11px;
    border: 1px solid var(--rc-item-border);
    border-radius: 8px;
    background: rgba(0,0,0,.16);
    color: var(--rc-item-muted);
    font: 500 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    overflow-wrap: anywhere;
}

.rc-item-page .rc-item-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.rc-item-page .rc-item-stat {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 9px;
    min-width: 0;
    min-height: 82px;
    padding: 15px 17px;
    border: 1px solid var(--rc-item-border);
    border-radius: 13px;
    background: rgba(0,0,0,.15);
}

.rc-item-page .rc-item-stat span,
.rc-item-page .rc-item-characteristic span,
.rc-item-page .rc-info-meta-row span {
    color: var(--rc-item-muted);
    font-size: 12px;
    line-height: 1.45;
}

.rc-item-page .rc-item-stat b {
    color: var(--rc-item-text);
    font-size: 17px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.rc-item-page .rc-item-language {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    padding: 4px;
    border: 1px solid var(--rc-item-border);
    border-radius: 10px;
    background: rgba(0,0,0,.16);
}

.rc-item-page .rc-item-language a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 32px;
    padding: 5px 10px;
    border-radius: 7px;
    color: var(--rc-item-muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    transition:
        color .16s ease,
        background .16s ease;
}

.rc-item-page .rc-item-language a:hover {
    color: var(--rc-item-text);
    background: rgba(255,255,255,.06);
}

.rc-item-page .rc-item-language a.is-active {
    color: #11160d;
    background: var(--rc-item-accent);
}

.rc-item-page .rc-item-section {
    margin-top: 22px;
    padding: clamp(20px, 3vw, 30px);
    border: 1px solid var(--rc-item-border);
    border-radius: var(--rc-item-radius);
    background: var(--rc-item-panel);
}

.rc-item-page .rc-item-section h2,
.rc-item-page .rc-item-info-card h2 {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 0 20px;
    color: var(--rc-item-text);
    font-size: clamp(20px, 2.5vw, 25px);
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: -.02em;
}

.rc-item-page .rc-item-section h2::before,
.rc-item-page .rc-item-info-card h2::before {
    display: block;
    width: 4px;
    height: 22px;
    flex: 0 0 4px;
    border-radius: 4px;
    background: var(--rc-item-accent);
    content: "";
}

.rc-item-page .rc-item-description {
    color: var(--rc-item-muted);
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.rc-item-page .rc-item-description > :first-child {
    margin-top: 0;
}

.rc-item-page .rc-item-description > :last-child {
    margin-bottom: 0;
}

.rc-item-page .rc-item-characteristics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.rc-item-page .rc-item-characteristic {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--rc-item-border);
    border-radius: 11px;
    background: rgba(0,0,0,.12);
}

.rc-item-page .rc-item-characteristic span {
    overflow-wrap: anywhere;
}

.rc-item-page .rc-item-characteristic b {
    color: var(--rc-item-text);
    text-align: right;
    font-size: 13px;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.rc-item-page .rc-item-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
    margin-top: 22px;
}

.rc-item-page .rc-item-info-card {
    min-width: 0;
    padding: clamp(18px, 2.5vw, 26px);
    border: 1px solid var(--rc-item-border);
    border-radius: var(--rc-item-radius);
    background: var(--rc-item-panel);
}

.rc-item-page .rc-item-info-card h2 {
    margin-bottom: 18px;
}

.rc-item-page .rc-info-meta {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.rc-item-page .rc-info-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 13px;
    border: 1px solid var(--rc-item-border);
    border-radius: 10px;
    background: rgba(0,0,0,.12);
}

.rc-item-page .rc-info-meta-row b {
    color: var(--rc-item-text);
    text-align: right;
    font-size: 13px;
}

.rc-item-page .rc-info-list {
    display: grid;
    gap: 8px;
}

.rc-item-page .rc-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    padding: 12px 13px;
    border: 1px solid var(--rc-item-border);
    border-radius: 10px;
    background: rgba(0,0,0,.12);
}

.rc-item-page .rc-info-row > span {
    min-width: 0;
    color: var(--rc-item-text);
    overflow-wrap: anywhere;
}

.rc-item-page .rc-info-value {
    flex: 0 0 auto;
    color: var(--rc-item-accent);
    font-size: 14px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.rc-item-page .rc-resource-row {
    align-items: center;
}

.rc-item-page .rc-resource-main {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.rc-item-page .rc-resource-icon {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    padding: 4px;
    border: 1px solid var(--rc-item-border);
    border-radius: 8px;
    background: rgba(0,0,0,.18);
}

.rc-item-page .rc-resource-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rc-item-page .rc-resource-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    color: var(--rc-item-text);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.rc-item-page .rc-resource-name small {
    color: var(--rc-item-muted);
    font: 500 10px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.rc-item-page .rc-resource-values {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
}

.rc-item-page .rc-recycle-chance {
    color: var(--rc-item-muted);
    font-size: 12px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.rc-item-page .rc-recycle-group + .rc-recycle-group {
    margin-top: 16px;
}

.rc-item-page .rc-recycle-group-title {
    margin: 0 0 8px;
    color: var(--rc-item-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.rc-item-page code {
    display: inline-block;
    margin-inline-start: 5px;
    padding: 2px 5px;
    border: 1px solid var(--rc-item-border);
    border-radius: 5px;
    color: var(--rc-item-muted);
    font-size: 11px;
    overflow-wrap: anywhere;
}

.rc-item-page .rc-recipe-list {
    display: grid;
    gap: 8px;
}

.rc-item-page .rc-recipe-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
    padding: 13px 15px;
    border: 1px solid var(--rc-item-border);
    border-radius: 10px;
    background: rgba(0,0,0,.12);
    color: var(--rc-item-text);
    text-decoration: none;
    transition:
        border-color .16s ease,
        background .16s ease,
        transform .16s ease;
}

.rc-item-page a.rc-recipe-row:hover {
    border-color: color-mix(
        in srgb,
        var(--rc-item-accent) 60%,
        transparent
    );
    background: rgba(167,216,90,.06);
    transform: translateY(-1px);
}

.rc-item-page .rc-recipe-row > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.rc-item-page .rc-recipe-row b {
    flex: 0 0 auto;
    color: var(--rc-item-accent);
}

@media (max-width: 980px) {
    .rc-item-page .rc-item-info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .rc-item-page {
        padding-top: 18px;
    }

    .rc-item-page .rc-item-hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
        padding: 20px;
    }

    .rc-item-page .rc-item-image {
        width: min(100%, 300px);
        justify-self: center;
    }

    .rc-item-page .rc-item-image img {
        max-height: 250px;
    }

    .rc-item-page .rc-item-heading {
        margin-bottom: 18px;
    }

    .rc-item-page .rc-item-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rc-item-page .rc-item-section {
        margin-top: 14px;
        padding: 20px;
    }

    .rc-item-page .rc-item-characteristics {
        grid-template-columns: minmax(0, 1fr);
    }

    .rc-item-page .rc-item-info-grid {
        gap: 14px;
        margin-top: 14px;
    }

    .rc-item-page .rc-item-info-card {
        padding: 20px;
    }

    .rc-item-page .rc-resource-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }
}

@media (max-width: 420px) {
    .rc-item-page .rc-item-hero {
        padding: 14px;
        border-radius: 16px;
    }

    .rc-item-page .rc-item-section {
        padding: 16px;
        border-radius: 14px;
    }

    .rc-item-page .rc-item-stats {
        gap: 8px;
    }

    .rc-item-page .rc-item-stat {
        min-height: 72px;
        padding: 12px;
    }

    .rc-item-page .rc-item-stat b {
        font-size: 15px;
    }

    .rc-item-page .rc-item-characteristic {
        align-items: flex-start;
        gap: 12px;
        padding: 12px;
    }

    .rc-item-page .rc-item-info-card {
        padding: 16px;
    }

    .rc-item-page .rc-info-row {
        padding: 11px;
    }

    .rc-item-page .rc-resource-main {
        gap: 8px;
    }

    .rc-item-page .rc-resource-icon {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }

    .rc-item-page .rc-resource-values {
        gap: 6px;
    }

    .rc-item-page .rc-info-value {
        font-size: 13px;
    }

    .rc-item-page .rc-recycle-chance {
        font-size: 11px;
    }


}