:root {
    /* Variables */
    --tencent-bg-sidebar: #f5f7fa;
    --tencent-bg-content: transparent;
    --tencent-bg-card: #ffffff;
    --tencent-border-color: #e4e7ed; /* Kept for other elements like nav border */
    --tencent-text-primary: #1d2129;
    --tencent-text-secondary: #586069;
    --tencent-active-blue: #0052D9;
    --tencent-active-text: #ffffff;
    --tencent-hover-bg: #ebeff5;
    --tencent-link-blue: #0052D9;
    --tencent-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --tencent-border-radius: 4px;
    --tencent-wrapper-padding-bottom: 150px;
    --tencent-wrapper-padding-x: 24px;
    --tencent-transition-speed: 0.2s; /* Base transition speed */
    --tencent-right-grid-max-height: 750px;
}

body {
    font-family: var(--tencent-font-family);
    background-color: #fff;
    color: var(--tencent-text-primary);
    margin: 0; padding: 0; font-size: 14px; line-height: 1.6;
}

/* --- Main Header Section (最终版) --- */
.cloudprod-main-header {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 40px 20px 30px 20px;
}
.cloudprod-main-header h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--tencent-text-primary);
    margin: 0 0 10px 0; /* 仅保留下方边距 */
}
/* 副标题和链接的容器 */
.subtitle-line {
    display: flex;
    align-items: baseline; /* 文本基线对齐 */
    justify-content: center; /* 水平居中 */
    flex-wrap: wrap; /* 允许换行 */
    gap: 15px; /* 副标题和链接之间的间距 */
    margin-bottom: 20px; /* 该行下方的间距 */
}
.cloudprod-main-header p {
    font-size: 16px;
    color: var(--tencent-text-secondary);
    margin: 0; /* 移除默认边距，由 flex gap 控制间距 */
}
.cloudprod-view-all {
    display: inline-flex;
    align-items: center;
    color: var(--tencent-link-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color var(--tencent-transition-speed) ease;
    margin-left: 0; /* 确保没有旧的 auto 边距 */
}
.cloudprod-view-all:hover { color: #003fab; }
.cloudprod-view-all .arrow-icon { width: 16px; height: 16px; margin-left: 4px; stroke-width: 2; }


/* --- Horizontal Navigation Section --- */
.cloudprod-navigation-wrapper {
    background-color: #fff;
    padding: 10px 0;
    border-bottom: 1px solid var(--tencent-border-color);
    margin-bottom: 0;
    z-index: 10;
    transition: box-shadow var(--tencent-transition-speed) ease;
}
.cloudprod-navigation-wrapper.is-sticky {
    position: sticky;
    top: 60px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}
.cloudprod-navigation { max-width: 1200px; margin: 0 auto; padding: 0 var(--tencent-wrapper-padding-x); display: flex; flex-wrap: wrap; gap: 8px 12px; justify-content: flex-start; }
.cloudprod-nav-item { padding: 8px 16px; cursor: pointer; color: var(--tencent-text-secondary); font-size: 14px; font-weight: 500; border-radius: var(--tencent-border-radius); background-color: transparent; border: 1px solid transparent; transition: background-color var(--tencent-transition-speed) ease, color var(--tencent-transition-speed) ease, border-color var(--tencent-transition-speed) ease; display: inline-flex; align-items: center; white-space: nowrap; }
.cloudprod-nav-item:hover { background-color: var(--tencent-hover-bg); color: var(--tencent-text-primary); }
.cloudprod-nav-item.active { background-color: var(--tencent-active-blue); color: var(--tencent-active-text); font-weight: 500; }

/* --- Content Area Wrapper --- */
.cloudprod-wrapper {
    margin: 0 0 40px 0;
    padding-top: 50px; /* Adjusted for non-sticky nav */
    padding-left: var(--tencent-wrapper-padding-x);
    padding-right: var(--tencent-wrapper-padding-x);
    padding-bottom: var(--tencent-wrapper-padding-bottom);
    position: relative;
    background-color: var(--tencent-bg-sidebar);
    box-sizing: border-box;
    width: 100%;
}
.cloudprod-wrapper::before, .cloudprod-wrapper::after { content: ''; display: block; position: absolute; left: 0; right: 0; height: 1px; background-color: var(--tencent-border-color); z-index: 5; }
.cloudprod-wrapper::before { top: 0; }
.cloudprod-wrapper::after { bottom: 0; }

/* --- Content Area --- */
.cloudprod-content { background-color: transparent; min-width: 0; box-sizing: border-box; position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; }

/* --- Section Activation & Animation --- */
.cloudprod-section { display: none; opacity: 0; animation: fadeIn 0.4s ease forwards; box-sizing: border-box; }
.cloudprod-section.active { display: block; opacity: 1; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- Section Layout --- */
.section-layout-container { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.section-featured { flex: 0 0 300px; min-width: 280px; }
.section-main-grid { flex: 1 1 60%; min-width: 280px; position: relative; }
.featured-cards-layout { display: flex; flex-direction: column; gap: 16px; }

/* --- Regular Cards Grid --- */
.regular-cards-layout {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-height: var(--tencent-right-grid-max-height);
    overflow-y: auto;
    padding-right: 10px; padding-bottom: 10px;
    &::-webkit-scrollbar { width: 6px; }
    &::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; }
    &::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
    &::-webkit-scrollbar-thumb:hover { background: #aaa; }
}

/* ================================================ */
/* --- Product Card Styles (企业风格优化) --- */
/* ================================================ */
.cloudprod-card {
    background: var(--tencent-bg-card);
    padding: 24px;
    border-radius: var(--tencent-border-radius);
    border: 1px solid #ebeef5; /* Optional subtle border */
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    height: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}
.cloudprod-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
    border-color: #dcdfe6; /* Hover border color if border is used */
}

/* 为左边的featured卡片添加背景图片 */
.cloudprod-card.featured {
    border-left: 3px solid #ff9900;
    padding-left: calc(24px - 3px);
    background-color: rgba(0, 82, 217, 0.02); /* Optional subtle background */
    border-color: #ebeef5; /* Match normal border or slightly different */
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05); /* Match normal shadow or slightly different */
    background-image: url('/themes/web/www/pic/cdn-bg_01.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 为右边的regular卡片添加背景图片 */
.regular-cards-layout .cloudprod-card {
    background-image: url('/themes/web/www/pic/hoverbg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 确保卡片内容在背景图片上有良好的可读性 */
.cloudprod-card.featured,
.regular-cards-layout .cloudprod-card {
    background-color: rgba(255, 255, 255, 0.9); /* 半透明白色背景确保文字可读 */
    backdrop-filter: blur(2px); /* 轻微模糊效果 */
}

.cloudprod-card .card-icon {
     width: 22px; height: 22px; margin-right: 10px; stroke: var(--tencent-active-blue); stroke-width: 1.5; flex-shrink: 0;
}
.cloudprod-card .card-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}
.cloudprod-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--tencent-text-primary);
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cloudprod-card p {
    color: var(--tencent-text-secondary);
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.7;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(13px * 1.7 * 2);
}
.cloudprod-tags {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping if space is tight */
    gap: 10px; /* Spacing between elements */
    align-items: center;
    margin-top: auto; /* Push to bottom */
    padding-top: 12px;
    border-top: 1px solid #f0f2f5; /* Separator line */
    /* Extend separator line */
    margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; padding-bottom: 0;
    /* Default alignment */
    justify-content: flex-start;
}
.cloudprod-tag-highlight {
    background: transparent;
    color: var(--tencent-link-blue);
    border: 1px solid rgba(0, 82, 217, 0.3);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 400;
}
.cloudprod-detail-link {
    color: var(--tencent-link-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    margin-left: auto; /* <<< Crucial: Pushes this link to the right */
    transition: color var(--tencent-transition-speed) ease;
}
.cloudprod-detail-link:hover {
    color: #003fab;
}
.cloudprod-detail-link .arrow-icon {
    width: 16px;
    height: 16px;
    margin-left: 4px;
    stroke-width: 2;
    opacity: 0;
    transform: translateX(-3px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.cloudprod-card:hover .cloudprod-detail-link .arrow-icon {
    opacity: 1;
    transform: translateX(0);
}

/* --- Featured Card Specific Styles --- */
.cloudprod-card.featured {
    border-left: 3px solid #ff9900;
    padding-left: calc(24px - 3px);
    background-color: rgba(0, 82, 217, 0.02); /* Optional subtle background */
    border-color: #ebeef5; /* Match normal border or slightly different */
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05); /* Match normal shadow or slightly different */
}
.cloudprod-card.featured:hover {
     box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
     transform: translateY(-3px);
     border-color: #dcdfe6;
}
.card-icon.featured-icon {
    stroke: #ff9900;
}
.cloudprod-card.featured .cloudprod-tags {
     border-top: 1px solid #f0f2f5; /* Match normal separator */
     /* Adjust padding/margin for border */
     margin-left: -calc(24px - 3px); margin-right: -24px; padding-left: calc(24px - 3px); padding-right: 24px;
}
.cloudprod-card.featured p {
    -webkit-line-clamp: 3;
    min-height: calc(13px * 1.7 * 3);
}

/* --- Buy Now Button Styles --- */
.cloudprod-buy-now-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--tencent-active-text); /* White text */
    background-color: var(--tencent-active-blue); /* Blue background */
    border: 1px solid var(--tencent-active-blue);
    border-radius: var(--tencent-border-radius);
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--tencent-transition-speed) ease, border-color var(--tencent-transition-speed) ease, color var(--tencent-transition-speed) ease;
    /* margin-right: 10px; */ /* Gap handles spacing now */
    white-space: nowrap;
}
.cloudprod-buy-now-btn:hover {
    background-color: #003fab; /* Darker blue */
    border-color: #003fab;
    color: var(--tencent-active-text);
}

/* ================================================ */
/* --- End of Product Card Styles --- */
/* ================================================ */


/* --- Mobile "Show More" Button --- */
.show-more-button {
    display: none;
    margin: 20px auto 10px auto;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--tencent-link-blue);
    background-color: #fff;
    border: 1px solid var(--tencent-link-blue);
    border-radius: var(--tencent-border-radius);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.show-more-button:hover {
    background-color: var(--tencent-hover-bg);
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) { /* Tablet */
    .section-layout-container { flex-direction: column; gap: 30px; }
    .section-featured, .section-main-grid { flex-basis: auto; width: 100%; }
    .regular-cards-layout {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        max-height: none; overflow-y: visible;
        padding-right: 0; padding-bottom: 0;
    }
    .cloudprod-wrapper {
        padding-top: calc(50px / 1.5);
        padding-bottom: calc(var(--tencent-wrapper-padding-bottom) / 1.5);
    }
    .cloudprod-navigation { padding-left: var(--tencent-wrapper-padding-x); padding-right: var(--tencent-wrapper-padding-x); }
}
@media (max-width: 767px) { /* Mobile (最终版) */
    /* 调整标题字号 */
    .cloudprod-main-header h2 {
        font-size: 22px; /* 或根据需要调整 */
        margin-bottom: 15px; /* 调整标题下方间距 */
    }
    /* 隐藏小标题 */
    .cloudprod-main-header p {
        display: none;
    }
    /* 调整 subtitle-line 在移动端的表现 */
    .subtitle-line {
       justify-content: center; /* 确保链接单独时也居中 */
       margin-bottom: 15px; /* 调整下方间距 */
       /* gap 在只有一个子元素时通常不起作用 */
    }
    /* 可选：调整链接字号 */
    .cloudprod-view-all {
       font-size: 13px;
    }

    .cloudprod-nav-item { font-size: 13px; padding: 6px 12px; }
    .cloudprod-navigation { justify-content: center; }

    .featured-cards-layout, .regular-cards-layout { grid-template-columns: 1fr; }
    .cloudprod-card { padding: 16px; }
    .cloudprod-card h3 { font-size: 15px; }
    .cloudprod-card p { font-size: 13px; -webkit-line-clamp: 3; min-height: calc(13px * 1.7 * 3);}
    .cloudprod-card.featured {padding-left: calc(16px - 3px);}

    /* 调整移动端卡片底部标签/按钮区域的 padding/margin */
     .cloudprod-tags {
         margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px;
    }
     .cloudprod-card.featured .cloudprod-tags {
         margin-left: -calc(16px - 3px); margin-right: -16px; padding-left: calc(16px - 3px); padding-right: 16px;
         border-top: 1px solid #f0f2f5; /* Match normal card separator */
    }

    .cloudprod-wrapper {
        padding-top: calc(50px / 2);
        padding-bottom: calc(var(--tencent-wrapper-padding-bottom) / 2);
    }
    .cloudprod-navigation { padding-left: var(--tencent-wrapper-padding-x); padding-right: var(--tencent-wrapper-padding-x); }
    .regular-cards-layout {
        max-height: none; overflow-y: visible;
        padding-right: 0; padding-bottom: 0;
    }
    .show-more-button { display: block; } /* Let JS control creation/removal */
}

