/**
 * 首页科技风样式
 * body 需 class：home-page home-theme-tech
 */

body.home-page {
    min-height: 100vh;
}

body.home-page .home-catalog {
    position: relative;
    z-index: 1;
}

body.home-page .home-catalog-title {
    text-align: center;
    margin: 0 0 8px;
    font-size: clamp(1.15rem, 2.5vw, 1.45rem);
    font-weight: 700;
}

body.home-page .home-catalog-lead {
    text-align: center;
    margin: 0 auto 28px;
    max-width: 560px;
    font-size: 0.92rem;
}

body.home-theme-tech {
    --ht-cyan: #22d3ee;
    --ht-cyan-d: #0891b2;
    --ht-bg0: #070b12;
    --ht-bg1: #0c1220;
    --ht-card: rgba(16, 24, 40, 0.92);
    --ht-line: rgba(34, 211, 238, 0.18);
    --ht-text: #e8edf5;
    --ht-muted: #8b9cb3;
    background: radial-gradient(1200px 600px at 80% -10%, rgba(34, 211, 238, 0.12), transparent 55%),
        radial-gradient(900px 500px at 10% 30%, rgba(99, 102, 241, 0.1), transparent 50%),
        linear-gradient(180deg, var(--ht-bg0) 0%, var(--ht-bg1) 45%, #0a101c 100%) !important;
    color: var(--ht-text) !important;
    font-family: "Outfit", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* 白底支付弹窗勿继承 body 浅色字，否则标题「微信扫码支付」发灰难辨 */
body.home-theme-tech .modal-overlay .modal {
    color: #1e293b;
}

body.home-theme-tech .modal-overlay .modal h3 {
    color: #0f172a;
    font-weight: 700;
}

body.home-theme-tech .modal-overlay .modal .pay-hint {
    color: #64748b;
}

body.home-theme-tech .modal-overlay .modal .muted {
    color: #64748b !important;
}

body.home-theme-tech .modal-overlay .modal .modal-close {
    color: #475569;
}

body.home-theme-tech .modal-overlay .modal .modal-close:hover {
    color: var(--wx);
}

body.home-theme-tech .home-hero-tech {
    position: relative;
    padding: 36px 16px 48px;
    overflow: hidden;
}

body.home-theme-tech .home-hero-tech__grid {
    pointer-events: none;
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(34, 211, 238, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.06) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, black 20%, transparent 75%);
    opacity: 0.9;
}

body.home-theme-tech .home-hero-tech__inner {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}

body.home-theme-tech .home-eyebrow {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.28em;
    color: var(--ht-cyan);
    margin: 0 0 16px;
    text-transform: uppercase;
}

body.home-theme-tech .home-hero-tech h1 {
    margin: 0 0 16px;
    font-size: clamp(1.85rem, 5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

body.home-theme-tech .home-hero-tech h1 span {
    background: linear-gradient(90deg, #fff, var(--ht-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

body.home-theme-tech .home-lead {
    margin: 0 0 22px;
    max-width: 560px;
    color: var(--ht-muted);
    font-size: 1.02rem;
    line-height: 1.65;
}

body.home-theme-tech .home-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

body.home-theme-tech .home-pills span {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.78rem;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--ht-line);
    background: rgba(15, 23, 42, 0.6);
    color: var(--ht-cyan);
}

body.home-theme-tech .home-bento {
    max-width: 1100px;
    margin: 0 auto 8px;
    padding: 0 16px 40px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

@media (max-width: 860px) {
    body.home-theme-tech .home-bento {
        grid-template-columns: 1fr;
    }
}

body.home-theme-tech .home-bento-card {
    padding: 18px 18px 20px;
    border-radius: 14px;
    background: var(--ht-card);
    border: 1px solid var(--ht-line);
    transition: transform 0.3s ease, border-color 0.3s;
}

body.home-theme-tech .home-bento-card:hover {
    transform: translateY(-3px);
    border-color: rgba(34, 211, 238, 0.45);
}

body.home-theme-tech .home-bento-card .ico {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

body.home-theme-tech .home-bento-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: #fff;
}

body.home-theme-tech .home-bento-card p {
    margin: 0;
    font-size: 0.86rem;
    color: var(--ht-muted);
    line-height: 1.55;
}

body.home-theme-tech .home-marquee-wrap {
    border-block: 1px solid var(--ht-line);
    background: rgba(8, 12, 20, 0.5);
    overflow: hidden;
    margin-bottom: 8px;
}

body.home-theme-tech .home-marquee {
    display: flex;
    gap: 48px;
    padding: 12px 0;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.78rem;
    color: var(--ht-muted);
    white-space: nowrap;
    animation: homeMarquee 28s linear infinite;
}

@keyframes homeMarquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

body.home-theme-tech .home-catalog-title,
body.home-theme-tech .home-catalog-lead {
    color: var(--ht-muted);
}

body.home-theme-tech .home-catalog-title {
    color: #fff;
}

body.home-theme-tech .product-card {
    background: var(--ht-card) !important;
    border: 1px solid var(--ht-line) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35) !important;
}

body.home-theme-tech .product-card:hover {
    box-shadow: 0 24px 60px rgba(34, 211, 238, 0.12) !important;
}

body.home-theme-tech .card-desc,
body.home-theme-tech .cover-placeholder {
    color: var(--ht-muted) !important;
}

body.home-theme-tech .cover-wrap {
    background: linear-gradient(145deg, #0f172a, #1e293b) !important;
}

body.home-theme-tech .btn-buy {
    background: linear-gradient(135deg, var(--ht-cyan-d), var(--ht-cyan)) !important;
    box-shadow: 0 8px 28px rgba(34, 211, 238, 0.35) !important;
}

body.home-theme-tech .site-footer {
    color: var(--ht-muted) !important;
    border-top: 1px solid var(--ht-line);
    margin-top: 24px;
}

body.home-theme-tech .admin-link {
    color: var(--ht-muted) !important;
}

body.home-theme-tech .admin-link:hover {
    color: var(--ht-cyan) !important;
}

body.home-theme-tech .empty-tip {
    color: var(--ht-muted) !important;
}

/* —— 资料详情页 —— */
body.detail-page .header-inner {
    max-width: 1320px;
}

body.detail-page .wrap.detail-main {
    padding: 24px 16px 56px;
    max-width: 1320px;
    margin: 0 auto;
}

body.home-theme-tech .detail-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 24px;
    font-size: 0.88rem;
    color: var(--ht-muted);
}

body.home-theme-tech .detail-breadcrumb a {
    color: var(--ht-cyan);
    text-decoration: none;
}

body.home-theme-tech .detail-breadcrumb a:hover {
    text-decoration: underline;
}

body.home-theme-tech .detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
    gap: 28px;
    align-items: start;
    margin-bottom: 40px;
    padding: 24px;
    border-radius: 16px;
    background: var(--ht-card);
    border: 1px solid var(--ht-line);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

@media (max-width: 760px) {
    body.home-theme-tech .detail-hero {
        grid-template-columns: 1fr;
    }
}

body.home-theme-tech .detail-hero-cover {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(145deg, #0f172a, #1e293b);
}

body.home-theme-tech .detail-hero-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.home-theme-tech .detail-cover-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 3rem;
    color: var(--ht-muted);
}

body.home-theme-tech .detail-eyebrow {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    color: var(--ht-cyan);
    margin: 0 0 10px;
}

body.home-theme-tech .detail-title {
    margin: 0 0 12px;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
}

body.home-theme-tech .detail-lead {
    margin: 0 0 12px;
    color: var(--ht-muted);
    line-height: 1.65;
}

body.home-theme-tech .detail-files-hint {
    margin: 0 0 20px;
    font-size: 0.88rem;
    color: var(--ht-muted);
}

body.home-theme-tech .detail-buy-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

body.home-theme-tech .detail-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
}

body.home-theme-tech .detail-price small {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ht-muted);
}

body.home-theme-tech .detail-section {
    margin-bottom: 36px;
}

body.home-theme-tech .detail-section-title {
    margin: 0 0 16px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

body.home-theme-tech .detail-video-wrap {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--ht-line);
    background: #000;
}

body.home-theme-tech .detail-video-player {
    display: block;
    width: 100%;
    max-height: 70vh;
    background: #000;
}

body.home-theme-tech .detail-video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

body.home-theme-tech .detail-video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

body.home-theme-tech .detail-video-link a {
    color: var(--ht-cyan);
}

body.home-theme-tech .detail-gallery-hint {
    margin: -8px 0 18px;
    font-size: 0.88rem;
    color: var(--ht-muted);
}

body.home-theme-tech .detail-gallery {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 4px 14px;
    margin: 0 -4px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: rgba(34, 211, 238, 0.35) transparent;
}

body.home-theme-tech .detail-gallery::-webkit-scrollbar {
    height: 8px;
}

body.home-theme-tech .detail-gallery::-webkit-scrollbar-thumb {
    background: rgba(34, 211, 238, 0.35);
    border-radius: 999px;
}

body.home-theme-tech .detail-gallery::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 999px;
}

body.home-theme-tech button.detail-gallery-item {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: zoom-in;
    text-align: left;
}

body.home-theme-tech .detail-gallery .detail-gallery-item {
    display: block;
    flex: 0 0 260px;
    width: 260px;
    min-width: 260px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--ht-line);
    background: var(--ht-card);
    transition: border-color 0.25s ease, transform 0.25s ease;
    scroll-snap-align: start;
}

