/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* 导航栏样式 */
.navbar {
    background-color: #e63946;
    color: #fff;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid #c1121f;
}

/* 默认隐藏汉堡菜单按钮（大屏幕） */
.mobile-menu-toggle {
    display: none;
}

/* 带图标的Logo样式 */
.logo-with-icon {
    display: flex;
    align-items: center;
}

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 5px;
    margin-right: 8px;
    object-fit: contain;
}

.logo h1 {
    margin: 0;
    color: #fff;
    font-size: 22px;
}

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

.logo h1 {
    font-size: 24px;
    font-weight: 700;
}

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

.nav-links ul li {
    margin-left: 20px;
}

.nav-links ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.nav-links ul li a:hover {
    color: #f00;
}

/* 滚动横幅样式 */
.banner-carousel {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
    background-color: #f0f0f0;
    margin: 0;
    padding: 0;
}

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

.carousel-slide {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

.carousel-slide img.active {
    opacity: 1;
}

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

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.indicator.active {
    background-color: #fff;
}

/* 主要内容区域样式 */
.main-content {
    min-height: calc(100vh - 500px); /* 调整主内容区域的最小高度 */
    padding: 40px 0;
    background-color: #fff;
}

/* 首页专用主内容区域样式 */
.main-content.home-main {
    padding: 0;
}

/* 图片列表样式 */
.image-gallery {
    padding: 40px 0;
    text-align: center;
}

/* 首页专用图片布局 */
.image-gallery.home-gallery {
    padding: 0;
    margin: 0;
}

.gallery-container.home-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 60%;
    margin: 0 auto;
    padding: 0;
}

/* 响应式样式 - 手机端宽度100% */
@media (max-width: 768px) {
    .gallery-container.home-gallery-container {
        max-width: 100%;
    }
    
    /* 手机端导航栏样式 */
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #e63946;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        z-index: 999;
    }
    
    .nav-links ul {
        flex-direction: column;
        width: 100%;
        padding: 0;
        margin: 0;
    }
    
    .nav-links ul li {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        height: 25px;
        display: flex;
        align-items: center;
    }
    
    .nav-links ul li a {
        display: block;
        padding: 7px 20px;
        width: 100%;
        text-align: center;
        line-height: 1;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 汉堡菜单按钮样式 */
    .mobile-menu-toggle {
        display: block;
        cursor: pointer;
        padding: 5px;
    }
    
    .menu-icon {
        width: 30px;
        height: 21px;
        position: relative;
        transform: rotate(0deg);
        transition: 0.5s ease-in-out;
        cursor: pointer;
    }
    
    .menu-icon div {
        display: block;
        position: absolute;
        height: 3px;
        width: 100%;
        background: #ffffff;
        border-radius: 3px;
        opacity: 1;
        left: 0;
        transform: rotate(0deg);
        transition: 0.25s ease-in-out;
    }
    
    .menu-icon div:nth-child(1) {
        top: 0px;
    }
    
    .menu-icon div:nth-child(2) {
        top: 9px;
    }
    
    .menu-icon div:nth-child(3) {
        top: 18px;
    }
}

.home-gallery-container .gallery-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 0;
    box-shadow: none;
    transition: none;
    display: block;
    margin: 0;
    padding: 0;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.05);
}

/* 产品分类样式 */
.product-category-card {
    width: 100%;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.category-image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.category-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-category-card:hover .category-thumbnail {
    transform: scale(1.05);
}

.category-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 15px;
    text-align: center;
    font-size: 18px;
    font-weight: 500;
    margin: 0;
}

/* 产品中心页面特定样式 */
.image-gallery .gallery-container {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* 产品分类卡片的图标样式 - 根据需求已隐藏 */
.category-icon {
    display: none;
}

/* 不同文件夹的图标样式 */
.icon-box-show::before {
    content: "📦";
}

.icon-box-lid::before {
    content: "🔒";
}

.icon-box-corner::before {
    content: "📥";
}

.icon-box-handle::before {
    content: "👜";
}

.icon-box-insert::before {
    content: "📤";
}

.icon-box-plane::before {
    content: "✈️";
}

.icon-box-other::before {
    content: "📚";
}

.icon-box-default::before {
    content: "📦";
}

/* 产品详情页面样式 */
.category-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

#category-title {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
    font-size: 32px;
    font-weight: 600;
}

.detail-image-gallery {
    margin-top: 20px;
}

.detail-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    max-width: 100%;
    margin: 0 auto;
}

.detail-image-container {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.detail-image-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.detail-gallery-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.detail-image-container:hover .detail-gallery-image {
    transform: scale(1.05);
}

/* 页脚样式 */
.footer {
    background-color: #333;
    color: #fff;
    padding: 30px 0;
}

.footer-content {
    text-align: center;
}

.footer-content p {
    margin-bottom: 10px;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .nav-links ul {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-links ul li {
        margin: 10px 0;
    }
    
    /* 手机端两列图片布局 */
    .detail-gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    /* 调整产品中心页面的图片网格在手机端也显示两列 */
    .image-gallery .gallery-container {
        grid-template-columns: 1fr 1fr;
    }
}