/* ============================================
   SKIN CARD — общая карточка скина (инвентарь, каталог супертрейда)
   ============================================ */

.items-wrapper {
    background: transparent;
    border: 1px solid rgba(0, 229, 153, 0.25);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 0 40px rgba(0, 229, 153, 0.08);
}
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(194px, 1fr));
    gap: 11px;
    max-width: 1184px;
    margin: 0 auto;
    justify-items: stretch;
}
/* Каталог супертрейда — отдельная плотность от инвентаря: это витрина со
   множеством позиций, а не личный список вещей, крупные карточки здесь
   означают больше скролла без пользы. Своя настройка, не завязана на
   инвентарные правки. */
.items-grid.catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.skin-card {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 13px;
    padding: 9px;
    border: 2px solid var(--rarity-color, #2A2A2A);
    box-shadow: 0 0 20px var(--rarity-glow, transparent);
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 3px;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}
.skin-card__info {
    width: 100%;
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
/* Обёртка над названием/паттерном — центрируется по вертикали в оставшемся
   месте (авто-отступы съедают свободное место сверху и снизу поровну), а
   цена всегда прижата к самому низу карточки. Так цены выровнены по одной
   линии у всех карточек в ряду, даже если у части из них нет строки Pattern
   (кейсы и т.п.) — свободное место не скапливается под текстом. */
.skin-card__info .main {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-top: auto;
    margin-bottom: auto;
}
.skin-card__info .name-primary {
    font-weight: 500;
    font-size: 0.78rem;
    color: #999;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.skin-card__info .name-secondary {
    font-weight: 700;
    font-size: 0.78rem;
    color: #F5F5F5;
    max-width: 100%;
    min-height: 1.2em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.skin-card__info .pattern-row {
    font-size: 0.78rem;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 1px;
}
.skin-card__info .pattern-row .label { color: #999; }
.skin-card__info .pattern-row .value { color: #E0E0E0; font-weight: 600; }
.skin-card__info .phase-badge {
    margin-left: 4px;
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #FFD700;
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.3);
}
.skin-card__info .price {
    font-size: 0.9rem;
    font-weight: 700;
    color: #F0F0F0;
    margin-top: 0;
}

.skin-card__image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: transparent;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.skin-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.25s ease;
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: none;
}
.skin-card:hover .skin-card__image img,
.skin-card.selected .skin-card__image img {
    transform: scale(1.06);
}
.skin-card:hover { transform: translateY(-3px); border-color: #00E599; box-shadow: 0 8px 24px rgba(0, 229, 153, 0.1); }
.skin-card.selected { border-color: #00E599; background: #1E2A1E; box-shadow: 0 0 0 1px #00E599, 0 8px 24px rgba(0, 229, 153, 0.15); }

.wear-badge {
    display: block;
    width: 100%;
    text-align: center;
    white-space: nowrap;
    color: #E8E8E8;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    margin-bottom: 6px;
}
.skin-card__favorite-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    color: #E8E8E8;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
    z-index: 2;
}
.skin-card__favorite-btn:hover {
    color: #00E599;
    border-color: rgba(0, 229, 153, 0.4);
    transform: scale(1.1);
}
.skin-card__favorite-btn.active {
    color: #00E599;
    border-color: rgba(0, 229, 153, 0.4);
}
.skin-card__amount {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(10, 10, 10, 0.8);
    color: #E8E8E8;
    font-size: 0.52rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
/* Модификатор для каталога супертрейда — счётчик владельцев рядом с ценой,
   не поверх картинки, без фона/рамки (в отличие от ×N стака в инвентаре). */
.skin-card__info .price-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
}
.skin-card__info .price-row .price { margin-top: 0; }
.skin-card__amount--inline {
    position: static;
    background: none;
    border: none;
    padding: 0;
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #F0F0F0;
}

.stickers-row {
    display: flex;
    gap: 4px;
    margin-top: 5px;
    flex-wrap: nowrap;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    width: 100%;
}
/* Стикеры/брелок — поверх картинки скина, справа снизу (как будут лежать на
   реальном скриншоте из игры), не отдельной строкой в тексте карточки. Без
   затемняющей подложки — сами стикеры уже читаются на любом фоне. */
.skin-card__image .stickers-row {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 6px;
    min-height: 0;
    gap: 3px;
    justify-content: flex-start;
    background: none;
}
.skin-card__image .stickers-row:empty {
    display: none;
}
.skin-card__image .stickers-row .sticker-item,
.skin-card__image .stickers-row .charm-item {
    width: 21px;
    height: 21px;
    background: none;
    border: none;
}
.sticker-item {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 4px;
    background: #0F0F0F;
    border: 1px solid #333;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.18s ease, box-shadow 0.18s ease;
    cursor: default;
}
.sticker-item:hover {
    transform: scale(1.3);
    border-color: #00E599;
    box-shadow: 0 2px 10px rgba(0, 229, 153, 0.35);
    z-index: 20;
}
.sticker-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}
.sticker-item .sticker-slot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    font-size: 0.42rem;
    color: #666;
    background: rgba(0,0,0,0.7);
    padding: 0 2px;
    border-radius: 2px;
    pointer-events: none;
}
.charm-item {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #0F0F0F;
    border: 1px solid #FFD700;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease;
    cursor: default;
    margin-left: 3px;
}
.charm-item:hover {
    transform: scale(1.3);
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.4);
    z-index: 20;
}
.charm-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.stickers-label {
    display: none;
}

/* auto-fill/minmax подбирает число колонок само по ширине контейнера —
   отдельные брейкпоинты на каждый шаг больше не нужны. */
