/*
Theme Name: TULOGCO V2.0
Description: TULOGCO 安装指引中心 V2.0 主题 - 基于 V2.0 静态站规范改写
Author: TULOGCO
Version: 2.0.0
*/

:root {
    --color-primary: #1B4332;
    --color-primary-light: #2D6A4F;
    --color-primary-dark: #081C15;
    --color-accent: #D4B896;
    --color-accent-dark: #C9A96E;
    --color-bg: #FAFAF7;
    --color-card: #FFFFFF;
    --color-text: #1A1A1A;
    --color-text-muted: #6B7280;
    --color-border: #E5E7EB;
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-danger: #EF4444;
    --radius-sm: 8px;
    --radius-default: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
    --max-width: 1200px;
    --font-stack: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-stack);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-light); }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Header ===== */
.site-header {
    background: var(--color-card);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    padding-bottom: 16px;
}
.brand-logo { height: 48px; }
.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}
.nav-links a {
    color: var(--color-text);
    font-weight: 500;
    padding: 8px 0;
}
.nav-links a:hover { color: var(--color-primary); }

/* ===== Hero ===== */
.hero-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    text-align: center;
}
.hero-pattern {
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    border: 60px solid rgba(255,255,255,0.05);
    border-radius: 50%;
}
.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -1px;
}
.hero-subtitle {
    font-size: 18px;
    opacity: 0.9;
    max-width: 640px;
    margin: 0 auto 32px;
}
.hero-cta {
    display: inline-block;
    background: var(--color-accent);
    color: var(--color-primary-dark);
    padding: 16px 32px;
    border-radius: var(--radius-default);
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}
.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--color-primary-dark);
}

/* ===== Sections ===== */
.section-block { padding: 44px 0; }
/* ⚠ v1.5.0：不再用 :nth-child(even) 做隔行底色 —— 删掉一个 section 就会整体错位。
   改成显式 class .section-block--alt（真相源只有一处）。 */
.section-block--alt { background: rgba(0,0,0,0.02); }
.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--color-primary);
}
.section-subtitle {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: 20px;
    font-size: 15px;
}
.section-block h2 {
    font-size: 28px;
    color: var(--color-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.section-block h2 .num {
    background: var(--color-primary);
    color: var(--color-accent);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.block-subtitle {
    color: var(--color-text-muted);
    margin-bottom: 32px;
    font-size: 15px;
}

/* ===== Product Grid ===== */
.products-section { padding: 80px 0; background: var(--color-bg); }
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 32px;
}
.product-card {
    background: var(--color-card);
    border-radius: var(--radius-default);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.product-card-link { color: inherit; display: block; }
.product-card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0;
    position: relative;
}
.product-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--color-accent);
    color: var(--color-primary-dark);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
}
.product-card-body { padding: 20px; }
.product-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-primary);
}
.product-card-subtitle {
    color: var(--color-text-muted);
    font-size: 14px;
    margin-bottom: 12px;
}
.product-features-list {
    list-style: none;
    margin-bottom: 12px;
}
.product-features-list li {
    font-size: 13px;
    color: var(--color-success);
    margin-bottom: 4px;
}
.product-card-desc {
    color: var(--color-text-muted);
    font-size: 13px;
    margin-bottom: 16px;
}
.product-card-cta {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 14px;
}

/* ===== Features ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-top: 32px;
}
.feature-card {
    text-align: center;
    padding: 24px;
    background: var(--color-card);
    border-radius: var(--radius-default);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}
.feature-card:hover { transform: translateY(-2px); }
.feature-icon { font-size: 48px; margin-bottom: 16px; }
.feature-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-primary);
}
.feature-desc { font-size: 13px; color: var(--color-text-muted); }

/* ===== Single Product ===== */
.product-header {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    color: white;
    padding: 28px 0 34px;
}
.product-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}
.product-tagline {
    font-size: 16px;
    opacity: 0.95;
    margin-bottom: 14px;
}

