* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

:root {
    --primary: #10B981;
    --primary-light: #34D399;
    --secondary: #059669;
    --accent: #F43F5E;
    --whatsapp: #25D366;
    --whatsapp-hover: #12B755;
    --light: #F0FDF4;
    --dark: #1D2B3A;
    --dark-light: #4A5568;
    --white: #ffffff;
    --shadow: 0 4px 15px rgba(16, 185, 129, 0.12);
    --shadow-hover: 0 6px 20px rgba(16, 185, 129, 0.2);
    --radius: 10px;
    --promo-bg: #F43F5E;
    --promo-text: #ffffff;
    --promo-bg-hover: #E11D48;
    --transition-base: all 0.3s ease;
}

body {
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 80px;
}

/* 效果1：逐元素淡入动画（修复触发问题，补充所有元素延迟） */
.content-visible {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeIn 0.5s ease-out forwards;
}

.content-visible:nth-child(1) {
    animation-delay: 0.1s;
}

.content-visible:nth-child(2) {
    animation-delay: 0.2s;
}

.content-visible:nth-child(3) {
    animation-delay: 0.3s;
}

.content-visible:nth-child(4) {
    animation-delay: 0.4s;
}

.content-visible:nth-child(5) {
    animation-delay: 0.5s;
}

.content-visible:nth-child(6) {
    animation-delay: 0.6s;
}

.content-visible:nth-child(7) {
    animation-delay: 0.7s;
}

.content-visible:nth-child(8) {
    animation-delay: 0.8s;
}

.content-visible:nth-child(9) {
    animation-delay: 0.9s;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: translateY(-50%) scale(1);
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    }

    50% {
        transform: translateY(-50%) scale(1.05);
        box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    }

    100% {
        transform: translateY(-50%) scale(1);
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    }
}

/* 效果2：顶部促销框-中间区间跑马灯（核心修改：往返滑动、不重复、兼顾移动端） */
.top-promo {
    background: var(--promo-bg);
    color: var(--promo-text);
    border-radius: var(--radius);
    padding: 12px 0;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    position: sticky;
    top: 10px;
    z-index: 99;
    max-width: 1200px;
    margin: 8px auto;
    box-shadow: 0 4px 20px rgba(244, 63, 94, 0.25);
    transition: var(--transition-base);
    overflow: hidden;
    text-align: center;
    /* 文字居中，为中间区间滑动做基础 */
}

/* 跑马灯容器：适配文字宽度，不换行 */
.promo-marquee {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 8s linear infinite;
    /* 匀速往返，不重复 */
}

/* 核心动画：中间区间往返滑动（20px左右），无整体平移、无重复 */
@keyframes marquee {
    0% {
        transform: translateX(20px);
    }

    /* 右侧起始位 */
    50% {
        transform: translateX(-20px);
    }

    /* 左侧终止位（中间区间） */
    100% {
        transform: translateX(20px);
    }

    /* 回到右侧，循环往返 */
}

