﻿/* 全局重置 & 基础变量（非色彩） */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
}
:root {
    /* 通用尺寸变量 */
    --container-width: 1200px;
    --header-height: 80px;
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
    --transition-base: 0.3s ease;
}
body {
    color: #333;
    background: #fff;
    padding-top: var(--header-height);
    line-height: 1.6;
}
a {
    text-decoration: none;
    color: inherit;
}
.container {
    width: var(--container-width);
    margin: 0 auto;
}

/* 头部导航基础样式 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid #eee;
    z-index: 999;
}
.header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}
.logo {
    font-size: 24px;
    font-weight: bold;
}
.logo span {
    color: #333;
    font-size: 18px;
    font-weight: normal;
    margin-left: 5px;
}
.nav ul {
    display: flex;
    list-style: none;
}
.nav li {
    margin: 0 20px;
    font-size: 16px;
}
.nav li a.active {
    border-bottom: 2px solid currentColor;
    padding-bottom: 5px;
}
.nav li a:hover {
    transition: color var(--transition-base);
}
.contact-btn {
    display: flex;
    align-items: center;
}
.tel {
    font-size: 14px;
    margin-right: 15px;
}
.consult-btn {
    width: 100px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
}

/* 通用模块基础样式 */
.section-title {
    font-size: 28px;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.btn-buy, .btn-consult, .form-btn, .product-card-btn {
    display: inline-block;
    text-align: center;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-base);
}
.btn-buy {
    width: 180px;
    height: 50px;
    line-height: 50px;
    font-size: 16px;
}
.btn-consult {
    width: 180px;
    height: 50px;
    line-height: 50px;
    font-size: 16px;
    border: 1px solid currentColor;
}
.form-btn {
    width: 100%;
    height: 45px;
    border: none;
    font-size: 16px;
    cursor: pointer;
}
.product-card-btn {
    width: 100px;
    height: 35px;
    line-height: 35px;
    font-size: 14px;
}

/* 产品详情基础样式 */
.product-detail {
    padding: 60px 0;
}
.product-base {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
}
.product-imgs {
    width: 45%;
}
.main-img {
    width: 100%;
    height: 400px;
    background: #f5f5f5;
    background-position: center;
    background-size: cover;
    border-radius: var(--border-radius-md);
    margin-bottom: 15px;
    will-change: background-image;
    transition: background-image 0.2s ease;
}
.img-thumbs {
    display: flex;
    gap: 10px;
}
.img-thumb {
    width: 20%;
    height: 80px;
    background: #f5f5f5;
    background-position: center;
    background-size: cover;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color var(--transition-base);
}
.img-thumb.active {
    border-color: currentColor;
}
.product-info {
    width: 55%;
}
.product-name {
    font-size: 28px;
    margin-bottom: 15px;
}
.product-tag {
    display: inline-block;
    padding: 5px 10px;
    font-size: 14px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
}
.product-price {
    font-size: 24px;
    margin-bottom: 20px;
}
.product-price span {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
    margin-left: 10px;
}
.product-features h4 {
    font-size: 16px;
    margin-bottom: 10px;
}
.product-features ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.product-features li {
    font-size: 14px;
    padding: 6px 12px;
    background: #F5F7FA;
    border-radius: var(--border-radius-sm);
}
.product-btns {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}
.product-service {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}
.product-params {
    margin-bottom: 60px;
    background: #F5F7FA;
    padding: 30px;
    border-radius: var(--border-radius-md);
}
.product-params h3, .product-desc h3, .product-related h3 {
    font-size: 20px;
    margin-bottom: 20px;
}
.params-table {
    width: 100%;
    border-collapse: collapse;
}
.params-table tr {
    border-bottom: 1px solid #eee;
}
.params-table td {
    padding: 12px 0;
    font-size: 14px;
}
.params-table td:first-child {
    width: 20%;
    color: #666;
}
.params-table td:last-child {
    width: 80%;
    color: #333;
}
.desc-content {
    font-size: 16px;
    line-height: 2;
    color: #666;
}
.desc-content p {
    margin-bottom: 15px;
}
.desc-img {
    width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: var(--border-radius-md);
}
.product-related {
    margin-bottom: 60px;
}
.product-related h3 {
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.related-list {
    display: flex;
    justify-content: space-between;
}
.related-item {
    width: 31%;
    background: #fff;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base);
    overflow: hidden;
}
.related-item:hover {
    box-shadow: var(--shadow-md);
}
.related-img {
    width: 100%;
    height: 200px;
    background: #f5f5f5;
    background-position: center;
    background-size: cover;
}
.related-info {
    padding: 15px;
}
.related-info h4 {
    font-size: 16px;
    margin-bottom: 8px;
}
.related-info p {
    font-size: 14px;
    margin-bottom: 10px;
}

/* 产品中心基础样式 */
.products {
    padding: 60px 0;
}
.product-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
}
.product-tab {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-base);
}
.product-tab.active {
    border-bottom: 2px solid currentColor;
}
.product-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}
.product-card {
    width: 31%;
    background: #fff;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base);
    overflow: hidden;
    margin-bottom: 20px;
}
.product-card:hover {
    box-shadow: var(--shadow-md);
}
.product-card-img {
    width: 100%;
    height: 250px;
    background: #f5f5f5;
    background-position: center;
    background-size: cover;
}
.product-card-info {
    padding: 20px;
}
.product-card-title {
    font-size: 18px;
    margin-bottom: 10px;
}
.product-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}
.product-card-tag {
    font-size: 12px;
    padding: 3px 8px;
    background: #F5F7FA;
    border-radius: var(--border-radius-sm);
}
.product-card-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* 关于我们基础样式 */
.about {
    padding: 60px 0;
}
.company-intro {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
}
.intro-img {
    width: 40%;
    height: 300px;
    background: #f5f5f5;
    background-position: center;
    background-size: cover;
    border-radius: var(--border-radius-md);
}
.intro-text {
    width: 60%;
}
.intro-text h3 {
    font-size: 20px;
    margin-bottom: 15px;
}
.intro-text p {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}
.development {
    margin-bottom: 60px;
}
.timeline {
    position: relative;
    padding-left: 40px;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 0;
    height: 100%;
    width: 2px;
}
.timeline-item {
    position: relative;
    margin-bottom: 30px;
}
.timeline-item::before {
    content: "";
    position: absolute;
    left: -35px;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
}
.timeline-item h4 {
    font-size: 18px;
    margin-bottom: 8px;
}
.timeline-item p {
    font-size: 14px;
    color: #666;
}
.team-list {
    display: flex;
    justify-content: space-between;
}
.team-item {
    width: 23%;
    text-align: center;
}
.team-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: #f5f5f5;
    margin: 0 auto 15px;
    background-position: center;
    background-size: cover;
}
.team-item h4 {
    font-size: 16px;
    margin-bottom: 5px;
}
.team-item p {
    font-size: 14px;
    color: #999;
}

