/**
 * @name: product.css
 * @description: 產品展示頁面樣式 (v2.0 - 專業活潑版)
 * @version: 2.0.0
 * @author: Baiya Wang
 * @date: 2025-01-31
 * @updated: 2026-03-27
 */

/* ============================
   產品頁面主容器
   ============================ */
.product-page {
    max-width: 1200px;
}

/* 取消產品頁面卡片的懸停晃動效果 */
.product-page .card-custom:hover {
    transform: none;
}

/* ============================
   語系標籤 (業務/管理者可見)
   ============================ */
.product-languages {
    font-size: 0.75rem;
}

.product-lang-badge {
    font-size: 0.65rem;
    font-weight: 500;
    padding: 0.2rem 0.4rem;
    min-width: 28px;
    text-align: center;
    transition: all 0.2s ease;
}

.product-lang-badge.clickable {
    cursor: pointer;
}

.product-lang-badge.clickable:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.product-lang-badge.bg-secondary {
    opacity: 0.5;
    cursor: not-allowed;
}

.product-lang-badge.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ============================
   區塊 1: Hero 區
   ============================ */
.product-hero {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
}

[data-theme="dark"] .product-hero {
    background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 100%);
}

/* 標題區 */
.product-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.3;
}

.product-separator {
    color: var(--border-color);
    font-weight: 300;
    font-size: 1.1em;
}

.product-origin {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* 品牌型號區 */
.product-brand-model {
    font-size: 0.95rem;
}

/* ============================
   產品圖片區
   ============================ */
.product-gallery {
    position: sticky;
    top: 1rem;
}

.product-main-image {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-main-image:hover img {
    transform: scale(1.02);
}

/* 縮圖列表 */
.product-thumbnails {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-thumb-item {
    width: 70px;
    height: 70px;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: var(--card-bg);
}

.product-thumb-item:hover {
    border-color: var(--primary-color);
}

.product-thumb-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.25);
}

.product-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ============================
   產品資訊區
   ============================ */
.product-info {
    padding: 0 0.5rem;
}

/* 彩色標籤 Pills */
.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.product-tag-pill {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.3rem 0.75rem;
    border-radius: 2rem;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
    background-color: var(--bs-primary, #0d6efd);
    color: #fff !important;
}

.product-tag-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* 產品簡介 */
.product-summary-content {
    line-height: 1.7;
    color: var(--text-color);
}

.product-summary-content p {
    margin-bottom: 0.5rem;
}

.product-summary-content p:last-child {
    margin-bottom: 0;
}

.product-summary-content ul,
.product-summary-content ol {
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
}

.product-summary-content a {
    color: var(--primary-color);
}

.product-summary-content a:hover {
    text-decoration: underline;
}

/* ============================
   價格卡片
   ============================ */
.product-price-card {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--card-bg) 100%);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
}

[data-theme="dark"] .product-price-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
}

.product-price-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.125rem;
}

.product-price-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

/* 庫存徽章 */
.product-stock-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
}

.product-stock-badge.in-stock {
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
}

.product-stock-badge.out-of-stock {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* 操作按鈕 */
.product-actions .btn {
    min-width: 140px;
}

/* 關注按鈕 */
#btnAddToWishlist {
    min-width: auto;
    padding: 0.5rem 1rem;
}

#btnAddToWishlist:hover .bi-heart,
#btnAddToWishlist.active .bi-heart {
    color: #dc3545;
}

#btnAddToWishlist.active .bi-heart::before {
    content: "\f415";
}

/* ============================
   下載區塊
   ============================ */
.product-downloads h6 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

/* 下載頁籤樣式 */
.nav-tabs-downloads {
    border-bottom: 1px solid var(--border-color);
    gap: 0;
}

.nav-tabs-downloads .nav-link {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    color: var(--text-muted);
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-tabs-downloads .nav-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--border-color);
}

.nav-tabs-downloads .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: none;
}

.nav-tabs-downloads .nav-link i {
    font-size: 1rem;
}

.nav-tabs-downloads .nav-link .badge {
    font-size: 0.65rem;
    padding: 0.15em 0.45em;
    font-weight: 500;
    opacity: 0.7;
}

/* 下載列表樣式 */
.downloads-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
}

.download-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    text-decoration: none;
    color: var(--text-color);
    border-radius: 0.375rem;
    transition: all 0.15s ease;
}

.download-item:hover {
    background-color: var(--hover-bg, rgba(0, 0, 0, 0.04));
    color: var(--primary-color);
}

