/* 科技感白底風格樣式 - 與 news 頁面一致 */
: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;
}

	

/* 重置預設樣式 */
.product-info-container * {
    box-sizing: border-box;
}

.product-info-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;
}

/* 背景裝飾 */
.product-info-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%),
        linear-gradient(45deg, transparent 48%, rgba(0, 204, 255, 0.02) 49%, rgba(0, 204, 255, 0.02) 51%, transparent 52%);
    pointer-events: none;
}

/* 裝飾性幾何圖形 */
.product-info-container::after {
    content: '';
    position: absolute;
    top: 10%;
    right: -5%;
    width: 300px;
    height: 300px;
    background: linear-gradient(45deg, rgba(0, 153, 255, 0.1), rgba(0, 204, 255, 0.1));
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
}

.geometric-decoration {
    position: absolute;
    top: 30%;
    left: -10%;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.08), rgba(0, 153, 255, 0.05));
    transform: rotate(45deg);
    border-radius: 20px;
    filter: blur(50px);
    pointer-events: none;
}

.product-info-content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px;
    position: relative;
    z-index: 1;
}

/* 頁面標題區域 */
.product-info-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
}

.product-info-main-title {
    color: var(--text-primary);
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    letter-spacing: -1px;
}

.product-info-subtitle {
    color: var(--text-secondary);
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.product-info-header::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    border-radius: 2px;
    box-shadow: 0 0 15px var(--glow-color);
}
	
/* 麵包屑：產品分類 > 光電材料 Optoelectronic Materials */
.product-info-breadcrumb {
    margin-top: 10px;
	margin-bottom: 10px; 
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.product-info-breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.product-info-breadcrumb a:hover {
    text-decoration: underline;
}

.product-info-breadcrumb .sep {
    margin: 0 6px;
    color: var(--text-light);
}

.product-info-breadcrumb .current {
    font-weight: 700;
    color: var(--text-primary);
}


/* 分類篩選器 */
.product-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 60px;
}

.filter-btn {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.95rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 5px 20px rgba(0, 102, 204, 0.3);
    transform: translateY(-2px);
}

.product-info-top-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}	

/* 產品網格布局 - 四欄 */
.product-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

/* 產品卡片 */
.product-info-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 10px 30px rgba(0, 102, 204, 0.08),
        0 0 0 1px var(--border-color);
    transition: all 0.4s ease;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.product-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 153, 255, 0.05), transparent);
    transition: left 0.6s ease;
}

.product-info-card:hover::before { left: 100%; }

.product-info-card:hover {
    transform: translateY(-10px);
    box-shadow: 
        0 25px 50px rgba(0, 102, 204, 0.15),
        0 0 0 1px var(--accent-color),
        0 0 30px rgba(0, 153, 255, 0.1);
}

.product-info-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: all 0.4s ease;
    background: linear-gradient(135deg, #f0f8ff, #e6f3ff);
}

.product-info-card:hover .product-info-image { transform: scale(1.05); }

.product-info-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
	justify-content: space-between;
	height: 100%;
}

.product-info-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.product-info-date {
    color: var(--text-light);
    background: rgba(0, 153, 255, 0.1);
    padding: 5px 12px;
    border-radius: 15px;
    font-weight: 500;
}

.product-info-category {
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
}

.product-info-title {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.4;
    transition: color 0.3s ease;
	flex-grow: 2; 
}

.product-info-card:hover .product-info-title { color: var(--primary-color); }

.product-info-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 15px;
    width: 100%;
	text-align: left;
	align-self: flex-end; 
}

.product-info-specs {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 153, 255, 0.05);
    border-radius: 10px;
    border-left: 3px solid var(--primary-color);
}

