/* Единый инспектор предметов (магазин / ТП / инвентарь / обмен) */

.item-inspect-overlay {
    z-index: 13200;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(4, 6, 12, 0.78);
}

.item-inspect-modal {
    position: relative;
    width: min(860px, 96vw);
    max-height: min(90vh, 720px);
    overflow: auto;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: color-mix(in srgb, var(--va-bg-elevated, #161920) 94%, #000);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}

.item-inspect-modal.rarity-border.legendary {
    box-shadow: 0 0 0 1px color-mix(in srgb, #e8a54b 55%, transparent), 0 28px 80px rgba(0, 0, 0, 0.55);
}
.item-inspect-modal.rarity-border.epic {
    box-shadow: 0 0 0 1px color-mix(in srgb, #b388ff 55%, transparent), 0 28px 80px rgba(0, 0, 0, 0.55);
}
.item-inspect-modal.rarity-border.rare {
    box-shadow: 0 0 0 1px color-mix(in srgb, #66c0f4 55%, transparent), 0 28px 80px rgba(0, 0, 0, 0.55);
}

.ii-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: inherit;
    cursor: pointer;
    font-size: 1.1rem;
}

.ii-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
    gap: 0;
    min-height: 360px;
}

.ii-preview-host {
    padding: 28px 22px;
    display: grid;
    place-items: center;
    background:
        radial-gradient(520px 280px at 50% 30%, color-mix(in srgb, var(--va-accent) 16%, transparent), transparent 60%),
        rgba(0, 0, 0, 0.22);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.ii-side {
    padding: 28px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ii-stage {
    width: 100%;
    max-width: 420px;
    display: grid;
    place-items: center;
}

.ii-hero-img {
    width: min(320px, 70vw);
    height: min(320px, 70vw);
    object-fit: contain;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.25);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.ii-stage--art.rarity-glow.legendary .ii-hero-img,
.ii-stage--fallback.legendary {
    box-shadow: 0 0 40px color-mix(in srgb, #e8a54b 35%, transparent);
}
.ii-stage--art.rarity-glow.epic .ii-hero-img {
    box-shadow: 0 0 40px color-mix(in srgb, #b388ff 35%, transparent);
}
.ii-stage--art.rarity-glow.rare .ii-hero-img {
    box-shadow: 0 0 40px color-mix(in srgb, #66c0f4 35%, transparent);
}

.ii-letter {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    font-size: 2.5rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.06);
}

.ii-sticker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 10px;
    width: min(380px, 100%);
}

.ii-sticker-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.25);
}

.ii-icon-demo {
    width: 140px !important;
    height: 140px !important;
    font-size: 1.2rem !important;
}

.ii-rarity {
    display: inline-flex;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ii-title {
    margin: 4px 0 0;
    font-family: var(--va-display, Syne, sans-serif);
    font-size: 1.45rem;
    letter-spacing: -0.02em;
}

.ii-price {
    font-size: 1.2rem;
    color: var(--va-accent, #66c0f4);
}

.ii-desc {
    margin: 0;
    line-height: 1.45;
    font-size: 0.92rem;
}

.ii-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
}

.ii-shop-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.ii-price--row {
    font-size: 1.25rem;
    font-weight: 700;
    white-space: nowrap;
}

.ii-shop-buy {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 220px;
}

.vcoin-purchase-confirm-price {
    margin: 12px 0 0;
    font-size: 1.05rem;
}

.vcoin-purchase-confirm-price .ii-price {
    font-size: 1.35rem;
}

.vcoin-item-card {
    cursor: pointer;
}

.vcoin-item-preview--tap {
    position: relative;
    cursor: zoom-in;
}

.vcoin-item-fav {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(8, 10, 16, 0.72);
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 1.05rem;
    line-height: 1;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.vcoin-item-fav::before {
    content: '♡';
}

.vcoin-item-fav.is-fav,
.vcoin-item-fav:hover {
    color: #ff6b8a;
    border-color: color-mix(in srgb, #ff6b8a 45%, transparent);
}

.vcoin-item-fav.is-fav::before {
    content: '♥';
}

.vcoin-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 4px;
}

.vcoin-item-footer .vcoin-item-price {
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
    color: var(--va-accent, #66c0f4);
    white-space: nowrap;
}

.vcoin-item-footer .buy-vcoin-item {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 140px;
    min-height: 36px;
}

.ii-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 88px;
}

.ii-tile-art {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06) center / cover no-repeat;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.ii-tile-name {
    font-size: 0.72rem;
    text-align: center;
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Улучшение карточек магазина / ТП */
.vcoin-item-preview,
.market-card-preview,
.mk-inv-art,
.mk-trade-pick-art,
.mk-trade-confirm-art,
.steam-inv-slot-preview,
.steam-inv-detail-preview {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.vcoin-item-card .vcoin-item-preview {
    min-height: 148px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.22);
}

.vcoin-item-card .vcoin-item-preview img {
    width: 100%;
    height: 148px;
    object-fit: contain;
}

.market-card-v2 .market-card-preview {
    min-height: 160px;
    border-radius: 14px 14px 0 0;
    background-color: rgba(0, 0, 0, 0.28);
    cursor: zoom-in;
}

.mk-trade-confirm-art,
.mk-trade-pick-art {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.06);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.mk-sell-icon--lg {
    width: 96px !important;
    height: 96px !important;
    border-radius: 16px !important;
    background-size: cover !important;
    background-position: center !important;
}

.steam-inv-detail-preview {
    min-height: 180px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.25);
    margin-bottom: 12px;
    overflow: hidden;
    cursor: zoom-in;
}

.steam-inv-detail-preview img {
    max-width: 100%;
    max-height: 220px;
    object-fit: contain;
}

.vcoin-purchase-modal.vcoin-preview-modal,
.vcoin-purchase-modal {
    width: min(720px, 94vw);
}

.vcoin-purchase-preview {
    min-height: 200px;
    display: grid;
    place-items: center;
    padding: 16px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.22);
    margin: 12px 0;
}

@media (max-width: 720px) {
    .ii-layout {
        grid-template-columns: 1fr;
    }
    .ii-preview-host {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        min-height: 240px;
    }
}
