/* 万昇半导体科技官网自定义样式 */
:root {
    --primary-blue: #0a4d8c;
    --primary-blue-light: #1a6bb5;
    --primary-blue-dark: #063a6b;
    --accent-green: #1b5e20;
    --accent-green-light: #2e7d32;
    --text-dark: #1a1a2e;
    --text-gray: #5a6a7a;
    --bg-light: #f5f8fc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 8px rgba(10, 77, 140, 0.08);
    --shadow-md: 0 8px 24px rgba(10, 77, 140, 0.12);
    --shadow-lg: 0 16px 48px rgba(10, 77, 140, 0.18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: "Microsoft YaHei", "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-dark);
    background: var(--bg-white);
    line-height: 1.7;
    overflow-x: hidden;
}

/* 顶部导航 */
.top-header {
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 100%);
    color: #fff;
    padding: 8px 0;
    font-size: 13px;
}
.top-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-header a { color: rgba(255,255,255,0.85); text-decoration: none; }
.top-header a:hover { color: #fff; }

.main-nav {
    background: #fff;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}
.main-nav.scrolled { box-shadow: var(--shadow-md); }
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    max-width: 1280px;
    margin: 0 auto;
}
.logo {
    display: flex;
    align-items: center;
    padding: 16px 0;
    text-decoration: none;
}
.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-green-light));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 18px;
    margin-right: 12px;
}
.logo-text { line-height: 1.3; }
.logo-text .cn { font-size: 18px; font-weight: bold; color: var(--primary-blue); }
.logo-text .en { font-size: 11px; color: var(--text-gray); letter-spacing: 1px; }

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-menu > li {
    position: relative;
}
.nav-menu > li > a {
    display: block;
    padding: 24px 18px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}
.nav-menu > li > a:hover,
.nav-menu > li.active > a {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 8px 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
    z-index: 100;
}
.nav-menu > li:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown a {
    display: block;
    padding: 12px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s;
}
.dropdown a:last-child { border-bottom: none; }
.dropdown a:hover {
    background: var(--bg-light);
    color: var(--primary-blue);
    padding-left: 26px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary-blue);
    cursor: pointer;
    padding: 10px;
}

/* Banner轮播 */
.banner-slider {
    position: relative;
    height: 560px;
    overflow: hidden;
}
.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
    display: flex;
    align-items: center;
}
.banner-slide.active { opacity: 1; }
.banner-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(6,58,107,0.85) 0%, rgba(10,77,140,0.6) 50%, rgba(27,94,32,0.4) 100%);
}
.banner-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
    color: #fff;
}
.banner-content h1 {
    font-size: 44px;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.3;
    animation: slideUp 0.8s ease;
}
.banner-content p {
    font-size: 18px;
    max-width: 680px;
    line-height: 1.8;
    opacity: 0.92;
    margin-bottom: 30px;
    animation: slideUp 0.8s ease 0.2s both;
}
.banner-btn {
    display: inline-block;
    padding: 14px 36px;
    background: linear-gradient(135deg, var(--accent-green-light), var(--accent-green));
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    animation: slideUp 0.8s ease 0.4s both;
    box-shadow: 0 4px 20px rgba(27,94,32,0.4);
}
.banner-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(27,94,32,0.5);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.banner-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}
.banner-dot {
    width: 40px;
    height: 4px;
    background: rgba(255,255,255,0.4);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s;
}
.banner-dot.active { background: #fff; width: 60px; }

/* 通用区块 */
.section { padding: 80px 0; }
.section-bg { background: var(--bg-light); }
.section-header {
    text-align: center;
    margin-bottom: 50px;
}
.section-header h2 {
    font-size: 36px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 12px;
}
.section-header .subtitle {
    font-size: 16px;
    color: var(--text-gray);
}
.section-header .line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-green-light));
    margin: 20px auto 0;
    border-radius: 2px;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
    border: 1px solid var(--border-color);
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-blue-light);
}
.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 26px;
    margin-bottom: 20px;
}
.card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-dark);
}
.card p {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.8;
}

/* 网格 */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    color: #fff;
    box-shadow: 0 4px 15px rgba(10,77,140,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(10,77,140,0.4); }
.btn-outline {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}
.btn-outline:hover { background: var(--primary-blue); color: #fff; }
.btn-green {
    background: linear-gradient(135deg, var(--accent-green-light), var(--accent-green));
    color: #fff;
    box-shadow: 0 4px 15px rgba(27,94,32,0.3);
}
.btn-green:hover { transform: translateY(-2px); }

/* 页脚 */
.footer {
    background: linear-gradient(180deg, #0a2540 0%, #061a2e 100%);
    color: rgba(255,255,255,0.8);
    padding: 60px 0 0;
}
.footer h4 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 12px;
}
.footer h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent-green-light);
    border-radius: 2px;
}
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 12px; }
.footer ul li a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}
.footer ul li a:hover { color: #fff; padding-left: 6px; }
.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.6;
}
.footer-contact .icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    margin-top: 2px;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 50px;
    padding: 24px 0;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