.top-promo:hover {
    background: var(--promo-bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(244, 63, 94, 0.5);
}

.hl-main {
    color: var(--white);
    font-weight: 900;
}

.hl-secondary {
    color: #FFE033;
    font-weight: 900;
    font-size: 18px;
    margin: 0 4px;
}

.hero {
    text-align: center;
    padding: 25px 20px;
    background: var(--white);
    margin-bottom: 15px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.hero h1 {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 6px;
    font-weight: 800;
}

.hero p {
    font-size: 18px;
    color: var(--dark);
    margin-bottom: 15px;
    font-weight: 500;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    background: var(--primary-light);
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn-outline {
    background: var(--primary);
    border: 2px solid var(--primary);
    color: var(--white);
    display: block;
    margin: 0 auto;
    padding: 12px 28px;
}

.btn-outline:hover {
    background: var(--primary-light);
    opacity: 1;
}

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

/* 效果3：产品优势轮播（修复：滑动卡顿、指示器错位、移动端触摸冲突） */
.carousel-section {
    padding: 20px;
    background: var(--white);
    margin-bottom: 15px;
    border-radius: var(--radius);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: var(--shadow);
    position: relative;
}

.carousel-title {
    text-align: center;
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 800;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: var(--transition-base);
    border: none;
    color: var(--primary);
    font-size: 16px;
}

.carousel-nav:hover,
.carousel-nav:focus-visible {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    outline: none;
}

.carousel-nav.prev {
    left: 5px;
}

.carousel-nav.next {
    right: 5px;
}

@media (max-width: 768px) {
    .carousel-nav {
        display: none;
    }
}

.carousel-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    height: 280px;
    max-width: 1000px;
    margin: 0 auto;
    touch-action: pan-y;
    /* 仅允许垂直滚动，解决移动端触摸冲突 */
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-item {
    width: 300px;
    padding: 18px;
    margin: 0 12px;
    background: var(--light);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    flex-shrink: 0;
    will-change: transform;
    transition: var(--transition-base);
}

.carousel-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.carousel-item img {
    width: 100%;
    height: 150px;
    border-radius: var(--radius);
    margin-bottom: 12px;
    background: var(--primary);
    background-size: cover;
    object-fit: cover;
}

.carousel-item h3 {
    color: var(--primary);
    margin-bottom: 4px;
    font-size: 18px;
    font-weight: 700;
}

.carousel-item p {
    font-size: 13px;
    color: var(--dark);
    margin-bottom: 8px;
    min-height: 40px;
    line-height: 1.5;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    margin-top: 12px;
    gap: 6px;
}

.carousel-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.3);
    transition: var(--transition-base);
    cursor: pointer;
}

.carousel-indicator.active {
    background: var(--primary);
    transform: scale(1.2);
}

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

.features-title {
    text-align: center;
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 20px;
    font-weight: 800;
    position: relative;
}

.features-title::after {
    content: "";
    width: 60px;
    height: 3px;
    background: var(--primary);
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

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

.feature-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition-base);
    border-left: 3px solid var(--primary);
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-left-width: 6px;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: var(--white);
    font-size: 22px;
}

.feature-card h4 {
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 700;
}

.feature-card p {
    font-size: 13px;
    color: var(--dark);
    line-height: 1.5;
}

.testimonials {
    padding: 20px;
    background: var(--white);
    margin-bottom: 15px;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.testimonials-title {
    text-align: center;
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 800;
    position: relative;
}

.testimonials-title::after {
    content: "";
    width: 60px;
    height: 3px;
    background: var(--primary);
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

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

.testimonial-card {
    padding: 18px;
    background: var(--light);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition-base);
    border-top: 2px solid var(--secondary);
}

.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-top-color: var(--primary);
}

.testimonial-card .stars {
    color: var(--secondary);
    margin-bottom: 8px;
    font-size: 16px;
    letter-spacing: 1px;
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--dark);
}

.testimonial-card .user {
    font-weight: 600;
    color: var(--primary);
    text-align: right;
    font-size: 12px;
}

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

.products-title {
    text-align: center;
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 800;
    position: relative;
}

.products-title::after {
    content: "";
    width: 60px;
    height: 3px;
    background: var(--primary);
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.products-desc {
    text-align: center;
    font-size: 14px;
    color: var(--dark);
    max-width: 700px;
    margin: 0 auto 20px;
    line-height: 1.5;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 15px;
    text-align: center;
    transition: var(--transition-base);
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--primary);
}

.product-card .sku {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 3px;
}

.product-card .name {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0;
}

.discount {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto 15px;
    background: var(--light);
    border-radius: var(--radius);
    text-align: center;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow);
    transition: var(--transition-base);
}

.discount:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.discount h3 {
    color: var(--primary);
    margin-bottom: 6px;
    font-size: 20px;
    font-weight: 700;
}