body.home-theme-tech .detail-gallery--landscape-4-3 .detail-gallery-item {
    aspect-ratio: 4 / 3;
}

body.home-theme-tech .detail-gallery--landscape-16-9 .detail-gallery-item {
    flex: 0 0 300px;
    width: 300px;
    min-width: 300px;
    aspect-ratio: 16 / 9;
}

body.home-theme-tech .detail-gallery--landscape-21-9 .detail-gallery-item {
    flex: 0 0 380px;
    width: 380px;
    min-width: 380px;
    aspect-ratio: 21 / 9;
}

body.home-theme-tech .detail-gallery--square .detail-gallery-item {
    flex: 0 0 200px;
    width: 200px;
    min-width: 200px;
    aspect-ratio: 1 / 1;
}

body.home-theme-tech .detail-gallery--portrait-3-4 .detail-gallery-item {
    flex: 0 0 200px;
    width: 200px;
    min-width: 200px;
    aspect-ratio: 3 / 4;
}

body.home-theme-tech .detail-gallery--portrait-9-16 .detail-gallery-item {
    flex: 0 0 150px;
    width: 150px;
    min-width: 150px;
    aspect-ratio: 9 / 16;
}

body.home-theme-tech .detail-gallery-item:hover {
    border-color: rgba(34, 211, 238, 0.45);
    transform: translateY(-2px);
}

