/* --- 訂製捲軸樣式 (Webkit only: Chrome, Safari, Edge) --- */
::-webkit-scrollbar {
    width: 8px;
    /* 寬度調細，更優雅 */
}

::-webkit-scrollbar-track {
    background: #0c0c0c;
    /* 軌道顏色：深黑 */
}

::-webkit-scrollbar-thumb {
    background: #333;
    /* 捲軸本體：深灰 */
    border-radius: 4px;
    /* 圓角 */
    border: 1px solid #000;
}

::-webkit-scrollbar-thumb:hover {
    background: #B4975A;
    /* 滑鼠移上去變金色 */
}

/* --- 全域反白選取顏色 (讓它符合黑金主題) --- */
::selection {
    background: #B4975A;
    /* 金色背景 */
    color: #000000;
    /* 黑色文字 */
}

::-moz-selection {
    /* 針對 Firefox 的支援 */
    background: #B4975A;
    color: #000000;
}

/* --- 禁止圖片被拖曳 (營造 App 般的紮實感) --- */
img {
    -webkit-user-drag: none;
    /* Chrome/Safari */
    user-select: none;
    /* 禁止選取圖片 */
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

/* --- 移除手機版點擊時的預設藍色背景 --- */
* {
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-color: #151515;
    /* 基底色：深炭灰 (Deep Charcoal)，避免純黑 */
    --card-bg: #1e1e1e;
    /* 卡片背景：稍亮的槍灰色 */
    --text-main: #ffffff;
    --text-muted: #999999;
    /* 萊金金：香檳金 -> 標準金 -> 古銅深金 */
    --gold-gradient: linear-gradient(135deg, #D1BFA0 0%, #B4975A 50%, #85714D 100%);
    --accent-gold: #B4975A;
    --border-color: #333333;
    --spacing-unit: 2rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Montserrat', 'Noto Sans TC', sans-serif;
    /* 內文使用現代無襯線體 */
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    /* 讓字體變細緻、銳利 */
    -moz-osx-font-smoothing: grayscale;
}

/* 遇到連結或按鈕時，變回手指，確保直覺 */
a,
button,
.card,
.menu-toggle,
.close,
.prev,
.next,
input,
select,
textarea {
    cursor: pointer;
}

/* 標題字體：Cinzel (襯線體) */
h1,
h2,
h3,
h4,
.logo,
.section-title {
    font-family: 'Cinzel', serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

/* --- Header / Navigation --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: transparent;
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    /* 您可以根據 Logo 的實際比例調整此數值 */
    width: auto;
}

nav {}

nav ul {
    display: flex;
    gap: 2rem;
}

nav a {
    position: relative;
    /* 為了定位金線 */
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-main);
    padding-bottom: 5px;
    /* 留一點空間給線 */
}

/* 這是那條隱形的金線 */
nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    /* 從中間開始 */
    width: 0%;
    /* 一開始寬度是 0 */
    height: 1px;
    background: var(--accent-gold);
    transition: all 0.3s ease-out;
    /* 滑順展開 */
    transform: translateX(-50%);
    /* 修正置中位置 */
}

/* 滑鼠移上去時 */
nav a:hover {
    color: var(--accent-gold);
}

nav a:hover::after {
    width: 100%;
    /* 展開到全寬 */
}

/* --- Footer --- */
footer {
    background-color: #000;
    font-size: 0.9rem;
    position: relative;
}

.footer-content {
    padding: 5rem 3rem 3rem 3rem;
    background-image:
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.08) 0%, transparent 60%),
        repeating-linear-gradient(45deg,
            transparent 0px,
            transparent 1px,
            rgba(255, 255, 255, 0.05) 1px,
            rgba(255, 255, 255, 0.05) 2px,
            transparent 2px,
            transparent 3px,
            rgba(0, 0, 0, 0.8) 3px,
            rgba(0, 0, 0, 0.8) 4px);
    opacity: 0.9;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4rem;
}

.footer-divider {
    height: 60px;
    background: #000;
}

.footer-col h4 {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: #B4975A;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    letter-spacing: 1.5px;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: #888;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: #FFF;
}

.copyright {
    background: #000;
    text-align: center;
    padding: 2rem 0 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    color: #666;
    font-family: 'Helvetica Neue', Helvetica, sans-serif;
}

/* --- 滾動進場動畫 --- */
.reveal-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
    /* 絲滑的減速曲線 */
}

