/* =========================================
   1. Core Variables & Reset
   ========================================= */
:root {
    --bg-color: #000000;
    --card-bg: #111111;
    --input-bg: #1c1c1e;
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --accent-color: #ce1b28;
    /* FLJ Brand Red */
    --link-blue: #2997ff;
    /* Blue for links */
    --nav-bg: rgba(0, 0, 0, 0.8);
    --border-color: #333;
    --transition: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", "Noto Sans TC", "Noto Sans JP", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

img {
    width: 100%;
    display: block;
}

ul {
    list-style: none;
}

/* =========================================
   2. Header & Navigation (Glassmorphism)
   ========================================= */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 54px;
    background: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    width: 100%;
    max-width: 1000px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.logo span {
    color: var(--accent-color);
}

nav ul {
    display: flex;
    gap: 25px;
    align-items: center;
}

nav a {
    font-size: 12px;
    color: #dcdcdc;
    font-weight: 400;
}

nav a:hover {
    color: #fff;
}

/* Language Switcher */
.lang-group {
    display: flex;
    gap: 5px;
    border-left: 1px solid #333;
    padding-left: 15px;
    margin-left: 5px;
}

.lang-switch {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: #888;
    border: 1px solid transparent;
}

.lang-switch:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.lang-switch.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.mobile-menu-btn {
    display: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
}

/* =========================================
   3. Hero Section (Video & Image)
   ========================================= */
.hero {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    filter: brightness(0.6);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), #000);
    z-index: 1;
}

.hero-content {
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
    margin-top: 50px;
}

.hero h1 {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero p {
    font-size: 24px;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 40px;
}

/* Capsule Buttons */
.cta-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--text-primary);
    color: #000;
    border-radius: 980px;
    font-size: 15px;
    font-weight: 500;
    transition: transform 0.3s;
    margin: 0 5px;
}

.cta-btn:hover {
    transform: scale(1.05);
}

.cta-btn.outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--text-primary);
}

.cta-btn.outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* =========================================
   4. General Sections & Typography
   ========================================= */