/* v1.5.0：顶部两栏（左主图 / 右标题+规格表）—— 规格表不再单独占一整屏 */
.product-header-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}
.product-header-media {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.92);
    border-radius: 14px;
    padding: 12px;
    min-height: 220px;
}
.product-header-info { min-width: 0; }
.product-specs-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.product-specs-title::before {
    content: '';
    width: 4px; height: 18px;
    background: var(--color-accent, #D4B896);
    border-radius: 2px;
}
.specs-table--compact {
    width: 100%;
    margin-top: 0;
    background: rgba(255,255,255,0.96);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
.specs-table--compact th, .specs-table--compact td {
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.45;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    color: #23282D;
}
.specs-table--compact th {
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}
.specs-table--compact tr:last-child td { border-bottom: none; }
@media (max-width: 900px) {
    .product-header-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .product-header h1 { font-size: 26px; }
}

.breadcrumb { margin-bottom: 12px; font-size: 14px; }
.breadcrumb a { color: rgba(255,255,255,0.9); }
.breadcrumb span { margin: 0 8px; opacity: 0.7; }

/* ===== Video ===== */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    background: #000;
    border-radius: var(--radius-default);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}
.video-poster {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}
.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-play-btn::after {
    content: '';
    border-style: solid;
    border-width: 16px 0 16px 24px;
    border-color: transparent transparent transparent var(--color-primary);
    margin-left: 6px;
}
.video-info {
    margin-top: 16px;
    color: var(--color-text-muted);
    font-size: 14px;
}

/* ===== PDF Viewer ===== */
.pdf-viewer {
    background: var(--color-card);
    border-radius: var(--radius-default);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.pdf-toolbar {
    background: var(--color-primary);
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.pdf-title { font-weight: 600; font-size: 14px; }
.pdf-page-btn {
    background: var(--color-accent);
    color: var(--color-primary-dark);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 700;
    margin-left: 8px;
}
.pdf-canvas-wrap {
    padding: 24px;
    background: #f5f5f5;
    text-align: center;
    cursor: zoom-in;
    min-height: 400px;
}
.pdf-canvas-wrap canvas { max-width: 100%; box-shadow: var(--shadow-md); }
.pdf-zoom-hint {
    margin-top: 12px;
    color: var(--color-text-muted);
    font-size: 13px;
}
.pdf-watermark-note {
    background: rgba(212,184,150,0.15);
    padding: 12px 20px;
    font-size: 13px;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== Steps ===== */
.step-list { margin-top: 32px; }
.step-item {
    background: var(--color-card);
    border-radius: var(--radius-default);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    align-items: start;
}
.step-image img {
    width: 100%;
    border-radius: var(--radius-sm);
    cursor: zoom-in;
}
.step-image-placeholder {
    height: 180px;
    background: #f5f5f5;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
}
.step-title {
    font-size: 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-primary);
}
.step-number {
    background: var(--color-accent);
    color: var(--color-primary-dark);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}
.step-desc { color: var(--color-text); margin-bottom: 12px; }
.step-parts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.step-part-tag {
    background: var(--color-primary-light);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}
.step-tip {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-top: 8px;
}
.step-tip-info { background: rgba(16,185,129,0.1); color: var(--color-success); border-left: 4px solid var(--color-success); }
.step-tip-warn { background: rgba(245,158,11,0.1); color: var(--color-warning); border-left: 4px solid var(--color-warning); }

/* ===== Specs Table ===== */
.specs-table {
    width: 100%;
    background: var(--color-card);
    border-radius: var(--radius-default);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-top: 24px;
}
.specs-table th, .specs-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}
.specs-table th {
    background: var(--color-primary);
    color: white;
    font-weight: 600;
}
.specs-table tr:last-child td { border-bottom: none; }

/* ===== Cautions ===== */
.cautions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}
.cautions-correct,
.cautions-wrong {
    padding: 24px;
    border-radius: var(--radius-default);
}
.cautions-correct {
    background: rgba(16,185,129,0.1);
    border-left: 4px solid var(--color-success);
}
.cautions-wrong {
    background: rgba(239,68,68,0.08);
    border-left: 4px solid var(--color-danger);
}
.cautions-correct h3, .cautions-wrong h3 { margin-bottom: 12px; }

/* ===== CTA ===== */
.product-cta {
    background: var(--color-primary);
    color: white;
    padding: 44px 0;
    text-align: center;
}
.cta-whatsapp {
    display: inline-block;
    background: var(--color-accent);
    color: var(--color-primary-dark);
    padding: 16px 32px;
    border-radius: var(--radius-default);
    font-weight: 600;
    margin-top: 24px;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--color-primary-dark);
    color: rgba(255,255,255,0.8);
    padding: 48px 0 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}
