/* shop.css - Стили для магазина */

/* Баланс в профиле */
.balance-badge {
    display: inline-block;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 1rem;
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.3);
}

/* Фильтр категорий */
.category-filter {
    text-align: center;
    margin: 2rem 0;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #e1e1e1;
}

.category-btn {
    margin: 0.3rem;
    font-size: 1.3rem;
    padding: 0.7rem 1.5rem;
    transition: all 0.2s ease;
}

.category-btn:hover {
    background: #f0f0f0;
}

.category-btn.active {
    background: #33C3F0;
    color: #fff;
    border-color: #33C3F0;
}

/* Сетка товаров */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* Карточка товара */
.product-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.product-card.hidden {
    display: none !important;
}

/* Изображение товара */
.product-image {
    height: 150px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.placeholder-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.placeholder-icon .icon-text {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Разные цвета для разных категорий */
.product-card[data-category="kits"] .product-image {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.product-card[data-category="items"] .product-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.product-card[data-category="resources"] .product-image {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.product-card[data-category="rare"] .product-image {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
}

.product-card[data-category="privileges"] .product-image {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

/* Информация о товаре */
.product-info {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.6rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.5rem 0;
}

.product-description {
    font-size: 1.3rem;
    color: #666;
    margin: 0 0 1rem 0;
    line-height: 1.5;
    min-height: 40px;
}

/* Подвал карточки */
.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e1e1e1;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3498db;
}

.buy-btn {
    font-size: 1.3rem;
    padding: 0.5rem 1.5rem;
}

/* Модальное окно */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h3 {
    margin-top: 0;
    color: #333;
}

.modal-product-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 1rem 0;
}

.modal-product-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #3498db;
    margin: 0.5rem 0;
}

.modal-balance {
    font-size: 1.3rem;
    color: #666;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f5f5f5;
    border-radius: 4px;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-buttons .button {
    flex: 1;
}

/* Информационная коробка */
.info-box {
    background: #f9f9f9;
    border-radius: 4px;
    padding: 1.5rem;
    border: 1px solid #e1e1e1;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.info-box h5 {
    color: #33C3F0;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 0.5rem;
    font-weight: 600;
}

.info-box ol,
.info-box ul {
    padding-left: 2rem;
    color: #555;
}

.info-box li {
    padding: 0.5rem 0;
    font-size: 1.4rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .category-filter {
        overflow-x: auto;
        white-space: nowrap;
    }

    .category-btn {
        font-size: 1.2rem;
        padding: 0.5rem 1rem;
    }

    .balance-badge {
        display: block;
        margin: 1rem auto;
    }
}

/* Уведомления */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 4px;
    margin: 1rem 0;
    font-size: 1.4rem;
}

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #28a745;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border: 1px solid #dc3545;
    color: #721c24;
}
