/* =========================================================
   BASE
========================================================= */

.mm2-item-card * {
    box-sizing: border-box;
}

/* =========================================================
   ВНЕШНИЙ ДИНАМИЧЕСКИЙ ЗАГОЛОВОК
========================================================= */

.mm2-cpt-page-title {
    width: 100%;
    max-width: 860px;
    margin: 0 auto 10px !important;
    padding: 0 10px !important;
    text-align: center !important; /* Центрирование H1 */
    font-size: 28px !important;
    font-weight: 750 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.025em !important;
    color: inherit !important;
}

.mm2-cpt-description-centered {
    width: 100%;
    max-width: 860px;
    margin: 0 auto 30px !important;
    padding: 0 10px !important;
    text-align: center !important; /* Центрирование описания */
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: inherit !important;
}

/* =========================================================
   ОСНОВНАЯ КАРТОЧКА
========================================================= */

.mm2-item-card {
    --rarity-color: #d1548c;
    --rarity-rgb: 209, 84, 140;

    width: 100%;
    max-width: 860px;

    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    align-items: center;

    padding: 24px;
    margin: 40px auto;

    background: transparent;

    border: 1px solid rgba(var(--rarity-rgb), 0.30);
    border-radius: 22px;

    box-shadow:
        0 0 30px rgba(var(--rarity-rgb), 0.06);

    color: inherit;

    transition:
        transform 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease;
}

.mm2-item-card:hover {
    transform: translateY(-2px);

    border-color: rgba(var(--rarity-rgb), 0.55);

    box-shadow:
        0 0 35px rgba(var(--rarity-rgb), 0.13);
}


/* =========================================================
   ИЗОБРАЖЕНИЕ
========================================================= */

.mm2-item-image-box {
    position: relative;

    width: 100%;
    aspect-ratio: 1 / 1;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border-radius: 18px;

    background:
        radial-gradient(
            circle at 50% 45%,
            rgba(var(--rarity-rgb), 0.18) 0%,
            rgba(var(--rarity-rgb), 0.07) 42%,
            transparent 72%
        );

    border: 1px solid rgba(var(--rarity-rgb), 0.18);
}

.mm2-item-image-box::before {
    content: "";

    position: absolute;
    inset: 20%;

    background: rgba(var(--rarity-rgb), 0.22);

    filter: blur(42px);

    border-radius: 50%;

    opacity: 0.70;

    transition: opacity 0.22s ease;
}

.mm2-item-card:hover .mm2-item-image-box::before {
    opacity: 1;
}

.mm2-item-image {
    position: relative;
    z-index: 1;

    width: 88% !important;
    height: 88% !important;

    object-fit: contain;

    transition: transform 0.25s ease;
}

.mm2-item-card:hover .mm2-item-image {
    transform: scale(1.035);
}


/* =========================================================
   ИНФОРМАЦИОННЫЙ БЛОК
========================================================= */

.mm2-item-content {
    min-width: 0;
}

.mm2-item-header {
    margin-bottom: 20px;
}


/* =========================================================
   НАЗВАНИЕ
========================================================= */

.mm2-item-name {
    margin: 0 0 10px !important;
    padding: 0 !important;

    font-size: 30px !important;
    font-weight: 750 !important;
    line-height: 1.15 !important;

    letter-spacing: -0.03em !important;

    color: inherit !important;
}

.mm2-item-name a {
    color: inherit !important;
    text-decoration: none !important;
    transition: opacity 0.18s ease;
}

.mm2-item-name a:hover {
    opacity: 0.8 !important;
    text-decoration: underline !important;
}


/* =========================================================
   РЕДКОСТЬ
========================================================= */

.mm2-item-rarity {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 6px 10px;

    font-size: 13px;
    font-weight: 700;
    line-height: 1;

    color: var(--rarity-color);

    background: rgba(var(--rarity-rgb), 0.10);

    border: 1px solid rgba(var(--rarity-rgb), 0.24);
    border-radius: 999px;
}

.mm2-item-rarity-dot {
    width: 7px;
    height: 7px;

    flex: 0 0 7px;

    background: var(--rarity-color);

    border-radius: 50%;

    box-shadow:
        0 0 10px rgba(var(--rarity-rgb), 0.55);
}


/* =========================================================
   ЦЕННОСТЬ
========================================================= */

.mm2-item-value-label {
    margin-bottom: 6px;

    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;

    color: inherit;

    opacity: 0.58;
}

.mm2-item-value {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;

    margin-bottom: 6px;

    font-size: 40px;
    font-weight: 800;
    line-height: 1;

    letter-spacing: -0.035em;
}


/* Текст "ВАЛЮТЫ -" */

.mm2-item-value-unit {
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;

    color: inherit;

    opacity: 1;
}


/* Число валют */

.mm2-item-value-number {
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;

    color: #39a866;

    letter-spacing: inherit;
}


/* =========================================================
   ДИАПАЗОН
========================================================= */

.mm2-item-range {
    margin-top: 7px;

    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;

    color: inherit;

    opacity: 0.60;
}