.footer-brand { font-size: 18px; font-weight: 600; color: white; margin-bottom: 12px; }
.footer-contact { font-size: 14px; line-height: 1.8; }
.footer-col p { font-size: 14px; margin-bottom: 8px; }
.footer-copyright {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
}

/* ===== Floating WhatsApp ===== */
.tg-float-wa {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    box-shadow: 0 4px 12px rgba(37,211,102,0.4);
    z-index: 99;
    transition: transform 0.2s;
}
.tg-float-wa:hover { transform: scale(1.1); color: white; }

/* ===== Archive ===== */
.archive-header { background: var(--color-primary); color: white; padding: 60px 0; text-align: center; }
.archive-header h1 { font-size: 36px; }
.archive-desc { margin-top: 12px; opacity: 0.9; }

/* ===== 404 ===== */
.error-404 { text-align: center; padding: 120px 0; }
.error-404 h1 { font-size: 96px; color: var(--color-primary); }

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .hero-title { font-size: 32px; }
    .section-title { font-size: 24px; }
    .step-item { grid-template-columns: 1fr; }
    .cautions-grid { grid-template-columns: 1fr; }
    .nav-links { gap: 12px; }
}

/* ===== Language switcher (single consolidated block, D-028e) ===== */
.site-header .nav-links .lang-switch {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}
.site-header .nav-links .lang-switch > li {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}
.site-header .nav-links .lang-switch a,
.site-header .nav-links .lang-switch button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    flex: 0 0 auto;
    line-height: 1.2;
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.site-header .nav-links .lang-switch a:hover,
.site-header .nav-links .lang-switch button:hover {
    background: rgba(27, 67, 50, 0.06);
    border-color: var(--color-primary);
    color: var(--color-primary);
}
.site-header .nav-links .lang-switch .current-lang a,
.site-header .nav-links .lang-switch a[aria-current="true"],
.site-header .nav-links .lang-switch button.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    font-weight: 600;
}

/* ===== D-028h appended ===== */

/* ===== D-028h: guide steps — readable diagrams + readable lightbox ===== */
.step-list { display: flex; flex-direction: column; gap: 28px; }
.step-item {
    display: grid;
    grid-template-columns: minmax(320px, 460px) 1fr;
    gap: 28px;
    align-items: start;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
}
.step-image {
    margin: 0;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-default);
    overflow: hidden;
    cursor: zoom-in;
}
.step-image img {
    display: block;
    width: 100%;
    height: auto;
    /* keep the printed text inside the diagram legible */
    image-rendering: -webkit-optimize-contrast;
}
.step-image-placeholder {
    display: flex; align-items: center; justify-content: center;
    min-height: 220px; color: var(--color-text-muted); font-size: 14px;
}
.step-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 20px; font-weight: 700; color: var(--color-primary);
    margin-bottom: 10px; line-height: 1.4;
}
.step-number {
    flex: 0 0 auto;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--color-accent); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 700;
}
.step-desc { font-size: 15px; line-height: 1.75; color: var(--color-text); }
.step-parts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.step-part-tag {
    background: rgba(27, 67, 50, 0.07); color: var(--color-primary);
    border: 1px solid rgba(27, 67, 50, 0.15);
    border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 500;
}
.step-tip {
    margin-top: 14px; padding: 12px 16px;
    background: #F0F7F3; border-left: 3px solid var(--color-primary-light);
    border-radius: var(--radius-sm); font-size: 14px; line-height: 1.7;
}
.step-tip-warning { background: #FFF7ED; border-left-color: var(--color-warning); }

@media (max-width: 900px) {
    .step-item { grid-template-columns: 1fr; }
}

/* ===== lightbox: fullscreen gallery, image on top, step text fixed below (2026-10-27 rebuild) ===== */
.step-image img[data-lightbox] { cursor: zoom-in; }

.tg-lightbox-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    display: flex; align-items: center; justify-content: center;
    padding: 20px 16px;
    opacity: 0; transition: opacity 0.28s ease;
}
.tg-lightbox-overlay.open { opacity: 1; }

