/**
 * 产品中心深色覆写 —— 必须压过 products.css 末尾的 !important 白底规则
 * 视觉对齐首页 home-product-card：整卡深色玻璃，无上下半截色差
 */

body.site-dark .products-section {
    background: transparent !important;
    padding-top: 100px;
}

body.site-dark .products-bg {
    background: var(--sd-bg);
}

body.site-dark .products-bg img {
    opacity: 0.18;
    filter: saturate(0.75) brightness(0.45);
}

body.site-dark .products-section:hover .products-bg img {
    opacity: 0.22;
}

/* ---------- 页头 ---------- */
body.site-dark .products-title h2 {
    color: var(--sd-text) !important;
    text-shadow: none;
    letter-spacing: -0.03em;
}

body.site-dark .products-title h2::after {
    background: linear-gradient(90deg, var(--sd-accent), transparent);
    width: 48px;
    height: 2px;
}

body.site-dark .products-title .products-subtitle {
    color: rgba(255, 255, 255, 0.05) !important;
}

/* ---------- 标签：胶囊轨道 ---------- */
body.site-dark .products-tabs {
    gap: 8px;
    padding: 6px;
    margin-bottom: 36px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    width: fit-content;
    max-width: 100%;
}

body.site-dark .tab-item {
    position: relative;
    padding: 10px 16px;
    background: transparent !important;
    color: rgba(186, 205, 230, 0.78) !important;
    border: 1px solid transparent !important;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    box-shadow: none !important;
    transition:
        color 0.25s var(--sd-ease),
        background 0.25s var(--sd-ease),
        border-color 0.25s var(--sd-ease),
        transform 0.25s var(--sd-ease);
}

body.site-dark .tab-item::after {
    display: none !important; /* 去掉旧下划线，改用胶囊填充 */
}

body.site-dark .tab-item:hover {
    background: rgba(91, 156, 255, 0.1) !important;
    color: #f2f7ff !important;
    transform: none;
}

body.site-dark .tab-item.active {
    background: rgba(91, 156, 255, 0.18) !important;
    color: #f2f7ff !important;
    border-color: rgba(120, 170, 255, 0.35) !important;
    box-shadow: 0 0 0 1px rgba(91, 156, 255, 0.12) inset !important;
}

/* ---------- 整卡深色玻璃（压过 !important 白底） ---------- */
body.site-dark .product-card {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    box-shadow: none !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden !important; /* 覆盖 products.css 的 overflow:visible */
    transition:
        transform 0.35s var(--sd-ease),
        border-color 0.35s var(--sd-ease),
        background 0.35s var(--sd-ease),
        box-shadow 0.35s var(--sd-ease);
}

body.site-dark .product-card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(120, 170, 255, 0.38) !important;
    box-shadow:
        0 20px 48px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(91, 156, 255, 0.1) inset !important;
}

body.site-dark .product-image {
    background: rgba(0, 0, 0, 0.35) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    height: 200px;
}

body.site-dark .product-image img {
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.35));
    transition: transform 0.4s var(--sd-ease);
}

body.site-dark .product-card:hover .product-image img {
    transform: scale(1.04);
}

/* 关键：这是截图里白底的根因 —— 必须 !important */
body.site-dark .product-content {
    background: transparent !important;
    background-color: transparent !important;
    padding: 22px 22px 24px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0;
    border-top: none;
}

body.site-dark .product-title {
    color: #f2f7ff !important;
    font-weight: 600 !important;
    font-size: 17px !important;
    letter-spacing: -0.01em;
    margin-bottom: 10px !important;
    padding-bottom: 0 !important;
}

body.site-dark .product-details,
body.site-dark .product-details p {
    color: rgba(190, 205, 230, 0.72) !important;
    font-size: 13.5px !important;
    line-height: 1.65 !important;
}

body.site-dark .product-details p {
    margin-bottom: 6px !important;
}

body.site-dark .product-details p:last-child {
    margin-bottom: 0 !important;
}

/* CTA：描边幽灵钮 + 悬停填充，去掉厚重投影 */
body.site-dark .product-more-btn {
    align-self: flex-start;
    margin-top: 16px !important;
    padding: 9px 18px !important;
    background: transparent !important;
    color: #c8daf5 !important;
    border: 1px solid rgba(120, 170, 255, 0.4) !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition:
        background 0.25s var(--sd-ease),
        border-color 0.25s var(--sd-ease),
        color 0.25s var(--sd-ease),
        transform 0.25s var(--sd-ease);
}

body.site-dark .product-more-btn:hover {
    background: rgba(91, 156, 255, 0.2) !important;
    border-color: rgba(155, 196, 255, 0.7) !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(59, 120, 230, 0.22) !important;
}

body.site-dark .back-to-top {
    background: rgba(12, 20, 36, 0.85);
    border: 1px solid rgba(120, 170, 255, 0.28);
    color: var(--sd-text);
}

body.site-dark .back-to-top:hover {
    background: rgba(91, 156, 255, 0.35);
}

@media (max-width: 768px) {
    body.site-dark .products-tabs {
        width: 100%;
        border-radius: 12px;
    }

    body.site-dark .product-card {
        border-radius: 14px !important;
    }
}
