/* ===========================
   全域樣式與變數
   =========================== */
:root {
    /* 深色主題配色 */
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --accent-color: #d4af37;
    --card-bg: rgba(40, 40, 40, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);
    
    /* 字體 */
    --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    /* 間距 */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 48px;
    --spacing-xl: 80px;
    
    /* 動畫 */
    --transition-speed: 0.3s;
}

/* 亮色主題配色 */
body.lit {
    --bg-color: #fffaf0;
    --text-color: #2c2c2c;
    --card-bg: rgba(255, 250, 240, 0.8);
    --border-color: rgba(212, 175, 55, 0.2);
}

/* 基礎重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

img {
    max-width: 100%;
    display: block;
}

/* ===========================
   導航欄
   =========================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-speed);
}

body.lit .navbar {
    background: rgba(255, 250, 240, 0.95);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    position: relative;
    padding: 5px 0;
    transition: color var(--transition-speed);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width var(--transition-speed);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 語言切換按鈕 */
.language-switcher {
    display: flex;
    gap: 8px;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 4px;
    border: 1px solid var(--border-color);
}

.lang-btn {
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 0.9rem;
    transition: all var(--transition-speed);
    color: var(--text-color);
}

.lang-btn.active {
    background: var(--accent-color);
    color: #1a1a1a;
}

.lang-btn:hover:not(.active) {
    background: rgba(212, 175, 55, 0.2);
}

/* 主題切換按鈕 */
.theme-toggle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed);
    font-size: 1.3rem;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: rgba(212, 175, 55, 0.2);
}

.flame {
    transition: transform 0.3s;
}

body.lit .flame {
    filter: brightness(1.2);
}

/* ===========================
   Hero 區塊
   =========================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 120px 80px 80px;
    max-width: 1400px;
    margin: 0 auto;
    gap: 60px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.hero-subtitle {
    font-size: 1.2rem;
    letter-spacing: 3px;
    color: var(--accent-color);
    font-weight: 300;
}

.hero-main {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    padding: 16px 40px;
    background: var(--accent-color);
    color: #1a1a1a;
    border-radius: 30px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all var(--transition-speed);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.hero-image {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.candle-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: glow 3s ease-in-out infinite;
}

body.lit .candle-glow {
    background: radial-gradient(circle, rgba(255, 200, 87, 0.5) 0%, transparent 70%);
}

@keyframes glow {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.candle-img {
    position: relative;
    z-index: 1;
    max-width: 400px;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
}

/* ===========================
   互動蠟燭動畫
   =========================== */
.interactive-candle-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    cursor: pointer;
    transition: transform 0.3s ease;
    user-select: none;
}

.interactive-candle-container:active {
    transform: scale(0.95);
}

.candle-svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
}

/* 火焰動畫 - 默認隱藏 */
.flame-group {
    opacity: 0;
    transition: opacity 1.5s ease;
    transform-origin: 100px 90px;
}

/* 當點亮時顯示火焰 */
body.lit .flame-group {
    opacity: 1;
    animation: flicker 2s ease-in-out infinite;
}

@keyframes flicker {
    0%, 100% { 
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    25% { 
        transform: scale(1.05, 0.95) translateY(-2px);
        opacity: 0.95;
    }
    50% { 
        transform: scale(0.98, 1.03) translateY(1px);
        opacity: 0.98;
    }
    75% { 
        transform: scale(1.02, 0.97) translateY(-1px);
        opacity: 0.97;
    }
}

/* 火焰外層動畫 */
.flame-outer {
    animation: flame-outer-anim 1.5s ease-in-out infinite;
}

@keyframes flame-outer-anim {
    0%, 100% { 
        transform: scaleY(1);
        opacity: 0.9;
    }
    50% { 
        transform: scaleY(1.1);
        opacity: 0.8;
    }
}

/* 火焰內層動畫 */
.flame-inner {
    animation: flame-inner-anim 1s ease-in-out infinite;
}

@keyframes flame-inner-anim {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.8;
    }
    50% { 
        transform: scale(1.15);
        opacity: 0.9;
    }
}

/* 火焰核心動畫 */
.flame-core {
    animation: flame-core-anim 0.8s ease-in-out infinite;
}

