/* ===== 基础样式重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

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

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

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

/* ===== 顶部信息栏 ===== */
.top-bar {
    background: #1a1a2e;
    color: #fff;
    font-size: 0.85rem;
    padding: 8px 0;
    position: relative;
    z-index: 1001;
}

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

.top-left span {
    margin-right: 20px;
}

.top-left i {
    margin-right: 5px;
    color: #e94560;
}

.top-right a {
    margin-left: 15px;
    color: #ccc;
}

.top-right a:hover {
    color: #e94560;
}

/* ===== 导航栏 ===== */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo a {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
    margin-right: 15px;
}

.logo-text h1 {
    font-size: 1.3rem;
    color: #1a1a2e;
    font-weight: 700;
    line-height: 1.2;
}

.logo-text p {
    font-size: 0.8rem;
    color: #666;
    margin-top: 2px;
}

.nav ul {
    display: flex;
    gap: 0;
}

.nav li a {
    display: block;
    padding: 0 20px;
    line-height: 80px;
    color: #333;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
}

.nav li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: #e94560;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav li a:hover,
.nav li.active a {
    color: #e94560;
}

.nav li a:hover::after,
.nav li.active a::after {
    width: 100%;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    padding: 10px;
}

/* 移动端导航 */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: left 0.3s ease;
    overflow-y: auto;
    padding-top: 60px;
}

.mobile-nav.active {
    left: 0;
}

.mobile-nav ul li a {
    display: block;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    color: #333;
    font-weight: 500;
}

.mobile-nav ul li a:hover,
.mobile-nav ul li.active a {
    color: #e94560;
    background: #f9f9f9;
}

/* 遮罩层 */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
}

.overlay.active {
    display: block;
}

/* ===== 页面横幅（通用） ===== */
.page-banner {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.page-banner h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.page-banner .breadcrumb {
    color: rgba(255,255,255,0.7);
}

.page-banner .breadcrumb a {
    color: #e94560;
}

.page-banner .breadcrumb a:hover {
    text-decoration: underline;
}

/* 移动端页面横幅 */
@media (max-width: 768px) {
    .page-banner {
        padding: 40px 0;
    }
    .page-banner h1 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .page-banner {
        padding: 30px 0;
    }
    .page-banner h1 {
        font-size: 1.3rem;
    }
}

/* ===== 横幅轮播 ===== */
.banner {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

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

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: 1;
}

.banner-slide.active {
    opacity: 1;
    z-index: 2;
}

.banner-bg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-content {
    text-align: center;
    color: #fff;
    padding: 0 20px;
    max-width: 800px;
}

.banner-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.banner-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn-primary {
    display: inline-block;
    padding: 12px 35px;
    background: #e94560;
    color: #fff;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #e94560;
}

.btn-primary:hover {
    background: transparent;
    color: #fff;
}

.banner-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

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

.banner-dots span.active {
    background: #e94560;
    width: 30px;
    border-radius: 6px;
}

/* ===== 通用区块标题 ===== */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2rem;
    color: #1a1a2e;
    margin-bottom: 10px;
    font-weight: 700;
}

.section-title p {
    color: #999;
    font-size: 0.9rem;
    letter-spacing: 3px;
}

.section-title.left {
    text-align: left;
}

/* ===== 产品分类入口 ===== */
.product-categories {
    padding: 80px 0;
    background: #fff;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.category-item {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background: #fff;
}

.category-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e94560, #c73e54);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.category-icon i {
    font-size: 2rem;
    color: #fff;
}

.category-item h3 {
    font-size: 1.2rem;
    color: #1a1a2e;
    margin-bottom: 10px;
}

.category-item p {
    color: #666;
    font-size: 0.9rem;
}

