* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: #f5f5f5;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.top-bar {
    background-color: #2c2c2c;
    padding: 10px 0;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo img {
    height: 50px;
    width: auto;
    border-radius: 8px;
    object-fit: contain;
}

.logo-text {
    color: #ffc107;
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 2px;
}

.logo-subtitle {
    color: #fff;
    font-size: 14px;
    margin-top: 2px;
}

.top-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 6px 12px;
    border: none;
    border-radius: 8px 0 0 8px;
    font-size: 14px;
    outline: none;
}

.search-box button {
    padding: 6px 15px;
    background-color: #ffc107;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    color: #333;
    font-weight: bold;
}

.nav-bar {
    background-color: #3a3a3a;
    border-bottom: 2px solid #ffc107;
}

.nav-bar ul {
    list-style: none;
    display: flex;
}

.nav-bar li {
    position: relative;
    display: inline;
    float: left;
    padding: 0;
    margin: 0;
}

.nav-bar li a {
    display: block;
    font-size: 14px;
    color: #ffffff;
    text-align: center;
    width: 145px;
    height: 42px;
    font-weight: bold;
    text-decoration: none;
    line-height: 42px;
    transition: all 0.3s;
}

.nav-bar li.active a,
.nav-bar li a:hover {
    color: #FFFFFF;
    background-color: #ffc107;
    text-decoration: none;
}

.nav-bar .submenu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 1000;
    visibility: hidden;
}

.nav-bar li:hover .submenu {
    display: block;
    visibility: visible;
}

.nav-bar .submenu li {
    display: list-item;
    float: none;
    padding: 0;
    margin: 0;
}

.nav-bar .submenu a {
    color: #ffffff;
    text-align: center;
    background-color: #e7ae19;
    width: 145px;
    height: auto;
    margin: 0;
    padding: 9px 0;
    font-size: 12px;
    text-decoration: none;
    line-height: 14px;
    font-weight: normal;
    border-top: 1px solid #ffff99;
    display: block;
}

.nav-bar .submenu li:first-child a {
    border-top: none;
}

.nav-bar .submenu a:hover {
    color: #ffffff;
    background-color: #F4D9AD;
}

.banner {
    position: relative;
    overflow: hidden;
}

.banner-container {
    position: relative;
    width: 100%;
}

.banner-slides {
    position: relative;
    width: 100%;
    height: 400px;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.banner-slide.active {
    opacity: 1;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.banner-indicators span {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.banner-indicators span:hover {
    background-color: rgba(255,255,255,0.8);
}

.banner-indicators span.active {
    background-color: #ffc107;
}

.section-title {
    text-align: center;
    padding: 40px 0 20px;
    position: relative;
}

.section-title h2 {
    font-size: 28px;
    color: #2c2c2c;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #ffc107;
}

.products-section {
    padding: 20px 0;
}

.products-container {
    position: relative;
}

.products-wrapper {
    overflow: hidden;
    width: 100%;
}

.products-scroll {
    display: flex;
    transition: transform 0.5s ease;
}

.products-page {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    flex-shrink: 0;
}

.product-card {
    background-color: #fff;
    border: 1px solid #e8e8e8;
    text-align: center;
    padding: 15px;
    transition: all 0.3s ease;
    display: block;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
}

.product-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.product-card img {
    width: 100%;
    height: 140px;
    background-color: #fafafa;
    margin-bottom: 10px;
}

.product-card h3 {
    font-size: 12px;
    color: #333;
    font-weight: 500;
    padding-top: 10px;
    box-sizing: border-box;
    border-top: 1px solid #e0e0e0;
    line-height: 1.4;
    white-space: nowrap;
}

.products-pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.pagination-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background-color: #000;
    font-size: 16px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    padding: 0;
}

.pagination-btn:hover:not(:disabled) {
    opacity: 0.7;
}

.pagination-btn:active:not(:disabled) {
    opacity: 0.9;
}

.pagination-btn:disabled {
    opacity: 0.15;
    cursor: not-allowed;
}



.about {
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.about h3 {
    font-size: 22px;
    color: #2c2c2c;
    margin-bottom: 20px;
}

.about p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

.contact-info {
    background-color: #fff;
    padding:0 40px 40px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.contact-offices {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.office-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 350px;
}

.office-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 20px;
    border: 3px solid #f0f0f0;
}

.office-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.office-details {
    text-align: center;
    width: 100%;
}

.office-details h4 {
    font-size: 16px;
    color: #2c2c2c;
    margin-bottom: 15px;
    font-weight: 600;
}

.office-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.office-info p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
    white-space: normal;
    word-wrap: break-word;
}

.footer {
    background-color: #404047;
    color: #999;
    padding: 40px 0 30px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #3a3a3a;
}

.footer-column h4 {
    color: #ffc107;
    font-size: 14px;
    font-weight: 600;
}

.footer-column .footer-subtitle {
    margin-top: 10px;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    padding: 2px 0 0;
}

.footer-column a {
    color: #999;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
    line-height: 1.5;
}

.footer-column a:hover {
    color: #ffc107;
}

.footer-contact {
    text-align: left;
}

.footer-phone {
    margin-bottom: 15px;
}

.footer-phone img {
    max-width: 100%;
    height: auto;
    display: block;
}

.footer-company,
.footer-copyright,
.footer-icp {
    font-size: 13px;
    margin: 8px 0;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    width: 36px;
    height: 36px;
    background-color: #3a3a3a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.3s;
    overflow: hidden;
}

.social-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.social-icon:hover {
    background-color: #ffc107;
}

.footer-description {
    padding: 25px 0 0;
    border-bottom: 1px solid #3a3a3a;
    margin-bottom: 25px;
}

.footer-description p {
    color: #ffc107;
    font-size: 13px;
    line-height: 1.8;
    text-align: center;
    margin: 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.footer-links span {
    color: #999;
    font-size: 13px;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #ffc107;
}

@media (max-width: 768px) {
    .top-bar .container {
        flex-direction: column;
        gap: 15px;
    }

    .nav-bar ul {
        flex-wrap: wrap;
    }

    .nav-bar li {
        padding: 10px 15px;
    }

    .banner-slides {
        height: 250px;
    }

    .banner-indicators span {
        width: 10px;
        height: 10px;
    }

    .products-page {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-links {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* 页面淡入效果 - 解决页面闪烁 */
body {
    opacity: 0;
    animation: fadeIn 0.1s ease-in forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Header占位符 - 防止加载时空白 */
#header-container {
    min-height: 110px;
    background: linear-gradient(to bottom, #2c2c2c 0%, #3a3a3a 100%);
}

/* Footer占位符 - 防止加载时空白 */
#footer-container {
    min-height: 200px;
    background-color: #404047;
}

/* 图片占位符 - 防止加载时布局跳动 */
img {
    background-color: #f5f5f5;
}

.product-card img {
    background-color: #fafafa;
}