/* 联系我们基础样式 */
.contact {
    padding: 60px 0;
}
.contact-wrap {
    display: flex;
    gap: 40px;
}
.contact-info {
    width: 40%;
}
.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}
.info-icon {
    font-size: 24px;
    margin-right: 15px;
    margin-top: 5px;
}
.info-text h4 {
    font-size: 18px;
    margin-bottom: 8px;
}
.info-text p {
    font-size: 16px;
    color: #666;
}
.map {
    width: 100%;
    height: 250px;
    background: #f5f5f5;
    background-position: center;
    background-size: cover;
    border-radius: var(--border-radius-md);
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 0 5px #000;
}
.contact-form {
    width: 60%;
    background: #F5F7FA;
    padding: 30px;
    border-radius: var(--border-radius-md);
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition-base);
}
.form-group input:focus, .form-group textarea:focus {
    border-color: currentColor;
}
.form-group textarea {
    height: 150px;
    resize: none;
}

/* 底部基础样式 */
footer {
    background: #333;
    color: #fff;
    padding: 40px 0;
}
.footer-wrap {
    display: flex;
    justify-content: space-between;
}
.footer-item {
    width: 31%;
}
.footer-item h3 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}
.footer-item h3::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
}
.footer-item p {
    font-size: 14px;
    color: #ccc;
}
.footer-nav {
    list-style: none;
}
.footer-nav li {
    margin-bottom: 10px;
}
.footer-nav li a {
    color: #ccc;
    font-size: 14px;
    transition: color var(--transition-base);
}
.footer-nav li a:hover {
    color: currentColor;
}
.copyright {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid #444;
    font-size: 12px;
    color: #999;
}

/* 主题切换按钮样式 */
.theme-switch {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.theme-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}
.theme-btn.blue {
    background: #165DFF;
}
.theme-btn.red {
    background: #FF4D4F;
}
.theme-btn.green {
    background: #52C41A;
}
.theme-btn.dark {
    background: #121212;
    border: 1px solid #444;
}
/* 新增四款主题按钮样式 */
.theme-btn.skyblue {
    background: #17C3B2;
}
.theme-btn.beige {
    background: #F5D782;
}
.theme-btn.lime {
    background: #94D82D;
}
.theme-btn.amber {
    background: #D97706;
}