.tg-lightbox-content {
    position: relative;
    display: flex; flex-direction: column; align-items: stretch;
    width: 100%; max-width: 1400px;
    max-height: calc(100vh - 40px);
    background: #fff; border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.tg-lightbox-counter {
    position: absolute; top: 14px; left: 18px; z-index: 12;
    padding: 5px 12px; border-radius: 999px;
    background: rgba(0, 0, 0, 0.55); color: #fff;
    font-size: 13px; letter-spacing: 0.4px; font-variant-numeric: tabular-nums;
}
.tg-lightbox-stage {
    flex: 1 1 auto; min-height: 0; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    padding: 12px 12px 4px; background: #fff;
}
/* 图片高度必须扣掉：容器留白(40) + 文字面板(24vh) + 舞台内边距(16)
   注意:不能写成 min(100%, calc(...)) —— flex 容器里父级高度无定值时,
   百分比会让整条 min() 判定为非法,max-height 整条失效,图片按原始尺寸溢出被裁。 */
.tg-lightbox-img {
    max-width: 100%;
    max-height: calc(100vh - 40px - 24vh - 16px);
    width: auto; height: auto;
    display: block; object-fit: contain;
    border: 1px solid var(--color-border); border-radius: var(--radius-default);
    background: #fff;
}
/* 文字解释：始终固定在图片下方，随图同步刷新 */
.tg-lightbox-text {
    flex: 0 0 auto; max-height: 24vh; overflow-y: auto;
    padding: 16px 24px 20px; background: #F7F6F2;
    border-top: 1px solid var(--color-border);
    font-size: 15px; line-height: 1.75; color: var(--color-text);
}
.tg-lightbox-text h3 {
    font-size: 18px; font-weight: 700; color: var(--color-primary);
    margin: 0 0 10px; line-height: 1.4;
}
.tg-lightbox-text p { margin: 0 0 10px; }
.tg-lightbox-stepno {
    display: inline-block; min-width: 22px; padding: 1px 8px;
    margin-bottom: 8px; border-radius: 999px;
    background: var(--color-primary); color: #fff;
    font-size: 12px; font-weight: 700; text-align: center;
}
.tg-lightbox-parts { margin: 4px 0 2px; display: flex; flex-wrap: wrap; gap: 8px; }
.tg-lightbox-parts .step-part-tag {
    display: inline-block; padding: 4px 12px; border-radius: 999px;
    background: #fff; border: 1px solid var(--color-border);
    font-size: 13px; color: var(--color-text);
}
.tg-lightbox-text .step-tip-inline {
    margin-top: 12px; padding: 12px 14px;
    background: #F0F7F3; border-left: 3px solid var(--color-primary-light);
    border-radius: var(--radius-sm); font-size: 14px;
}
.tg-lightbox-close {
    position: absolute; top: 14px; right: 16px; z-index: 12;
    width: 38px; height: 38px; border-radius: 50%;
    border: none; background: rgba(0, 0, 0, 0.55); color: #fff;
    font-size: 24px; line-height: 1; cursor: pointer;
}
.tg-lightbox-close:hover { background: rgba(0, 0, 0, 0.78); }
.tg-lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 12; width: 46px; height: 46px; border-radius: 50%;
    border: none; background: rgba(0, 0, 0, 0.5); color: #fff;
    font-size: 30px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center; padding: 0;
}
.tg-lightbox-nav:hover { background: rgba(0, 0, 0, 0.75); }
.tg-lightbox-prev { left: 14px; }
.tg-lightbox-next { right: 14px; }

@media (max-width: 900px) {
    .tg-lightbox-overlay { padding: 10px 6px; }
    .tg-lightbox-content { max-height: calc(100vh - 20px); }
    .tg-lightbox-stage { padding: 10px 10px 4px; }
    .tg-lightbox-img { max-height: calc(100vh - 20px - 28vh - 14px); }
    .tg-lightbox-text { max-height: 28vh; padding: 14px 16px 16px; font-size: 14px; }
    .tg-lightbox-nav { width: 40px; height: 40px; font-size: 26px; }
    .tg-lightbox-prev { left: 6px; }
    .tg-lightbox-next { right: 6px; }
}

