﻿/* 全局样式 - 最小间距 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #b23b61;
    --primary-dark: #8c2e4b;
    --secondary-color: #fef7f7;
    --text-color: #333;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(178, 59, 97, 0.1);
    --radius: 15px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--secondary-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent; /* 禁用点击高亮 */
}

/* 微信专用提示文字样式 */
.weixin-video-tip {
    display: none; /* 默认隐藏 */
    text-align: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    color: #666;
    margin: 0;
    position: relative;
    z-index: 5;
}

    .weixin-video-tip.show {
        display: block;
    }

    .weixin-video-tip span {
        color: var(--primary-color);
        font-weight: bold;
    }

/* 顶部导航栏样式 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
}

    .header.scrolled {
        padding: 10px 0;
        background-color: rgba(255, 255, 255, 0.98);
    }

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}
    .logo span {
        margin-left: 8px;
    }
/*    .logo img {
        height: 40px;
        margin-right: 50px;

    }*/

/* 电脑端语言选择器样式 */
.desktop-language-selector {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.current-language {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 20px;
    background-color: rgba(178, 59, 97, 0.1);
    transition: var(--transition);
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
}

    .current-language:hover {
        background-color: rgba(178, 59, 97, 0.2);
    }

    .current-language .flag {
        margin-right: 6px;
        font-size: 1.2rem;
    }

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 140px;
    display: none;
    z-index: 1002;
    overflow: hidden;
}

    .language-dropdown.active {
        display: block;
        animation: fadeIn 0.3s ease;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.language-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    -webkit-tap-highlight-color: transparent;
}

    .language-option:last-child {
        border-bottom: none;
    }

    .language-option:hover {
        background-color: rgba(178, 59, 97, 0.1);
    }

    .language-option.active {
        background-color: rgba(178, 59, 97, 0.15);
        color: var(--primary-color);
        font-weight: 500;
    }

    .language-option .flag {
        margin-right: 8px;
        font-size: 1.2rem;
    }

/* 手机端语言选择器 */
.mobile-language-selector {
    display: none;
    align-items: center;
    margin-right: 0px;
}

.mobile-language-btn {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 20px;
    background-color: rgba(178, 59, 97, 0.1);
    transition: var(--transition);
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
}

    .mobile-language-btn:hover {
        background-color: rgba(178, 59, 97, 0.2);
    }

    .mobile-language-btn .flag {
        font-size: 1.2rem;
    }

.mobile-language-dropdown {
    position: fixed;
    top: 70px;
    left: 15px;
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 140px;
    display: none;
    z-index: 1002;
    overflow: hidden;
}

    .mobile-language-dropdown.active {
        display: block;
        animation: fadeIn 0.3s ease;
    }

.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

    .nav-links a {
        color: var(--text-color);
        text-decoration: none;
        font-weight: 500;
        transition: var(--transition);
        padding: 5px 0;
        position: relative;
    }

        .nav-links a:hover {
            color: var(--primary-color);
        }

        .nav-links a::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 2px;
            background-color: var(--primary-color);
            transition: var(--transition);
        }

        .nav-links a:hover::after {
            width: 100%;
        }

        /* 为active状态的链接设置文字颜色 */
        .nav-links a.active {
            color: var(--primary-color); /* 文字颜色改为粉红色 */
        }

            /* 为active状态的链接设置默认下划线 */
            .nav-links a.active::after {
                width: 100%; /* 默认显示完整下划线 */
            }

            /* 为active状态的链接悬停效果（可选） */
            .nav-links a.active:hover {
                color: var(--primary-dark); /* 悬停时文字颜色加深 */
            }

                .nav-links a.active:hover::after {
                    background-color: var(--primary-dark); /* 悬停时下划线颜色加深 */
                }

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 5px;
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

h2 {
    font-size: clamp(1.4rem, 4vw, 2rem);
    text-align: center;
    margin-top: 5px;
}

