/* ═══════════════════════════════════════════════
   AVATAR STORE — GalaxySeven
   Styles for the store page (avatar & CS2 tabs)
   ═══════════════════════════════════════════════ */

/* ── Store Container ───────────────────────── */
.store-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.store-header {
    text-align: center;
    margin-bottom: 24px;
}

.store-header h1 {
    font-family: "Maven Pro", sans-serif;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #9333ea, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.store-header p {
    color: #9ca3af;
    font-size: 0.95rem;
}

/* ── Store Tabs ────────────────────────────── */
.store-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.store-tab {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-family: "Montserrat", sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.store-tab:hover {
    color: #e2e8f0;
    background: rgba(99, 102, 241, 0.1);
}

.store-tab.active {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.3), rgba(99, 102, 241, 0.3));
    color: #e2e8f0;
    box-shadow: 0 0 12px rgba(147, 51, 234, 0.2);
}

.store-tab-icon {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-right: 4px;
}

/* ── Store Tab Content ─────────────────────── */
.store-tab-content {
    display: none;
}

.store-tab-content.active {
    display: block;
}

/* ── Avatar Category Tabs ──────────────────── */
.avatar-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    justify-content: center;
}

.avatar-cat-tab {
    padding: 8px 18px;
    border: 1px solid rgba(99, 102, 241, 0.25);
    background: rgba(15, 23, 42, 0.7);
    color: #9ca3af;
    font-family: "Montserrat", sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.avatar-cat-tab:hover {
    border-color: rgba(147, 51, 234, 0.5);
    color: #e2e8f0;
    background: rgba(147, 51, 234, 0.1);
}

.avatar-cat-tab.active {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.4), rgba(99, 102, 241, 0.4));
    border-color: #9333ea;
    color: #fff;
}

/* ── Avatar Store Grid ─────────────────────── */
.avatar-store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.store-loading {
    grid-column: 1 / -1;
    text-align: center;
    color: #9ca3af;
    padding: 40px;
    font-size: 1rem;
}

/* ── Store Item Card ───────────────────────── */
.avatar-item-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.avatar-item-card:hover {
    border-color: rgba(147, 51, 234, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(147, 51, 234, 0.15);
}

.avatar-item-card.owned {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(15, 23, 42, 0.9);
}

.avatar-item-card .item-img-wrap {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    background: rgba(10, 14, 26, 0.4);
    border-radius: 8px;
    overflow: hidden;
}

.avatar-item-card .item-img-wrap img {
    max-width: 100%;
    max-height: 130px;
    object-fit: contain;
    image-rendering: pixelated;
}

.avatar-item-card .item-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #e2e8f0;
    margin-bottom: 4px;
}

.avatar-item-card .item-desc {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 10px;
    min-height: 18px;
}

.avatar-item-card .item-price-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.avatar-item-card .item-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.avatar-item-card .badge-owned {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.avatar-item-card .badge-price {
    background: rgba(250, 204, 21, 0.15);
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.3);
}

.avatar-item-card .badge-free {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.avatar-item-card .owned-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #fff;
}

/* ── Variants Badge ("R") ──────────────────── */
.avatar-item-card .variants-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #9333ea, #6366f1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 0 8px rgba(147, 51, 234, 0.4);
    pointer-events: none;
    z-index: 2;
}

/* ── Buy Modal ─────────────────────────────── */
.store-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.store-modal-content {
    background: rgba(17, 24, 39, 0.98);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    padding: 30px;
    max-width: 420px;
    width: 90%;
    text-align: center;
}

.store-modal-content h3 {
    font-family: "Maven Pro", sans-serif;
    font-size: 1.3rem;
    color: #e2e8f0;
    margin-bottom: 8px;
}

.store-modal-content p {
    color: #9ca3af;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.store-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 12px;
}

.store-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.store-btn-buy {
    background: linear-gradient(135deg, #9333ea, #6366f1);
    color: #fff;
}

.store-btn-buy:hover {
    box-shadow: 0 0 16px rgba(147, 51, 234, 0.4);
}

.store-btn-cancel {
    background: rgba(55, 65, 81, 0.5);
    color: #9ca3af;
}

.store-btn-cancel:hover {
    background: rgba(55, 65, 81, 0.8);
    color: #e2e8f0;
}

.store-modal-msg {
    font-size: 0.8rem;
    min-height: 20px;
}

.store-modal-msg.success { color: #22c55e; }
.store-modal-msg.error { color: #ef4444; }

/* ── CS2 Store Placeholder ─────────────────── */
.cs2-store-placeholder {
    text-align: center;
    padding: 60px 20px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 16px;
    border: 1px dashed rgba(99, 102, 241, 0.2);
}

.cs2-placeholder-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.6;
}

.cs2-store-placeholder h2 {
    font-family: "Maven Pro", sans-serif;
    color: #9ca3af;
    margin-bottom: 8px;
}

.cs2-store-placeholder p {
    color: #6b7280;
    font-size: 0.9rem;
}

/* ── Avatar Preview Box in User Info ───────── */
.avatar-preview-box {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    padding: 4px 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.avatar-preview-box:hover {
    background: rgba(147, 51, 234, 0.2);
    border-color: rgba(147, 51, 234, 0.5);
    box-shadow: 0 0 8px rgba(147, 51, 234, 0.2);
}

.avatar-preview-box img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    image-rendering: pixelated;
    border-radius: 4px;
}

.avatar-preview-label {
    font-size: 0.7rem;
    color: #9ca3af;
    font-weight: 500;
}

/* ── Responsive ────────────────────────────── */
@media (max-width: 768px) {
    .avatar-store-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    .avatar-category-tabs {
        gap: 4px;
    }
    .avatar-cat-tab {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
}