/* 主题预览面板核心样式 V5*/
.theme-preview-panel {
    position: fixed;
    top: 160px;
    right: 20px;
    z-index: 9998;
    width: 280px;
    background: var(--bg-light, #fff);
    border: 1px solid var(--border-color, #eee);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,0.1));
    padding: 15px;
    display: none; /* 默认隐藏，可通过JS控制显示/隐藏 */
}
.theme-preview-panel.show {
    display: block;
}
.theme-preview-header {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color, #333);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light, #eee);
}
.theme-preview-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.theme-preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}
.theme-preview-item:hover {
    background: var(--primary-light, #f5f5f5);
}
.theme-preview-item.active {
    background: var(--primary-light, #f5f5f5);
    border: 1px solid var(--primary-color, #165DFF);
}
/* 配色样例色块 */
.theme-color-blocks {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 40px;
}
.theme-primary-block {
    width: 100%;
    height: 20px;
    border-radius: 2px;
    background: var(--item-primary);
}
.theme-bg-block {
    width: 100%;
    height: 20px;
    border-radius: 2px;
    background: var(--item-bg);
    border: 1px solid #eee;
}
/* 文字样例 */
.theme-text-preview {
    flex: 1;
}
.theme-text-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--item-text);
    margin-bottom: 4px;
}
.theme-text-desc {
    font-size: 12px;
    color: var(--item-text-gray);
}
/* 预览面板开关按钮 */
.theme-preview-toggle {
    position: fixed;
    top: 120px;
    right: 20px;
    z-index: 9999;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color, #165DFF);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}
/* 原有主题按钮样式（参考） */
.theme-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    margin: 5px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease, border 0.2s ease;
}
.theme-btn:hover, .theme-btn.active {
    opacity: 1;
    border: 2px solid #fff;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}
.theme-btn.blue { background: #165DFF; }
.theme-btn.red { background: #FF4D4F; }
.theme-btn.green { background: #52C41A; }
.theme-btn.dark { background: #121212; border: 1px solid #444; }
.theme-btn.skyblue { background: #17C3B2; }
.theme-btn.beige { background: #F5D782; }
.theme-btn.lime { background: #94D82D; }
.theme-btn.amber { background: #D97706; }

/* 新增4款主题按钮样式（补充此处） */
/* 1. 淡樱粉色按钮 */
.theme-btn.cherrypink {
    background: #F8C8DC;
}
/* 2. 虹彩搭配按钮（渐变背景，适配多浏览器） */
.theme-btn.iridescent {
    background: linear-gradient(120deg, #845EC2, #D65DB1, #FF6F91, #FF9671, #FFC75F, #F9F871);
    /* 渐变背景兼容webkit内核 */
    background: -webkit-linear-gradient(120deg, #845EC2, #D65DB1, #FF6F91, #FF9671, #FFC75F, #F9F871);
}
/* 3. 琥珀柔焦按钮 */
.theme-btn.amber-soft {
    background: #E2B86C;
}
/* 4. 热带雨林（青柠×薄荷绿）按钮（渐变背景） */
.theme-btn.rainforest {
    background: linear-gradient(135deg, #7CCC7A, #4ECDC4);
    /* 渐变背景兼容webkit内核 */
    background: -webkit-linear-gradient(135deg, #7CCC7A, #4ECDC4);
}

/* 全局主题过渡动画（核心） */
:root {
    --transition-base: all 0.5s ease-in-out; /* 统一过渡时长+缓动 */
}
/* 所有主题相关元素添加过渡 */
body,
header, footer,
.product-card, .related-item, .contact-form, .product-params,
.consult-btn, .btn-buy, .form-btn, .product-card-btn, .btn-consult,
.product-tag, .product-card-tag,
.form-group input, .form-group textarea,
.main-img, .img-thumb, .desc-img,
.timeline::before, .timeline-item::before,
.theme-preview-panel, .theme-preview-item {
    transition: var(--transition-base);
}
/* 特殊属性单独过渡（部分浏览器对复合属性支持差） */
body {
    transition: 
        background 0.5s ease-in-out,
        background-image 0.5s ease-in-out,
        color 0.5s ease-in-out;
}
/* 模糊/滤镜效果过渡 */
.product-card, .related-item, .contact-form, .product-params,
header, footer, .btn-consult {
    transition:
        backdrop-filter 0.5s ease-in-out,
        -webkit-backdrop-filter 0.5s ease-in-out,
        filter 0.5s ease-in-out,
        background 0.5s ease-in-out,
        border-color 0.5s ease-in-out,
        box-shadow 0.5s ease-in-out;
}
/* 渐变按钮/文字过渡 */
.consult-btn, .btn-buy, .form-btn, .product-card-btn {
    transition:
        background 0.5s ease-in-out,
        box-shadow 0.5s ease-in-out,
        transform 0.3s ease-in-out;
}
/* 图片过渡（柔焦/光影） */
.desc-img, .main-img, .img-thumb {
    transition:
        filter 0.5s ease-in-out,
        border-color 0.5s ease-in-out,
        box-shadow 0.5s ease-in-out;
}