/**
 * 守正通信IP核平台 - 样式表
 * 采用现代化设计，蓝色主题，响应式布局
 */

/* ===== 基础变量 ===== */
:root {
    --primary-color: #1a5fb4;
    --primary-dark: #0d3a7a;
    --primary-light: #e8f0fc;
    --secondary-color: #26a269;
    --text-dark: #1c1c1c;
    --text-gray: #5e5e5e;
    --text-light: #8c8c8c;
    --bg-white: #ffffff;
    --bg-light: #f6f8fc;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

/* ===== 重置样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== 语言切换器 ===== */
.lang-switcher {
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
}

.lang-btn {
    border: none;
    background: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-gray);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 12px;
    transition: var(--transition);
}

.lang-btn:hover {
    color: var(--primary-color);
}

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

.lang-divider {
    color: var(--border-color);
    font-size: 12px;
}

/* ===== 主容器 ===== */
.ip-platform-container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-white);
    min-height: 100vh;
    box-shadow: var(--shadow-lg);
}

/* ===== 头部区域 ===== */
.platform-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 50px 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 48px;
    height: 48px;
}

.logo svg {
    width: 100%;
    height: 100%;
}

.brand-text h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.platform-tagline {
    font-size: 14px;
    opacity: 0.9;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* ===== 按钮样式 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

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

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* ===== 统计栏 ===== */
.stats-bar {
    background: var(--bg-white);
    padding: 30px;
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}

.stat-item {
    padding: 10px;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: var(--text-gray);
    margin-top: 4px;
}

/* ===== 筛选区域 ===== */
.filter-section {
    padding: 20px 30px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.filter-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 14px;
    color: var(--text-gray);
    font-weight: 500;
}

.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-gray);
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

/* ===== 产品区域 ===== */
.products-section {
    padding: 50px 30px;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.section-header p {
    font-size: 15px;
    color: var(--text-gray);
}

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

/* ===== 产品卡片 ===== */
.product-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

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

.product-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-light) 0%, #e0e7ff 100%);
}

.product-info {
    padding: 20px;
}

.product-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--primary-light);
    padding: 4px 10px;
    border-radius: 12px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.product-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-desc {
    font-size: 13px;
    color: var(--text-gray);
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
}

.product-actions {
    display: flex;
    gap: 8px;
}

.btn-view {
    padding: 6px 14px;
    font-size: 12px;
    color: var(--primary-color);
    background: var(--primary-light);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

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

/* ===== 优势区域 ===== */
.advantages-section {
    padding: 50px 30px;
    background: var(--bg-light);
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.advantage-card {
    background: var(--bg-white);
    padding: 30px 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.advantage-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.advantage-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.advantage-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.advantage-card p {
    font-size: 13px;
    color: var(--text-gray);
    line-height: 1.6;
}

/* ===== 联系区域 ===== */
.contact-section {
    padding: 50px 30px;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
}

.contact-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.contact-label {
    color: var(--text-gray);
}

.contact-item a {
    color: var(--primary-color);
    font-weight: 500;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* ===== 页脚 ===== */
.platform-footer {
    padding: 25px 30px;
    background: var(--text-dark);
    color: var(--text-light);
    text-align: center;
    font-size: 13px;
}

/* ===== 弹窗样式 ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95);
    transition: var(--transition);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-light);
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: var(--text-gray);
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    background: var(--primary-color);
    color: white;
}

.modal-body {
    padding: 30px;
}

.modal-header {
    margin-bottom: 25px;
}

.modal-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--primary-light);
    padding: 4px 12px;
    border-radius: 12px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.modal-desc {
    font-size: 15px;
    color: var(--text-gray);
    line-height: 1.7;
}

.modal-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.modal-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
    text-transform: uppercase;
}

.modal-specs,
.modal-apps,
.modal-deliver {
    list-style: none;
}

.modal-specs li,
.modal-apps li,
.modal-deliver li {
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-gray);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-specs li:last-child,
.modal-apps li:last-child,
.modal-deliver li:last-child {
    border-bottom: none;
}

.modal-specs li::before,
.modal-apps li::before,
.modal-deliver li::before {
    content: "✓";
    color: var(--secondary-color);
    font-weight: bold;
}

.modal-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .platform-header {
        padding: 30px 20px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .brand {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .products-section,
    .advantages-section,
    .contact-section {
        padding: 30px 20px;
    }
    
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        flex-direction: column;
        gap: 15px;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .stat-number {
        font-size: 24px;
    }
    
    .section-header h2 {
        font-size: 22px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 打印样式 ===== */
@media print {
    .lang-switcher,
    .platform-header,
    .filter-section,
    .modal-overlay {
        display: none !important;
    }
    
    .ip-platform-container {
        box-shadow: none;
    }
    
    .product-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