.reveal-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- 進場動畫定義 --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
        /* 從下方 40px 處開始 */
        filter: blur(10px);
        /* 加上模糊，模擬從迷霧中浮現 */
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* --- Preloader 樣式 --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    /* 純黑背景 */
    z-index: 9999;
    /* 確保蓋在所有東西上面 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader-logo img {
    height: 30px;
    width: auto;
    margin-bottom: 20px;
    animation: pulse 2s infinite ease-in-out;
}

.loader-line {
    width: 0%;
    height: 1px;
    background: var(--gold-gradient);
    box-shadow: 0 0 10px rgba(180, 151, 90, 0.5);
    animation: loadLine 1.5s ease-in-out forwards;
}

@keyframes loadLine {
    0% {
        width: 0%;
        opacity: 0;
    }

    50% {
        width: 50%;
        opacity: 1;
    }

    100% {
        width: 100%;
        opacity: 0;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
        filter: grayscale(100%);
    }

    50% {
        opacity: 1;
        filter: grayscale(0%);
    }
}

/* 用來隱藏 Preloader 的 class */
.loaded #preloader {
    opacity: 0;
    visibility: hidden;
}

/* --- 頂部閱讀進度條 --- */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    /* 初始寬度為 0 */
    height: 3px;
    /* 極細 */
    background: var(--gold-gradient);
    /* 使用您的金色漸層 */
    z-index: 99999;
    /* 確保在所有東西最上面 */
    box-shadow: 0 0 10px rgba(180, 151, 90, 0.7);
    /* 發光效果 */
    transition: width 0.1s ease-out;
    /* 順暢的變化 */
}

/* --- Mobile Optimization (手機版優化) --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    z-index: 1001;
}

.bar {
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
    transition: 0.3s;
}

.mobile-break {
    display: none;
}

@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    .menu-toggle {
        display: flex;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(10px);
        display: flex;
        justify-content: center;
        align-items: center;
        transition: 0.4s ease;
        z-index: 1000;
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        text-align: center;
        gap: 2.5rem;
    }

    nav a {
        font-size: 1.2rem;
    }

    nav a {
        opacity: 0;
        /* 預設先隱藏 */
        transform: translateY(20px);
        /* 往下沉一點 */
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    nav.active a {
        opacity: 1;
        transform: translateY(0);
    }

    /* ★★★ 關鍵：設定延遲時間，製造階梯效果 ★★★ */
    nav.active li:nth-child(1) a {
        transition-delay: 0.1s;
    }

    nav.active li:nth-child(2) a {
        transition-delay: 0.2s;
    }

    nav.active li:nth-child(3) a {
        transition-delay: 0.3s;
    }

    nav.active li:nth-child(4) a {
        transition-delay: 0.4s;
    }

    nav.active li:nth-child(5) a {
        transition-delay: 0.5s;
    }

    /* Hamburger Animation */
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* 手機版 LOGO 尺寸微調，增加精緻度與留白 */
    .logo img {
        height: 30px;
    }

    header.menu-open .logo {
        position: relative;
        z-index: 1002;
    }

    header.menu-open .logo img {
        filter: sepia(100%) hue-rotate(5deg) saturate(300%) brightness(1.2);
    }

    /* Footer Adjustments */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .footer-col {
        width: 100%;
    }

    .mobile-break {
        display: inline;
    }
}

html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}

/* --- Cookie Banner (黑金風格) --- */
.cookie-banner {
    position: fixed;
    bottom: -100%;
    /* 初始隱藏 */
    left: 0;
    width: 100%;
    background: rgba(15, 15, 15, 0.95);
    /* 深色背景 */
    backdrop-filter: blur(10px);
    /* 毛玻璃效果 */
    border-top: 1px solid #333;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    transition: bottom 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    /* 優雅滑入 */
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
}

.cookie-banner.show {
    bottom: 0;
}

.cookie-text {
    font-size: 0.9rem;
    color: #ccc;
    font-family: 'Noto Sans TC', sans-serif;
}

/* --- 全站統一 CTA 按鈕樣式 --- */
.btn,
.cookie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border: 1px solid #B4975A;
    color: #B4975A;
    background: transparent;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* --- 金屬液體流動效果 --- */
.btn::before,
.cookie-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--gold-gradient);
    transition: width 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: -1;
}

.btn:hover,
.cookie-btn:hover {
    color: #0A0A0A;
    box-shadow: 0 0 15px rgba(180, 151, 90, 0.3);
}

/* Hover 時讓液體填滿 */
.btn:hover::before,
.cookie-btn:hover::before {
    width: 100%;
}

@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
        gap: 1rem;
    }

    .cookie-btn {
        margin-left: 0;
        width: 100%;
    }
}

/* --- Back to Top Button --- */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(21, 21, 21, 0.9);
    border: 1px solid #B4975A;
    border-radius: 50%;
    color: #B4975A;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background: #B4975A;
    color: #000;
    box-shadow: 0 0 20px rgba(180, 151, 90, 0.4);
    transform: translateY(-3px);
}

/* --- Back to Products Button --- */
#back-to-products {
    position: fixed;
    bottom: 95px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(21, 21, 21, 0.9);
    border: 1px solid #B4975A;
    border-radius: 50%;
    color: #B4975A;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

#back-to-products.show {
    opacity: 1;
    visibility: visible;
}

#back-to-products:hover {
    background: #B4975A;
    color: #000;
    box-shadow: 0 0 20px rgba(180, 151, 90, 0.4);
    transform: translateY(-3px);
}