/* ========== Base Reset ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #2d3436;
    background-color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== Header ========== */
.header {
    background: #fff;
    box-shadow: 0 1px 10px rgba(0,0,0,0.06);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 60px;
    width: auto;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #2d3436;
}

.nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    font-size: 15px;
    color: #636e72;
    border-radius: 6px;
}

.nav-link:hover,
.nav-link.active {
    color: #0984e3;
    background: #f0f7ff;
}

/* ========== Carousel ========== */
.hero {
    margin-top: 84px;
    background: #111;
    scroll-margin-top: 84px;
}

.carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}

.carousel-track {
    position: relative;
    width: 100%;
    aspect-ratio: 21/9;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
    cursor: pointer;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.3);
    color: #fff;
    border: none;
    padding: 16px 14px;
    font-size: 22px;
    cursor: pointer;
    border-radius: 4px;
    z-index: 10;
}

.carousel-prev { left: 16px; }
.carousel-next { right: 16px; }

.carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
}

.carousel-dot.active {
    background: #fff;
}

/* ========== Buttons ========== */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: #fff;
    color: #0984e3;
}

.btn-primary:hover {
    background: #f0f7ff;
}

.btn-outline {
    border: 2px solid #0984e3;
    color: #0984e3;
    background: transparent;
    padding: 10px 28px;
}

.btn-outline:hover {
    background: #0984e3;
    color: #fff;
}

/* ========== Section Title ========== */
.section-title {
    text-align: center;
    font-size: 32px;
    color: #2d3436;
    margin-bottom: 48px;
    font-weight: 700;
}

.section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 4px;
    background: #0984e3;
    margin: 12px auto 0;
    border-radius: 2px;
}

/* ========== Products ========== */
.products {
    padding: 80px 0;
    background: #f5f6fa;
    scroll-margin-top: 84px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    cursor: pointer;
}

.product-image {
    width: 100%;
    aspect-ratio: 3/2;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 18px;
    color: #2d3436;
    margin-bottom: 8px;
    font-weight: 600;
}

.product-info p {
    color: #636e72;
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.6;
}

/* ========== About ========== */
.about {
    padding: 80px 0;
    scroll-margin-top: 84px;
}

.about-content {
    display: flex;
    justify-content: center;
}

.about-text {
    max-width: 800px;
    text-align: center;
}

.about-text p {
    font-size: 16px;
    color: #636e72;
    margin-bottom: 16px;
    line-height: 1.8;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
    background: #f5f6fa;
    padding: 24px 40px;
    border-radius: 12px;
}

.stat-number {
    display: block;
    font-size: 40px;
    font-weight: 700;
    color: #0984e3;
}

.stat-label {
    font-size: 14px;
    color: #636e72;
    margin-top: 4px;
}

/* ========== Contact ========== */
.contact {
    padding: 80px 0;
    background: #1a1a2e;
    scroll-margin-top: 84px;
}

.section-title-light {
    color: #fff;
}

.section-title-light::after {
    background: #fff;
}

.contact-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 60px;
}

.contact-info {
    flex: 1;
}

.contact-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    align-items: flex-start;
}

.contact-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.contact-item h4 {
    color: #fff;
    margin-bottom: 4px;
    font-size: 16px;
    font-weight: 600;
}

.contact-item p {
    color: #b2bec3;
    font-size: 14px;
}

.wechat-qr {
    text-align: center;
    flex-shrink: 0;
}

.wechat-qr img {
    width: 260px;
    height: 260px;
    border: 3px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 10px;
    background: #fff;
}

.wechat-qr p {
    margin-top: 14px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
}

/* ========== 模块照片弹层 ========== */
.module-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    overflow-y: auto;
    padding: 40px 24px;
    -webkit-overflow-scrolling: touch;
}

.module-overlay.show {
    display: block;
}

