/*
Theme Name: TULOGCO V2.0
Description: TULOGCO 安装指引中心 V2.0 主题 - 基于 V2.0 静态站规范改写
Author: SPUNUM Independent Site
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: 80px 0; }
.section-block:nth-child(even) { 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: 48px;
    font-size: 16px;
}
.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: 60px 0;
}
.product-header h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 12px;
}
.product-tagline {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 24px;
}

.breadcrumb { margin-bottom: 16px; 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: 60px 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: image on the left, step text on the right, both readable */
.tg-lightbox-content {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 28px;
    align-items: start;
    max-width: 1500px;
    max-height: 92vh;
    width: 100%;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    overflow: auto;
}
.tg-lightbox-content > img {
    width: 100%; height: auto; display: block;
    border: 1px solid var(--color-border); border-radius: var(--radius-default);
    background: #fff;
}
.tg-lightbox-text { font-size: 15px; line-height: 1.8; color: var(--color-text); }
.tg-lightbox-text h3 {
    font-size: 19px; font-weight: 700; color: var(--color-primary);
    margin-bottom: 12px; line-height: 1.4;
}
.tg-lightbox-text p { margin-bottom: 12px; }
.tg-lightbox-text .step-tip-inline {
    margin-top: 14px; 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;
    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; z-index: 10;
}
.tg-lightbox-close:hover { background: rgba(0, 0, 0, 0.78); }

@media (max-width: 900px) {
    .tg-lightbox-content { grid-template-columns: 1fr; }
}

/* ===== 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; }
