/**
 * 产品页面专用样式
 * 用于产品列表页和产品详情页
 * Feature: product-page-redesign
 */

/* ========================================
   页面基础样式
   ======================================== */
.product-page {
    background-color: var(--gaming-black);
    color: white;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

/* 装饰背景 - 与Gaming Hero一致 */
.product-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 20%, var(--gaming-glow) 0%, transparent 50%),
                radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* 面包屑样式优化 - 标准化深色背景样式 */
.breadcrumb-container {
    padding: 1.5rem 0;
}

.breadcrumb-dark {
    background: transparent;
    padding: 0;
    margin-bottom: 24px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    --bs-breadcrumb-divider: none;
    --bs-breadcrumb-padding-x: 0;
    --bs-breadcrumb-padding-y: 0;
}

.breadcrumb-dark .breadcrumb-item {
    display: inline;
    padding: 0;
    margin: 0;
    vertical-align: middle;
}

.breadcrumb-dark .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 0;
    margin: 0;
    vertical-align: middle;
    transition: all 0.3s ease;
    font-weight: 500;
}

.breadcrumb-dark .breadcrumb-item a:hover {
    color: white;
    text-shadow: 0 0 10px var(--gaming-glow);
}

.breadcrumb-dark .breadcrumb-item.active {
    color: white;
    font-weight: 600;
    padding: 0;
    margin: 0;
    vertical-align: middle;
}

/* 分隔符 */
.breadcrumb-dark .breadcrumb-item:not(:last-child)::after {
    content: ">";
    margin: 0 10px;
    color: var(--gaming-border);
    vertical-align: middle;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

/* ========================================
   页面头部区域
   ======================================== */
.page-header-dark {
    background: var(--gaming-black);
    padding: 54px 0 60px;
    position: relative;
    overflow: hidden;
}

/* 装饰光效 - 右上 */
.page-header-dark::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--gaming-glow) 0%, transparent 70%);
    pointer-events: none;
}

/* 装饰光效 - 左下 */
.page-header-dark::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* ========================================
   筛选区域
   ======================================== */
.filter-section {
    background: var(--gaming-glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--gaming-border);
    padding: 25px 30px;
    border-radius: 20px;
    margin-top: -35px;
    position: relative;
    z-index: 10;
    box-shadow: var(--gaming-card-shadow);
}

/* 筛选组 */
.filter-group {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group-label {
    color: white;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 水平滚动容器 */
.filter-scroll-container {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--gaming-border) transparent;
    flex: 1;
}

.filter-scroll-container::-webkit-scrollbar {
    height: 4px;
}

.filter-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.filter-scroll-container::-webkit-scrollbar-thumb {
    background-color: var(--gaming-border);
    border-radius: 2px;
}

.filter-scroll-container::-webkit-scrollbar-thumb:hover {
    background-color: var(--gaming-blue);
}

/* 滚动包装器 */
.filter-scroll-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 5px;
    min-width: auto;
}

/* 中等及以上屏幕样式调整 */
@media (min-width: 768px) {
    .filter-scroll-container {
        overflow-x: visible;
        overflow-y: visible;
    }
    
    .filter-scroll-wrapper {
        flex-wrap: wrap;
        padding-bottom: 0;
    }
    
    .filter-btn {
        flex-shrink: 0;
        margin-bottom: 5px;
    }
}

/* 筛选按钮 */
.filter-btn {
    background: var(--gaming-glass);
    border: 1px solid var(--gaming-border);
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-btn:hover {
    color: white;
    border-color: var(--gaming-blue);
    background: rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--gaming-glow);
}

.filter-btn.active {
    background: var(--gaming-gradient);
    border-color: transparent;
    color: white;
    box-shadow: 0 5px 15px var(--gaming-glow);
    transform: translateY(-2px);
}

/* 历史产品切换 */
.history-toggle {
    display: flex;
    background: var(--gaming-glass);
    border: 1px solid var(--gaming-border);
    border-radius: 50px;
    padding: 4px;
    margin-left: auto;
    flex-shrink: 0;
}