/* 页面头部 */
.page-hero {
    background: linear-gradient(135deg, var(--primary-blue-dark), var(--primary-blue));
    color: #fff;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(46,125,50,0.3) 0%, transparent 70%);
    border-radius: 50%;
}
.page-hero h1 {
    font-size: 40px;
    margin-bottom: 16px;
    position: relative;
}
.page-hero p {
    font-size: 17px;
    opacity: 0.9;
    position: relative;
}
.breadcrumb {
    margin-top: 20px;
    font-size: 14px;
    opacity: 0.8;
    position: relative;
}
.breadcrumb a { color: #fff; text-decoration: none; }
.breadcrumb span { margin: 0 8px; }

/* 流程图 */
.process-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    margin: 40px 0;
}
.process-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    min-width: 120px;
    position: relative;
}
.process-step .step-num {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 14px;
    box-shadow: 0 4px 15px rgba(10,77,140,0.3);
    position: relative;
    z-index: 2;
}
.process-step .step-label {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
    padding: 0 8px;
}
.process-arrow {
    flex: 0 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue-light);
    font-size: 24px;
    margin-top: -20px;
}

/* 产品卡片 */
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s;
    border: 1px solid var(--border-color);
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.product-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--bg-light);
}
.product-info { padding: 20px; }
.product-cat {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(10,77,140,0.1);
    color: var(--primary-blue);
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 10px;
}
.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.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 搜索框 */
.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.search-box input {
    flex: 1;
    padding: 16px 24px;
    border: none;
    outline: none;
    font-size: 15px;
}
.search-box button {
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
}
.search-box button:hover { background: var(--primary-blue-dark); }

/* 仓储卡片 */
.warehouse-card {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-blue);
    transition: all 0.3s;
}
.warehouse-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}
.warehouse-card h3 {
    font-size: 20px;
    color: var(--primary-blue);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.warehouse-card .tag {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(46,125,50,0.1);
    color: var(--accent-green);
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 12px;
}
.warehouse-card p {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.8;
}

/* 优势数字 */
.stat-item {
    text-align: center;
    padding: 30px 20px;
}
.stat-num {
    font-size: 48px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-green-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}
.stat-label {
    font-size: 15px;
    color: var(--text-gray);
}

/* 动画 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 后台样式 */
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-blue-dark), var(--primary-blue), var(--accent-green));
}
.admin-login-box {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 400px;
}
.admin-login-box h2 {
    text-align: center;
    color: var(--primary-blue);
    margin-bottom: 30px;
}
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(10,77,140,0.1);
}

.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 240px;
    background: linear-gradient(180deg, var(--primary-blue-dark), #061a2e);
    color: #fff;
    padding: 20px 0;
}
.admin-sidebar h3 {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 18px;
}
.admin-sidebar ul { list-style: none; margin-top: 20px; }
.admin-sidebar ul li a {
    display: block;
    padding: 14px 24px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}
.admin-sidebar ul li a:hover,
.admin-sidebar ul li.active a {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-left-color: var(--accent-green-light);
}
.admin-main {
    flex: 1;
    background: var(--bg-light);
    padding: 30px;
}
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.admin-header h2 { color: var(--text-dark); }
.admin-table {
    width: 100%;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.admin-table th {
    background: var(--primary-blue);
    color: #fff;
    padding: 14px 16px;
    text-align: left;
    font-weight: 500;
}
.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover { background: var(--bg-light); }
.action-btn {
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    margin-right: 6px;
    display: inline-block;
}
.action-btn.edit { background: rgba(10,77,140,0.1); color: var(--primary-blue); }
.action-btn.del { background: rgba(220,53,69,0.1); color: #dc3545; }

/* 响应式 */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-6 { grid-template-columns: repeat(3, 1fr); }
    .banner-content h1 { font-size: 34px; }
}

@media (max-width: 768px) {
    .mobile-toggle { display: block; }
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        box-shadow: var(--shadow-md);
        padding: 10px 0;
    }
    .nav-menu.open { display: flex; }
    .nav-menu > li > a { padding: 14px 24px; border-bottom: none; }
    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        display: none;
    }
    .nav-menu > li.open .dropdown { display: block; }
    .banner-slider { height: 420px; }
    .banner-content h1 { font-size: 26px; }
    .banner-content p { font-size: 15px; }
    .section { padding: 50px 0; }
    .section-header h2 { font-size: 28px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .grid-6 { grid-template-columns: repeat(2, 1fr); }
    .page-hero { padding: 50px 0; }
    .page-hero h1 { font-size: 28px; }
    .process-flow { flex-direction: column; gap: 10px; }
    .process-arrow { transform: rotate(90deg); margin: 0; }
    .top-header .container { flex-direction: column; gap: 6px; text-align: center; }
    .footer { padding: 40px 0 0; }
    .stat-num { font-size: 36px; }
}