h3 {
    font-size: clamp(1.1rem, 3vw, 1.6rem);
}

p {
    margin-bottom: 8px;
    font-size: clamp(0.85rem, 2vw, 1rem);
    line-height: 1.6;
}

/* 添加顶部导航后的间距调整 */
body {
    padding-top: 80px; /* 为固定导航栏留出空间 */
}

/* 视频/图片播放区域 */
#video-intro {
    position: relative;
    width: 100%;
    height: 70vh;
    max-height: 650px;
    min-height: 280px;
    overflow: hidden;
    background-color: transparent;
    margin-bottom: 0;
    margin-top: -30px; /* 向上移动以抵消导航栏高度 */
}

    #video-intro video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

/* 视频封面图片 */
.video-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding: 10px;
    z-index: 4;
}

    .video-overlay p {
        font-size: clamp(0.9rem, 3vw, 1.3rem);
        max-width: 800px;
        margin-top: 8px;
    }

/* 关于玫瑰水区域 - 在产品展示下方 */
#description {
    padding: 10px 0 15px 0; /* 减少顶部内边距，增加底部内边距 */
    background-color: var(--white);
    margin-top: -2px; /* 向上移动以靠近产品展示 */
}

    #description .container {
        max-width: 1200px;
    }

/* 产品展示区域 - 在视频下方 */
#products {
    padding: 15px 0 10px 0; /* 增加顶部内边距，减少底部内边距 */
    text-align: center;
    background-color: var(--white);
    margin-top: -5px; /* 向上移动 */
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.product-card {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(178, 59, 97, 0.15);
    }

/* 产品轮播图容器 */
.product-carousel {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
    user-select: none;
}

.carousel-slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.carousel-slide {
    flex: 0 0 100%;
    height: 100%;
    position: relative;
}

    .carousel-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.3s ease;
    }

        .carousel-slide img:hover {
            transform: scale(1.02);
        }

/* 轮播指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 2;
}

    .carousel-indicators .indicator {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.5);
        cursor: pointer;
        transition: all 0.3s ease;
    }

        .carousel-indicators .indicator.active {
            background-color: var(--white);
            transform: scale(1.2);
        }

/* 轮播导航按钮 */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

    .carousel-btn:hover {
        background-color: rgba(255, 255, 255, 0.3);
    }

    .carousel-btn.prev {
        left: 15px;
    }

    .carousel-btn.next {
        right: 15px;
    }

.product-carousel:hover .carousel-btn {
    opacity: 1;
}

.product-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

    .product-content p {
        margin-bottom: 8px;
        flex-grow: 1;
    }

.price {
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    color: var(--primary-color);
    font-weight: bold;
    margin: 10px 0;
}

.btn {
    display: inline-block;
    padding: 8px 20px;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 20px;
    font-weight: bold;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: clamp(0.9rem, 2vw, 1rem);
    text-align: center;
    margin-top: auto;
    -webkit-tap-highlight-color: transparent;
}

    .btn:hover {
        background-color: var(--primary-dark);
        transform: scale(1.02);
    }

/* 图片放大查看模态框 */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .image-modal.active {
        display: flex;
        opacity: 1;
    }

.modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-image {
    max-width: 95%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.image-modal.active .modal-image {
    transform: scale(1);
}

.modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2001;
    -webkit-tap-highlight-color: transparent;
}

    .modal-close:hover {
        background: rgba(0, 0, 0, 0.7);
        border-color: rgba(255, 255, 255, 0.5);
        transform: scale(1.1);
    }

.modal-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: var(--white);
    font-size: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2001;
    -webkit-tap-highlight-color: transparent;
}

    .modal-nav:hover {
        background-color: rgba(0, 0, 0, 0.7);
        border-color: rgba(255, 255, 255, 0.5);
        transform: translateY(-50%) scale(1.1);
    }

    .modal-nav.prev {
        left: 20px;
    }

    .modal-nav.next {
        right: 20px;
    }