.discount p {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.fixed-bottom-btn {
    position: fixed;
    bottom: max(20px, env(safe-area-inset-bottom));
    right: max(20px, env(safe-area-inset-right));
    z-index: 98;
}

.fixed-bottom-btn .btn {
    padding: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--whatsapp);
    color: var(--white);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    animation: pulse 2s infinite;
    font-size: 24px;
}

.fixed-bottom-btn .btn:hover {
    animation: none;
    transform: scale(1.1);
    background: var(--whatsapp-hover);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    outline: none;
}

.fixed-bottom-btn .btn i {
    margin: 0;
}

.footer-copyright {
    background: var(--white);
    border-top: 1px solid var(--light);
    padding: 15px 20px;
    text-align: center;
    margin-top: 20px;
}

.copyright-main {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.copyright-desc {
    font-size: 11px;
    color: var(--dark-light);
    line-height: 1.6;
    max-width: 900px;
    margin: 0 auto;
}

/* 移动端适配：所有效果兼容小屏幕，重点调整跑马灯区间 */
@media (max-width: 768px) {

    /* 效果2移动端：缩小跑马灯滑动区间、适配字体 */
    .top-promo {
        padding: 10px 0;
        font-size: 14px;
        margin: 5px auto;
    }

    .promo-marquee {
        animation: marquee-mobile 7s linear infinite;
        /* 移动端稍快，适配视觉 */
    }

    @keyframes marquee-mobile {
        0% {
            transform: translateX(15px);
        }

        50% {
            transform: translateX(-15px);
        }

        100% {
            transform: translateX(15px);
        }
    }

    .hl-secondary {
        font-size: 16px;
        margin: 0 2px;
    }

    .hero {
        padding: 20px 15px;
        margin-bottom: 10px;
    }

    .hero h1 {
        font-size: 26px;
    }

    .hero p {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .carousel-section {
        padding: 15px;
        margin-bottom: 10px;
    }

    .carousel-title {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .carousel-container {
        height: 250px;
    }

    .carousel-item {
        width: 260px;
        padding: 12px;
        margin: 0 8px;
    }

    .carousel-item img {
        height: 130px;
        margin-bottom: 10px;
    }

    .carousel-item h3 {
        font-size: 16px;
        margin-bottom: 3px;
    }

    .carousel-item p {
        font-size: 12px;
        min-height: 35px;
        margin-bottom: 6px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .feature-card {
        padding: 15px;
    }

    .feature-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin-bottom: 10px;
    }

    .feature-card h4 {
        font-size: 15px;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .testimonial-card {
        padding: 15px;
    }

    .testimonial-card p {
        font-size: 12px;
    }

    .products {
        padding: 15px;
    }

    .products-title {
        font-size: 20px;
    }

    .products-desc {
        font-size: 13px;
        margin-bottom: 15px;
    }

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

    .product-card {
        padding: 12px 8px;
    }

    .discount {
        padding: 15px;
        margin-bottom: 10px;
    }

    .discount h3 {
        font-size: 18px;
    }

    .discount p {
        font-size: 13px;
    }

    .btn {
        padding: 10px 22px;
        font-size: 14px;
    }

    .btn-outline {
        padding: 10px 22px;
    }

    .fixed-bottom-btn {
        bottom: max(15px, env(safe-area-inset-bottom));
        right: max(15px, env(safe-area-inset-right));
    }

    .fixed-bottom-btn .btn {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 22px;
    }

    .hero p {
        font-size: 14px;
    }

    .carousel-container {
        height: 230px;
    }

    .carousel-item {
        width: 240px;
        padding: 10px;
    }

    .carousel-item p {
        min-height: 30px;
    }

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

    .fixed-bottom-btn .btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

@supports not (env(safe-area-inset-bottom)) {
    .fixed-bottom-btn {
        bottom: 20px;
        right: 20px;
    }

    @media (max-width:768px) {
        .fixed-bottom-btn {
            bottom: 15px;
            right: 15px;
        }
    }
}