.mm2-item-range strong {
    font-weight: 650;
}


/* =========================================================
   СОДЕРЖИТ
========================================================= */

.mm2-item-set {
    width: 100%;

    margin-top: 20px;
    padding: 14px 16px;

    background: rgba(var(--rarity-rgb), 0.045);

    border: 1px solid rgba(var(--rarity-rgb), 0.13);
    border-radius: 13px;
}

.mm2-item-set-title {
    margin-bottom: 6px;

    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;

    letter-spacing: 0.06em;
    text-transform: uppercase;

    color: var(--rarity-color);
}

.mm2-item-set-items {
    font-size: 14px;
    font-weight: 550;
    line-height: 1.55;

    color: inherit;

    opacity: 0.80;
}


/* =========================================================
   ЦВЕТА РЕДКОСТЕЙ
========================================================= */


/* COMMON */

.mm2-item-card.common {
    --rarity-color: #78909c;
    --rarity-rgb: 120, 144, 156;
}


/* UNCOMMON */

.mm2-item-card.uncommon {
    --rarity-color: #00e676;
    --rarity-rgb: 0, 230, 118;
}


/* RARE */

.mm2-item-card.rare {
    --rarity-color: #3d5afe;
    --rarity-rgb: 61, 90, 254;
}


/* LEGENDARY */

.mm2-item-card.legendary {
    --rarity-color: #ff9900;
    --rarity-rgb: 255, 153, 0;
}


/* VINTAGE */

.mm2-item-card.vintage {
    --rarity-color: #8d6e63;
    --rarity-rgb: 141, 110, 99;
}


/* GODLY */

.mm2-item-card.godly {
    --rarity-color: #ff3366;
    --rarity-rgb: 255, 51, 102;
}


/* ANCIENT */

.mm2-item-card.ancient {
    --rarity-color: #cc33ff;
    --rarity-rgb: 204, 51, 255;
}


/* UNIQUE / UNIQUES */

.mm2-item-card.unique,
.mm2-item-card.uniques {
    --rarity-color: #e91e63;
    --rarity-rgb: 233, 30, 99;
}


/* CHROMA */

.mm2-item-card.chroma {
    --rarity-color: #00e5ff;
    --rarity-rgb: 0, 229, 255;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    /* Карточка превращается в вертикальный блок */

    .mm2-item-card {
        grid-template-columns: 1fr !important;

        gap: 18px !important;

        padding: 16px !important;

        border-radius: 18px !important;
    }


    /* Картинка */

    .mm2-item-image-box {
        width: 100% !important;
        max-width: 330px !important;

        margin-left: auto !important;
        margin-right: auto !important;
    }


    /* Текстовый блок */

    .mm2-item-content {
        width: 100% !important;
        max-width: 330px !important;

        margin-left: auto !important;
        margin-right: auto !important;
    }


    /* Название */

    .mm2-item-name {
        font-size: 25px !important;
        line-height: 1.2 !important;
    }


    /* Блок валют */

    .mm2-item-value {
        font-size: 34px !important;
        gap: 7px !important;
    }


    .mm2-item-header {
        margin-bottom: 16px !important;
    }


    .mm2-item-set {
        margin-top: 17px !important;
    }

}


/* =========================================================
   ОЧЕНЬ УЗКИЕ ЭКРАНЫ
========================================================= */

@media (max-width: 380px) {

    .mm2-item-value {
        font-size: 30px !important;
    }

}

/* =========================================================
   КНОПКА МАГАЗИНА
========================================================= */

.mm2-item-shop-button-container {
    width: 100% !important;
    display: flex !important;
    justify-content: flex-start !important;
}

.mm2-item-shop-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    padding: 10px 24px !important;
    
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    
    color: #ffffff !important;
    background: var(--rarity-color) !important;
    
    border: 1px solid rgba(var(--rarity-rgb), 0.3) !important;
    border-radius: 999px !important;
    
    box-shadow: 0 4px 15px rgba(var(--rarity-rgb), 0.2) !important;
    
    cursor: pointer !important;
    transition: all 0.2s ease !important;

    /* Плавная аппаратная пульсация */
    animation: mm2Pulse 1.2s infinite alternate ease-in-out;
    will-change: transform, box-shadow;
}

.mm2-item-shop-button:hover {
    transform: translateY(-1px) scale(1.02) !important;
    box-shadow: 0 6px 20px rgba(var(--rarity-rgb), 0.45) !important;
    opacity: 0.95 !important;
    animation-play-state: paused; /* Ставим пульсацию на паузу при наведении */
}

@keyframes mm2Pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(var(--rarity-rgb), 0.25);
    }
    100% {
        transform: scale(1.035);
        box-shadow: 0 6px 25px rgba(var(--rarity-rgb), 0.45);
    }
}

@media (max-width: 600px) {
    .mm2-item-shop-button-container {
        justify-content: center !important;
    }
    .mm2-item-shop-button {
        width: 100% !important;
        max-width: 330px !important; /* Растягивается под размер картинки */
    }
}
