﻿
/* 基础设置 - 设置根元素字体大小方便rem单位计算 */
:root {
    font-size: 16px; /* 1rem = 16px */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    min-width: 1200px;
}

/* 头部样式 */
.header-outer {
    width: 100%;
    height: 3rem; /* 48px/16 = 3rem */
    border-bottom: 1px solid #d8d8d8;
    display: flex;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    background-color: white;
    z-index: 1000;
}

.header-inner {
    width: 1200px;
    height: 100%;
    display: flex;
    align-items: center;
}

.header-left {
    width: 50%;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

    .header-left a {
        margin-right: 1.25rem; /* 20px/16 = 1.25rem */
        color: #333;
        text-decoration: none;
        font-size: 0.875rem; /* 14px */
        display: flex;
        align-items: center;
        white-space: nowrap;
    }

        .header-left a:hover {
            color: #3687d9;
        }

        .header-left a i {
            margin-right: 0.3125rem; /* 5px */
            font-size: 0.875rem;
        }

.header-right {
    width: 50%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.search-form {
    display: flex;
}

.search-input {
    width: 21.625rem; /* 346px/16 = 21.625rem */
    height: 1.875rem; /* 30px/16 = 1.875rem */
    padding: 0 0.625rem; /* 10px */
    border: 1px solid #3687d9;
    outline: none;
    font-size: 0.875rem;
}

.search-button {
    background-color: #3687d9;
    color: white;
    border: none;
    height: 1.875rem; /* 30px */
    padding: 0 0.9375rem; /* 15px */
    cursor: pointer;
    margin-left: 0.3125rem; /* 5px */
    font-size: 0.875rem;
}

    .search-button:hover {
        background-color: #2a6cb9;
    }

/* 导航条样式 */
.nav-bar {
    width: 100%;
    height: 3.125rem; /* 50px/16 = 3.125rem */
    background-color: #3687d9;
    display: flex;
    justify-content: center;
    margin-top: 3.4375rem; /* 55px */
    position: relative;
    z-index: 999;
}

.nav-container {
    width: 1200px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 0 0.625rem; /* 10px */
    height: 100%;
}

.nav-logo-icon {
    width: 4.0625rem; /* 65px */
    height: 2.1875rem; /* 35px */
    background-color: #ddd; /* 图标背景色，实际使用时替换为图片 */
    margin-right: 0.625rem; /* 10px */
}

.nav-logo-text {
    font-size: 1.875rem; /* 30px */
    color: #3687d9;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    height: 100%;
    justify-content: flex-start;
    flex-grow: 1;
    margin-left: 1.25rem; /* 20px */
}

    .nav-menu a {
        color: #fff;
        text-decoration: none;
        font-size: 1rem; /* 16px */
        padding: 0 1rem; /* 16px */
        display: flex;
        align-items: center;
        height: 100%;
        font-weight: bold;
    }

        .nav-menu a:hover {
            background-color: #2a6cb9;
        }

/* 主要内容区域 */
.main-content {
    width: 1200px;
    margin: 1rem auto 0; /* 头部高度48px + 导航条高度50px + 间隙55px = 153px/16 = 9.5625rem */
    padding: 1rem 0;
    display: flex;
}

/* 左边内容区域 - 修改为列表形式 */
.content-left {
    width: 58.125rem; /* 930px */
    margin-right: 0.625rem; /* 10px */
}

.product-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.product-item {
    display: flex;
    background-color: white;
    border: 1px solid #e8e8e8;
    padding: 1.25rem;
    gap: 1.25rem;
}

.product-image {
    width: 15.625rem; /* 250px */
    flex-shrink: 0;
    border: 1px solid #eee;
    padding: 0.2rem;
}

    .product-image a {
        display: block;
        width: 100%;
        height: 100%;
    }

    .product-image img {
        width: 100%;
        height: auto;
        display: block;
    }

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-name {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

    .product-name a {
        color: #333;
        text-decoration: none;
    }

        .product-name a:hover {
            color: #3687d9;
            text-decoration: underline;
        }

.product-specs {
    display: flex;
    gap: 0.9rem;
    margin-bottom: 0.5rem;
}

.product-spec {
    font-size: 0.75rem;
    color: #666;
    background-color: #f0f0f0;
    padding: 0.2rem 0.5rem;
    border-radius: 0.2rem;
}

.product-price {
    font-size: 1.25rem;
    color: #C62828;
    margin-bottom: 0.5rem;
}

.inquiry-button {
    display: inline-block;
    background-color: #3687d9;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.2rem;
    cursor: pointer;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
    width: fit-content;
}

    .inquiry-button:hover {
        background-color: #2a6cb9;
    }

.product-company {
    font-size: 0.875rem;
}

    .product-company a {
        color: #666;
        text-decoration: none;
    }

        .product-company a:hover {
            color: #3687d9;
            text-decoration: underline;
        }

/* 分类标题 */
.category-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #333;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 1.25rem;
}

/* 友情链接 */
.friend-links {
    border: 1px solid #e8e8e8;
    padding: 0.625rem;
    margin-top: 1.25rem;
}

.friend-links-title {
    font-size: 1.125rem;
    font-weight: bold;
    color: #333;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 0.625rem;
}

.friend-links-list {
    display: flex;
    flex-wrap: wrap;
}

.friend-links-item {
    margin-right: 1rem;
    margin-bottom: 0.5rem;
}

    .friend-links-item a {
        color: #3687d9;
        text-decoration: none;
        font-size: 0.875rem;
    }

        .friend-links-item a:hover {
            text-decoration: underline;
        }

/* 右边内容区域 */
.content-right {
    width: 16.25rem; /* 260px */
}

.right-section {
    border: 1px solid #e8e8e8;
    margin-bottom: 0.625rem; /* 10px */
    padding: 0.625rem; /* 10px */
}

.right-section-title {
    font-size: 1rem; /* 16px */
    font-weight: bold;
    color: #3687d9;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 0.5rem;
}

    .right-section-title a {
        color: inherit;
        text-decoration: none;
    }

        .right-section-title a:hover {
            text-decoration: underline;
        }

.right-section-list {
    list-style: none;
}

.right-section-item {
    padding: 0.25rem 0;
    font-size: 0.875rem; /* 14px */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .right-section-item a {
        color: #333;
        text-decoration: none;
    }

        .right-section-item a:hover {
            color: #3687d9;
            text-decoration: underline;
        }

/* 底部栏目 */
.footer {
    width: 100%;
    background-color: #3d3d3d;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

.footer-container {
    width: 1200px;
    margin: 0 auto;
    color: #999;
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.footer-link {
    margin: 0 1rem;
}

    .footer-link a {
        color: #fff;
        text-decoration: none;
    }

        .footer-link a:hover {
            text-decoration: underline;
        }

.footer-info {
    text-align: center;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.footer-copyright {
    text-align: center;
    margin-bottom: 0.5rem;
}

.footer-cert {
    text-align: center;
    margin-bottom: 1rem;
}

.footer-qrcodes {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-qrcode {
    text-align: center;
}

    .footer-qrcode img {
        width: 6.25rem; /* 100px */
        height: 6.25rem; /* 100px */
        background-color: #fff;
        margin-bottom: 0.5rem;
    }

    .footer-qrcode p {
        color: #fff;
        font-size: 0.75rem;
    }

.footer-disclaimer {
    text-align: center;
    line-height: 1.6;
    font-size: 0.75rem;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    body {
        min-width: auto;
    }

    .header-inner, .nav-container, .main-content, .footer-container {
        width: 100%;
        padding: 0 0.9375rem; /* 15px */
    }

    .content-left {
        width: calc(100% - 16.875rem); /* 减去右边栏宽度+间隙 */
    }
}

@media (max-width: 992px) {
    .nav-menu {
        overflow-x: auto;
        white-space: nowrap;
    }

        .nav-menu::-webkit-scrollbar {
            display: none;
        }

    .product-item {
        flex-direction: column;
    }

    .product-image {
        width: 100%;
    }
}

@media (max-width: 768px) {
    :root {
        font-size: 14px;
    }

    .header-outer {
        height: auto;
        padding: 0.5rem 0;
        position: relative;
    }

    .nav-bar {
        margin-top: 0;
    }

    .header-left, .header-right {
        width: 100%;
    }

    .header-inner {
        flex-direction: column;
        height: auto;
        padding: 0.625rem;
    }

    .header-left {
        margin-bottom: 0.625rem;
        justify-content: center;
    }

        .header-left a {
            margin: 0 0.625rem 0.3125rem;
        }

    .header-right {
        justify-content: center;
    }

    .search-input {
        width: 12.5rem;
    }

    .nav-logo {
        display: none;
    }

    .nav-menu {
        width: 100%;
        justify-content: space-around;
        margin-left: 0;
    }

        .nav-menu a {
            padding: 0 0.5rem;
            font-size: 0.875rem;
        }

    .main-content {
        flex-direction: column;
        margin-top: 0;
    }

    .content-left, .content-right {
        width: 100%;
        margin-right: 0;
    }

    .footer-links {
        justify-content: flex-start;
    }

    .footer-link {
        margin: 0 0.5rem 0.5rem;
    }

    .footer-qrcodes {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .search-form {
        width: 100%;
    }

    .search-input {
        width: 70%;
    }

    .search-button {
        width: 30%;
    }

    .header-left a span {
        display: none;
    }

    .header-left a i {
        margin-right: 0;
        font-size: 1rem;
    }

    .nav-menu a span {
        display: none;
    }

    .nav-menu a:before {
        content: attr(data-short);
    }

    .product-specs {
        flex-wrap: wrap;
    }

    .footer-info, .footer-cert {
        text-align: left;
    }
}
/* 子类导航样式 */
.subcategory-nav {
    margin-bottom: 1.25rem;
    border: 1px solid #e8e8e8;
    padding: 0.625rem;
    background-color: #f9f9f9;
}

.subcategory-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.subcategory-item {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    font-size: 0.875rem;
    color: #333;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 0.2rem;
    background-color: white;
    transition: all 0.3s ease;
}

    .subcategory-item:hover {
        background-color: #3687d9;
        border-color: #3687d9;
        color: #fff;
        text-decoration: none;
    }
.item-active {
    background-color: #3687d9;
    border-color: #3687d9;
    color: #fff;
}

    /* 响应式设计 - 小屏幕调整子类导航 */
    @media (max-width: 768px) {
        .subcategory-list {
        gap: 0.3rem;
    }

    .subcategory-item {
        padding: 0.2rem 0.6rem;
        font-size: 0.75rem;
    }
}
