:root {
    /* --- 核心色票 --- */
    --primary: #AA9177;       /* 質感咖 */
    --primary-dark: #8A725A;
    --bg-body: #F9F8F6;       /* 燕麥白 */
    --white: #FFFFFF;
    --text-main: #4A4A4A;
    --text-light: #999999;
    
    /* --- 元件參數 --- */
    --radius-btn: 50px;
    --radius-card: 16px;
    --radius-xl: 24px;
    --shadow-card: 0 10px 30px rgba(170, 145, 119, 0.08);
    --shadow-float: 0 15px 40px rgba(0,0,0,0.05);
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    padding-top: 70px; /* 預留給導覽列高度 */
    overflow-x: hidden;
    letter-spacing: 0.03em;
}

/* 字體工具 */
.font-serif { font-family: 'Noto Serif TC', serif; }
.font-en { font-family: 'Playfair Display', serif; }

a { text-decoration: none; color: var(--text-main); transition: 0.3s; }
a:hover { color: var(--primary); }

/* =========================================
   1. 導覽列系統
   ========================================= */
.navbar-main {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    height: 70px;
    z-index: 1030;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.navbar-brand img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.nav-link-item {
    font-weight: 500;
    margin: 0 15px;
    color: var(--text-main);
    position: relative;
}

.nav-link-item:hover { color: var(--primary); }

.nav-icon-btn {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-main);
    border-radius: 50%;
    transition: 0.3s;
    border: none; background: transparent;
    margin-left: 5px;
    position: relative;
    text-decoration: none;
}

.nav-icon-btn:hover { background: rgba(170, 145, 119, 0.1); color: var(--primary); }

/* 手機版漢堡選單按鈕 */
.navbar-toggler-custom {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-main);
    border-radius: 50%;
    transition: 0.3s;
    border: none; background: transparent;
    font-size: 1.2rem;
}

.navbar-toggler-custom:hover { background: rgba(170, 145, 119, 0.1); color: var(--primary); }

/* 手機版滑出選單 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: #fff;
    z-index: 1040;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.mobile-menu-header h5 {
    margin: 0;
    font-weight: 700;
    color: var(--text-main);
}

.close-btn {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border: none; background: transparent;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
}

.close-btn:hover { color: var(--primary); }

.mobile-menu-content {
    padding: 20px 0;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--text-main);
    text-decoration: none;
    transition: 0.3s;
    border-left: 3px solid transparent;
}

.mobile-menu-item:hover {
    background: rgba(170, 145, 119, 0.05);
    border-left-color: var(--primary);
    color: var(--primary);
}

.mobile-menu-item i {
    width: 24px;
    margin-right: 15px;
    text-align: center;
}

.mobile-menu-divider {
    height: 1px;
    background: #eee;
    margin: 10px 0;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1035;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* L2: 快速分類列 (Scrollable) */
.category-bar {
    position: fixed;
    top: 70px;
    left: 0; width: 100%;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    z-index: 1020;
    padding: 10px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    overflow-x: auto;
    white-space: nowrap;
}

.category-bar::-webkit-scrollbar { display: none; }

.cat-pill {
    display: inline-block;
    padding: 6px 20px;
    margin: 0 5px;
    border-radius: var(--radius-btn);
    font-size: 0.9rem;
    color: var(--text-main);
    border: 1px solid transparent;
    background: transparent;
    transition: 0.3s;
    cursor: pointer;
}

