/* VPS产品页面样式 - 微信绿主题完整版 */

/* ===== CSS变量定义 ===== */
:root {
    /* 主色调 - 微信绿配色 */
    --primary-color: #07C160;
    --primary-dark: #06AD56;
    --primary-light: #38D9A9;
    --primary-gradient: linear-gradient(135deg, #07C160 0%, #38D9A9 100%);
    --secondary-color: #2E3A47;
    --accent-color: #FF6B35;
    --success-color: #07C160;
    --warning-color: #FAAD14;
    --danger-color: #FF4757;
    --info-color: #5BC0DE;

    /* 文字色 */
    --text-primary: #2C3E50;
    --text-secondary: #5A6C7D;
    --text-muted: #95A5A6;
    --text-light: #ECF0F1;

    /* 背景色 */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FFFC;
    --bg-tertiary: #F0F9F5;
    --bg-light: #F8FFFC;

    /* 边框色 */
    --border-light: #E8F5E8;
    --border-medium: #D1E7DD;
    --border-dark: #A8D5BA;

    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(7, 193, 96, 0.08);
    --shadow: 0 4px 12px rgba(7, 193, 96, 0.12);
    --shadow-md: 0 8px 24px rgba(7, 193, 96, 0.15);
    --shadow-lg: 0 12px 28px rgba(7, 193, 96, 0.18);
    --shadow-xl: 0 20px 40px rgba(7, 193, 96, 0.25);

    /* 圆角 */
    --border-radius: 0.75rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.5rem;

    /* 过渡 */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== 英雄区域 ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 50%, #047857 100%);
    position: relative;
    overflow: hidden;
    padding: 120px 0 80px;
    border-radius: 0 0 40px 40px;
    box-shadow: var(--shadow-xl);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.08)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.4;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #ffffff, rgba(255, 255, 255, 0.9));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    max-width: 600px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 3rem;
}

.hero-stats {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    gap: 2rem;
}

.stat-item {
    flex: 1;
    text-align: center;
    color: white;
}

.stat-value {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.75rem;
    background: linear-gradient(to right, #ffffff, rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== 筛选区域 ===== */
.filter-section {
    background: var(--bg-secondary);
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-light);
}

.filter-container {
    background: var(--bg-primary);
    border-radius: var(--border-radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.filter-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-title i {
    color: var(--primary-color);
}

.filter-reset {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    padding: 0.5rem 1.25rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-reset:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-label i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.filter-input {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.1);
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.1);
}

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

.btn-filter {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 0.875rem 2.5rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-filter:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-filter-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-filter-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* ===== 产品列表区域 ===== */
.products-section {
    padding: 4rem 0;
    background: var(--bg-primary);
}

.products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
}

.products-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.products-count {
    background: var(--bg-tertiary);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-secondary);
    padding: 0.25rem;
    border-radius: var(--border-radius);
}

.view-btn {
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.view-btn.active {
    background: var(--bg-primary);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.product-header {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.vendor-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.vendor-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
}

.vendor-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.vendor-details h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.vendor-name {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.product-badges {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius-2xl);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-featured {
    background: var(--primary-gradient);
    color: white;
}

.badge-new {
    background: var(--warning-color);
    color: white;
}

.badge-sale {
    background: var(--danger-color);
    color: white;
}

.product-body {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.product-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.spec-item i {
    color: var(--primary-color);
    width: 16px;
}

.product-footer {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.price-info {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.price-main {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.price-period {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.product-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-details {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-details:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
    text-decoration: none;
}

.btn-compare {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-compare:hover {
    background: var(--primary-color);
    color: white;
}

/* ===== 分页 ===== */
.pagination-section {
    padding: 3rem 0;
    background: var(--bg-secondary);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.page-btn {
    padding: 0.625rem 1rem;
    border: 1px solid var(--border-light);
    background: var(--bg-primary);
    color: var(--text-secondary);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    text-decoration: none;
}

.page-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.page-btn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

.page-btn:disabled {
    background: var(--bg-light);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 100px 0 60px;
        border-radius: 0 0 30px 30px;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .hero-stats {
        padding: 1.5rem;
        gap: 1rem;
    }

    .stat-value {
        font-size: 2.2rem;
    }

    .filter-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-header {
        padding: 1rem;
    }

    .product-body {
        padding: 1rem;
    }

    .product-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .products-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .filter-container {
        padding: 1.5rem;
    }

    .product-specs {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .page-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}