/* 科技感白底風格樣式 - 與列表頁一致 */
:root {
    --primary-color: #0066cc;
    --secondary-color: #0099ff;
    --accent-color: #00ccff;
    --white-bg: #ffffff;
    --light-bg: #f8fbff;
    --card-bg: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-light: #999999;
    --border-color: #e0e8ff;
    --shadow-color: rgba(0, 102, 204, 0.1);
    --glow-color: #0099ff;
}

.single-product-container {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    background: linear-gradient(135deg, var(--white-bg) 0%, var(--light-bg) 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* 背景裝飾 */
.single-product-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 15% 20%, rgba(0, 153, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 85% 80%, rgba(0, 102, 204, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.geometric-decoration-single {
    position: absolute;
    top: 20%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.08), rgba(0, 153, 255, 0.05));
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
}

.single-product-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px;
    position: relative;
    z-index: 1;
}
.product-info-card-content {
	background-color: #fff !important;
    border-radius: 0 0 20px 20px;
}

/* 返回按鈕 */
.back-to-products {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 12px 24px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    transition: all 0.3s ease;
    margin-bottom: 40px;
}

.back-to-products:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateX(-5px);
    box-shadow: 0 5px 20px rgba(0, 102, 204, 0.3);
}

.back-to-products::before {
    content: '←';
    font-size: 1.2rem;
}

/* 主要布局：左邊內容 + 右邊側邊欄 */
.product-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

/* 主要內容區域 */
.product-main-content {
    background: var(--card-bg);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 
        0 10px 30px rgba(0, 102, 204, 0.08),
        0 0 0 1px var(--border-color);
}

/* 產品圖片區 */
.product-images-wrapper {
    margin-bottom: 40px;
}

.product-main-image {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 20px 60px rgba(0, 102, 204, 0.15),
        0 0 0 1px var(--border-color);
    margin-bottom: 20px;
    background: linear-gradient(135deg, #f0f8ff, #e6f3ff);
}

.product-main-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.product-main-image:hover img {
    transform: scale(1.05);
}

/* 圖片畫廊 */
.product-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.gallery-thumb {
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    aspect-ratio: 1;
}

.gallery-thumb:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.2);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 產品資訊 */
.product-categories-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.product-category-badge {
    display: inline-block;
    background: rgba(0, 102, 204, 0.1);
    color: var(--primary-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.product-category-badge:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.product-title-main {
    color: var(--text-primary);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.3;
}

.product-meta-info {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.meta-icon {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* 產品描述 */
.product-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
}

/* 產品規格 */
.product-specifications {
    background: rgba(0, 153, 255, 0.05);
    padding: 30px;
    border-radius: 15px;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 40px;
}

.product-specifications h3 {
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.spec-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.spec-label {
    color: var(--text-primary);
    font-weight: 600;
    min-width: 80px;
}

.spec-value {
    color: var(--text-secondary);
}

/* 詳細內容 */
.product-detailed-content {
    
}

.product-detailed-content h2 {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
}

.product-detailed-content h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 30px 0 15px;
}

.product-detailed-content p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.product-detailed-content ul,
.product-detailed-content ol {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 20px;
    padding-left: 30px;
}

.product-detailed-content li {
    margin-bottom: 10px;
}

.product-detailed-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0, 102, 204, 0.1);
}

/* 右側邊欄 */
.product-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 
        0 10px 30px rgba(0, 102, 204, 0.08),
        0 0 0 1px var(--border-color);
    margin-bottom: 30px;
}

.sidebar-widget h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.sidebar-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-category-list li {
    margin-bottom: 12px;
}

.sidebar-category-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-category-list a:hover,
.sidebar-category-list a.active {
    background: rgba(0, 102, 204, 0.1);
    color: var(--primary-color);
    transform: translateX(5px);
}

.sidebar-category-list a::before {
    content: '▸';
    color: var(--primary-color);
    font-weight: bold;
}

/* 聯絡詢價按鈕 */
.contact-inquiry-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    margin-top: 60px;
    box-shadow: 0 20px 60px rgba(0, 102, 204, 0.3);
}

.contact-inquiry-section h3 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.contact-inquiry-section p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.inquiry-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    color: var(--primary-color);
    padding: 15px 40px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.inquiry-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* 相關產品 */