.modal-indicators {
    position: fixed;
    bottom: 30px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 12px;
    z-index: 2001;
}

    .modal-indicators .modal-indicator {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.3);
        cursor: pointer;
        transition: all 0.3s ease;
        -webkit-tap-highlight-color: transparent;
    }

        .modal-indicators .modal-indicator.active {
            background-color: var(--primary-color);
            transform: scale(1.3);
        }

/* 双击放大提示 */
.double-click-tip {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 14px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 8px;
    border-radius: 4px;
    margin: 0 auto;
    width: fit-content;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-carousel:hover .double-click-tip {
    opacity: 1;
}

/* 底部样式 */
footer {
    background-color: #333;
    color: var(--white);
    text-align: center;
    padding: 20px 0;
    margin-top: 20px;
}

    footer p {
        margin-bottom: 5px;
    }

/* 响应式设计 */
@media (max-width: 768px) {
    .header-container {
        padding: 0 15px;
    }

    /* 隐藏电脑端语言选择器，显示手机端 */
    .desktop-language-selector {
        display: none;
    }

    .mobile-language-selector {
        display: flex;
        order: 1; /* 最左边 */
    }

    .logo {
        order: 2; /* 中间 */
        flex: 1;
        text-align: left;
        justify-content: left;
    }

    .mobile-menu-btn {
        display: block;
        order: 3; /* 最右边 */
    }

    /* 手机端导航菜单结构 */
    .nav-wrapper {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 30px;
        transition: var(--transition);
        transform: translateX(-100%);
        z-index: 999;
        height: auto;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

        .nav-wrapper.active {
            transform: translateX(0);
        }

    /* 手机端导航链接 */
    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding: 0 20px;
    }

        .nav-links li {
            width: 100%;
            border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        }

            .nav-links li:last-child {
                border-bottom: none;
            }

        .nav-links a {
            display: block;
            font-size: 1.1rem;
            padding: 16px 0;
            width: 100%;
        }

    #video-intro {
        height: 55vh;
        max-height: 450px;
        margin-top: -20px;
    }

    .video-overlay {
        padding: 8px;
    }

        .video-overlay p {
            margin-top: 6px;
        }

    #description {
        padding: 12px 0 8px 0;
        margin-top: -1px;
    }

    #products {
        padding: 12px 0 8px 0;
        margin-top: -3px;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 12px;
    }

    .product-card {
        margin: 0;
    }

    .product-content {
        padding: 12px;
    }

    #description .container {
        padding: 0 12px;
    }

    h2 {
        margin-top: 3px;
    }

    .weixin-video-tip {
        padding: 8px 12px;
        font-size: 13px;
    }

    /* 轮播图响应式 */
    .carousel-btn {
        display: none;
    }

    .carousel-indicators .indicator {
        width: 10px;
        height: 10px;
    }

    .product-carousel:hover .carousel-btn {
        opacity: 0;
    }

    /* 移动端显示双击放大提示 */
    .double-click-tip {
        opacity: 1;
        font-size: 12px;
        bottom: 35px;
        padding: 6px 10px;
    }

    /* 图片放大模态框响应式 */
    .modal-nav {
        width: 50px;
        height: 50px;
        font-size: 28px;
    }

        .modal-nav.prev {
            left: 15px;
        }

        .modal-nav.next {
            right: 15px;
        }

    .modal-close {
        width: 45px;
        height: 45px;
        font-size: 24px;
        top: 15px;
        right: 15px;
    }

    .modal-image {
        max-width: 98%;
        max-height: 75vh;
    }

    .modal-indicators {
        bottom: 20px;
    }

        .modal-indicators .modal-indicator {
            width: 10px;
            height: 10px;
        }
}

