/* MineHubX Store Styles */

/* Store Header */
.store-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    border-radius: 8px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.store-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.store-header h1 i {
    margin-right: 0.75rem;
}

.store-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.minex-balance-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.minex-balance {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: bold;
}

.minex-icon {
    color: #FFD700;
    margin-right: 0.5rem;
}

.minex-amount {
    font-size: 1.2rem;
    margin-right: 0.25rem;
}

.minex-label {
    opacity: 0.9;
}

/* Store Categories */
.store-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.category-btn {
    background-color: var(--color-bg-secondary);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    color: var(--color-text);
}

.category-btn i {
    margin-right: 0.5rem;
}

.category-btn:hover {
    background-color: var(--color-bg-hover);
}

.category-btn.active {
    background-color: var(--color-primary);
    color: white;
}

/* Store Filters */
.store-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--color-bg-secondary);
    border-radius: 8px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-select {
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    background-color: var(--color-bg);
    color: var(--color-text);
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-label input {
    margin-right: 0.5rem;
}

/* Store Items Grid */
.store-items-container {
    position: relative;
    min-height: 300px;
}

.store-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.store-item {
    background-color: var(--color-bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    position: relative;
}

.store-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.item-image-container {
    height: 160px;
    overflow: hidden;
    position: relative;
    background-color: var(--color-bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.store-item:hover .item-image {
    transform: scale(1.05);
}

.item-owned-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--color-success);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.item-details {
    padding: 1rem;
}

.item-name {
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.item-type {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.item-type i {
    margin-right: 0.25rem;
}

.item-price {
    display: flex;
    align-items: center;
    font-weight: bold;
}

.item-price .minex-icon {
    font-size: 0.9rem;
}

/* Item Rarity */
.rarity-common {
    color: #8e8e8e;
}

.rarity-uncommon {
    color: #4CAF50;
}

.rarity-rare {
    color: #2196F3;
}

.rarity-epic {
    color: #9C27B0;
}

.rarity-legendary {
    color: #FF9800;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--color-bg);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text);
}

.modal-body {
    padding: 1.5rem;
}

.preview-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.preview-image-container {
    text-align: center;
}

.preview-image-container img {
    max-width: 100%;
    max-height: 250px;
    border-radius: 8px;
}

.preview-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.preview-description {
    margin-bottom: 1rem;
    line-height: 1.5;
}

.preview-type, .preview-rarity, .preview-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-type .label, .preview-rarity .label, .preview-price .label {
    font-weight: bold;
    min-width: 60px;
}

.preview-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Responsive Styles */
@media (min-width: 768px) {
    .preview-container {
        flex-direction: row;
    }
    
    .preview-image-container {
        flex: 0 0 40%;
    }
    
    .preview-details {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .store-filters {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .store-items-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}
