/* 
 * 全域樣式和共用元素
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft JhengHei', 'PingFang TC', sans-serif;
}

body {
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
}

/* 
 * 頁頭導航樣式
 */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    max-width: 150px;
}

.logo img {
    max-width: 100%;
    height: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s;
}

.nav-menu a:hover, .nav-menu a.active {
    color: #f8b500;
}

/* 
 * 首頁主視覺區塊樣式
 */
.main-visual {
    margin-top: 70px;
    position: relative;
    cursor: pointer;
    display: block;
    text-decoration: none;
}

.main-visual img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 10%;
    transition: background 0.3s;
}

.main-visual:hover .hero-overlay {
    background: rgba(0, 0, 0, 0.2);
}

.hero-text h1 {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 7px 7px 10px rgba(0, 0, 0, 0.5);
}

.hero-text h2 {
    color: #ffffff;
    font-size: 1.8rem;
    margin-bottom: 30px;
    text-shadow: 7px 7px 10px rgba(0, 0, 0, 0.5);
}

.view-products {
    display: inline-block;
    background-color: #f8b500;
    color: #fff;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.view-products:hover {
    background-color: #e69f00;
    transform: translateY(-3px);
}

/* 
 * 產品列表頁樣式
 */
.page-content {
    max-width: 1200px;
    margin: 120px auto 60px;
    padding: 0 20px;
}

.page-title {
    text-align: center;
    margin-bottom: 50px;
}

.page-title h1 {
    font-size: 32px;
    color: #333;
    margin-bottom: 10px;
}

.page-title p {
    font-size: 16px;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

.category-section {
    margin-bottom: 60px;
}

.category-title {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
}

.category-title h2 {
    font-size: 24px;
    color: #333;
    margin-right: 15px;
}

.category-line {
    flex-grow: 1;
    height: 2px;
    background-color: #e0e0e0;
}

.category-icon {
    font-size: 24px;
    margin-right: 10px;
    color: #f8b500;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.product-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    background-color: #f9f9f9;
}

.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
    line-height: 1.4;
}

.product-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
    flex-grow: 1;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.product-tag {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    background-color: #f0f0f0;
    color: #555;
    border-radius: 20px;
}

.product-button {
    display: inline-block;
    background-color: #f8b500;
    color: #fff;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    transition: background-color 0.3s;
}

.product-button:hover {
    background-color: #e69f00;
}

/* 
 * 產品詳情頁樣式
 */
.product-container {
    max-width: 1000px;
    margin: 100px auto 60px;
    padding: 0 20px;
}

.product-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 50px;
    text-align: center;
}

.product-header .product-image {
    width: 100%;
    max-width: 400px;
    margin-bottom: 30px;
    padding-top: 0;
    position: static;
}

.product-header .product-image img {
    width: 100%;
    height: auto;
    display: block;
    position: static;
    object-fit: contain;
}

.product-title {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    line-height: 1.3;
}

.product-description {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 40px;
    margin-bottom: 50px;
}

.section-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 25px;
    color: #333;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: #f8b500;
}

.description-text {
    font-size: 16px;
    color: #444;
    line-height: 1.8;
}

.product-features-long {
    margin-bottom: 50px;
}

.feature-image {
    width: 100%;
    margin-bottom: 20px;
}

.feature-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.report-section {
    text-align: center;
    margin-bottom: 60px;
}

.report-button {
    display: inline-block;
    background-color: #f0f0f0;
    color: #555;
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: background-color 0.3s, color 0.3s;
}

.report-button:hover {
    background-color: #e0e0e0;
    color: #333;
}

.report-button i {
    margin-right: 8px;
}

/* 
 * 檢驗報告頁樣式
 */
.report-container {
    max-width: 1000px;
    margin: 100px auto 60px;
    padding: 0 20px;
}

.report-header {
    text-align: center;
    margin-bottom: 40px;
}

.report-title {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.3;
}

.report-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}

.report-date {
    font-size: 14px;
    color: #888;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: #666;
    text-decoration: none;
    font-size: 16px;
    margin-bottom: 30px;
    transition: color 0.3s;
}

.back-link i {
    margin-right: 8px;
}

.back-link:hover {
    color: #f8b500;
}

.report-section {
    margin-bottom: 60px;
}

.section-title {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
}

.section-title h2 {
    font-size: 24px;
    color: #333;
    margin-right: 15px;
    padding-left: 10px;
    border-left: 4px solid #f8b500;
}

.section-line {
    flex-grow: 1;
    height: 1px;
    background-color: #e0e0e0;
}