.related-products-section {
    margin-top: 80px;
}

.related-products-section h2 {
    color: var(--text-primary);
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* 響應式設計 */
@media (max-width: 1200px) {
    .product-layout {
        display: flex;
		flex-direction: column;
    }
    
    .product-sidebar {
        order: 2; /* 放下面 */
    }
    
    .related-products-grid {
        order: 1; /* 放上面 */
    }
}

@media (max-width: 768px) {
    .single-product-wrapper {
        padding: 30px 20px;
    }
    
    .product-title-main {
        font-size: 2rem;
    }
    
    .product-main-content,
    .sidebar-widget {
        padding: 30px 25px;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
    
    .related-products-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-inquiry-section {
        padding: 40px 25px;
    }
    
    .product-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .product-title-main {
        font-size: 1.6rem;
    }
    
    .product-meta-info {
        flex-direction: column;
        gap: 10px;
    }
}

/* 載入動畫 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.single-product-wrapper > * {
    animation: fadeInUp 0.6s ease-out forwards;
}
	
.product-info-card-content {
  border-top: 1px solid #eee; /* 細灰線，可改成其他顏色或粗細 */
}
	
	/* 第一層列與展開按鈕排版 */
.sidebar-parent-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* 展開按鈕（不影響原本點名稱跳轉） */
.toggle-children {
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 8px;
    padding: 4px 8px;
    cursor: pointer;
    font-weight: 700;
    line-height: 1;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.toggle-children:hover {
    background: rgba(0, 102, 204, 0.06);
    border-color: var(--primary-color);
}

/* 旋轉指示：展開時箭頭朝下 */
.toggle-children[aria-expanded="true"] {
    transform: rotate(90deg);
}

/* 第二層外觀 */
.sidebar-category-sublist {
    list-style: none;
    margin: 8px 0 12px 20px;
    padding-left: 12px;
    border-left: 2px solid var(--border-color);
}
.sidebar-category-sublist li { margin: 6px 0; }
.sidebar-category-sublist a { padding: 8px 12px; font-size: 0.95rem; }
.cat-count { margin-left: 6px; color: var(--text-light); font-weight: 500; }
.cat-count.is-zero { opacity: .7; }


/* 麵包屑導航樣式 */
.single-breadcrumb {
    margin-bottom: 30px; /* 與下方內容保持距離 */
    font-size: 0.95rem;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.single-breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.single-breadcrumb a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.single-breadcrumb .sep {
    margin: 0 8px;
    color: var(--text-light);
    font-size: 0.8em;
}

.single-breadcrumb .current {
    color: var(--text-light);
    font-weight: 500;
}

/*  增加側邊欄層級縮排樣式 */

    .sidebar-category-sublist {
        padding-left: 15px; 
        background-color: rgba(0,0,0,0.02);
    }
    .toggle-children {
        cursor: pointer;
        border: none;
        background: none;
        padding: 0 8px;
    }
    .sidebar-category-item a.active {
        font-weight: bold;
        color: #0073aa; /* 或您的主題色 */
    }


/* PDF檔案下載區塊 */
.product-file-download {
    background: linear-gradient(135deg, rgba(0, 153, 255, 0.05), rgba(0, 102, 204, 0.08));
    padding: 40px;
    border-radius: 20px;
    border-left: 4px solid var(--primary-color);
    margin: 40px 0;
}

.product-file-download h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 25px;
}

.file-download-grid {
    display: grid;
    gap: 15px;
}

.file-download-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    padding: 20px 25px;
    border-radius: 15px;
    text-decoration: none;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-download-item:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0, 102, 204, 0.15);
}

.file-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.file-info {
    flex: 1;
}

.file-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.file-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.file-type {
    background: rgba(0, 102, 204, 0.1);
    color: var(--primary-color);
    padding: 2px 10px;
    border-radius: 5px;
    font-weight: 600;
}

.download-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.file-download-item:hover .download-icon {
    transform: translateY(3px);
}

/* 響應式 */
@media (max-width: 768px) {
    .product-file-download {
        padding: 30px 20px;
    }

    .file-download-item {
        padding: 15px 20px;
    }

    .file-icon {
        font-size: 2rem;
    }
}