.history-toggle .toggle-btn {
    padding: 8px 22px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.history-toggle .toggle-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

.history-toggle .toggle-btn.active {
    background: var(--gaming-gradient);
    color: white;
    box-shadow: 0 5px 15px var(--gaming-glow);
}

/* ========================================
   产品网格布局 - 已迁移至 Bootstrap Grid
   ======================================== */
.products-grid-container {
    margin-top: 40px;
}

/* ========================================
   分页样式
   ======================================== */
.pagination-dark {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pagination-dark .page-link {
    background: var(--gaming-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--gaming-border);
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 20px;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.pagination-dark .page-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-color: var(--gaming-blue);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--gaming-glow);
}

.pagination-dark .page-link.active {
    background: var(--gaming-gradient);
    border-color: transparent;
    color: white;
    box-shadow: 0 5px 15px var(--gaming-glow);
    transform: translateY(-2px);
}

/* ========================================
   无产品提示
   ======================================== */
.no-products {
    text-align: center;
    padding: 100px 20px;
    color: rgba(255, 255, 255, 0.5);
    background: var(--gaming-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--gaming-border);
    border-radius: 20px;
    margin-top: 40px;
    box-shadow: var(--gaming-card-shadow);
}

.no-products i {
    font-size: 5rem;
    margin-bottom: 25px;
    background: var(--gaming-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.8;
}

.no-products p {
    margin-bottom: 12px;
    font-size: 1.2rem;
    color: white;
    font-weight: 600;
}

/* ========================================
   响应式断点
   ======================================== */

/* Desktop: >= 768px */
@media (min-width: 768px) {
    .products-grid-container {
        margin-top: 40px;
    }
}

/* Tablet & Mobile: < 768px */
@media (max-width: 767px) {
    .filter-section {
        padding: 15px;
    }
    
    .filter-group-label {
        font-size: 13px;
    }
    
    .filter-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
    
    .page-header-dark {
        padding: 40px 0 30px;
    }

    .gaming-hero {
        padding-top: 110px !important;
        padding-bottom: 4rem !important;
    }
}

/* Mobile: < 575px */
@media (max-width: 575px) {
    .filter-section {
        padding: 15px 12px;
        margin-top: -25px;
        background: rgba(13, 17, 23, 0.9); /* 更深一点的背景，增加高级感 */
        border-radius: 16px;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 18px;
        position: relative;
    }

    .filter-group:last-child {
        margin-bottom: 0;
    }

    /* 改进标签样式：小巧且带有装饰线 */
    .filter-group-label {
        font-size: 11px;
        color: rgba(255, 255, 255, 0.4);
        margin-left: 2px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .filter-group-label::after {
        content: '';
        flex: 1;
        height: 1px;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent);
    }

    /* 优化滚动容器：移除滚动条视觉干扰 */
    .filter-scroll-container {
        width: 100%;
        margin: 0 -12px;
        padding: 0 12px;
        overflow-x: auto;
    }

    .filter-scroll-container::-webkit-scrollbar {
        display: none; /* 移动端隐藏滚动条，保持整洁 */
    }

    .filter-scroll-wrapper {
        padding-bottom: 2px;
        gap: 8px;
    }

    /* 按钮改造成“胶囊”样式，更符合现代 App 感 */
    .filter-btn {
        padding: 6px 16px;
        font-size: 12px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        min-width: 60px;
        justify-content: center;
    }

    /* 状态切换：改造成顶部“分段控制器” (Segmented Control) */
    .history-toggle {
        margin: -5px 0 10px 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 10px;
        padding: 3px;
        display: flex;
    }

    .history-toggle .toggle-btn {
        flex: 1;
        padding: 8px 0;
        text-align: center;
        font-size: 12px;
        border-radius: 8px;
        color: rgba(255, 255, 255, 0.5);
    }

    .history-toggle .toggle-btn.active {
        background: var(--gaming-gradient);
        color: white;
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    }

    .products-grid-container {
        margin-top: 25px;
    }
    
    .page-header-dark {
        padding: 30px 0 35px;
    }
}
    
    .pagination-dark {
        margin-top: 30px;
    }
    
    .pagination-dark .page-link {
        padding: 8px 12px;
        font-size: 13px;
    }
}