/* ===== 热门产品 ===== */
.hot-products {
    padding: 80px 0;
    background: #f5f5f5;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.product-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

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

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-item:hover .product-image img {
    transform: scale(1.1);
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 1.1rem;
    color: #1a1a2e;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-info p {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-more {
    display: inline-block;
    padding: 10px 25px;
    border: 2px solid #e94560;
    color: #e94560;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-more:hover {
    background: #e94560;
    color: #fff;
}

/* ===== 关于我们简介 ===== */
.about-brief {
    padding: 80px 0;
    background: #fff;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.about-image img {
    width: 100%;
    height: auto;
}

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

/* ===== 新闻动态 ===== */
.news-section {
    padding: 80px 0;
    background: #f5f5f5;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.news-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.news-image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-item:hover .news-image img {
    transform: scale(1.1);
}

.news-content {
    padding: 20px;
}

.news-date {
    color: #e94560;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.news-content h3 {
    font-size: 1.1rem;
    color: #1a1a2e;
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-content p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== 优势特色 ===== */
.features {
    padding: 60px 0;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.feature-item {
    text-align: center;
    padding: 30px 20px;
}

.feature-item i {
    font-size: 2.5rem;
    color: #e94560;
    margin-bottom: 20px;
}

.feature-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.feature-item p {
    color: #aaa;
    font-size: 0.9rem;
}

/* ===== 页脚 ===== */
.footer {
    background: #0f0f1a;
    color: #aaa;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-item h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-item h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: #e94560;
}

.footer-item p {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.footer-item i {
    margin-right: 8px;
    color: #e94560;
    width: 16px;
}

.footer-item ul li {
    margin-bottom: 10px;
}

.footer-item ul li a {
    color: #aaa;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-item ul li a:hover {
    color: #e94560;
}

.qr-code {
    text-align: center;
}

.qr-code img {
    width: 120px;
    height: 120px;
    margin: 0 auto 10px;
    background: #fff;
    padding: 5px;
    border-radius: 5px;
}

.qr-code p {
    font-size: 0.8rem;
}

.footer-bottom {
    border-top: 1px solid #222;
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .category-grid,
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== 移动端全适配（所有手机尺寸） ===== */
@media (max-width: 768px) {
    html {
        font-size: 13px;
    }
    
    .top-bar {
        padding: 4px 0;
        font-size: 0.7rem;
    }
    
    .top-bar .container {
        flex-direction: row;
        gap: 3px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .top-left span {
        margin-right: 8px;
    }
    
    .top-left span:last-child {
        display: none;
    }
    
    .header .container {
        height: 50px;
    }
    
    .logo img {
        height: 28px;
    }
    
    .logo-text h1 {
        font-size: 0.8rem;
    }
    
    .logo-text p {
        display: none;
    }
    
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
        padding: 6px;
        font-size: 1.3rem;
    }
    
    .mobile-nav {
        display: block;
    }
    
    /* 首页轮播 */
    .banner {
        height: 160px;
    }
    
    .banner-content {
        padding: 0 15px;
    }
    
    .banner-content h2 {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }
    
    .banner-content p {
        display: none;
    }
    
    .banner-content .btn-primary {
        padding: 6px 14px;
        font-size: 0.75rem;
    }
    
    /* 首页产品分类 - 2x2网格 */
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .category-item {
        padding: 14px 10px;
    }
    
    .category-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 6px;
    }
    
    .category-icon i {
        font-size: 1.2rem;
    }
    
    .category-item h3 {
        font-size: 0.8rem;
    }
    
    .category-item p {
        font-size: 0.7rem;
    }
    
    /* 首页热销产品 */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .product-image {
        height: 140px;
    }
    
    .product-info {
        padding: 8px;
    }
    
    .product-info h3 {
        font-size: 0.8rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .product-info .product-price {
        font-size: 0.8rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .feature-item {
        padding: 15px 10px;
    }
    
    .feature-item i {
        font-size: 1.5rem;
    }
    
    .feature-item h4 {
        font-size: 0.85rem;
    }
    
    .feature-item p {
        font-size: 0.75rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .section-title {
        margin-bottom: 15px;
    }
    
    .section-title h2 {
        font-size: 1rem;
    }
    
    .section-title p {
        font-size: 0.75rem;
    }
    
    .product-categories,
    .hot-products,
    .about-brief,
    .news-section,
    .features-section {
        padding: 24px 0;
    }
    
    .container {
        padding: 0 10px;
    }
    
    /* 按钮通用 */
    .btn-primary {
        padding: 6px 14px;
        font-size: 0.75rem;
    }
    
    .btn-more {
        padding: 6px 14px;
        font-size: 0.75rem;
    }
    
    /* 手机版首页底部链接 */
    .hot-products .btn-more {
        margin-top: 10px;
    }
}

/* 无需480px以下独立breakpoint，768px以下已覆盖所有手机 */

/* ===== 动画效果 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* ===== 加载动画 ===== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #e94560;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