.cat-pill:hover { color: var(--primary); background: rgba(170, 145, 119, 0.1); }
.cat-pill.active { background: var(--text-main); color: #fff; }

/* =========================================
   2. Hero Section
   ========================================= */
.hero-wrapper { margin-top: 20px; margin-bottom: 40px; }

.hero-card {
    height: 450px;
    border-radius: var(--radius-xl);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Hero 輪播樣式 */
.hero-carousel {
    height: 450px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
}

.hero-carousel .carousel-inner {
    height: 100%;
}

.hero-carousel .carousel-item {
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-carousel .carousel-indicators {
    bottom: 20px;
    margin-bottom: 0;
}

.hero-carousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    margin: 0 5px;
}

.hero-carousel .carousel-indicators button.active {
    background-color: var(--primary);
    border-color: var(--primary);
}

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: opacity 0.3s;
}

.hero-carousel .carousel-control-prev {
    left: 20px;
}

.hero-carousel .carousel-control-next {
    right: 20px;
}

.hero-carousel .carousel-control-prev:hover,
.hero-carousel .carousel-control-next:hover {
    opacity: 1;
}

.hero-overlay {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(8px);
    padding: 40px 50px;
    border-radius: var(--radius-card);
    margin-left: 60px;
    max-width: 550px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.btn-hero {
    background: var(--primary); color: #fff;
    border-radius: var(--radius-btn);
    padding: 10px 30px; border: none;
    transition: 0.3s; letter-spacing: 1px;
}

.btn-hero:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* =========================================
   3. 內容區塊樣式
   ========================================= */
.section-title {
    font-family: 'Noto Serif TC', serif;
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    display: flex; justify-content: space-between; align-items: end;
}

.link-more { font-size: 0.9rem; color: var(--text-light); font-family: 'Noto Sans TC'; font-weight: 400; }

/* 技術師卡片 */
.tech-scroll-wrapper {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 5px 30px 5px;
    scroll-behavior: smooth;
}

.tech-scroll-wrapper::-webkit-scrollbar { height: 0px; }

.tech-card-pro {
    min-width: 160px;
    height: 240px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.tech-card-pro:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(170, 145, 119, 0.25);
}

.tech-bg-img {
    width: 100%; height: 100%; object-fit: cover; transition: 0.5s;
}

.tech-card-pro:hover .tech-bg-img { transform: scale(1.1); }

.rank-number-art {
    position: absolute; top: -5px; left: 10px;
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem; font-weight: 900;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 2; line-height: 1; font-style: italic;
}

.rank-1 { color: #FFD700; } 
.rank-2 { color: #E0E0E0; } 
.rank-3 { color: #CD7F32; }
.rank-normal { font-size: 2.5rem; top: 0; opacity: 0.6; color: #fff; }

.tech-info-glass {
    position: absolute; bottom: 10px; left: 10px; right: 10px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    border-radius: 12px;
    padding: 10px; text-align: center;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.tech-name-pro { font-family: 'Noto Serif TC'; font-weight: 700; font-size: 1rem; color: #333; }
.tech-role-pro { font-size: 0.75rem; color: #666; letter-spacing: 1px; text-transform: uppercase; }

/* 服務卡片 */
.ins-card {
    background: #fff;
    border-radius: var(--radius-card);
    border: none;
    transition: 0.3s;
    overflow: hidden;
    cursor: pointer;
    height: 100%;
}

.ins-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); }

.card-img-box { position: relative; overflow: hidden; aspect-ratio: 4/3; }
.card-img-box img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.ins-card:hover .card-img-box img { transform: scale(1.05); }

.card-body-ins { padding: 15px; }
.card-tag { font-size: 0.75rem; color: var(--primary); font-weight: 600; margin-bottom: 5px; display: block; }
.card-title { font-family: 'Noto Serif TC'; font-weight: 600; font-size: 1.1rem; margin-bottom: 5px; }
.card-price { font-weight: 700; color: var(--text-main); }

/* 商城卡片 */
.product-card-simple {
    background: transparent; border: none; cursor: pointer;
    overflow: visible;
}

.product-card-simple .card-img-box {
    border-radius: 16px; overflow: hidden;
    position: relative; aspect-ratio: 1/1; margin-bottom: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card-simple:hover .card-img-box {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(170, 145, 119, 0.2);
}

.product-card-simple img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.product-card-simple:hover img { transform: scale(1.08); }
.product-title { font-family: 'Noto Serif TC'; font-weight: 700; margin-bottom: 4px; line-height: 1.4; }
.product-price { font-weight: 700; color: var(--text-main); font-size: 1.05rem; }

/* 側欄 */
.sidebar-sticky { position: sticky; top: 150px; }

/* Sidebar Card Styles */
.sidebar-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
}

.filter-section {
    margin-bottom: 20px;
}

.filter-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-option {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    color: #4a5568;
    background: #fafafa;
    border: 1px solid transparent;
}

.filter-option:hover {
    background-color: #f0f4f8;
    border-color: #e2e8f0;
    transform: translateX(4px);
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    cursor: pointer;
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.filter-option input[type="checkbox"]:checked,
.filter-option input[type="radio"]:checked {
    accent-color: var(--primary);
}

.filter-option input[type="checkbox"]:checked + span,
.filter-option input[type="radio"]:checked + span {
    color: var(--primary);
    font-weight: 600;
}

.filter-option:has(input:checked) {
    background-color: rgba(170, 145, 119, 0.1);
    border-color: var(--primary);
}

.booking-widget {
    background: #fff; border-radius: var(--radius-card);
    padding: 25px; box-shadow: var(--shadow-float);
    margin-bottom: 30px; border: 1px solid rgba(0,0,0,0.02);
}

.widget-title { font-family: 'Noto Serif TC'; font-weight: 600; margin-bottom: 20px; }
.form-ins {
    background: var(--bg-body); border: none;
    border-radius: 10px; padding: 12px;
    width: 100%; margin-bottom: 12px; font-size: 0.9rem;
}

.btn-block-primary {
    width: 100%; background: var(--primary); color: #fff;
    padding: 12px; border-radius: 10px; border: none;
    font-weight: 500; transition: 0.3s;
}

.btn-block-primary:hover { background: var(--primary-dark); }

/* 統計數據 */
.stats-section {
    background: #fff; padding: 60px 0; margin-top: 80px;
    border-top: 1px solid #eee;
}

.stat-num { font-family: 'Playfair Display'; font-size: 2.5rem; color: var(--primary); font-weight: 700; }
.stat-label { font-size: 0.9rem; color: var(--text-light); letter-spacing: 1px; margin-top: 5px; }

/* Footer */
footer { background: #222; color: #999; padding: 60px 0 30px; font-size: 0.9rem; }
footer h5 { color: #fff; font-family: 'Playfair Display'; margin-bottom: 20px; }
footer a { color: #999; }
footer a:hover { color: #fff; }

/* Toast */
.toast-custom {
    background: rgba(255,255,255,0.95); backdrop-filter: blur(5px);
    border: 1px solid rgba(0,0,0,0.05); box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* RWD 調整 */
@media (max-width: 768px) {
    body {
        padding-top: 70px; /* 手機版只有單層導覽 */
    }
    
    .hero-overlay { margin: 0; max-width: 100%; padding: 30px; text-align: center; }
    .hero-card { justify-content: center; }
    .rank-number-art { font-size: 2.5rem; }
    
    .navbar-links {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .navbar-links {
        display: flex !important;
    }
    
    .mobile-menu-overlay {
        display: none !important;
    }
}