/* ===== D-028k manual viewer ===== */

/* ===== D-028k: server-rendered manual viewer ===== */
.manual-viewer {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.manual-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 14px 20px;
    background: var(--color-primary); color: #fff;
    flex-wrap: wrap;
}
.manual-title { font-size: 15px; font-weight: 600; }
.manual-toolbar-actions { display: flex; align-items: center; gap: 10px; }
.manual-page-count {
    font-size: 14px; font-variant-numeric: tabular-nums;
    opacity: 0.95; margin-right: 4px;
}
.manual-page-btn {
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12); color: #fff;
    font-size: 20px; line-height: 1; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background 0.18s ease, opacity 0.18s ease;
}
.manual-page-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.26); }
.manual-page-btn:disabled { opacity: 0.32; cursor: not-allowed; }
.manual-stage {
    padding: 20px; background: #F4F5F2;
    max-height: 78vh; overflow: auto; text-align: center;
    cursor: zoom-in;
}
.manual-page {
    display: none;
    max-width: 100%; height: auto; margin: 0 auto;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    background: #fff;
}
.manual-page.is-active { display: block; }
.manual-hint {
    padding: 10px 20px; font-size: 13px; color: var(--color-text-muted);
    border-top: 1px solid var(--color-border); background: #fff;
}
/* fullscreen: let the page fill the screen and scroll */
.manual-viewer:fullscreen { background: #fff; display: flex; flex-direction: column; }
.manual-viewer:fullscreen .manual-stage { max-height: none; flex: 1; padding: 24px; }
.manual-viewer:fullscreen .manual-page { max-width: 100%; box-shadow: none; }
.manual-zoom-btn {
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.12); color: #fff;
    font-size: 13px; padding: 7px 14px; border-radius: 999px;
    cursor: pointer; line-height: 1;
}
.manual-zoom-btn:hover { background: rgba(255,255,255,0.26); }

/* ===== v1.5.0：说明书页图全屏灯箱（可放大缩小）===== */
.tg-mzoom-overlay {
    position: fixed; inset: 0; z-index: 100000;
    background: rgba(12, 14, 13, 0.96);
    display: none; align-items: center; justify-content: center;
    touch-action: none;
}
.tg-mzoom-overlay.is-open { display: flex; }
.tg-mzoom-stage {
    position: relative;
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; cursor: grab;
}
.tg-mzoom-stage.is-dragging { cursor: grabbing; }
.tg-mzoom-img {
    max-width: 92vw; max-height: 88vh;
    transform-origin: center center;
    will-change: transform;
    user-select: none; -webkit-user-drag: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    background: #fff;
}
.tg-mzoom-bar {
    position: absolute; left: 50%; transform: translateX(-50%);
    bottom: 16px; z-index: 12;
    display: flex; align-items: center; gap: 10px;
    background: rgba(0,0,0,0.6); border-radius: 999px;
    padding: 8px 16px; color: #fff; font-size: 13px;
}
.tg-mzoom-btn {
    width: 34px; height: 34px; border-radius: 50%;
    border: none; background: rgba(255,255,255,0.16); color: #fff;
    font-size: 19px; line-height: 1; cursor: pointer;
}
.tg-mzoom-btn:hover { background: rgba(255,255,255,0.3); }
.tg-mzoom-count { font-variant-numeric: tabular-nums; min-width: 62px; text-align: center; }
.tg-mzoom-level { font-variant-numeric: tabular-nums; min-width: 46px; text-align: center; opacity: 0.85; }
.tg-mzoom-close {
    position: absolute; top: 14px; right: 16px; z-index: 12;
    width: 40px; height: 40px; border-radius: 50%;
    border: none; background: rgba(0,0,0,0.55); color: #fff;
    font-size: 25px; line-height: 1; cursor: pointer;
}
.tg-mzoom-close:hover { background: rgba(0,0,0,0.8); }
.tg-mzoom-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 12; width: 46px; height: 46px; border-radius: 50%;
    border: none; background: rgba(0,0,0,0.5); color: #fff;
    font-size: 30px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center; padding: 0;
}
.tg-mzoom-nav:hover { background: rgba(0,0,0,0.75); }
.tg-mzoom-prev { left: 14px; }
.tg-mzoom-next { right: 14px; }
@media (max-width: 700px) {
    .tg-mzoom-img { max-width: 96vw; max-height: 74vh; }
    .tg-mzoom-nav { width: 40px; height: 40px; font-size: 26px; }
    .tg-mzoom-prev { left: 6px; }
    .tg-mzoom-next { right: 6px; }
}

