/* 产品分享海报：固定竖版比例；svh 增强，实际尺寸由 NavigationViewport 实测。 */
.nav_bar .share_btn { padding: .55rem; border: 0; margin: 0; background: transparent; color: inherit; font: inherit; line-height: 1; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.nav_bar .share_btn[hidden] { display: none !important; }
.nav_bar .share_btn:focus-visible { outline: 2px solid var(--theme-focus); outline-offset: 3px; border-radius: 50%; }
.product_share {
    --share-duration: 240ms; --share-unit: 1vh; --share-qr-padding: 1px;
    --share-poster-width: 360px; --share-poster-height: 693.333px;
    --share-safe-top: 0px; --share-safe-right: 0px; --share-safe-bottom: 0px; --share-safe-left: 0px;
    position: fixed; z-index: 205; left: 0; top: 0; width: 100%; height: 100vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; box-sizing: border-box;
    padding: 24px;
    padding: calc(24px + var(--share-safe-top)) calc(24px + var(--share-safe-right)) calc(24px + var(--share-safe-bottom)) calc(24px + var(--share-safe-left));
    color: #FFFFFF; background: #000000A6;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity var(--share-duration) ease, visibility 0s linear var(--share-duration);
    font-family: inherit; font-size: 14px; text-align: center;
}
@supports (height: 100svh) { .product_share { --share-unit: 1svh; height: 100svh; } }
.product_share[hidden] { display: none; }
.product_share.is-open { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
/* 加载页内测量 / 合成：保持排版可测，整体透明且 inert，不闪现分享页、不接管焦点。 */
.product_share.is-preloading { opacity: 0; visibility: visible; pointer-events: none; transition: none; }
.product_share.is-preloading * { pointer-events: none !important; }
.product_share.is-preloading .product_share_panel { transform: none; transition: none; }
.product_share *, .product_share *::before, .product_share *::after { box-sizing: border-box; }
.product_share [hidden] { display: none !important; }
.product_share button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.product_share p, .product_share h2, .product_share figure { margin: 0; }
.product_share_panel {
    position: relative; flex: 0 0 auto; width: var(--share-poster-width); height: var(--share-poster-height);
    max-width: 100%; max-height: 100%; min-width: 0; min-height: 0;
    border: 0; border-radius: 4px; overflow: hidden; outline: none;
    color: #FFFFFF; background: #173858; box-shadow: 0 24px 80px #00000066;
    transform: translateY(10px) scale(.985); transition: transform var(--share-duration) cubic-bezier(.22, 1, .36, 1);
}
.product_share.is-open .product_share_panel { transform: translateY(0) scale(1); }
.product_share_close {
    position: absolute; z-index: 5; top: 10px; right: 10px;
    display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0;
    border: 1px solid #FFFFFF26; border-radius: 50%; background: #061A3266; color: #FFFFFF;
    transition: background-color 180ms ease, border-color 180ms ease;
}
.product_share_close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.product_share_scroll { position: relative; width: 100%; height: 100%; overflow: hidden; overscroll-behavior: contain; }
.product_share .product_share_saved_image {
    position: absolute; top: 0; left: 0; display: block; width: 100%; height: 100%; object-fit: contain;
    background: #173858; pointer-events: auto; -webkit-touch-callout: default !important;
    -webkit-user-select: auto !important; user-select: auto !important;
    -webkit-user-drag: auto !important; touch-action: auto;
}
.product_share_save_hint {
    position: relative; flex: 0 0 auto; max-width: 100%; padding: 0 8px;
    color: #FFFFFF; font-size: 12px; line-height: 1.5; text-align: center;
    text-shadow: 0 1px 4px #00000066; overflow-wrap: break-word; pointer-events: none;
}
.product_share_poster {
    position: relative; isolation: isolate; width: 100%; height: 100%; overflow: hidden;
    pointer-events: none;
    color: #FFFFFF; background-color: #173858;
    background-image: url('../static/image/public/product_share_bg.jpg'); background-position: center; background-size: cover; background-repeat: no-repeat;
}
.product_share .product_share_logo {
    position: absolute; z-index: 2; top: 5.5%; left: 6%; right: 6%;
    color: #FFFFFF; font-size: 38px; font-size: calc(var(--share-poster-width) * .092);
    line-height: 1; text-align: center;
}
.product_share_logo:not(:empty)::before { content: none; }
.product_share_heading { position: absolute; z-index: 2; top: 16%; left: 6%; right: 6%; }
.product_share_heading h2 {
    color: #FFFFFF; font-size: 26px; font-size: calc(var(--share-poster-width) * .072);
    line-height: 1.22; font-weight: 700; letter-spacing: .025em; text-shadow: 0 1px 8px #06172D24;
}
.product_share_title_line { display: block; }
.product_share_subtitle {
    display: flex; justify-content: center; align-items: baseline; flex-wrap: wrap; gap: 0 .38em;
    margin-top: 12px !important; margin-top: calc(var(--share-poster-width) * .031) !important;
    color: #FFFFFF; font-size: 15px; font-size: calc(var(--share-poster-width) * .0395);
    line-height: 1.45; letter-spacing: .035em; font-weight: 400; overflow-wrap: break-word;
}
.product_share_subtitle [data-share="name"] { min-width: 0; }
.product_share_figure {
    position: absolute; z-index: 2; left: 9%; right: 9%; top: 24%; height: 53%;
    display: flex; align-items: flex-end; justify-content: center; overflow: visible;
}
/* 原始 PNG 保留不变；JS 只按透明边界设置显示裁切框，完整展示产品主体。 */
.product_share_product { position: relative; flex: 0 0 auto; width: 100%; height: 100%; overflow: hidden; }
.product_share_product img {
    position: absolute; display: block; left: 0; top: 0; width: 100%; height: 100%; max-width: none; max-height: none;
    object-fit: contain; -webkit-user-drag: none;
}
.product_share_figure [data-share="imageFallbackText"] {
    position: absolute; left: 0; right: 0; top: 45%; padding: 12px;
    color: #E3ECF7; font-size: 13px; line-height: 1.7; text-align: center;
}
.product_share_footer {
    position: absolute; z-index: 3; left: 6%; right: 6%; bottom: 3.5%;
    display: flex; flex-direction: column; align-items: center;
}
.product_share_qr_box {
    position: relative; display: flex; align-items: center; justify-content: center;
    width: 112px; height: 112px; width: calc(var(--share-poster-width) * .3); height: calc(var(--share-poster-width) * .3);
    min-width: 0; min-height: 0;
    padding: var(--share-qr-padding); border: 0; border-radius: 4px; overflow: hidden; background: #FFFFFF; color: #48586D;
    box-shadow: 0 1px 9px #0C203626;
}
.product_share_qr_box img { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.product_share_qr_box p { padding: 3px; font-size: 10px; line-height: 1.4; text-align: center; }
.product_share_qr_caption {
    margin-top: 7px !important; color: #FFFFFF; font-size: 13px; font-size: calc(var(--share-poster-width) * .0346);
    line-height: 1.5; letter-spacing: .045em;
}
.product_share button:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .product_share_close:hover { background: #061A32CC; border-color: #FFFFFF66; } }
@media (max-width: 996px) { .nav_bar .share_btn.is-mobile-enabled { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 2.4rem; margin-right: .35rem; } }
@media (max-width: 640px), (max-height: 540px) {
    .product_share { padding: 10px; padding: calc(10px + var(--share-safe-top)) calc(10px + var(--share-safe-right)) calc(10px + var(--share-safe-bottom)) calc(10px + var(--share-safe-left)); }
    .product_share_close { top: 8px; right: 8px; width: 30px; height: 30px; }
}
/* 手机横屏改用两列：保留足够大的二维码，避免把整张竖图缩成不可扫码的尺寸。 */
.product_share.is-landscape .product_share_logo {
    top: 4%; font-size: 24px; font-size: min(28px, calc(var(--share-poster-height) * .085));
}
.product_share.is-landscape .product_share_heading { top: 18%; left: 5%; right: 5%; }
.product_share.is-landscape .product_share_heading h2 {
    font-size: 20px; font-size: clamp(16px, calc(var(--share-poster-height) * .061), 24px);
}
.product_share.is-landscape .product_share_subtitle { margin-top: 6px !important; font-size: 13px; line-height: 1.4; }
.product_share.is-landscape .product_share_figure { left: 7%; right: 43%; }
.product_share.is-landscape .product_share_footer { left: 65%; right: 5%; top: 42%; bottom: auto; }
.product_share.is-landscape .product_share_qr_box { width: 128px; height: 128px; }
.product_share.is-landscape .product_share_qr_caption { max-width: 180px; font-size: 12px; line-height: 1.4; }
@media (prefers-reduced-motion: reduce) { .product_share, .product_share_panel { transition: none; } }