.download-item-icon {
    font-size: 1.25rem;
    color: var(--primary-color);
    flex-shrink: 0;
    width: 1.5rem;
    text-align: center;
}

.download-item-title {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.download-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.download-item-action {
    font-size: 0.875rem;
    color: var(--text-muted);
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.download-item:hover .download-item-action {
    opacity: 1;
}

/* 影片列表 */
.video-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.75rem 0;
}

/* 影片內嵌播放器卡片 */
.video-embed-card {
    width: 280px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.2s ease;
}

.video-embed-card:hover {
    border-color: #ff0000;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.1);
}

.video-embed-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    cursor: pointer;
    overflow: hidden;
}

.video-embed-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-embed-preview:hover img {
    transform: scale(1.05);
}

.video-embed-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
    pointer-events: none;
}

.video-embed-preview:hover .video-embed-play {
    color: #ff0000;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-embed-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
}

.video-embed-player iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-embed-info {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.video-embed-title {
    flex: 1;
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-embed-info .download-count {
    font-size: 0.7rem;
    margin-left: auto;
}

/* ============================
   Markdown 渲染覆寫（產品頁微調）
   通用 .markdown-body 樣式位於 /css/markdown.css
   ============================ */
/* 產品簡介中的標題間距較緊湊 */
.product-summary-content.markdown-body h1,
.product-summary-content.markdown-body h2,
.product-summary-content.markdown-body h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* ============================
   區塊 2: 產品特色
   ============================ */
.product-highlights-section {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 0;
}

[data-theme="dark"] .product-highlights-section {
    background-color: rgba(255, 255, 255, 0.02);
}

/* 產品特色 wrapper (國籍卡片 + 特色列表) */
.product-highlights-wrapper {
    display: flex;
    align-items: stretch;
    gap: 1.5rem;
    margin-top: 1rem;
}

/* 國籍卡片 (內嵌在產品特色左側) */
.product-origin-card-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 1.5rem;
    min-width: 120px;
    flex-shrink: 0;
}

.product-origin-card-inline__flag {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.product-origin-card-inline__flag .fi {
    font-size: 3.5rem;
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
}

.product-origin-card-inline__label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.125rem;
}

.product-origin-card-inline__value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
}

/* 產品特色區塊 */
.product-highlights-custom {
    flex: 1;
    min-width: 0;
}

.product-highlights-custom__header {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.product-highlights-custom__header i {
    color: var(--primary-color);
}

.product-highlights-custom__list {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
}

.product-highlights-custom__list::-webkit-scrollbar {
    height: 4px;
}

.product-highlights-custom__list::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 2px;
}

.product-highlights-custom__item {
    display: flex;
    align-items: stretch;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--card-bg) 100%);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    min-width: 220px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

[data-theme="dark"] .product-highlights-custom__item {
    background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
}


.product-highlights-custom__icon {
    width: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.product-highlights-custom__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 0.75rem 1.25rem;
}

.product-highlights-custom__feature {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
}

.product-highlights-custom__brief {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 0.125rem;
}

/* ============================
   區塊 3: 產品描述 (色帶裝飾)
   ============================ */
.product-section-header {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.product-section-header i {
    color: var(--primary-color);
}

.product-description-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 0.75rem;
    overflow: hidden;
}

.product-description-card .product-section-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.1rem;
    background-color: var(--bg-secondary);
}

[data-theme="dark"] .product-description-card .product-section-header {
    background-color: rgba(255, 255, 255, 0.02);
}

.product-description-body {
    padding: 1.5rem 1.25rem;
}

.product-description {
    line-height: 1.8;
    color: var(--text-color);
}

.product-description p {
    margin-bottom: 1rem;
}

.product-description ul,
.product-description ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.product-description li {
    margin-bottom: 0.5rem;
}

.product-description img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 0.5rem 0;
}

/* ============================
   區塊 3+4: 產品資訊面板 (Tab 分頁式)
   ============================ */
.product-specs-section {
    --spec-group-bg: var(--card-bg);
    --spec-group-border: var(--border-color);
    --spec-group-radius: 14px;
    --spec-table-head-bg: rgba(var(--primary-rgb), 0.04);
    --spec-table-row-alt: rgba(var(--primary-rgb), 0.025);
    --spec-table-row-hover: rgba(var(--primary-rgb), 0.05);
    --spec-table-border: var(--border-color);
    --spec-icon-bg: rgba(var(--primary-rgb), 0.08);
    --spec-icon-color: var(--primary-color);
}

