:root {
    --primary: #3498db;      /* 亮藍色 */
    --dark: #2c3e50;         /* 深藍商務色 */
    --bg-gray: #f4f7f6;      /* 淺灰背景 */
    --text: #333;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Noto Sans TC', -apple-system, sans-serif; color: var(--text); line-height: 1.6; background-color: var(--white); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* --- 導航欄 --- */
header { background: #fff; padding: 15px 0; box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 1000; }
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.6rem; font-weight: 700; text-decoration: none; color: var(--dark); }
.logo span { color: var(--primary); }
nav ul { display: flex; list-style: none; gap: 20px; align-items: center; }
nav a { text-decoration: none; color: var(--dark); font-weight: 500; transition: var(--transition); }
nav a:hover { color: var(--primary); }
.nav-btn { background: var(--primary); color: #fff !important; padding: 8px 20px; border-radius: 50px; }

/* --- 英雄區 (Hero) --- */
.hero { 
    height: 60vh; 
    background: linear-gradient(rgba(44,62,80,0.7), rgba(44,62,80,0.7)), url('https://images.unsplash.com/photo-1497215728101-856f4ea42174?w=1200') center/cover;
    display: flex; align-items: center; justify-content: center; text-align: center; color: #fff;
}
.hero h1 { font-size: 3.5rem; margin-bottom: 20px; font-weight: 800; }
.hero p { font-size: 1.25rem; margin-bottom: 30px; opacity: 0.9; }

/* --- 分類與產品網格區塊 --- */
.filter-section {
    padding: 80px 0 120px; /* 增加底部留白，讓產品跟下方夾層拉開距離 */
    background: var(--bg-gray);
}
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 2.2rem; color: var(--dark); font-weight: 700; }

.filter-groups { margin-top: 25px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.filter-btn { 
    padding: 10px 25px; border: 1px solid #ddd; background: #fff; border-radius: 50px; 
    cursor: pointer; font-size: 0.95rem; color: #666; transition: var(--transition);
}
.filter-btn.active, .filter-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 產品網格：確保間距足夠 (這就是卡片之間的外距) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;            /* 增加卡片之間的間隙，讓它們互不干擾 */
    margin-top: 50px;
}

/* 產品卡片容器 */
/* 產品卡片 */
.product-card {
    background: #ffffff;
    border-radius: 8px; /* 微圓角更專業 */
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid #eee;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: #3498db;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* 圖片比例：1:1 或 4:3 都可以，建議 4:3 更有商務感 */
.card-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f9f9f9;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .card-img img {
    transform: scale(1.08);
}

/* 文字區域：純標題優化 */
.card-info {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between; /* 標題在左，箭頭在右 */
    align-items: center;
    background: #fff;
}

.card-info h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    /* 避免標題太長衝破一行，超過自動省略號 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 小提示文字 (選用) */
.view-more {
    font-size: 0.85rem;
    color: #3498db;
    font-weight: 500;
    opacity: 0; /* 平時隱藏 */
    transition: 0.3s;
    transform: translateX(-10px);
}

.product-card:hover .view-more {
    opacity: 1; /* 滑過時顯現 */
    transform: translateX(0);
}

/* --- 數據夾層 (Stats) --- */
.interlayer { padding: 100px 0; text-align: center; margin: 0; }
.stats-bar { background: var(--dark); color: #fff; }
.stats-wrapper { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 30px; }
.stat-item .num { display: block; font-size: 3.5rem; font-weight: 800; color: var(--primary); margin-bottom: 10px; }
.stat-item p { font-size: 1.1rem; opacity: 0.8; letter-spacing: 1px; }

/* CTA 區塊 */
.cta-banner { 
    background: linear-gradient(rgba(52, 152, 219, 0.85), rgba(52, 152, 219, 0.85)), url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=1200') center/cover;
    background-attachment: fixed; color: #fff; padding: 100px 0;
}
.btn { display: inline-block; padding: 14px 40px; border-radius: 6px; text-decoration: none; transition: var(--transition); font-weight: 600; font-size: 1.1rem; }
.btn.primary { background: var(--dark); color: #fff; }
.btn.light { background: #fff; color: var(--primary); }

/* --- 詳情頁專屬 (Product Detail) --- */
.breadcrumb { padding: 30px 0; font-size: 0.9rem; color: #999; }
.breadcrumb a { text-decoration: none; color: var(--primary); margin-right: 8px; }

.detail-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
    align-items: start;
}
.main-image-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
    border: 1px solid #eee;
}
.main-image-box img { width: 100%; height: 100%; object-fit: contain; padding: 30px; }

.category-tag {
    display: inline-block;
    padding: 4px 15px;
    background: var(--bg-gray);
    color: var(--dark); /* 修正：將 dark-navy 改為 dark */
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 4px;
    margin-bottom: 15px;
}
.detail-info h1 { font-size: 2.8rem; color: var(--dark); line-height: 1.2; margin-bottom: 25px; font-weight: 800; }
.short-summary {
    font-size: 1.15rem; color: #555; line-height: 1.8; margin-bottom: 35px;
    padding-left: 20px; border-left: 5px solid var(--primary);
}
.specs-section h3 { font-size: 1.3rem; margin-bottom: 15px; color: var(--dark); border-bottom: 3px solid var(--primary); display: inline-block; }
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table td { padding: 15px 0; border-bottom: 1px solid #eee; }
.specs-table td.label { font-weight: 700; color: var(--dark); width: 30%; }

.action-box { margin-top: 40px; }
.btn-consult {
    display: inline-block; background: var(--dark); color: #fff; text-decoration: none;
    padding: 18px 50px; border-radius: 6px; font-weight: 700; font-size: 1.1rem; transition: var(--transition);
}
.btn-consult:hover { background: var(--primary); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

.long-description { background: var(--bg-gray); padding: 100px 0; }
.content-header { text-align: center; margin-bottom: 50px; }
.article-body { max-width: 850px; margin: 0 auto; font-size: 1.15rem; line-height: 2; color: #444; }

/* 響應式適應 */
@media (max-width: 1024px) { 
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-layout { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 600px) { 
    .product-grid { grid-template-columns: 1fr; } 
    .hero h1 { font-size: 2.5rem; }
    .stat-item .num { font-size: 2.5rem; }
}

/* --- 關於與聯絡頁通用 Hero --- */
.page-hero {
    padding: 100px 0;
    background-color: var(--dark);
    color: #fff;
    text-align: center;
}
.page-hero h1 { font-size: 3rem; margin-bottom: 20px; font-weight: 800; }
.page-hero p { font-size: 1.2rem; opacity: 0.8; }

/* 關於我們頁面樣式 */
.about-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 80px 0;
    align-items: center;
}
.intro-content h2 { font-size: 2rem; color: var(--dark); margin-bottom: 25px; }
.intro-content p { margin-bottom: 20px; color: #555; line-height: 2; }
.intro-image img { width: 100%; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }

.values-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding: 80px 0;
    border-top: 1px solid #eee;
}
.value-item { text-align: center; padding: 40px; }
.value-icon { font-size: 3rem; margin-bottom: 20px; }
.value-item h3 { margin-bottom: 15px; color: var(--dark); }

/* 聯絡我們頁面樣式 */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 80px;
    padding: 80px 0;
}
.info-block { margin-bottom: 35px; }
.info-block h3 { color: var(--dark); font-size: 1.1rem; margin-bottom: 10px; border-bottom: 2px solid var(--primary); display: inline-block; }
.info-block p { font-size: 1.1rem; color: #555; }

.contact-form-box {
    background: #fff;
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}
.form-group { margin-bottom: 25px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 700; color: var(--dark); }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: 0.3s;
}
.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}
.btn-submit {
    width: 100%;
    padding: 18px;
    background: var(--dark);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}
.btn-submit:hover { background: var(--primary); transform: translateY(-3px); }

/* 響應式適應 */
@media (max-width: 900px) {
    .about-intro, .contact-layout, .values-section { grid-template-columns: 1fr; gap: 40px; }
}