body.home-theme-tech .detail-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* 详情图灯箱：严格限制在视口内，底部计数器始终可见 */
body.home-theme-tech .detail-lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    box-sizing: border-box;
    height: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    padding: 48px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    padding-top: max(48px, env(safe-area-inset-top, 0px));
    background: rgba(4, 8, 16, 0.92);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow: hidden;
}

body.home-theme-tech .detail-lightbox[hidden] {
    display: none !important;
}

body.home-theme-tech .detail-lightbox-stage {
    flex: 1 1 0;
    min-height: 0;
    width: 100%;
    max-width: min(100%, 1200px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

body.home-theme-tech .detail-lightbox-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

body.home-theme-tech .detail-lightbox-close {
    position: absolute;
    top: max(8px, env(safe-area-inset-top, 0px));
    right: max(8px, env(safe-area-inset-right, 0px));
    z-index: 5;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(34, 211, 238, 0.35);
    background: rgba(15, 23, 42, 0.85);
    color: #e8edf5;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}

body.home-theme-tech .detail-lightbox-close:hover {
    background: rgba(34, 211, 238, 0.15);
    border-color: var(--ht-cyan);
}

body.home-theme-tech .detail-lightbox-prev,
body.home-theme-tech .detail-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid rgba(34, 211, 238, 0.35);
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 4px;
    transition: background 0.2s, border-color 0.2s;
}

body.home-theme-tech .detail-lightbox-prev:hover,
body.home-theme-tech .detail-lightbox-next:hover {
    background: rgba(34, 211, 238, 0.2);
    border-color: var(--ht-cyan);
}

body.home-theme-tech .detail-lightbox-prev {
    left: max(6px, env(safe-area-inset-left, 0px));
}

body.home-theme-tech .detail-lightbox-next {
    right: max(6px, env(safe-area-inset-right, 0px));
}

@media (max-width: 640px) {
    body.home-theme-tech .detail-lightbox {
        padding: 44px 10px calc(10px + env(safe-area-inset-bottom, 0px));
        padding-top: max(44px, env(safe-area-inset-top, 0px));
    }

    body.home-theme-tech .detail-lightbox-prev {
        left: max(4px, env(safe-area-inset-left, 0px));
    }

    body.home-theme-tech .detail-lightbox-next {
        right: max(4px, env(safe-area-inset-right, 0px));
    }

    body.home-theme-tech .detail-lightbox-prev,
    body.home-theme-tech .detail-lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.65rem;
    }
}

body.home-theme-tech .detail-lightbox-counter {
    flex-shrink: 0;
    margin: 0;
    padding-top: 8px;
    text-align: center;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.85rem;
    color: var(--ht-muted);
    letter-spacing: 0.06em;
}

body.home-theme-tech .detail-prose {
    padding: 22px 24px;
    border-radius: 14px;
    background: var(--ht-card);
    border: 1px solid var(--ht-line);
    color: var(--ht-text);
    line-height: 1.75;
    font-size: 0.96rem;
}

body.home-theme-tech .detail-prose p {
    margin: 0 0 1em;
}

body.home-theme-tech .detail-prose p:last-child {
    margin-bottom: 0;
}

body.home-theme-tech .detail-empty {
    text-align: center;
    padding: 64px 20px;
}

body.home-theme-tech .detail-empty h1 {
    margin: 0 0 12px;
    color: #fff;
}

body.home-theme-tech.detail-page .modal-overlay {
    align-items: flex-start;
    justify-content: center;
    padding-top: max(64px, calc(env(safe-area-inset-top, 0px) + 36px));
    padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

body.home-theme-tech.detail-page .modal-overlay .modal {
    margin-top: 0;
    transform: translateY(8px) scale(0.98);
}

body.home-theme-tech.detail-page .modal-overlay.show .modal {
    transform: translateY(0) scale(1);
}

body.home-theme-tech .card-title-link:hover {
    color: var(--ht-cyan);
}

body.home-theme-tech .cover-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

body.home-theme-tech .card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

body.home-theme-tech .btn-ghost {
    border: 1px solid var(--ht-line);
    color: var(--ht-muted);
    background: transparent;
}

body.home-theme-tech .btn-ghost:hover {
    color: var(--ht-cyan);
    border-color: rgba(34, 211, 238, 0.45);
    background: rgba(34, 211, 238, 0.08);
}