[data-theme="dark"] .product-specs-section {
    --spec-group-bg: var(--card-bg);
    --spec-group-border: var(--border-color);
    --spec-table-head-bg: rgba(var(--primary-rgb), 0.10);
    --spec-table-row-alt: rgba(255, 255, 255, 0.02);
    --spec-table-row-hover: rgba(var(--primary-rgb), 0.10);
    --spec-table-border: rgba(255, 255, 255, 0.08);
    --spec-icon-bg: rgba(var(--primary-rgb), 0.16);
    --spec-icon-color: #ffffff;
}

/* 滿寬面板佈局 */
.product-specs-grid {
    width: 100%;
}

.product-spec-panel {
    padding: 0.5rem 0;
    height: 100%;
}

/* 面板標頭 */
.product-spec-panel__header {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color, #4f46e5);
}

.product-spec-panel__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.4;
}

[data-theme=dark] .product-spec-panel__title {
    color: var(--text-color);
}

/* 面板內容 */
.product-spec-panel__body {
    min-width: 0;
    overflow-x: auto;
    padding-left: 2em;
}

.product-spec-panel__body .product-description {
    font-size: 0.95rem;
    line-height: 1.7;
}

.product-spec-panel__body .text-muted-custom {
    font-size: 0.9rem;
    font-style: italic;
}

/* 規格列表 */
.product-spec-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.product-spec-list li {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    line-height: 1.55;
    transition: background-color 0.18s ease;
}

.product-spec-list li:hover {
    background-color: var(--spec-table-row-hover);
}

.product-spec-list__key {
    flex-shrink: 0;
    font-weight: 600;
    color: var(--text-color);
    word-break: break-word;
}

.product-spec-list__key::after {
    content: '：';
}

.product-spec-list__value {
    color: var(--text-secondary);
    word-break: break-word;
}

[data-theme="dark"] .product-spec-list__key {
    color: #ffffff;
}

[data-theme="dark"] .product-spec-list__value {
    color: var(--text-secondary);
}

/* Q&A 面板：與左側產品規範等高 + 捲軸 */
.product-qna-panel .product-qna-body {
    max-height: 360px;
    overflow-y: auto;
    padding-left: 0.5em;
    padding-right: 0.5em;
}

.product-qna-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.product-qna-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--spec-table-border, var(--border-color));
}

.product-qna-item--last {
    border-bottom: none;
}

.product-qna-question,
.product-qna-answer {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    line-height: 1.6;
}

.product-qna-answer {
    margin-top: 0.4rem;
}

.product-qna-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    background-color: var(--primary-color, #4f46e5);
    color: #fff;
    line-height: 1;
}

.product-qna-badge--a {
    background-color: var(--spec-icon-bg, rgba(79, 70, 229, 0.08));
    color: var(--primary-color, #4f46e5);
}

[data-theme="dark"] .product-qna-badge--a {
    background-color: rgba(var(--primary-rgb), 0.2);
    color: #fff;
}

.product-qna-q-text {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-color);
}

.product-qna-a-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* 捲軸美化 */
.product-qna-body::-webkit-scrollbar {
    width: 5px;
}

.product-qna-body::-webkit-scrollbar-track {
    background: transparent;
}

.product-qna-body::-webkit-scrollbar-thumb {
    background-color: rgba(var(--primary-rgb), 0.2);
    border-radius: 3px;
}

.product-qna-body::-webkit-scrollbar-thumb:hover {
    background-color: rgba(var(--primary-rgb), 0.4);
}

/* ============================
   區塊 5: 實體規格 + 信任元素 (Icon 卡片列)
   ============================ */
.product-physical-section {
    background: transparent;
}

.product-physical-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.product-physical-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.25rem 1.5rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    min-width: 140px;
    flex: 0 1 auto;
}

.product-physical-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.1);
}

[data-theme="dark"] .product-physical-card:hover {
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.25);
}




.product-physical-card-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

/* 國旗 icon */
.product-physical-card .product-origin-flag {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    overflow: hidden;
    padding: 0;
    background: none;
}

.product-physical-card .product-origin-flag .fi {
    font-size: 3.5rem;
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
}

.product-physical-card-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.product-physical-card-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
}

/* 認證卡片特殊樣式 */
.product-cert-card .product-physical-card-icon {
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
}