@keyframes flame-core-anim {
    0%, 100% { 
        opacity: 0.9;
        transform: translateY(0);
    }
    50% { 
        opacity: 1;
        transform: translateY(-2px);
    }
}

/* 光暈動畫 - 默認隱藏 */
.candle-glow-svg {
    opacity: 0;
    transition: opacity 1.5s ease;
}

body.lit .candle-glow-svg {
    opacity: 0.8;
    animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { 
        opacity: 0.6;
        transform: scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* 燭淚動畫 */
.wax-drip {
    animation: drip 8s ease-in-out infinite;
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
}

.wax-drip-1 {
    animation-delay: 0s;
}

.wax-drip-2 {
    animation-delay: 4s;
}

@keyframes drip {
    0% {
        stroke-dashoffset: 50;
        opacity: 0;
    }
    20% {
        stroke-dashoffset: 0;
        opacity: 0.6;
    }
    80% {
        stroke-dashoffset: 0;
        opacity: 0.6;
    }
    100% {
        stroke-dashoffset: 50;
        opacity: 0;
    }
}

/* 點亮狀態的光暈增強 */
body.lit .candle-glow-svg {
    animation: glow-pulse-lit 2s ease-in-out infinite;
}

@keyframes glow-pulse-lit {
    0%, 100% { 
        opacity: 0.8;
        transform: scale(1.1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.2);
    }
}

body.lit .flame-group {
    animation: flicker-lit 1.5s ease-in-out infinite;
}

@keyframes flicker-lit {
    0%, 100% { 
        transform: scale(1.1) translateY(-2px);
        opacity: 1;
    }
    50% { 
        transform: scale(1.05, 1.15) translateY(-4px);
        opacity: 1;
    }
}


/* 鼠標懸停效果 */
.interactive-candle-container:hover .flame-group {
    animation: flame-hover 0.5s ease-in-out infinite;
}

@keyframes flame-hover {
    0%, 100% { 
        transform: scale(1.1) translateX(-2px);
    }
    50% { 
        transform: scale(1.15) translateX(2px);
    }
}

/* 移除主題切換按鈕 */
.theme-toggle {
    display: none;
}

/* ===========================
   產品區塊
   =========================== */
.product-section {
    padding: var(--spacing-xl) 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--accent-color);
}

/* 產品選擇器 */
.product-selector {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.product-tab {
    background: rgba(40,40,40,0.3);
    border: 2px solid rgba(255,255,255,0.1);
    padding: 20px 35px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 180px;
}

.product-tab:hover {
    background: rgba(50,50,50,0.5);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-3px);
}

.product-tab.active {
    background: rgba(212,175,55,0.15);
    border-color: #d4af37;
}

body.lit .product-tab {
    background: rgba(255,250,240,0.3);
    border-color: rgba(212,175,55,0.2);
}

body.lit .product-tab:hover {
    background: rgba(255,250,240,0.5);
    border-color: rgba(212,175,55,0.4);
}

body.lit .product-tab.active {
    background: rgba(212,175,55,0.2);
    border-color: #d4af37;
}

.product-tab-number {
    font-size: 0.85rem;
    letter-spacing: 2px;
    opacity: 0.9;  /* 從 0.7 改為 0.9 */
    font-weight: 400;  /* 從 300 改為 400 */
    color: #c0c0c0;  /* 新增：淺灰色 */
}

.product-tab-name {
    font-size: 1.1rem;
    letter-spacing: 1px;
    font-weight: 500;  /* 從 400 改為 500 */
    color: #e0e0e0;  /* 新增：更亮的灰色 */
}

/* 活動狀態下的文字顏色 */
.product-tab.active .product-tab-number {
    color: #d4af37;  /* 金色 */
    opacity: 1;
}

.product-tab.active .product-tab-name {
    color: #d4af37;  /* 金色 */
}

/* 亮色主題下的文字顏色 */
body.lit .product-tab-number {
    color: #666;  /* 深灰色 */
}

body.lit .product-tab-name {
    color: #2c2c2c;  /* 深色文字 */
}

body.lit .product-tab.active .product-tab-number,
body.lit .product-tab.active .product-tab-name {
    color: #b8960f;  /* 深金色 */
}

/* 產品展示區域 */
.product-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.product-showcase.switching {
    opacity: 0;
}

/* 產品圖片輪播 */
.product-gallery {
    position: relative;
}

.slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.slider {
    display: flex;
    transition: transform 0.5s ease;
}

.slide {
    min-width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.slider-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

.slider-nav.prev {
    left: 20px;
}

.slider-nav.next {
    right: 20px;
}

.dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: var(--accent-color);
    transform: scale(1.2);
}

/* 產品詳情 */
.product-details {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.product-name {
    font-size: 1.8rem;
    line-height: 1.4;
    letter-spacing: 1px;
    color: var(--accent-color);
}

.product-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    padding: 25px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spec-label {
    font-size: 0.85rem;
    opacity: 0.7;
    letter-spacing: 1px;
}

.spec-value {
    font-size: 1rem;
    font-weight: 600;
}

.scent-description {
    padding: 25px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.description-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.description-text {
    line-height: 1.8;
    opacity: 0.9;
}

.moments-section {
    padding: 25px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.moments-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.moments-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.moments-list li {
    padding-left: 25px;
    position: relative;
}

.moments-list li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.essence-quote {
    padding: 25px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.05) 100%);
    border-left: 4px solid var(--accent-color);
    border-radius: 8px;
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* 產品特色區塊 */
.product-features-section {
    margin-top: 80px;
}

.features-section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 50px;
    letter-spacing: 2px;
}

.product-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature {
    padding: 35px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    text-align: center;
    transition: all var(--transition-speed);
}

.feature:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-title {
    font-size: 1.2rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.feature-desc {
    opacity: 0.8;
    line-height: 1.6;
}

/* CTA 按鈕組 */
.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 60px;
    flex-wrap: wrap;
}

.btn {
    padding: 16px 40px;
    border-radius: 30px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all var(--transition-speed);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-amazon {
    background: #ff9900;
    color: #000;
}

.btn-amazon:hover {
    background: #ffad33;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 153, 0, 0.3);
}

.btn-whatsapp {
    background: #25d366;
    color: #fff;
}

.btn-whatsapp:hover {
    background: #20ba5a;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
}

/* ===========================
   品牌故事區塊
   =========================== */
.story-section {
    padding: var(--spacing-xl) 80px;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.story-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.story-text {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.story-text p {
    line-height: 1.8;
    opacity: 0.9;
    font-size: 1.05rem;
}

.story-image img {
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ===========================
   聯絡我們區塊
   =========================== */
.contact-section {
    padding: var(--spacing-xl) 80px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.contact-description {
    font-size: 1.1rem;
    margin-bottom: 50px;
    opacity: 0.9;
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.contact-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 35px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    min-width: 220px;
    transition: all var(--transition-speed);
}

.contact-method:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
}

.contact-icon {
    font-size: 2.5rem;
}

/* ===========================
   頁腳
   =========================== */
.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 60px 80px 40px;
    margin-top: var(--spacing-xl);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--accent-color);
}

.footer-tagline {
    opacity: 0.8;
    font-size: 1.1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-links a {
    opacity: 0.8;
    transition: all var(--transition-speed);
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.copyright {
    opacity: 0.6;
    font-size: 0.9rem;
    margin-top: 15px;
}

/* ===========================
   響應式設計
   =========================== */
@media (max-width: 1024px) {
    .hero {
        padding: 100px 40px 60px;
    }
    
    .product-section,
    .story-section,
    .contact-section,
    .footer {
        padding-left: 40px;
        padding-right: 40px;
    }
    
    .product-showcase {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .story-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 15px 20px;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero {
        flex-direction: column;
        padding: 100px 20px 40px;
        text-align: center;
    }
    
    .hero-main {
        font-size: 2.5rem;
    }
    
    .product-section,
    .story-section,
    .contact-section,
    .footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .product-selector {
        gap: 15px;
    }
    
    .product-tab {
        padding: 15px 25px;
        min-width: 140px;
    }
    
    .product-tab-number {
        font-size: 0.75rem;
    }
    
    .product-tab-name {
        font-size: 0.95rem;
    }
    
    .product-features {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .contact-methods {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .hero-main {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .slider-nav {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .slider-nav.prev {
        left: 10px;
    }
    
    .slider-nav.next {
        right: 10px;
    }
}