@media (min-width: 769px) {
    /* 电脑端隐藏手机端语言选择器 */
    .mobile-language-selector {
        display: none;
    }

    /* 电脑端显示桌面端语言选择器 */
    .desktop-language-selector {
        display: flex;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 70px;
    }

    .header {
        padding: 12px 0;
    }

    .logo {
        font-size: 1.3rem;
    }

        .logo img {
            height: 35px;
        }

    .mobile-language-btn {
        padding: 5px 8px;
    }

    #video-intro {
        height: 45vh;
        max-height: 350px;
        margin-top: -15px;
    }

    .video-overlay h1 {
        font-size: 1.6rem;
    }

    .video-overlay p {
        font-size: 1rem;
    }

    #description {
        padding: 10px 0 12px 0;
        margin-top: -1px;
    }

    #products {
        padding: 10px 0 6px 0;
    }

    h2 {
        margin-top: 2px;
        font-size: 1.3rem;
    }

    .container {
        padding: 0 10px;
    }

    .product-grid {
        padding: 0 10px;
        gap: 12px;
    }

    footer {
        padding: 15px 0;
        margin-top: 15px;
    }

    .weixin-video-tip {
        padding: 6px 10px;
        font-size: 12px;
    }

    /* 图片放大模态框响应式 */
    .modal-nav {
        width: 45px;
        height: 45px;
        font-size: 24px;
    }

        .modal-nav.prev {
            left: 10px;
        }

        .modal-nav.next {
            right: 10px;
        }

    .modal-close {
        width: 40px;
        height: 40px;
        font-size: 20px;
        top: 10px;
        right: 10px;
    }

    .modal-image {
        max-height: 70vh;
    }

    .modal-indicators {
        bottom: 15px;
        gap: 10px;
    }
}

@media (min-width: 1200px) {
    #video-intro {
        height: 75vh;
    }
}

@media (hover: none) {
    .product-card:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }

    .carousel-slide img:hover {
        transform: none;
    }

    .modal-nav:hover {
        transform: translateY(-50%);
    }

    .modal-close:hover {
        transform: none;
    }

    .product-carousel:hover .double-click-tip {
        opacity: 1;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #f0f0f0;
    }

    .header {
        background-color: rgba(42, 42, 42, 0.95);
    }

        .header.scrolled {
            background-color: rgba(42, 42, 42, 0.98);
        }

    .nav-links a {
        color: #f0f0f0;
    }

    #description {
        background-color: #2a2a2a;
    }

    .product-card {
        background-color: #2a2a2a;
        color: #f0f0f0;
    }

    .weixin-video-tip {
        background-color: #2a2a2a;
        color: #aaa;
        border-color: #444;
    }

    /* 语言选择器暗色模式 */
    .current-language, .mobile-language-btn {
        background-color: rgba(178, 59, 97, 0.2);
        color: #f0f0f0;
    }

        .current-language:hover, .mobile-language-btn:hover {
            background-color: rgba(178, 59, 97, 0.3);
        }

    .language-dropdown, .mobile-language-dropdown {
        background-color: #2a2a2a;
        border: 1px solid #444;
    }

    .language-option {
        border-bottom: 1px solid #444;
        color: #f0f0f0;
    }

        .language-option:hover {
            background-color: rgba(178, 59, 97, 0.2);
        }

        .language-option.active {
            background-color: rgba(178, 59, 97, 0.3);
        }

    /* 轮播图暗色模式 */
    .carousel-indicators .indicator {
        background-color: rgba(255, 255, 255, 0.3);
    }

        .carousel-indicators .indicator.active {
            background-color: var(--primary-color);
        }

    .carousel-btn {
        background-color: rgba(0, 0, 0, 0.3);
        color: #f0f0f0;
    }

    @media (max-width: 768px) {
        .nav-wrapper {
            background-color: rgba(42, 42, 42, 0.98);
        }

        .nav-links li {
            border-bottom-color: #444;
        }
    }
}
