/* --- Balatro Card Style for Shop --- */

.shop-container {
    margin-top: 2rem;
    width: 100%;
    max-width: 900px; /* 🔥 шире */
    margin-left: auto;
    margin-right: auto;
}

/* Заголовок */
.shop-title {
    color: #f5e6c8;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 3px 3px #000;
}

/* Сетка магазина */
.shop-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* 🔥 шире карточки */
}
.pixel-particle {
    position: fixed;
    pointer-events: none;
    z-index: 100000; /* pixel particles, fireworks */
    image-rendering: pixelated;
}

.purchase-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    pointer-events: none;
    z-index: 99999; /* purchase flash */
    animation: flashPulse 0.3s ease-out forwards;
}

@keyframes flashPulse {
    0% { opacity: 0.5; }
    100% { opacity: 0; }
}

.purchase-text {
    position: fixed;
    pointer-events: none;
    z-index: 100001; /* purchase text */
    font-family: "Press Start 2P", monospace, Arial;
    font-size: 16px;
    color: #ffd700;
    text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000;
    animation: purchaseTextAnim 1.5s ease-out forwards;
}

@keyframes purchaseTextAnim {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(0) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translateX(-50%) translateY(-10px) scale(1.2);
    }
    40% {
        transform: translateX(-50%) translateY(-15px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-60px) scale(0.8);
    }
}

.firework-container {
    position: fixed;
    pointer-events: none;
    z-index: 100000; /* pixel particles, fireworks */
}
/* Карточка товара */
.shop-item {
    background: #f5e6c8;
    border: 3px solid #000;
    box-shadow: 4px 4px 0px #000;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    transform: rotate(-1deg);
}

.shop-item:hover {
    transform: rotate(1deg) scale(1.05);
    box-shadow: 6px 6px 0px #222;
}

/* Название предмета */
.shop-item h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    color: #000;
    font-weight: bold;
}

/* Описание / цена */
.shop-item p {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #333;
}

/* --- Кнопки покупки --- */
.buy-btn {
    width: 100%;
    padding: 0.8rem;
    border: 3px solid #000;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s ease;
    background: #ff5555;
    color: #fff;
    box-shadow: 3px 3px 0px #000;
}

.buy-btn:hover {
    background: #ff7777;
    transform: scale(1.05);
    box-shadow: 4px 4px 0px #222;
}

/* Если уже куплено */
.buy-btn.equipped {
    background: #aaa;
    color: #333;
    cursor: not-allowed;
    box-shadow: none;
}

/* Если нет денег */
.buy-btn:disabled:not(.equipped) {
    background: #555;
    color: #999;
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}