.product-info-specs h4 {
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.product-info-specs ul { list-style: none; padding: 0; margin: 0; }
.product-info-specs li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 5px;
    position: relative;
    padding-left: 15px;
}
.product-info-specs li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.product-info-read-more {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    gap: 8px;
    margin-top: auto;
}
.product-info-read-more::after { content: '→'; font-size: 1.2rem; transition: transform 0.3s ease; }
.product-info-read-more:hover { color: var(--secondary-color); text-shadow: 0 0 10px rgba(0,153,255,0.3); }
.product-info-read-more:hover::after { transform: translateX(5px); }

/* 分頁導航 */
.product-info-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 60px;
}
.page-numbers {
    display: inline-block;
    padding: 12px 20px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 50px;
    text-align: center;
}
.page-numbers:hover,
.page-numbers.current {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 5px 20px rgba(0, 102, 204, 0.3);
    transform: translateY(-2px);
}
.page-numbers.dots { border: none; background: none; cursor: default; }
.page-numbers.dots:hover { transform: none; box-shadow: none; background: none; }

/* 暫無產品 */
.no-products {
    text-align: center;
    grid-column: 1 / -1;
    padding: 100px 20px;
    color: var(--text-secondary);
}
.no-products-icon { font-size: 4rem; margin-bottom: 30px; opacity: 0.3; }
.no-products h3 { font-size: 2rem; color: var(--text-primary); margin-bottom: 15px; }
.no-products p { font-size: 1.1rem; max-width: 500px; margin: 0 auto; line-height: 1.6; }

/* 響應式設計 */
@media (max-width: 1200px) {
    .product-info-content-wrapper { padding: 40px 30px; }
    .product-info-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
	.product-info-top-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
}
@media (max-width: 768px) {
    .product-info-content-wrapper { padding: 30px 20px; }
    .product-info-main-title { font-size: 2.5rem; }
    .product-info-subtitle { font-size: 1.1rem; }
    .product-info-grid { grid-template-columns: 1fr; gap: 25px; }
	.product-info-top-grid { grid-template-columns: 1fr; gap: 25px; }
    .product-info-card-content { padding: 25px; }
    .product-filter { gap: 10px; }
    .filter-btn { padding: 10px 20px; font-size: 0.9rem; }
}
@media (max-width: 480px) {
    .product-info-main-title { font-size: 2rem; }
    .product-info-grid { grid-template-columns: 1fr; }
	.product-info-top-grid { grid-template-columns: 1fr; }
    .product-info-card-content { padding: 20px; }
    .product-filter { flex-direction: column; align-items: center; }
}

/* 載入動畫 */
.product-info-card {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}
.product-info-card:nth-child(1) { animation-delay: 0.1s; }
.product-info-card:nth-child(2) { animation-delay: 0.2s; }
.product-info-card:nth-child(3) { animation-delay: 0.3s; }
.product-info-card:nth-child(4) { animation-delay: 0.4s; }
.product-info-card:nth-child(5) { animation-delay: 0.5s; }
.product-info-card:nth-child(6) { animation-delay: 0.6s; }
.product-info-card:nth-child(7) { animation-delay: 0.7s; }
.product-info-card:nth-child(8) { animation-delay: 0.8s; }

/* 產品分類標籤樣式（卡片內顯示父層標籤） */
.product-info-categories-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.product-category-tag {
    display: inline-block;
    background: rgba(0, 102, 204, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}
.product-category-tag:hover { background: var(--primary-color); color: white; transform: translateY(-2px); }

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}
	
/* 主要布局：左邊內容 + 右邊側邊欄 */
.product-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

/* 主要內容區域 */
.product-main-content {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 
        0 10px 30px rgba(0, 102, 204, 0.08),
        0 0 0 1px var(--border-color);
}

/* 右側邊欄 */
.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;
}

/* 第一層列與展開按鈕排版 */
.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; }

/* RWD，可以沿用 single 的 */
@media (max-width: 1200px) {
  .product-layout {
    display: flex;
    flex-direction: column;
  }

  .product-sidebar {
    order: 2; /* 放下面 */
  }

  .product-main-content {
    order: 1; /* 放上面 */
  }
}