.section {
    padding: 150px 0;
    position: relative;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.big-statement {
    font-size: 40px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

.big-statement span {
    color: var(--text-secondary);
}

.big-statement b {
    color: var(--text-primary);
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s var(--transition);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   5. Product Grid (Bento Style)
   ========================================= */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 80px;
}

.product-card {
    background-color: var(--card-bg);
    height: 500px;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 50px 20px;
    text-align: center;
    transition: transform 0.5s var(--transition), box-shadow 0.3s;
}

.product-card:hover {
    transform: scale(1.02);
    z-index: 2;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.product-card img {
    width: 80%;
    max-width: 400px;
    margin-top: auto;
    margin-bottom: -50px;
    filter: brightness(0.8);
    transition: 0.5s;
}

.product-card:hover img {
    filter: brightness(1);
    transform: translateY(-10px);
}

.product-card h3 {
    font-size: 32px;
    margin-bottom: 10px;
}

.product-card p {
    font-size: 19px;
    color: var(--text-secondary);
}

.full-width {
    grid-column: span 2;
}

.learn-link {
    color: var(--link-blue);
    margin-top: 10px;
    font-size: 14px;
    font-weight: 500;
}

.learn-link:hover {
    text-decoration: underline;
}

.card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

/* Catalog Grid (Smaller Cards) */
.catalog-page {
    padding-top: 120px;
    padding-bottom: 80px;
    max-width: 1000px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 80px;
}

.page-header h1 {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 24px;
    color: var(--text-secondary);
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.catalog-grid .product-card {
    height: 400px;
    border-radius: 20px;
}

.catalog-grid .card-image {
    height: 220px;
    width: 100%;
    overflow: hidden;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
}

.catalog-grid .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    filter: brightness(0.9);
    transition: 0.5s;
}

.catalog-grid .product-card:hover .card-image img {
    transform: scale(1.1);
    filter: brightness(1);
}

.catalog-grid .card-info {
    padding: 30px;
    margin-top: 220px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left;
    width: 100%;
}

.catalog-grid h3 {
    font-size: 22px;
    text-align: left;
}

.catalog-grid p {
    font-size: 14px;
    text-align: left;
    margin-bottom: 15px;
}

/* =========================================
   6. Product Detail Page (Sticky Layout)
   ========================================= */
.product-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    padding-top: 54px;
}

.product-visual {
    position: sticky;
    top: 54px;
    height: calc(100vh - 54px);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0a0a0a;
    padding: 40px;
}

.product-visual img {
    max-width: 80%;
    max-height: 80vh;
    object-fit: contain;
    filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.5));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.product-content {
    padding: 80px 60px;
    background-color: #000;
}

.breadcrumb {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.product-content h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 24px;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 40px;
}

.description {
    font-size: 17px;
    color: #d2d2d7;
    margin-bottom: 60px;
    max-width: 500px;
    text-align: justify;
}

.specs-container {
    margin-top: 80px;
    border-top: 1px solid #333;
    padding-top: 40px;
}

.specs-title {
    font-size: 21px;
    margin-bottom: 30px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
    border-bottom: 1px solid #222;
}

.spec-label {
    color: var(--text-secondary);
    font-size: 15px;
}

.spec-value {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    text-align: right;
    max-width: 60%;
}

/* =========================================
   7. Contact Page
   ========================================= */
.contact-page {
    padding-top: 150px;
    padding-bottom: 100px;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.page-title {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.1;
}

.page-subtitle {
    font-size: 24px;
    color: var(--text-secondary);
    margin-bottom: 80px;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
}

.info-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.info-value {
    font-size: 18px;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 30px;
}

.info-value i {
    width: 25px;
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

input,
textarea,
select {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 16px;
    color: #fff;
    font-size: 17px;
    font-family: inherit;
    transition: 0.3s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    background-color: #2c2c2e;
    border-color: #3a3a3c;
}

.submit-btn {
    background-color: var(--text-primary);
    color: #000;
    border: none;
    border-radius: 980px;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    margin-top: 20px;
}

.submit-btn:hover {
    transform: scale(1.02);
}

.map-section {
    margin-top: 100px;
    width: 100%;
    height: 450px;
    border-radius: 20px;
    overflow: hidden;
    background: #111;
}

iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* =========================================
   8. Footer & RWD
   ========================================= */
footer {
    background: #111;
    padding: 80px 0 40px;
    color: var(--text-secondary);
    font-size: 12px;
    border-top: 1px solid #222;
    margin-top: 80px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #333;
    padding-bottom: 40px;
    margin-bottom: 20px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 14px;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col a:hover {
    text-decoration: underline;
}

/* =========================================
   9. Desktop Dropdown Menu (電腦版下拉選單)
   ========================================= */

/* 1. 設定父層定位點 */
.dropdown {
    position: relative;
    height: 100%;
    display: block;
    align-items: center;
}

/* 2. 小箭頭樣式 */
.arrow-icon {
    font-size: 10px;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

/* 滑鼠移過去時，箭頭旋轉 180度 */
.dropdown:hover .arrow-icon {
    transform: rotate(180deg);
}

/* 3. 下拉選單本體 (預設隱藏) */
.dropdown-content {
    display: none;
    /* 平常不顯示 */
    position: absolute;
    top: 100%;
    /* 緊貼 Header 下緣 */
    left: 50%;
    transform: translateX(-50%);
    /* 水平置中 */

    /* 深色背景 + 毛玻璃 */
    background-color: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(20px);

    min-width: 200px;
    /* 選單寬度 */
    border-radius: 0 0 12px 12px;
    /* 下方圓角 */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    padding: 10px 0;
    flex-direction: column;
    z-index: 99999;
}

/* 4. 滑鼠懸停時顯示 */
.dropdown:hover .dropdown-content {
    display: flex;
    animation: fadeInUp 0.3s ease;
}

/* 5. 選單內的連結樣式 */
.dropdown-content li {
    width: 100%;
    margin: 0;
}

.dropdown-content a {
    display: block;
    color: #ccc;
    padding: 12px 25px;
    font-size: 14px;
    text-align: left;
    white-space: nowrap;
    /* 防止文字換行 */
    transition: 0.2s;
}

/* 連結 Hover 效果 */
.dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding-left: 30px;
    /* 微微向右滑動的效果 */
}

/* 淡入動畫 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, 10px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* =========================================
   10. Mobile Safety (手機版強制關閉下拉特效)
   ========================================= */
@media (max-width: 900px) {

    /* 手機版不顯示下拉選單，直接點擊進入總覽頁 */
    .dropdown-content {
        display: none !important;
    }

    /* 手機版隱藏小箭頭，避免誤導 */
    .arrow-icon {
        display: none;
    }
}

/* RWD: Mobile Styles */
@media (max-width: 900px) {
    .hero h1 {
        font-size: 40px;
    }

    /* 版面單欄化 */
    .product-grid,
    .catalog-grid,
    .product-page,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .full-width {
        grid-column: span 1;
    }

    /* 1. 預設隱藏導覽列清單 */
    nav ul {
        display: none;
    }

    /* 2. 顯示漢堡選單按鈕 */
    .mobile-menu-btn {
        display: block;
    }

    /* 3. [修正] 當 JS 加上 active 類別時，顯示選單 */
    /* 請在 style.css 最下方的 RWD 區塊找到這一段並修改 */

    nav ul.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 54px;
        left: 0;
        width: 100%;

        /* 把原本的 var(--nav-bg) 改成下面這個接近全黑的值 */
        background-color: rgba(5, 5, 5, 0.98);

        backdrop-filter: blur(20px);
        /* 毛玻璃保留，但因為背景很黑，只會有微弱質感 */
        padding: 20px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        gap: 0;
        z-index: 10000;

        /* 新增一個陰影讓它跟背景分得更開 */
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
    }

    /* 手機版選單項目樣式 */
    nav ul.active li {
        width: 100%;
        text-align: center;
    }

    nav ul.active a {
        display: block;
        padding: 15px;
        font-size: 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* 語言切換區在手機版的微調 */
    .lang-group {
        justify-content: center;
        margin-top: 15px;
        padding-left: 0;
        border-left: none;
    }

    /* 其他既有的 RWD 調整 */
    .product-visual {
        position: relative;
        height: 50vh;
        top: 0;
        padding: 20px;
    }

    .product-content {
        padding: 40px 20px;
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
    }

    .catalog-grid .card-info {
        margin-top: 220px;
    }
}

/* === LINE Button Style (Apple Dark Style) === */
.line-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    /* 圖示跟文字的距離 */
    background-color: #2c2c2e;
    /* 平常是深灰色，跟輸入框一樣 */
    color: #fff;
    padding: 10px 24px;
    border-radius: 980px;
    /* 膠囊形狀 */
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid transparent;
}

.line-btn i {
    font-size: 1.2rem;
    /* 圖示稍微大一點 */
}

/* 滑鼠移過去的效果：變回 LINE 經典綠色 */
.line-btn:hover {
    background-color: #06c755;
    /* LINE Brand Green */
    transform: scale(1.05);
    /* 微微放大 */
    box-shadow: 0 5px 15px rgba(6, 199, 85, 0.3);
    /* 綠色光暈 */
}

/* === 雙層下拉選單樣式 (Nested Dropdown) === */

/* 1. 讓父層選項 (其他應用產品) 變成定位點 */
.has-submenu {
    position: relative;
    /* 關鍵：讓子選單根據它來定位 */
}

/* 2. 子選單預設隱藏，位置設定在右側 */
.submenu-content {
    display: none;
    position: absolute;
    left: 100%;
    /* 移到父層的右邊 */
    top: 0;
    /* 對齊頂部 */
    background-color: #000;
    /* 背景色 (與主選單一致) */
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.5);
    z-index: 1;
    border-left: 1px solid #333;
    /* 加個分隔線比較好看 */
}

/* 3. 滑鼠移過去時顯示子選單 */
.has-submenu:hover .submenu-content {
    display: block;
}

/* 4. 子選單裡的連結樣式 (跟原本的一樣) */
.submenu-content li a {
    color: #ccc;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-size: 14px;
}

.submenu-content li a:hover {
    background-color: #222;
    color: #fff;
}

/* 5. 手機版特別處理：直接展開在下方，不要飄在右邊 */
@media (max-width: 768px) {
    .submenu-content {
        position: static;
        /* 取消絕對定位 */
        display: block;
        /* 手機版直接顯示出來，或是用 JS 控制 */
        padding-left: 20px;
        /* 縮排一下表示它是子項目 */
        border-left: 2px solid #555;
        background-color: #111;
    }

    .has-submenu:hover .submenu-content {
        display: block;
    }
}