/* Сетка магазина */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Карточка товара */
.shop-item-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 25px 15px 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.shop-item-card:hover {
    transform: translateY(-8px);
}

/* Кнопка "Открыть" в инвентаре */
.shop-item-card button.btn-outline-warning {
    background: rgba(250, 191, 60, 0.2);
    border: 1px solid #fabf3c;
    color: #fabf3c;
    padding: 10px;
    border-radius: 12px;
    font-weight: 700;
    margin-top: 10px;
    width: 100%;
}

.shop-item-card button.btn-outline-warning:hover {
    background: #fabf3c;
    color: #000;
}

/* Эффект свечения ПОД прозрачной PNG */
.shop-item-glow {
    position: absolute;
    top: 10%; 
    left: 50%;
    transform: translateX(-50%);
    width: 120px; 
    height: 120px;
    border-radius: 50%;
    filter: blur(35px);
    opacity: 0.4;
    z-index: 0;
    transition: opacity 0.3s, transform 0.3s;
}

.shop-item-card:hover .shop-item-glow {
    opacity: 0.8;
    transform: translateX(-50%) scale(1.2);
}

/* Сама прозрачная PNG картинка */
.shop-item-img {
    position: relative;
    z-index: 1;
    width: 110px; 
    height: 110px;
    object-fit: contain;
    /* Это создаст красивую тень по контуру самой PNG, а не рамки! */
    filter: drop-shadow(0 15px 15px rgba(0,0,0,0.6)); 
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 15px;
}

.shop-item-card:hover .shop-item-img {
    transform: scale(1.15) translateY(-5px);
}

.shop-item-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 5px;
    position: relative;
    z-index: 2;
}

.shop-item-desc {
    color: #94a3b8;
    font-size: 0.75rem;
    margin-bottom: 15px;
    line-height: 1.4;
    position: relative;
    z-index: 2;
    flex-grow: 1;
}

/* Кнопка покупки */
.shop-buy-btn {
    width: 100%;
    background: rgba(0,0,0,0.4);
    border: 1px solid;
    border-radius: 12px;
    padding: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    position: relative;
    z-index: 2;
}

.shop-buy-btn:hover {
    background: #fff;
    color: #000;
    box-shadow: 0 0 15px rgba(255,255,255,0.3);
}

/* Цвета редкости */
.rarity-common .shop-item-glow { background: #94a3b8; }
.rarity-common .shop-buy-btn { border-color: #94a3b8; }
.rarity-common:hover { border-color: rgba(148, 163, 184, 0.5); box-shadow: 0 10px 20px rgba(148, 163, 184, 0.1); }

.rarity-rare .shop-item-glow { background: #38bdf8; }
.rarity-rare .shop-buy-btn { border-color: #38bdf8; color: #38bdf8; }
.rarity-rare:hover { border-color: rgba(56, 189, 248, 0.5); box-shadow: 0 10px 20px rgba(56, 189, 248, 0.15); }

.rarity-epic .shop-item-glow { background: #c084fc; }
.rarity-epic .shop-buy-btn { border-color: #c084fc; color: #c084fc; }
.rarity-epic:hover { border-color: rgba(192, 132, 252, 0.5); box-shadow: 0 10px 20px rgba(192, 132, 252, 0.15); }

.rarity-legendary .shop-item-glow { background: #facc15; }
.rarity-legendary .shop-buy-btn { border-color: #facc15; color: #facc15; }
.rarity-legendary:hover { border-color: rgba(250, 204, 21, 0.5); box-shadow: 0 10px 20px rgba(250, 204, 21, 0.15); }

.rarity-mythic .shop-item-glow { background: #f43f5e; }
.rarity-mythic .shop-buy-btn { border-color: #f43f5e; color: #f43f5e; }
.rarity-mythic:hover { border-color: rgba(244, 63, 94, 0.5); box-shadow: 0 10px 20px rgba(244, 63, 94, 0.15); }

.shop-header h2 { font-weight: 900; margin-bottom: 5px; }
.shop-header p { color: #94a3b8; }

@keyframes shake {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
    100% { transform: rotate(0deg); }
}
.chest-shake-box { display: inline-block; }