/* 商城共用樣式 */

/* 基礎容器 */
.gaming-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 20px;
}

/* 返回按鈕 */
.back-btn {
    background: rgba(255,255,255,0.08);
    color: #e0e0e0;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    margin-bottom: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.back-btn:hover {
    background: rgba(255,255,255,0.12);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* 分類標籤 */
.category-tabs {
    background: rgba(0,0,0,0.8);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08);
    position: sticky;
    top: calc(var(--navbar-height, 56px) + 4px);
    z-index: 999;
    backdrop-filter: saturate(120%) blur(20px);
    -webkit-backdrop-filter: saturate(120%) blur(20px);
}

.category-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.category-btn {
    background: rgba(255,255,255,0.08);
    color: #e0e0e0;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.category-btn:hover, 
.category-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.category-btn:hover::before {
    left: 100%;
}

/* 商品網格 */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* 商品卡片 */
.item-card {
    background: rgba(255,255,255,0.05);
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 32px rgba(0,0,0,0.3),
        0 0 0 1px rgba(255,255,255,0.08),
        inset 0 1px 0 rgba(255,255,255,0.1);
    cursor: pointer;
    border: 2px solid transparent;
}

/* 初始狀態：隱藏並下移，避免進場前閃現 */
.item-card.is-hidden {
    opacity: 0;
    transform: translateY(30px);
}

/* 顯示狀態：套用過渡效果 */
.item-card.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.item-card-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    text-decoration: none;
}

.item-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(102,126,234,0.4);
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.4),
        0 0 20px rgba(102,126,234,0.2),
        0 0 0 1px rgba(102,126,234,0.3),
        inset 0 1px 0 rgba(255,255,255,0.15);
}

.item-card:active {
    transform: translateY(-6px) scale(1.01);
    transition: all 0.1s ease;
}

.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102,126,234,0.08), transparent);
    transition: left 0.6s;
    z-index: 1;
    pointer-events: none;
}

.item-card:hover::before {
    left: 100%;
}

.item-image {
    height: 180px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    background-color: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.item-card:hover .item-image {
    transform: scale(1.05);
}

.item-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0,0,0,0.3), transparent);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.item-card:hover .item-image::after {
    background: linear-gradient(45deg, rgba(102,126,234,0.15), transparent);
}

.item-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(231,76,60,0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.item-card:hover .item-badge {
    transform: scale(0.98);
}

.item-featured .item-badge {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    box-shadow: 0 4px 12px rgba(243,156,18,0.4);
}

.item-body {
    padding: 25px;
}

.item-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #ecf0f1;
    transition: all 0.3s ease;
}

.item-card:hover .item-title {
    color: #fff;
}

.item-description {
    color: #bdc3c7;
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
    transition: all 0.3s ease;
}

.item-card:hover .item-description {
    color: #d5d9dc;
}

.item-price {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.item-card:hover .item-price {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-clip: text;
    -webkit-background-clip: text;
    filter: brightness(1.1);
}

.item-price i {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.item-card:hover .item-price i {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-clip: text;
    -webkit-background-clip: text;
}

/* 標題樣式 */
.section-title {
    color: #ecf0f1;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 40px;
    margin-top: 20px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #f39c12);
    border-radius: 2px;
}

/* 無商品提示 */
.no-items {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
    font-size: 1.2rem;
}

.no-items i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .gaming-container {
        padding: 20px 15px;
    }
    
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .category-tabs {
        padding: 14px 16px;
        top: calc(var(--navbar-height, 56px) + 4px);
    }
    
    .category-nav {
        gap: 12px;
    }
    
    .category-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
        flex: 0 0 auto;
        min-width: auto;
    }
    
    .item-body {
        padding: 20px;
    }
    
    .section-title {
        font-size: 1.7rem;
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .gaming-container {
        padding: 15px 10px;
    }
    
    .items-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .category-nav {
        gap: 10px;
    }
    
    .category-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .item-body {
        padding: 18px;
    }
}