/* ===== v1.5.0：邮箱留言表单 ===== */
.tg-msg-form-wrap { max-width: 820px; margin: 0 auto; }
.tg-msg-done { margin: 0 0 14px; }
/* ⚠ WP 的 .notice 样式只在后台加载，前台要自己给一套 */
.tg-msg-done p { margin: 0; font-size: 14px; }
.tg-msg-done.notice-success { background: #f0f6f2; border-left: 4px solid #1a7f37; color: #1a5c2e; padding: 12px 16px; border-radius: var(--radius-sm); }
.tg-msg-done.notice-error { background: #fcf0f1; border-left: 4px solid #b32d2e; color: #8a1f20; padding: 12px 16px; border-radius: var(--radius-sm); }
.tg-msg-form {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    box-shadow: var(--shadow-sm);
    text-align: left;   /* 外层 CTA 是居中的，表单本身要左对齐 */
    /* ⚠ 外层 .product-cta 是 color:white，表单卡片是白底 —— 必须显式指定正文色，
       否则单选按钮文字（建议/意见/投诉）会白字白底看不见 */
    color: var(--color-text);
}
.tg-msg-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}
.tg-msg-field { margin: 0; display: flex; flex-direction: column; gap: 5px; }
.tg-msg-field--full { grid-column: 1 / -1; }
.tg-msg-field > label { font-size: 13px; font-weight: 600; color: var(--color-text); }
.tg-msg-field .req { color: #b32d2e; }
.tg-msg-field input[type="text"],
.tg-msg-field input[type="email"],
.tg-msg-field textarea,
.tg-msg-field input[type="file"] {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--color-text);
    background: #fff;
}
.tg-msg-field textarea { resize: vertical; }
.tg-msg-field input:focus, .tg-msg-field textarea:focus {
    outline: none; border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(27,67,50,0.12);
}
.tg-msg-hint { font-size: 12px; color: var(--color-text-muted); }
.tg-msg-radios { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.tg-msg-radio { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; color: var(--color-text); }
.tg-msg-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.tg-msg-submit { margin: 18px 0 0; }
.tg-msg-submit-btn {
    background: var(--color-primary);
    color: #fff; border: none;
    padding: 12px 30px; border-radius: 999px;
    font-size: 15px; font-weight: 600; cursor: pointer;
}
.tg-msg-submit-btn:hover { background: var(--color-primary-dark, var(--color-primary)); }
@media (max-width: 700px) {
    .tg-msg-grid { grid-template-columns: minmax(0, 1fr); }
    .tg-msg-form { padding: 16px; }
}

/* D-030: real <img> for product cards + product hero image */
.product-card-image{position:relative;width:100%;aspect-ratio:3/2;overflow:hidden;background:#f2efe9;}
.product-card-image img.tg-card-img{width:100%;height:100%;object-fit:cover;display:block;}
.product-header-image{max-width:100%;max-height:300px;width:auto;height:auto;display:block;border-radius:12px;margin:0;}
.product-header-image--empty{min-height:220px;background:rgba(255,255,255,0.5);border-radius:12px;}

/* ── 站点设置：页脚联系方式行 + 页头 LOGO ───────────────────────── */
.footer-contact { margin-bottom: 14px; }
.footer-tagline { margin: 0 0 8px; font-weight: 600; font-size: 15px; color: #FFFFFF; }
.footer-contact-items { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; font-size: 14px; line-height: 1.8; color: rgba(255,255,255,0.82); }
.footer-contact-items a { color: rgba(255,255,255,0.82); text-decoration: none; }
.footer-contact-items a:hover { color: #FFFFFF; text-decoration: underline; }
.footer-contact-items .fc-item { white-space: nowrap; }
.footer-contact-items .fc-label { color: #FFFFFF; font-weight: 600; margin-right: 5px; }