.module-panel {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 36px 32px 32px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.panel-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 32px;
    color: #636e72;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}

.panel-close:hover {
    color: #2d3436;
}

.module-header {
    padding-right: 40px;
    margin-bottom: 28px;
}

.module-header h2 {
    font-size: 26px;
    color: #2d3436;
    margin-bottom: 12px;
}

.module-header p {
    font-size: 15px;
    color: #636e72;
    line-height: 1.8;
    margin-bottom: 20px;
    max-width: 760px;
}

/* 照片九宫格 */
.module-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.module-photo {
    display: block;
    padding: 0;
    border: none;
    background: #f5f6fa;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: zoom-in;
}

.module-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.module-photo:hover img {
    transform: scale(1.05);
}

/* 展开全部：占满一整行，形状和照片格子区隔开 */
.module-more {
    grid-column: 1 / -1;
    padding: 14px;
    border: 2px dashed #c8d6e5;
    border-radius: 10px;
    background: #f8fafc;
    color: #0984e3;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.module-more:hover {
    background: #eef6ff;
    border-color: #0984e3;
}

/* ========== 原图查看 ========== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.92);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.lightbox.show {
    display: flex;
}

.lightbox img {
    max-width: 92vw;
    max-height: 86vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.85;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    padding: 18px 16px;
    font-size: 22px;
    border-radius: 6px;
    cursor: pointer;
}

.lightbox-arrow:hover {
    background: rgba(255,255,255,0.3);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    opacity: 0.8;
}

/* 只有一张照片时，不需要切换箭头和计数 */
.lightbox.single .lightbox-arrow,
.lightbox.single .lightbox-counter {
    display: none;
}

/* ========== Footer ========== */
.footer {
    background: #2d3436;
    color: #fff;
    padding: 28px 0;
    text-align: center;
}

.footer p {
    font-size: 13px;
    opacity: 0.7;
}

.footer-icp {
    margin-top: 6px;
}

.footer-icp a {
    color: inherit;
    text-decoration: none;
}

.footer-icp a:hover {
    text-decoration: underline;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .header .container {
        flex-direction: row;
        height: auto;
        padding: 8px 12px;
        align-items: center;
        justify-content: space-between;
    }

    .logo {
        margin-bottom: 0;
    }

    .logo img {
        height: 41px;
    }

    .nav {
        gap: 2px;
        margin-top: 0;
    }

    .nav-link {
        padding: 4px 8px;
        font-size: 12px;
    }



    /* 手机端轮播：细长指示条、淡化箭头 */
    .hero {
        margin-top: 57px;
        scroll-margin-top: 57px;
    }

    .carousel-track {
        aspect-ratio: 16/9;
    }

    .carousel-dot {
        width: 20px;
        height: 3px;
        border-radius: 2px;
    }

    .carousel-dot.active {
        width: 30px;
    }

    .carousel-arrow {
        padding: 8px 6px;
        font-size: 14px;
        opacity: 0.3;
        background: rgba(0,0,0,0.15);
    }

    /* 产品：一排两个 */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-info {
        padding: 12px;
    }

    .product-info h3 {
        font-size: 14px;
    }

    .product-info p {
        font-size: 12px;
    }

    .product-info .btn-outline {
        padding: 6px 12px;
        font-size: 12px;
    }

    /* 关于：三框并排，字体缩小 */
    .about {
        padding: 40px 0;
        scroll-margin-top: 57px;
    }

    .products {
        scroll-margin-top: 57px;
    }

    .contact {
        scroll-margin-top: 57px;
    }

    .section-title {
        font-size: 22px;
        margin-bottom: 28px;
    }

    .about-text p {
        font-size: 14px;
    }

    .stats {
        gap: 10px;
    }

    .stat-item {
        padding: 12px 8px;
    }

    .stat-number {
        font-size: 24px;
    }

    .stat-label {
        font-size: 11px;
    }

    /* 联系：文字和二维码左右排版 */
    .contact {
        padding: 40px 0;
    }

    .contact-content {
        flex-direction: row;
        align-items: flex-start;
        gap: 20px;
    }

    .contact-item {
        margin-bottom: 16px;
        gap: 10px;
    }

    .contact-icon {
        font-size: 22px;
    }

    .contact-item h4 {
        font-size: 14px;
    }

    .contact-item p {
        font-size: 12px;
    }

    .wechat-qr img {
        width: 120px;
        height: 120px;
    }

    .wechat-qr p {
        font-size: 12px;
    }

    /* 手机端模块照片弹层 / 原图查看 */
    .module-overlay {
        padding: 16px 12px;
    }

    .module-panel {
        padding: 24px 16px 20px;
        border-radius: 12px;
    }

    .module-header {
        padding-right: 32px;
        margin-bottom: 18px;
    }

    .module-header h2 {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .module-header p {
        font-size: 13px;
        margin-bottom: 14px;
    }

    .module-header .btn-outline {
        padding: 8px 18px;
        font-size: 13px;
    }

    .module-photos {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .module-more {
        padding: 10px;
        font-size: 13px;
    }

    .lightbox img {
        max-width: 94vw;
        max-height: 78vh;
    }

    .lightbox-close {
        top: 8px;
        right: 12px;
        font-size: 32px;
    }

    .lightbox-arrow {
        padding: 12px 10px;
        font-size: 16px;
    }

    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
}

/* ========== Accessibility & Motion ========== */
/* 键盘导航：显示清晰的焦点框 */
.nav-link:focus-visible,
.carousel-arrow:focus-visible,
.panel-close:focus-visible,
.lightbox-close:focus-visible,
.lightbox-arrow:focus-visible,
.module-photo:focus-visible,
button:focus-visible {
    outline: 2px solid #0984e3;
    outline-offset: 2px;
}

/* 尊重系统“减少动效”设置 */
@media (prefers-reduced-motion: reduce) {
    .carousel-slide,
    .carousel-arrow,
    .carousel-dot,
    .nav-link,
    .btn {
        transition: none;
    }
}
