/* ============================================================
   FJMAGI — Front-end styles
   Clean, responsive industrial B2B theme
   ============================================================ */

:root {
    --blue: #0b4a8b;
    --blue-dark: #08365f;
    --blue-light: #2f7bc4;
    --accent: #e8541e;
    --ink: #1a2332;
    --muted: #5b6776;
    --line: #e4e8ee;
    --bg: #ffffff;
    --bg-soft: #f5f7fa;
    --bg-softer: #eef2f7;
    --radius: 10px;
    --shadow-sm: 0 1px 3px rgba(16, 38, 66, .08);
    --shadow: 0 6px 24px rgba(16, 38, 66, .10);
    --maxw: 1180px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--ink); margin: 0 0 .5em; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: transform .12s ease, box-shadow .2s ease, background .2s;
    text-align: center;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #cf4715; color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-secondary { background: var(--blue); color: #fff; }
.btn-secondary:hover { background: var(--blue-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 14px; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,.96);
    backdrop-filter: saturate(150%) blur(6px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: flex-start; gap: 0; min-height: 70px; padding-top: 6px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; font-weight: 800; font-size: 20px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark {
    width: 38px; height: 38px; border-radius: 9px;
    background: linear-gradient(135deg, var(--blue), var(--blue-light));
    color: #fff; display: grid; place-items: center; font-size: 16px; font-weight: 800;
}
.brand-logo { height: 42px; width: auto; display: block; }
.brand-text { letter-spacing: .2px; }

.main-nav { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; flex: 1; justify-content: flex-start; margin-left: 28px; }
.main-nav > a, .has-dropdown > a {
    display: flex; align-items: center; justify-content: center; text-align: center;
    min-height: 46px; padding: 6px 11px; border-radius: 8px; color: var(--ink);
    font-weight: 500; font-size: 14.5px; line-height: 1.25; word-break: keep-all;
}
.main-nav > a:hover, .has-dropdown > a:hover { background: var(--bg-soft); color: var(--blue); }
.nav-cta { background: var(--accent); color: #fff !important; margin-left: auto; font-weight: 600; }
.nav-cta:hover { background: #cf4715; }

.has-dropdown { position: relative; }
.dropdown {
    position: absolute; top: 100%; left: 0; min-width: 260px;
    background: #fff; border: 1px solid var(--line); border-radius: 10px;
    box-shadow: var(--shadow); padding: 8px; display: none;
}
.has-dropdown:hover .dropdown { display: block; }
.dropdown a { display: block; padding: 9px 12px; border-radius: 7px; color: var(--ink); font-size: 14px; }
.dropdown a:hover { background: var(--bg-soft); color: var(--blue); }
.dropdown-group { padding: 2px 0; }
.dropdown-group + .dropdown-group { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 6px; }
.dropdown-parent { font-weight: 600; }
.dropdown-children a { padding: 6px 12px 6px 24px; font-size: 13px; color: var(--muted, #667); }
.dropdown-children a:hover { color: var(--blue); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 55%, var(--blue-light) 100%);
    color: #fff; padding: 80px 0; position: relative; overflow: hidden;
}
.hero::after {
    content: ""; position: absolute; right: -120px; top: -120px;
    width: 420px; height: 420px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.12), transparent 70%);
}
.hero-inner { max-width: 680px; position: relative; z-index: 2; }
.hero h1 { color: #fff; font-size: clamp(28px, 4vw, 46px); margin-bottom: 16px; }
.hero p { font-size: 18px; color: rgba(255,255,255,.9); margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 28px; margin-top: 40px; flex-wrap: wrap; }
.hero-badge strong { display: block; font-size: 26px; }
.hero-badge span { color: rgba(255,255,255,.8); font-size: 14px; }

/* ---------- Sections ---------- */
.section { padding: 70px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(24px, 3vw, 34px); }
.section-head p { color: var(--muted); font-size: 17px; }
.eyebrow { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; font-size: 13px; }

/* ---------- Category grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.cat-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 28px 24px; transition: .2s; box-shadow: var(--shadow-sm);
}
.cat-card:hover { border-color: var(--blue-light); box-shadow: var(--shadow); transform: translateY(-3px); }
.cat-thumb {
    aspect-ratio: 1 / 1;
    background: #f7f9fb;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    display: grid;
    place-items: center;
}
.cat-thumb img {
    width: 100%; height: 100%;
    object-fit: contain;
    display: block;
}
.cat-card h3 { font-size: 19px; }
.cat-card h3 a { color: var(--ink); }
.cat-card p { color: var(--muted); font-size: 14px; margin: 6px 0 14px; }
.cat-card .count { color: var(--accent); font-weight: 600; font-size: 13px; }
.cat-icon {
    width: 46px; height: 46px; border-radius: 10px; margin-bottom: 14px;
    background: var(--bg-softer); color: var(--blue); display: grid; place-items: center;
}

/* ---------- Product grid ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px; }
.product-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; transition: .2s; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--blue-light); }
.product-thumb { aspect-ratio: 1 / 1; background: #f7f9fb; display: grid; place-items: center; overflow: hidden; padding: 12px; box-sizing: border-box; }

/* V25D：全站产品卡图容器统一 1:1 方图，object-fit:contain 居中、永不裁切、不拉伸。
   保留 product_thumb_shape() 输出的 class 以兼容旧模板，但比例一律 1/1。 */
.product-thumb.thumb-square,
.product-thumb.thumb-landscape,
.product-thumb.thumb-wide,
.product-thumb.thumb-portrait,
.product-thumb.thumb-tall      { aspect-ratio: 1 / 1; }
.product-thumb img { width: 100%; height: 100%; object-fit: contain; object-position: center center; box-sizing: border-box; }
.product-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.product-cat { font-size: 12px; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
.product-body h3 { font-size: 17px; margin: 6px 0 8px; }
.product-body h3 a { color: var(--ink); }
.product-body h3 a:hover { color: var(--blue); }
.product-desc { color: var(--muted); font-size: 14px; flex: 1; }
.product-foot { margin-top: 16px; display: flex; gap: 10px; }
.badge-featured { display: inline-block; background: #fff3ec; color: var(--accent); font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 14px 0; font-size: 14px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb span { color: var(--ink); }
.breadcrumb .sep { color: #c2cbd6; margin: 0 8px; }

/* ---------- Listing layout ---------- */
.listing { display: grid; grid-template-columns: 250px 1fr; gap: 36px; padding: 50px 0; }
.sidebar h4 { font-size: 15px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 14px; }
.cat-list { list-style: none; padding: 0; margin: 0 0 28px; }
.cat-list li { margin-bottom: 4px; }
.cat-list a { display: flex; justify-content: space-between; padding: 9px 12px; border-radius: 8px; color: var(--ink); font-size: 14px; }
.cat-list a:hover, .cat-list a.active { background: var(--bg-soft); color: var(--blue); }
.cat-list .num { color: var(--muted); font-size: 12px; }
.search-box { display: flex; gap: 8px; margin-bottom: 26px; }
.search-box input { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }

.listing-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.listing-head h1 { font-size: 28px; margin: 0; }
.result-count { color: var(--muted); font-size: 14px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 12px;
    border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-size: 14px; background: #fff;
}
.pagination a:hover { border-color: var(--blue); color: var(--blue); }
.pagination .current { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ---------- Product detail ---------- */
.pd-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 50px 0; }
.pd-gallery .pd-main { background: #f7f9fb; border-radius: var(--radius); aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); }
.pd-main img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.pd-thumbs { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.pd-thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; }
.pd-thumbs img:hover { border-color: var(--blue); }
.pd-info h1 { font-size: 30px; }
.pd-sku { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.pd-short { font-size: 16px; color: var(--ink); margin-bottom: 22px; }
.pd-actions { display: flex; gap: 12px; margin: 24px 0; flex-wrap: wrap; }
.pd-block { margin-top: 36px; }
.pd-block h2 { font-size: 20px; border-bottom: 2px solid var(--line); padding-bottom: 10px; margin-bottom: 16px; }
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.specs-table td:first-child { font-weight: 600; width: 40%; color: var(--muted); background: var(--bg-soft); }
.prose { color: #38424f; font-size: 15px; }
.prose p { margin: 0 0 14px; }
.prose ul { padding-left: 20px; }

/* ---------- Forms ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm); }
.form-row { margin-bottom: 18px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
label .req { color: var(--accent); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], select, textarea {
    width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; font-family: inherit; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue-light); box-shadow: 0 0 0 3px rgba(47,123,196,.12); }
textarea { resize: vertical; min-height: 130px; }
.field-error { color: #c0341a; font-size: 13px; margin-top: 5px; }
.has-error input, .has-error textarea, .has-error select { border-color: #d96a55; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Alerts ---------- */
.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 22px; font-size: 14px; }
.alert-success { background: #e8f6ec; color: #1f6b39; border: 1px solid #b7e1c3; }
.alert-error { background: #fdecea; color: #a32c18; border: 1px solid #f3c4bb; }

/* ---------- Inquiry split layout ---------- */
.inquiry-wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; padding: 50px 0; }
.inquiry-aside { background: var(--bg-soft); border-radius: var(--radius); padding: 30px; }
.inquiry-aside h3 { font-size: 20px; }
.inquiry-aside .ia-item { display: flex; gap: 12px; margin: 18px 0; }
.inquiry-aside .ia-item strong { display: block; font-size: 14px; }
.inquiry-aside .ia-item span { color: var(--muted); font-size: 14px; }
.product-pill { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 22px; }
.product-pill img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: #fff; padding: 56px 0; }
.cta-band .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 6px; }
.cta-band p { color: rgba(255,255,255,.75); margin: 0; }

/* ---------- Page content ---------- */
.page-content { padding: 50px 0; }
.page-content .container { max-width: 860px; }
.page-content h1 { font-size: 32px; margin-bottom: 24px; }

/* ---------- Trust strip ---------- */
.trust-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
.trust-item { text-align: center; padding: 20px; }
.trust-item .ti-icon { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 12px; background: var(--bg-softer); color: var(--blue); display: grid; place-items: center; }
.trust-item h3 { font-size: 17px; }
.trust-item p { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: #0d1722; color: #aeb9c6; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 36px; padding: 56px 20px; }
.footer-brand { color: #fff; font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.footer-intro { font-size: 14px; line-height: 1.7; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #aeb9c6; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.contact-list li { font-size: 14px; }
.footer-bar { border-top: 1px solid rgba(255,255,255,.08); }
.footer-bar-inner { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; font-size: 13px; color: #7e8b9a; }
.admin-link { color: #7e8b9a; }
.admin-link:hover { color: #fff; }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .listing { grid-template-columns: 1fr; }
    .sidebar { order: 2; }
    .pd-wrap { grid-template-columns: 1fr; gap: 30px; }
    .inquiry-wrap { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
    .header-inner { justify-content: space-between; }
    .nav-toggle { display: flex; margin-left: auto; }
    .main-nav {
        position: fixed; top: 70px; right: 0; bottom: 0; width: 280px; max-width: 85vw;
        flex-direction: column; align-items: stretch; gap: 2px; background: #fff; margin-left: 0; flex: none;
        border-left: 1px solid var(--line); padding: 16px; transform: translateX(100%);
        transition: transform .25s ease; overflow-y: auto; box-shadow: var(--shadow);
    }
    .main-nav.open { transform: translateX(0); }
    .main-nav > a, .has-dropdown > a { padding: 12px 14px; justify-content: flex-start; min-height: 0; }
    .dropdown { position: static; display: block; box-shadow: none; border: none; padding: 0 0 0 14px; }
    .has-dropdown:hover .dropdown { display: block; }
    .nav-cta { margin: 8px 0 0; }
    .form-grid-2 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .cta-band .container { flex-direction: column; text-align: center; }
}

/* ============================================================
   Supplementary styles (views completion)
   ============================================================ */
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #cf4715; color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-light { background: #fff; color: var(--blue-dark); }
.btn-light:hover { background: #f0f4f9; color: var(--blue-dark); transform: translateY(-1px); }
.btn-lg { padding: 15px 34px; font-size: 16px; }

/* Hero extras */
.hero-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.hero-text h1 { font-size: 2.5rem; }
.hero-card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); padding: 24px; backdrop-filter: blur(4px); }
.hero-points { list-style: none; margin: 0; padding: 0; }
.hero-points li { display: flex; flex-direction: column; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.15); }
.hero-points li:last-child { border-bottom: none; }
.hero-points strong { color: #fff; font-size: 1.05rem; }
.hero-points span { color: rgba(255,255,255,.8); font-size: .9rem; }

/* Trust strip */
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* Section alt background */
.section-alt { background: var(--bg-soft); }

/* Category meta */
.cat-meta { display: inline-block; margin-top: 10px; color: var(--accent); font-weight: 600; font-size: .9rem; }

/* Product card extras */
.product-sku { display: inline-block; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--bg-softer); padding: 2px 8px; border-radius: 4px; margin-bottom: 6px; }
.product-link { display: inline-block; margin-top: 10px; font-weight: 600; font-size: .9rem; color: var(--accent); }

/* Listing */
.listing-main { min-width: 0; }
.listing-intro { color: var(--muted); margin: -6px 0 20px; }
.sidebar-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.sidebar-box h3 { font-size: 1rem; margin-bottom: 12px; }
.sidebar-cta { background: var(--bg-soft); }
.sidebar-cta p { font-size: .9rem; color: var(--muted); margin: 0 0 12px; }

/* Product detail */
.pd-main img { width: 100%; border-radius: var(--radius); background: var(--bg-soft); }
.pd-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.pd-thumbs img { width: 70px; height: 70px; object-fit: cover; border: 2px solid var(--line); border-radius: 8px; cursor: pointer; }
.pd-thumbs img.active, .pd-thumbs img:hover { border-color: var(--accent); }
.pd-lead { font-size: 1.05rem; color: var(--muted); }
.pd-subhead { font-size: 1.3rem; margin: 28px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.pd-description { margin-top: 30px; }
.related { margin-top: 40px; }

/* Inquiry */
.inquiry-main h1 { font-size: 2rem; }
.lead { color: var(--muted); font-size: 1.05rem; }
.aside-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.aside-box h3 { font-size: 1rem; margin-bottom: 10px; }
.tick-list { list-style: none; margin: 0; padding: 0; }
.tick-list li { padding: 5px 0 5px 24px; position: relative; color: var(--muted); }
.tick-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* Thank-you + error */
.thanks-card, .error-page { max-width: 620px; margin: 60px auto; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 48px 32px; box-shadow: var(--shadow-sm); }
.thanks-icon { width: 64px; height: 64px; line-height: 64px; margin: 0 auto 18px; border-radius: 50%; background: #e6f6ec; color: #1a9c52; font-size: 2rem; }
.thanks-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.error-code { font-size: 4rem; font-weight: 800; color: var(--accent); line-height: 1; }

/* Contact */
.contact-wrap { display: grid; grid-template-columns: 1.6fr 1fr; gap: 30px; margin: 24px 0 50px; align-items: start; }
.contact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.contact-card h3 { font-size: .95rem; color: var(--muted); margin-bottom: 6px; }
.contact-card p { margin: 0; font-weight: 600; }
.contact-cta-box { background: var(--blue); color: #fff; border-radius: var(--radius); padding: 28px; }
.contact-cta-box h2 { color: #fff; }
.contact-cta-box p { color: rgba(255,255,255,.85); margin-bottom: 18px; }
.page-cta { margin: 30px 0 50px; }

@media (max-width: 960px) {
    .hero-inner { grid-template-columns: 1fr; }
    .trust-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .trust-grid, .contact-cards { grid-template-columns: 1fr; }
    .hero-text h1 { font-size: 2rem; }
}

/* ---- Language switcher (v2) ---- */
.lang-switch { display:inline-flex; gap:2px; margin-left:8px; align-items:center; }
.lang-switch a {
    padding:4px 8px; border-radius:6px; font-size:.82rem; font-weight:600;
    color:var(--muted,#667); text-decoration:none; line-height:1;
}
.lang-switch a.active { background:var(--accent,#e8541e); color:#fff; }
.lang-switch a:not(.active):hover { background:rgba(0,0,0,.06); }
@media (max-width:860px){ .lang-switch{ margin:8px 0 0; } }

/* ---- Staging / test-site ribbon (front) ---- */
.staging-ribbon {
    background: #b91c1c; color: #fff; text-align: center;
    font-size: 13px; font-weight: 700; letter-spacing: .3px;
    padding: 6px 12px; position: sticky; top: 0; z-index: 1000;
}

/* ============================================================
   Theme / skin palettes (set via <html data-theme="...">)
   Only the brand-blue trio is overridden; --accent (CTA) stays.
   Managed in admin → Settings → Site Theme.
   ============================================================ */
html[data-theme="teal"]     { --blue:#0f6e6e; --blue-dark:#0a4f4f; --blue-light:#2f9c9c; }
html[data-theme="emerald"]  { --blue:#1d6f43; --blue-dark:#134d2e; --blue-light:#2f9c63; }
html[data-theme="slate"]    { --blue:#2b3a4a; --blue-dark:#1c2733; --blue-light:#4a5d70; }
html[data-theme="plum"]     { --blue:#5b3a78; --blue-dark:#412857; --blue-light:#7e57a3; }
html[data-theme="espresso"] { --blue:#8a5a2b; --blue-dark:#623f1d; --blue-light:#a9743c; }
html[data-theme="crimson"]  { --blue:#9b2335; --blue-dark:#6f1827; --blue-light:#c0485a; }


/* ---------- Product video (V25) ---------- */
.pd-video { margin: 10px 0 30px; }
.pd-video .pd-subhead { margin-bottom: 12px; }
.pd-video-el { width: 100%; max-width: 560px; aspect-ratio: 1 / 1; background: #f7f9fb; border: 1px solid var(--line); border-radius: var(--radius); display: block; }
.pd-video-btn { display: inline-flex; align-items: center; }
@media (max-width: 720px) { .pd-video-el { max-width: 100%; } }


/* ===== V25D: 相关产品布局 (桌面4列 / 平板2 / 手机1) + 卡图 1:1 ===== */
.related .product-grid,
.related-products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}
@media (max-width: 1024px) {
    .related .product-grid,
    .related-products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .related .product-grid,
    .related-products-grid { grid-template-columns: 1fr; }
}
.related .product-thumb { aspect-ratio: 1 / 1; background: #f7f9fb; overflow: hidden; padding: 12px; box-sizing: border-box; }
.related .product-thumb img { width: 100%; height: 100%; object-fit: contain; object-position: center; }

/* ===== V25D: 询盘篮 toast 提示 ===== */
.fj-toast-wrap { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
    z-index: 9999; display: flex; flex-direction: column; gap: 10px; align-items: center;
    pointer-events: none; }
.fj-toast { background: #1f2a37; color: #fff; padding: 11px 18px; border-radius: 10px;
    font-size: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.18); opacity: 0; transform: translateY(8px);
    transition: opacity .25s, transform .25s; max-width: 86vw; }
.fj-toast.show { opacity: 1; transform: translateY(0); }
.fj-toast.is-info { background: #2c5d8f; }

/* ==========================================================
   V25F-3 产品列表卡片 hover：内层裁切框（图片只在内框放大，不侵占外框 padding）
   结构：.product-thumb(外框 / padding / 1:1) > .product-thumb-inner(裁切框) > img
   - 外框/内框尺寸与外内框间距不变；图片只在内框内 scale(1.10)，超出被裁切。
   - 不对 .product-card 做 scale；卡片/文字/按钮不动；仅 hover 设备生效。
   详情页 gallery 切换动效（.pd-main img）保持 V25F 不变。
   ========================================================== */
.product-thumb-inner { display: block; width: 100%; height: 100%; overflow: hidden; }
.product-thumb-inner img {
  width: 100%; height: 100%;
  object-fit: contain; object-position: center center;
  transition: transform .32s ease;
  transform-origin: center center;
  will-change: transform;
}
@media (hover: hover) and (pointer: fine) {
  .product-card:hover .product-thumb-inner img,
  .product-thumb:hover .product-thumb-inner img {
    transform: scale(1.10);
  }
  /* 卡片本体不位移/不缩放：覆盖既有 .product-card:hover translateY 抬升 */
  .product-card:hover { transform: none; box-shadow: 0 6px 18px rgba(20, 30, 60, .10); }
}

/* 详情页主图切换动效（V25F，保持不变） */
.pd-main img { transition: opacity .18s ease, transform .18s ease; }
.pd-main img.is-switching { opacity: .72; transform: scale(.985); }

/* ==========================================================
   V25F-4 首页分类卡片 hover：内层裁切框（与产品卡片一致的镜头拉近）
   .cat-card(外框) > .cat-thumb(图片区/裁切) > .cat-thumb-inner(裁切) > img
   图片只在内框放大；卡片不上移（覆盖既有 translateY）；文字/分类名不动。
   ========================================================== */
.cat-thumb-inner { display: block; width: 100%; height: 100%; overflow: hidden; border-radius: inherit; }
.cat-thumb-inner img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .32s ease; transform-origin: center center; will-change: transform; }
@media (hover: hover) and (pointer: fine) {
  .cat-card:hover .cat-thumb-inner img { transform: scale(1.10); }
  .cat-card:hover { transform: none; }
}

/* ==========================================================
   V25G 详情页主图放大镜（Alibaba 式 hover zoom，仅桌面）
   - 不改主图 <img> 尺寸/布局：放大用 .pd-main::after 背景图实现
   - background-size:200% → 2 倍；background-position 跟随鼠标
   - 背景图来源 = 当前主图（gallery 切换后自动同步，由 JS 设 --zoom-image）
   - 手机端不启用（媒体查询隔离），保持点击 gallery 切换
   ========================================================== */
.pd-main { position: relative; }
@media (hover: hover) and (pointer: fine) {
  .pd-main { cursor: zoom-in; }
  .pd-main.is-zooming img { opacity: 0; }
  .pd-main.is-zooming::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--zoom-image);
    background-repeat: no-repeat;
    background-size: 200% 200%;
    background-position: var(--zoom-x, 50%) var(--zoom-y, 50%);
    pointer-events: none;
  }
}

/* ==========================================================
   V25G-2 首页分类卡片紧凑化 + Logo 文字字号 +2px
   - 去掉「XX 件 →」后收紧卡片底部留白（仅 .cat-card，不动 .product-card）
   - 不影响产品中心左侧分类数量(.cat-list .count) 与后台分类统计
   - Logo 旁品牌文字 .brand-text 20px → 22px（不动 MG 图标 / 导航 / 后台 / 页脚）
   ========================================================== */
.cat-card { padding: 20px 20px; }
.cat-thumb { margin-bottom: 14px; }
.cat-card p { margin-bottom: 0; }
.brand-text { font-size: 22px; }

/* ==========================================================
   V25H — 首页 hero 左右产品图片展示
   - 绝对定位于 hero 两侧空白区，深蓝渐变背景保留不动
   - 仅桌面端(>=1280px)显示；中小屏与移动端隐藏，绝不挤压主标题/按钮
   - pointer-events:none，不影响 hero 按钮与导航点击
   - 白底产品图用 object-fit:contain，呈现为干净的浮层产品卡
   ========================================================== */
.hero-visuals {
    position: absolute;
    inset: 0;
    z-index: 1;            /* 低于 .hero-inner(z-index:2)，文字始终在上 */
    pointer-events: none;  /* 不拦截任何点击 */
    display: none;         /* 默认隐藏，仅大屏开启 */
}
.hero-side {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.hero-side-left  { left:  clamp(24px, 4vw, 96px); align-items: flex-start; }
.hero-side-right { right: clamp(24px, 4vw, 96px); align-items: flex-end; }
.hero-visual {
    width: 220px;
    aspect-ratio: 1 / 1;
    margin: 0;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255,255,255,.96);
    box-shadow: 0 18px 50px rgba(0,0,0,.28);
    border: 1px solid rgba(255,255,255,.18);
}
.hero-visual-sm { width: 150px; }
.hero-side-left  .hero-visual-sm { margin-left: 54px; }   /* 错位叠放 */
.hero-side-right .hero-visual-sm { margin-right: 54px; }
.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: contain;   /* 白底产品图用 contain 更干净；场景图可改 cover */
    padding: 10px;
    box-sizing: border-box;
    display: block;
}
@media (min-width: 1280px) { .hero-visuals { display: block; } }

/* ==========================================================
   V25H — About Us 页面图片 / 卡片 / 视频占位布局
   - 作用于 .page-content .prose 内（About 页 body 注入的 HTML）
   - 图片用 onerror 隐藏，缺图不破图；视频区为优雅占位，不引用任何 mp4
   ========================================================== */
.about-intro {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    align-items: center;
    margin: 8px 0 36px;
}
.about-intro-media {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow, 0 10px 30px rgba(8,54,95,.12));
    background: var(--bg-soft);
    aspect-ratio: 4 / 3;
}
.about-intro-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-section-title { font-size: 22px; margin: 36px 0 18px; color: var(--ink); }
.about-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}
.about-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 18px;
    transition: transform .18s ease, box-shadow .18s ease;
}
.about-card:hover { transform: translateY(-3px); box-shadow: var(--shadow, 0 10px 30px rgba(8,54,95,.12)); }
.about-card h4 { margin: 0 0 6px; font-size: 16px; color: var(--blue-dark); }
.about-card p  { margin: 0; font-size: 14px; color: #5a6573; }
.about-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 4px 0 12px;
}
.about-gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); aspect-ratio: 1 / 1; }
.about-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.about-gallery figure:hover img { transform: scale(1.04); }
.about-video {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 60%, var(--blue-light) 100%);
    color: #fff;
    aspect-ratio: 16 / 7;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
}
.about-video .play-badge {
    width: 64px; height: 64px; border-radius: 50%;
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.4);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
}
.about-video .play-badge::before {
    content: ""; width: 0; height: 0;
    border-style: solid; border-width: 11px 0 11px 18px;
    border-color: transparent transparent transparent #fff;
    margin-left: 4px;
}
.about-video strong { font-size: 18px; display: block; }
.about-video span   { font-size: 14px; color: rgba(255,255,255,.85); margin-top: 4px; }

@media (max-width: 860px) {
    .about-intro  { grid-template-columns: 1fr; gap: 22px; }
    .about-cards  { grid-template-columns: repeat(2, 1fr); }
    .about-gallery{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
    .about-cards  { grid-template-columns: 1fr; }
    .about-gallery{ grid-template-columns: 1fr; }
}

/* ==========================================================
   V25I — 首页 Banner 轮播（替代旧蓝色 Hero）
   - 强调色（圆点 active / 箭头 hover）复用网站皮肤主色 var(--blue)
   - 仅用于首页；不影响导航与下方分类区
   ========================================================== */
.home-banner { position: relative; width: 100%; overflow: hidden; background: var(--blue-dark); }
.hb-track { display: flex; transition: transform .5s ease; will-change: transform; }
.hb-slide { position: relative; flex: 0 0 100%; width: 100%; }
.hb-slide img { display: block; width: 100%; height: auto; object-fit: contain; }
.hb-link { display: block; color: inherit; text-decoration: none; }
.hb-overlay {
    position: absolute; left: 0; bottom: 0; width: 100%;
    padding: 26px 30px; color: #fff;
    background: linear-gradient(to top, rgba(0,0,0,.58), rgba(0,0,0,.12) 60%, transparent);
}
.hb-overlay h2 { margin: 0 0 6px; font-size: clamp(20px, 2.6vw, 34px); color: #fff; }
.hb-overlay p  { margin: 0; font-size: clamp(13px, 1.4vw, 17px); color: rgba(255,255,255,.92); }
.hb-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; border: none; border-radius: 50%; cursor: pointer;
    background: rgba(255,255,255,.85); color: #222; font-size: 18px; line-height: 1;
    display: flex; align-items: center; justify-content: center; transition: background .2s, color .2s; z-index: 3;
}
.hb-arrow:hover { background: var(--blue); color: #fff; }
.hb-prev { left: 16px; } .hb-next { right: 16px; }
.hb-dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; gap: 9px; justify-content: center; z-index: 3; }
.hb-dot { width: 10px; height: 10px; padding: 0; border: none; border-radius: 50%; cursor: pointer; background: rgba(255,255,255,.55); transition: background .2s, width .2s; }
.hb-dot.active { background: var(--blue); width: 24px; border-radius: 6px; }
@media (max-width: 720px) { .hb-arrow { width: 36px; height: 36px; font-size: 15px; } .hb-overlay { padding: 16px 18px; } }
@media (max-width: 560px) { .hb-arrow { display: none; } }

/* V25I-2 — Banner 拖动交互（去箭头、grab 光标、防选中） */
.home-banner { cursor: grab; }
.home-banner.dragging { cursor: grabbing; }
.home-banner .hb-track { user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.home-banner .hb-slide img { -webkit-user-drag: none; user-drag: none; }
.home-banner .hb-slide.has-link { cursor: pointer; }
.home-banner.dragging .hb-slide.has-link { cursor: grabbing; }
.home-banner .hb-arrow { display: none !important; }

/* ==========================================================
   V25I-3 — About Us 媒体模块（前台）
   图片：固定尺寸 object-fit:cover，多图右→左慢滚动、hover 暂停、点击 lightbox
   视频：原比例 object-fit:contain + 黑底，多个纵向排列
   ========================================================== */
.about-media { margin-top: 42px; }
.about-media-images { margin-bottom: 28px; }
.about-img-scroller { overflow: hidden; position: relative; width: 100%; }
.about-img-track { display: flex; gap: 14px; width: max-content; animation: about-marquee linear infinite; }
.about-img-scroller:hover .about-img-track { animation-play-state: paused; }
.about-img-scroller.is-single { display: flex; justify-content: center; }
.about-img-scroller.is-single .about-img-track { animation: none; width: auto; }
.about-img-item { flex: 0 0 364px; width: 364px; height: 273px; margin: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--bg-soft); }
.about-img-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes about-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.about-media-videos { display: flex; flex-direction: column; gap: 18px; }
.about-video-item { background: transparent; }
.about-media-videos video,
.about-video-item video { display: block; max-width: 80%; width: auto; height: auto; margin: 24px auto; background: transparent; object-fit: contain; border-radius: 12px; }
@media (max-width: 720px) { .about-media-videos video, .about-video-item video { max-width: 100%; } }

/* Lightbox */
.amlb { position: fixed; inset: 0; background: rgba(0,0,0,.86); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.amlb[hidden] { display: none; }
.amlb-img { max-width: 90vw; max-height: 82vh; object-fit: contain; border-radius: 6px; }
.amlb-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.9); border: none; width: 48px; height: 48px; border-radius: 50%; font-size: 22px; cursor: pointer; }
.amlb-prev { left: 18px; } .amlb-next { right: 18px; }
.amlb-close { position: absolute; top: 16px; right: 18px; background: rgba(255,255,255,.9); border: none; width: 42px; height: 42px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; }
.amlb-dots { position: absolute; bottom: 22px; left: 0; right: 0; display: flex; gap: 9px; justify-content: center; }
.amlb-dot { width: 10px; height: 10px; border-radius: 50%; border: none; background: rgba(255,255,255,.5); cursor: pointer; padding: 0; transition: .2s; }
.amlb-dot.active { background: #fff; width: 24px; border-radius: 6px; }
@media (max-width: 560px) { .amlb-btn { width: 40px; height: 40px; font-size: 18px; } .about-img-item { flex: 0 0 277px; width: 277px; height: 208px; } }

/* About media admin manager */
.about-media-admin .amedia-upload { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.about-media-admin .amedia-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.about-media-admin .amedia-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.about-media-admin .amedia-thumb { width: 130px; height: 86px; border-radius: 8px; overflow: hidden; background: var(--bg-soft); flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.about-media-admin .amedia-thumb img { width: 100%; height: 100%; object-fit: cover; }
.about-media-admin .amedia-vtag { font-size: 11px; padding: 4px; word-break: break-all; }
.about-media-admin .amedia-fields { flex: 1 1 360px; }
.about-media-admin .amedia-fields .form-grid-2 label { display: flex; flex-direction: column; font-size: 12px; gap: 3px; }

/* ==========================================================
   V25J — 博客正文媒体排版（仅作用于 .post .prose，不影响产品详情/About）
   ========================================================== */
.post .prose img {
    display: block;
    max-width: 80%;
    width: auto;
    height: auto;
    margin: 24px auto;
    border-radius: 10px;
}
.post .prose video {
    display: block;
    max-width: 80%;
    width: auto;
    height: auto;
    margin: 24px auto;
    background: #000;
    border-radius: 10px;
}
@media (max-width: 640px) {
    .post .prose img, .post .prose video { max-width: 100%; }
}

/* ==========================================================
   V25J-5 — 全站移动端导航层级修复（全宽下拉 + 超高 z-index + body 锁 + 遮罩）
   不依赖降低单个模块 z-index；菜单提升到全站最高层。桌面端不受影响。
   ========================================================== */
.mobile-nav-backdrop { display: none; }
@media (max-width: 720px) {
    .site-header { position: sticky; top: 0; z-index: 10000; isolation: isolate; background: #fff; }
    .nav-toggle { position: relative; z-index: 10002; }
    .main-nav {
        position: fixed; top: 70px; left: 0; right: 0; bottom: auto;
        width: auto; max-width: none; margin: 0;
        z-index: 10001; background: #fff;
        border-left: none; border-top: 1px solid var(--line);
        box-shadow: 0 18px 40px rgba(0,0,0,.18);
        max-height: calc(100vh - 70px); overflow-y: auto;
        padding: 14px 20px 20px;
        transform: translateY(-14px); opacity: 0; visibility: hidden;
        transition: transform .22s ease, opacity .22s ease, visibility .22s ease;
    }
    .main-nav.open { transform: translateY(0); opacity: 1; visibility: visible; }
    .mobile-nav-backdrop {
        display: block; position: fixed; inset: 0; z-index: 9998;
        background: rgba(0,0,0,.38); opacity: 0; visibility: hidden;
        transition: opacity .22s ease, visibility .22s ease;
    }
    body.mobile-nav-open .mobile-nav-backdrop { opacity: 1; visibility: visible; }
    body.mobile-nav-open { overflow: hidden; }
}

/* V4 — footer copyright line */
.footer-copyright { display: block; opacity: .8; margin-top: 4px; font-size: 13px; }


/* ==========================================================
   V4.2 FINAL-VIDEO-LAYOUT
   - 详情页：视频作为最后一个缩略图，点击后在主图区域播放，移除独立长视频区
   - 首页推荐产品：有本地/MP4 视频时，产品卡主图位直接显示视频
   ========================================================== */
.pd-main .pd-main-img,
.pd-main .pd-main-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.pd-main .pd-main-img { padding: 10px; }
.pd-main .pd-main-video {
    background: #f7f9fb;
    padding: 0;
}
.pd-main .is-hidden { display: none !important; }
.pd-main.is-video-mode { cursor: default; }
.pd-main.is-video-mode::after { display: none !important; }

.pd-thumbs .pd-thumb-media {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    border: 1px solid var(--line);
    cursor: pointer;
    background: #fff;
    overflow: hidden;
    flex: 0 0 auto;
}
.pd-thumbs img.pd-thumb-media {
    object-fit: cover;
}
.pd-thumbs .pd-thumb-media:hover,
.pd-thumbs .pd-thumb-media.active {
    border-color: var(--accent);
}
.pd-thumb-video {
    position: relative;
    padding: 0;
    display: grid;
    place-items: center;
}
.pd-thumb-video img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pd-thumb-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    text-shadow: 0 1px 8px rgba(0,0,0,.55);
    background: rgba(0,0,0,.22);
}
.pd-thumb-video-link { text-decoration: none; }

.product-thumb.is-video-thumb { padding: 0; }
.product-thumb.is-video-thumb .product-thumb-inner {
    position: relative;
    background: #f7f9fb;
}
.product-card-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
    background: #f7f9fb;
}
.product-video-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
    .product-card:hover .product-card-video,
    .product-thumb:hover .product-card-video {
        transform: scale(1.04);
    }
}
.product-card-video {
    transition: transform .32s ease;
    transform-origin: center center;
    will-change: transform;
}



/* V4.3-5 Banner no-crop all devices: 首页横幅按 5:2 原图比例完整显示，手机端也不裁切。 */
.home-banner { background: #f7f2eb; }
.hb-slide img { width: 100%; height: auto; aspect-ratio: 5 / 2; object-fit: contain; object-position: center center; background: #f7f2eb; }
@media (max-width: 768px) {
    .hb-slide img { height: auto; min-height: 0; object-fit: contain; object-position: center center; }
    .hb-dots { bottom: 8px; }
}


/* V4.3-13 — product detail canvas video player.
   Restores the square media layout while avoiding Chrome native <video> overexposure. */
.pd-main.is-canvas-video-mode { background: #f7f9fb; }
.pd-main .pd-video-engine {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 2px !important;
    height: 2px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
.pd-main .pd-video-canvas {
    width: 100%;
    height: 100%;
    display: block;
    background: #f7f9fb;
    cursor: pointer;
}
.pd-main .pd-video-toggle {
    position: absolute;
    right: 18px;
    bottom: 18px;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 3;
}
.pd-main .pd-video-toggle:hover { background: rgba(0,0,0,.68); }
.pd-main.is-canvas-video-mode::before,
.pd-main.is-canvas-video-mode::after { display: none !important; }


/* V4.3-14 — homepage video card and detail video letterbox refinements. */
.product-thumb.is-video-thumb .product-thumb-inner {
    background: #f7f9fb;
}
.product-card-video {
    width: 100%;
    height: 100%;
    object-fit: cover !important;      /* default: fill the 1:1 card window */
    object-position: center center;
    background: #f7f9fb;
}
.product-card-video.is-hover-preview,
.product-thumb.is-video-thumb:hover .product-card-video,
.product-thumb.is-video-thumb:focus-within .product-card-video {
    object-fit: contain !important;    /* hover: real video ratio */
    background: #000 !important;       /* letterbox uses black, not gray */
    transform: none !important;
}
.product-thumb.is-video-thumb:hover .product-thumb-inner,
.product-thumb.is-video-thumb:focus-within .product-thumb-inner {
    background: #000 !important;
}
.product-thumb.is-video-thumb:hover .product-video-badge,
.product-thumb.is-video-thumb:focus-within .product-video-badge,
.product-card-video.is-hover-preview + .product-video-badge {
    display: none !important;
}
.pd-main.is-canvas-video-mode { background: #000 !important; }
.pd-main .pd-video-canvas { background: #000 !important; }
.pd-main .pd-video-toggle { background: rgba(0,0,0,.62); }


/* V4.3-15 — detail video full control bar + image lightbox */
.pd-main .pd-video-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    background: rgba(0,0,0,.92);
    color: #fff;
    z-index: 4;
    box-sizing: border-box;
}
.pd-main .pd-video-controls.is-hidden { display: none !important; }
.pd-main .pd-video-controls button {
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    padding: 4px 6px;
}
.pd-main .pd-video-toggle {
    position: static !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    background: transparent !important;
    display: inline-flex !important;
    color: #fff !important;
    z-index: auto !important;
}
.pd-main .pd-video-time {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    min-width: 94px;
}
.pd-main .pd-video-seek {
    flex: 1 1 auto;
    min-width: 80px;
    height: 6px;
    appearance: none;
    border-radius: 999px;
    outline: none;
    background: linear-gradient(to right, var(--accent) 0, var(--accent) var(--progress, 0%), rgba(255,255,255,.48) var(--progress, 0%), rgba(255,255,255,.48) 100%);
    cursor: pointer;
}
.pd-main .pd-video-seek::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 0;
}
.pd-main .pd-video-seek::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 0;
}
.pd-main .pd-video-mute,
.pd-main .pd-video-full {
    width: 32px;
    text-align: center;
}
@media (max-width: 720px) {
    .pd-main .pd-video-controls {
        gap: 8px;
        padding: 8px 10px;
    }
    .pd-main .pd-video-time {
        font-size: 12px;
        min-width: 75px;
    }
    .pd-main .pd-video-controls button {
        font-size: 18px;
        padding: 3px 4px;
    }
}

.pd-main-img { cursor: zoom-in; }
body.pd-lightbox-open { overflow: hidden; }
.pd-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.86);
    padding: 36px 78px;
}
.pd-lightbox.is-open { display: flex; }
.pd-lightbox-stage {
    margin: 0;
    max-width: min(92vw, 1280px);
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.pd-lightbox-stage img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    background: #111;
    box-shadow: 0 18px 70px rgba(0,0,0,.35);
}
.pd-lightbox-counter {
    color: rgba(255,255,255,.78);
    font-size: 14px;
}
.pd-lightbox-close,
.pd-lightbox-prev,
.pd-lightbox-next {
    position: absolute;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.94);
    color: #111827;
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow: 0 8px 30px rgba(0,0,0,.22);
}
.pd-lightbox-close {
    top: 24px;
    right: 28px;
    width: 46px;
    height: 46px;
    font-size: 30px;
}
.pd-lightbox-prev,
.pd-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    font-size: 42px;
}
.pd-lightbox-prev { left: 26px; }
.pd-lightbox-next { right: 26px; }
@media (max-width: 720px) {
    .pd-lightbox { padding: 52px 14px 28px; }
    .pd-lightbox-prev,
    .pd-lightbox-next {
        width: 42px;
        height: 42px;
        font-size: 34px;
        background: rgba(255,255,255,.88);
    }
    .pd-lightbox-prev { left: 10px; }
    .pd-lightbox-next { right: 10px; }
    .pd-lightbox-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
        font-size: 26px;
    }
}




/* V4.3-23 — compact product center pagination */
.compact-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 34px auto 26px;
}
.compact-pagination .page-btn,
.compact-pagination .page-ellipsis {
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}
.compact-pagination .page-prev,
.compact-pagination .page-next {
    min-width: 82px;
}
.compact-pagination .page-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.compact-pagination .page-btn.disabled {
    color: #9aa4b2;
    background: #f7f9fb;
    pointer-events: none;
}
.compact-pagination .page-ellipsis {
    border-color: transparent;
    background: transparent;
    min-width: 28px;
    padding: 0 4px;
}


/* V4.45 — 首页 Banner 响应式显示：桌面端 cover，手机/窄屏 contain。
   目的：桌面端保持铺满与视觉冲击；窄屏避免文字和主体被左右裁切。 */
.home-banner { background: #f7f2eb; }
.home-banner .hb-slide { aspect-ratio: 5 / 2; background: #f7f2eb; overflow: hidden; }
.home-banner .hb-slide img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center center;
    background: #f7f2eb;
}
@media (max-width: 900px) {
    .home-banner .hb-slide { height: auto; aspect-ratio: 5 / 2; }
    .home-banner .hb-slide img {
        height: 100%;
        object-fit: contain;
        object-position: center center;
    }
    .hb-dots { bottom: 8px; }
}
@media (max-width: 560px) {
    .home-banner .hb-slide { aspect-ratio: 5 / 2; }
    .home-banner .hb-slide img { object-fit: contain; }
}