.report-images {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.report-image {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.report-image img {
    width: 100%;
    height: auto;
    display: block;
}

.report-caption {
    padding: 15px;
    text-align: center;
    font-size: 16px;
    color: #666;
    border-top: 1px solid #f0f0f0;
    background-color: #fafafa;
}

/* 
 * 頁尾樣式
 */
.site-footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.contact-info, .social-links {
    margin-bottom: 30px;
    flex: 1;
    min-width: 250px;
}

.contact-info h3, .social-links h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: #f8b500;
}

.contact-info p {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #444;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
}

.social-icon:hover {
    background-color: #f8b500;
    transform: translateY(-3px);
}

.copyright {
    width: 100%;
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 12px;
}

/* 
 * 響應式設計
 */
@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        padding: 10px 5%;
    }
    
    .nav-menu {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-menu li {
        margin: 5px 10px;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-text h2 {
        font-size: 1.4rem;
    }
    
    .footer-container {
        flex-direction: column;
    }
    
    .product-description {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* 
 * 檢驗報告頁面專用CSS
 * 需要添加到styles.css文件中
 */

/* 報告標籤切換 */
.report-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
    padding-bottom: 5px;
}

.report-tabs::-webkit-scrollbar {
    height: 4px;
}

.report-tabs::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

.report-tab {
    display: inline-block;
    padding: 10px 15px;
    margin-right: 10px;
    background-color: #f0f0f0;
    border-radius: 5px 5px 0 0;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.report-tab:hover {
    background-color: #e0e0e0;
}

.report-tab.active {
    background-color: #f8b500;
    color: #fff;
}

/* 橫向滑動容器 */
.slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 30px;
}

.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease;
    padding-bottom: 15px; /* 為滾動條預留空間 */
}

.slider-item {
    flex: 0 0 100%;
    padding: 0 10px;
}

.slider-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* 圖片說明 */
.image-caption {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

/* 滑動頁碼指示器 */
.slider-pagination {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    gap: 10px;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
    transition: background-color 0.3s;
}

.slider-dot.active {
    background-color: #f8b500;
}

/* 頁面指示器 */
.page-indicator {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    color: #888;
    font-weight: 500;
}

/* 導航按鈕 */
.slider-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.slider-nav-btn {
    background-color: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: all 0.3s;
}

.slider-nav-btn:hover {
    background-color: #f8b500;
    color: #fff;
}

.slider-nav-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 滑動手勢提示 */
.swipe-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px 0;
    color: #888;
    font-size: 14px;
    animation: fadeInOut 2s infinite;
}

.swipe-hint i {
    margin-right: 8px;
    font-size: 16px;
}

@keyframes fadeInOut {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* 響應式調整 */
@media (max-width: 768px) {
    .report-tab {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .slider-nav-btn {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .report-tabs {
        padding-bottom: 10px;
    }
    
    .report-tab {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .slider-item {
        padding: 0 5px;
    }
    
    .slider-nav-btn {
        width: 30px;
        height: 30px;
    }
}

/* 手機版響應式修復 */
@media (max-width: 768px) {
    /* 修復導航欄 */
    .nav-container {
      flex-direction: column;
      padding: 10px 5%;
    }
    
    .logo {
      margin-bottom: 5px;
    }
    
    .nav-menu {
      margin-top: 5px;
      width: 100%;
      justify-content: center;
    }
    
    /* 調整內容頂部邊距，防止被固定導航欄覆蓋 */
    .main-visual {
      margin-top: 90px;
    }
    
    .page-content, .product-container, .report-container {
      margin-top: 100px;
    }
    
    /* 修復主視覺區域 */
    .hero-text h1 {
      font-size: 1.6rem;
      margin-bottom: 10px;
    }
    
    .hero-text h2 {
      font-size: 1.2rem;
      margin-bottom: 20px;
    }
    
    .view-products {
      padding: 8px 16px;
      font-size: 14px;
    }
    
    /* 修復頁面標題和內容區域 */
    .page-title {
      margin-bottom: 30px;
      padding: 0 10px;
    }
    
    .page-title h1 {
      font-size: 24px;
    }
    
    .page-title p {
      font-size: 14px;
    }
    
    .category-section {
      margin-bottom: 40px;
    }
    
    /* 修復產品卡片在手機版的顯示 */
    .product-card {
      margin-bottom: 20px;
    }
    
    .product-name {
      font-size: 14px;
    }
    
    .product-description {
      font-size: 12px;
    }
    
    /* 修復底部頁腳 */
    .footer-container {
      flex-direction: column;
      text-align: center;
    }
    
    .contact-info, .social-links {
      width: 100%;
      margin-bottom: 20px;
    }
    
    .social-icons {
      justify-content: center;
    }
  }
  
  /* 超小屏幕設備調整 */
  @media (max-width: 375px) {
    .nav-menu li {
      margin: 3px 5px;
    }
    
    .nav-menu a {
      font-size: 14px;
    }
    
    .main-visual {
      margin-top: 100px;
    }
    
    .hero-text h1 {
      font-size: 1.4rem;
    }
    
    .hero-text h2 {
      font-size: 1rem;
    }
    
    .view-products {
      padding: 6px 12px;
      font-size: 12px;
    }
  }