.product-cert-card .product-physical-card-value {
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* ============================
   區塊 6: 推薦產品 (響應式卡片 Grid)
   ============================ */
.product-recommended-section {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

[data-theme="dark"] .product-recommended-section {
    background-color: rgba(255, 255, 255, 0.01);
}

/* 推薦產品跑馬燈 */
.product-recommended-marquee {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.product-recommended-marquee-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-recommended-marquee.is-scrolling .product-recommended-marquee-fade {
    opacity: 1;
}

.product-recommended-marquee-fade--left {
    left: 0;
    background: linear-gradient(to right, var(--bg-secondary), transparent);
}

.product-recommended-marquee-fade--right {
    right: 0;
    background: linear-gradient(to left, var(--bg-secondary), transparent);
}

[data-theme="dark"] .product-recommended-marquee-fade--left {
    background: linear-gradient(to right, rgba(30, 30, 30, 1), transparent);
}

[data-theme="dark"] .product-recommended-marquee-fade--right {
    background: linear-gradient(to left, rgba(30, 30, 30, 1), transparent);
}

.product-recommended-track {
    display: flex;
    gap: 1rem;
    width: max-content;
}

.product-recommended-marquee.is-scrolling .product-recommended-track {
    animation: recommendedMarquee var(--marquee-duration, 30s) linear infinite;
}

.product-recommended-marquee:hover .product-recommended-track {
    animation-play-state: paused;
}

@keyframes recommendedMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 不需要滾動時置中顯示 */
.product-recommended-marquee:not(.is-scrolling) .product-recommended-track {
    justify-content: center;
    width: 100%;
}

.product-recommended-card-wrapper {
    flex-shrink: 0;
    width: 160px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 0.625rem;
    overflow: hidden;
}

.product-recommended-card-wrapper:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .product-recommended-card-wrapper:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* 迷你產品卡片 */
.product-card-mini {
    display: block;
    text-decoration: none;
    color: var(--text-color);
    background-color: var(--card-bg);
    border: none;
    border-radius: 0.625rem;
    overflow: hidden;
    transition: opacity 0.2s ease;
    position: relative;
    height: 100%;
}

.product-card-mini:hover {
    color: var(--text-color);
}

.product-card-mini-image {
    width: 100%;
    height: 180px;
    background-color: var(--bg-secondary);
    overflow: hidden;
}

.product-card-mini-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card-mini:hover .product-card-mini-image img {
    transform: scale(1.06);
}

.product-card-mini-info {
    padding: 0.625rem 0.5rem;
    text-align: center;
}

.product-card-mini-model {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.product-card-mini-name {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.product-recommended-content {
    padding: 0;
}

/* ============================
   響應式調整
   ============================ */
@media (max-width: 991.98px) {
    .product-gallery {
        position: static;
        margin-bottom: 2rem;
    }

    .product-info {
        padding: 0;
    }

    .product-title {
        font-size: 1.5rem;
    }

}

@media (max-width: 767.98px) {
    .product-highlights-wrapper {
        flex-direction: column;
        gap: 1rem;
    }

    .product-origin-card-inline {
        flex-direction: row;
        gap: 0.75rem;
        padding: 0.75rem 1.25rem;
        min-width: auto;
    }

    .product-origin-card-inline__flag {
        width: 2.5rem;
        height: 2.5rem;
        margin-bottom: 0;
    }

    .product-origin-card-inline__flag .fi {
        font-size: 2.5rem;
    }

    .product-origin-card-inline__label {
        margin-bottom: 0;
    }

    .product-title {
        font-size: 1.25rem;
    }

    .product-actions .btn {
        width: 100%;
        min-width: auto;
    }

    .product-thumb-item {
        width: 60px;
        height: 60px;
    }

    .product-physical-cards {
        gap: 0.75rem;
    }

    .product-physical-card {
        padding: 1rem 0.75rem;
        min-width: 120px;
    }

    .product-price-value {
        font-size: 1.5rem;
    }

    /* Tab 標籤縮小 */
}

@media (max-width: 575.98px) {
    .product-physical-cards {
        justify-content: center;
    }

    .product-physical-card {
        min-width: 100px;
        flex: 1 1 calc(50% - 0.75rem);
    }
}


/* ============================
   列印樣式
   ============================ */
@media print {
    .product-gallery {
        position: static;
    }

    .product-actions,
    .product-thumbnails {
        display: none;
    }

    .product-hero {
        background: none;
        border: none;
    }

    .product-main-image {
        border: none;
        page-break-inside: avoid;
    }

    .card-custom {
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }

    .product-highlights-section,
    .product-specs-section,
    .product-recommended-section {
        background: none;
        border: none;
    }

    .product-physical-item {
        border: 1px solid #ddd;
    }
}
