/* 全屏单页滚动样式 */

/* 基础设置 */
.fullpage-wrapper {
    position: relative;
    width: 100%;
}

/* 全屏页面 - 基础样式 */
.fullpage-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    /* 默认不从顶部开始，允许内部滚动 */
    padding-top: 72px;
    padding-bottom: 40px;
}

/* JS启用全屏模式时的样式 */
.fullpage-wrapper.fullpage-enabled {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    overflow: hidden !important;
    z-index: 1 !important;
}

.fullpage-wrapper.fullpage-enabled .fullpage-section {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    min-height: auto !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 0 !important;
}

.fullpage-wrapper.fullpage-enabled .fullpage-section.active {
    opacity: 1;
    visibility: visible;
}

/* 全屏模式下各section的container容器 */
.fullpage-wrapper.fullpage-enabled .fullpage-section > .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px 40px;
    box-sizing: border-box;
    min-height: calc(100vh - 72px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* 各区块背景色 */
.fullpage-section.hero { background: linear-gradient(135deg, #faf8f5 0%, #f5f0e8 100%); }
.fullpage-section.products { background: #faf8f5; }
.fullpage-section.certification { background: linear-gradient(135deg, #faf8f5 0%, #f5f0e8 100%); }
.fullpage-section.brand-story { background: #ffffff; }
.fullpage-section.features { background: linear-gradient(135deg, #faf8f5 0%, #f5f0e8 100%); }
.fullpage-section.scenes { background: #ffffff; }
.fullpage-section.where-to-buy { background: linear-gradient(135deg, #faf8f5 0%, #f5f0e8 100%); }
.fullpage-section.footer-page { background: #1a1a1a; color: #fff; }

/* Hero区域 - 特殊布局 */
.fullpage-section.hero > .container {
    padding-top: 72px !important;
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 40px;
}

.fullpage-section.hero .hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 40px;
}

.fullpage-section.hero .hero-text {
    flex: 1;
    max-width: 55%;
}

.fullpage-section.hero .hero-image {
    flex: 0 0 45%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* 品牌故事页 - 左右布局 */
.fullpage-section.brand-story > .container {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px;
}

.fullpage-section.brand-story .story-content {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.fullpage-section.brand-story .story-text {
    flex: 1;
    min-width: 0;
}

.fullpage-section.brand-story .story-image {
    flex: 0 0 38%;
    max-width: 380px;
    position: sticky;
    top: 90px;
}

/* 产品特点页 - 左右布局 */
.fullpage-section.features > .container {
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 24px;
}

.fullpage-section.features .features-left {
    flex: 1;
    min-width: 0;
}

.fullpage-section.features .features-right {
    flex: 0 0 34%;
    max-width: 34%;
    position: sticky;
    top: 90px;
    align-self: flex-start;
}

/* Footer页面调整 */
.fullpage-section.footer-page .container {
    min-height: 100vh !important;
    padding-top: 80px !important;
}

.fullpage-wrapper.fullpage-enabled .fullpage-section.footer-page .container {
    padding: 80px 24px 40px;
    min-height: calc(100vh - 72px);
}

.fullpage-section.footer-page .footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.fullpage-section.footer-page .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}

/* 导航栏始终显示 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(139, 69, 19, 0.1);
}

/* 右侧分页指示器 */
.page-indicator {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.page-indicator .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(139, 69, 19, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.page-indicator .dot.active {
    background: #8B4513;
    transform: scale(1.3);
}

.page-indicator .dot:hover {
    background: rgba(139, 69, 19, 0.6);
}

.page-indicator .dot .tooltip {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.page-indicator .dot:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

/* 滚动提示箭头 */
.scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    animation: bounce 2s infinite;
    cursor: pointer;
}

.scroll-hint svg {
    width: 30px;
    height: 30px;
    color: #8B4513;
    opacity: 0.6;
}

.fullpage-section.footer-page .scroll-hint svg {
    color: #D4A574;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* 全屏模式下标题更紧凑 */
.fullpage-section .section-title {
    margin-bottom: 1rem;
}

.fullpage-section .section-title h2 {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}

.fullpage-section .section-title p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* 动画效果 */
.fullpage-section.active .fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.fullpage-section.active .fade-in:nth-child(1) { animation-delay: 0.1s; }
.fullpage-section.active .fade-in:nth-child(2) { animation-delay: 0.2s; }
.fullpage-section.active .fade-in:nth-child(3) { animation-delay: 0.3s; }
.fullpage-section.active .fade-in:nth-child(4) { animation-delay: 0.4s; }
.fullpage-section.active .fade-in:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============ 响应式调整 - 平板 ============ */
@media (max-width: 1024px) {
    .fullpage-section.hero > .container {
        flex-direction: column !important;
        text-align: center;
    }

    .fullpage-section.hero .hero-text { max-width: 100%; }
    .fullpage-section.hero .hero-image {
        flex: 0 0 100% !important;
        justify-content: center;
    }
    .fullpage-section.hero .hero-image img { max-height: 300px; }

    .fullpage-section.brand-story .story-content,
    .fullpage-section.features > .container {
        flex-direction: column !important;
    }
    .fullpage-section.brand-story .story-image,
    .fullpage-section.features .features-right {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        position: static !important;
    }

    .fullpage-section.footer-page .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-indicator { right: 15px; }
}

/* ============ 响应式调整 - 手机（不分页，正常滚动） ============ */
@media (max-width: 640px) {
    .page-indicator { display: none; }

    .fullpage-wrapper.fullpage-enabled {
        position: relative !important;
        height: auto !important;
        overflow: visible !important;
    }

    .fullpage-wrapper.fullpage-enabled .fullpage-section {
        position: relative !important;
        height: auto !important;
        min-height: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
        overflow-y: visible !important;
        padding: 80px 0 40px !important;
    }

    .fullpage-section > .container,
    .fullpage-section.footer-page .container {
        padding: 80px 16px 40px !important;
        min-height: auto !important;
    }

    .fullpage-section.hero > .container {
        padding-top: 80px !important;
        min-height: 100vh !important;
    }

    .fullpage-section.hero .hero-content h1 { font-size: 2.2rem; }

    .fullpage-section.footer-page .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .scroll-hint { display: none; }

    .fullpage-section.where-to-buy .channels {
        grid-template-columns: 1fr !important;
    }
}

/* ============ 功效证书与背标独立页面 ============ */
.fullpage-section.cert-gallery > .container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: calc(100vh - 72px) !important;
    padding: 80px 24px 40px !important;
}

.fullpage-section.cert-gallery .cert-horizontal {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.fullpage-section.cert-gallery .cert-mini-card {
    flex: 1;
    max-width: 450px;
    min-width: 300px;
}

/* ============ 购买渠道区域 - 确保横向排列 ============ */
.fullpage-section.where-to-buy > .container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.fullpage-section.where-to-buy .channels {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px;
    width: 100%;
    max-width: 1000px;
}

.fullpage-section.where-to-buy .channel-card {
    padding: 20px 12px !important;
    text-align: center;
}

@media (max-width: 1024px) {
    .fullpage-section.cert-gallery .cert-horizontal {
        flex-direction: column;
        align-items: center;
    }
    .fullpage-section.cert-gallery .cert-mini-card {
        max-width: 400px;
    }
    
    .fullpage-section.where-to-buy .channels {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
