/* 授权产品列表小工具样式 */

.text-yellow {
    color: #ff4d4f;
}

/* 立即购买按钮样式 - 限定在小工具和产品中心内 */
.xl_auth_product_widget .xl-auth-buy-button,
.xl-auth-product-grid .xl-auth-buy-button {
    padding: 6px 15px;
    background: #ff4d4f;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
}

.xl_auth_product_widget .xl-auth-buy-button:hover,
.xl-auth-product-grid .xl-auth-buy-button:hover {
    background: #ff7875;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.3);
    color: white;
}

.xl_auth_product_widget .xl-auth-buy-button:active,
.xl-auth-product-grid .xl-auth-buy-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(255, 77, 79, 0.2);
}

.xl-auth-product-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.xl-auth-product-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

.xl-auth-product-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.xl-auth-product-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.xl-auth-product-link:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.xl-auth-product-thumbnail {
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 4px;
}

.xl-auth-product-thumbnail img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.xl-auth-product-link:hover .xl-auth-product-thumbnail img {
    transform: scale(1.05);
}

.xl-auth-product-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px 0;
    line-height: 1.4;
}

.xl-auth-product-price {
    font-size: 16px;
    font-weight: bold;
    color: #ff4d4f;
    margin-bottom: 5px;
}

.xl-auth-product-date {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

/* 时间显示样式 */
.icon-circle {
    display: inline-block;
    font-size: 12px;
    color: #999;
    margin-left: 6px;
}

/* 确保时间信息显示 */
.meta-left .icon-circle {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 12px;
    color: #999;
    margin-left: 6px;
}

.xl-auth-product-excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    margin-top: 5px;
}

.xl-auth-product-none {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}

.xl-auth-product-more {
    margin-top: 15px;
    text-align: center;
}

.xl-auth-product-more a {
    display: inline-block;
    padding: 6px 15px;
    background: #1890ff;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.xl-auth-product-more a:hover {
    background: #40a9ff;
    transform: translateY(-1px);
}

.item-heading-1 {
    width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 响应式样式 - 修改移动端缩略图高度为 130px */
@media (max-width: 768px) {
    .item-thumbnail-1 {
        height: 130px !important;
    }
    .item-heading-1 {
        margin-top: -7px !important;
        width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .item-price-2 {
        margin-top: -9px !important;
    }
    .meta-left-1 {
        margin-top: -10px !important;
    }
}

/* 响应式样式 */
@media (max-width: 767px) {
    .item-thumbnail-1 {
        height: 130px !important;
    }
    .item-heading-1 {
        margin-top: -7px !important;
        width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .item-price-2 {
        margin-top: -9px !important;
    }
    .meta-left-1 {
        margin-top: -10px !important;
    }
}

@media (max-width: 640px) {
    .item-thumbnail-1 {
        height: 130px !important;
    }
    .item-heading-1 {
        margin-top: -7px !important;
        width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .item-price-2 {
        margin-top: -9px !important;
    }
    .meta-left-1 {
        margin-top: -10px !important;
    }
}

/* ===== 全宽幻灯片卡片样式（去除白色框架） ===== */
.xl-auth-product-grid-fullwidth .posts-item.card {
    background: #fff;
    padding: 0 !important;
    border-radius: 0 !important;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

/* 缩略图容器贴合边缘 */
.xl-auth-product-grid-fullwidth .posts-item.card .item-thumbnail-1 {
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    margin-bottom: 0 !important;
}

/* 图片完全铺满，无圆角 */
.xl-auth-product-grid-fullwidth .posts-item.card .item-thumbnail-1 img {
    border-radius: 0 !important;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 内容区域内边距 — 已调整顶部内边距 */
.xl-auth-product-grid-fullwidth .posts-item.card .item-body {
    padding: 12px 14px;
    padding-top: 8px !important;   /* 新增顶部内边距，增加幻灯片上方空白 */
}

/* 响应式：移动端内边距调整 */
@media (max-width: 768px) {
    .xl-auth-product-grid-fullwidth .posts-item.card .item-body {
        padding: 8px 12px;
        padding-top: 6px !important; /* 移动端顶部内边距略小 */
    }
}

/* ===== 统一按钮样式，防止主题样式影响 ===== */
.xl-auth-product-grid-fullwidth .posts-item.card .xl-auth-buy-button {
    display: inline-block !important;
    width: auto !important;
    min-width: 90px;
    text-align: center;
    box-sizing: border-box;
    line-height: 1.5;
    background: #ff4d4f;
    border: none;
    transition: all 0.3s ease;
}

.xl-auth-product-grid-fullwidth .posts-item.card .xl-auth-buy-button:hover {
    background: #ff7875;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.3);
}

.xl-auth-product-grid-fullwidth .posts-item.card .xl-auth-buy-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(255, 77, 79, 0.2);
}

/* 价格区域适配小屏幕，避免换行 */
@media (max-width: 640px) {
    .item-price-2 {
        gap: 8px !important;
    }
    .meta-right-1 {
        font-size: 16px !important;
    }
    .xl-auth-buy-button {
        font-size: 12px !important;
        padding: 4px 12px !important;
        min-width: 70px;
    }
}

/* ===== 小工具中立即购买按钮与产品页登录购买按钮样式完全一致 ===== */
/* 将原来全局的 .login-buy-btn 限定在小工具和产品中心区域 */
.xl_auth_product_widget .login-buy-btn,
.xl-auth-product-grid .login-buy-btn {
    padding: 0.2em 0.5em !important;
    border-radius: 4px !important;
    font-size: 1em !important;
    line-height: 1.4 !important;
    background: #ff4d4f !important;
    color: white !important;
    display: inline-block !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

.xl_auth_product_widget .login-buy-btn:hover,
.xl-auth-product-grid .login-buy-btn:hover {
    background: #ff7875 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.3);
    color: white !important;
}

/* ===== 减小价格/按钮区与作者信息之间的空隙 ===== */
.xl-auth-product-grid-fullwidth .posts-item.card .item-body .item-meta {
    margin-top: 0 !important;
}

/* 移动端价格字体适当缩小 */
@media (max-width: 768px) {
    .xl-auth-product-grid-fullwidth .meta-right-1 {
        font-size: 18px !important;
    }
}

/* ===== 幻灯片与标题间距调整 ===== */
/* 桌面端：标题上边距改为 -4px，缩小与幻灯片的间距 */
.xl-auth-product-grid-fullwidth .posts-item.card .item-body .item-heading-1 {
    margin-top: -4px !important;   /* 从 8px 改为 -4px，标题上移 */
    margin-bottom: 12px !important;
}

/* 移动端：标题上边距改为 -6px，缩小与幻灯片的间距 */
@media (max-width: 768px) {
    .xl-auth-product-grid-fullwidth .posts-item.card .item-body .item-heading-1 {
        margin-top: -6px !important; /* 从 0 改为 -6px，标题上移 */
        margin-bottom: 10px !important;
    }
}

/* 确保缩略图容器底部无额外间距 */
.xl-auth-product-grid-fullwidth .posts-item.card .item-thumbnail-1 {
    margin-bottom: 0 !important;
}

/* 移动端缩略图高度提升至 120px */
@media (max-width: 768px) {
    .xl-auth-product-grid-fullwidth .posts-item.card .item-thumbnail-1 {
        height: 120px !important;
    }
}

/* ===== 价格与按钮微调 ===== */
/* 价格数字右移，增加与¥符号的间距（¥符号位置不变） */
.text-yellow .price-number {
    margin-left: 10px;   /* 可根据需要调整数值，增加数字与¥符号的距离 */
}

/* 按钮图标右移，紧挨“立”字 */
.login-buy-btn i {
    margin-right: -2px;  /* 负值使图标向右移动，紧挨文字 */
    display: inline-block;
}

/* 按钮整体向右移动（与价格区域拉开距离） */
.xl-auth-product-grid-fullwidth .posts-item.card .login-buy-btn,
.xl-auth-product-grid-fullwidth .posts-item.card .xl-auth-buy-button {
    margin-left: 6px !important;
    margin-right: 0 !important;
}

/* 作者信息向左移动 */
.xl-auth-product-grid-fullwidth .posts-item.card .meta-left {
    margin-left: -5px !important;
}

/* ===== 产品左右外边距调整：通过负外边距减少两侧留白 ===== */
.xl-auth-product-grid-fullwidth {
    margin-left: -10px !important;   /* 向左扩展 10px */
    margin-right: -10px !important;  /* 向右扩展 10px */
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* 移动端负外边距适当减小，避免内容溢出 */
@media (max-width: 768px) {
    .xl-auth-product-grid-fullwidth {
        margin-left: -6px !important;
        margin-right: -6px !important;
    }
}

/* ===== 让授权产品小工具标题区域与产品列表左右对齐（使用专属类，提高优先级） ===== */
.xl_auth_product_widget .xl-auth-widget-header {
    margin-left: -10px !important;
    margin-right: -10px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

@media (max-width: 768px) {
    .xl_auth_product_widget .xl-auth-widget-header {
        margin-left: -6px !important;
        margin-right: -6px !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
    }
}

/* ===== 标题两行省略，固定布局高度，字体调小 ===== */
.xl-auth-product-grid-fullwidth .posts-item.card .item-body .item-heading-1 {
    width: auto !important;
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    word-break: break-word !important;
    line-height: 1.4 !important;
    font-size: 14px !important;
    font-weight: bold !important;
    min-height: 2.8em !important;
    /* 注意：上面已单独设置 margin-top，此处不再重复设置 */
}

/* ===== 减少标题区域与产品列表之间的留白 ===== */
.xl_auth_product_widget .xl-auth-widget-header {
    margin-bottom: -10px !important;  /* 负值向上拉近产品列表 */
}
.xl-auth-product-grid-fullwidth {
    margin-top: -13px !important;     /* 进一步减少空隙 */
}

/* ===== 产品卡片圆角与底部内边距优化 ===== */
/* 1. 卡片四角圆角 2px，并确保内容裁剪 */
.xl-auth-product-grid-fullwidth .posts-item.card {
    border-radius: 2px !important;
    overflow: hidden; /* 保证圆角裁剪生效 */
}

/* 2. 缩小产品信息区域底部内边距，减少留白 */
.xl-auth-product-grid-fullwidth .posts-item.card .item-body {
    padding-bottom: 6px !important; /* 原 12px，减少 6px */
}

/* 移动端适配：进一步缩小底部内边距 */
@media (max-width: 768px) {
    .xl-auth-product-grid-fullwidth .posts-item.card .item-body {
        padding-bottom: 4px !important; /* 原 8px，减少 4px */
    }
}

/* ===== 新增：统一价格容器样式（替代原内联样式） ===== */
.xl-auth-price-value {
    font-size: 22px;
    color: #ff4d4f;
    font-weight: bold;
    flex-shrink: 0;
}

/* ¥ 符号样式：可自由调整 font-size 控制大小，默认 0.7 倍于父级 */
.price-currency {
    font-size: 0.6em;
    margin-right: 6px;  /* 符号与数字间距，可按需调整 */
}

/* 移除之前为增加间距而设置的 margin-left，避免重复间距（如有需要可保留其他设置） */
.text-yellow .price-number {
    margin-left: 0;  /* 原为 8px，现由 .price-currency 的 margin-right 控制 */
}

/* ===== 统一按钮内边距（缩小） ===== */
/* 注意：此处将全局的 .xl-auth-buy-button 和 .login-buy-btn 限定到小工具和产品中心，避免影响产品详情页 */
.xl_auth_product_widget .xl-auth-buy-button,
.xl-auth-product-grid .xl-auth-buy-button,
.xl_auth_product_widget .login-buy-btn,
.xl-auth-product-grid .login-buy-btn {
    padding: 6px 10px !important;  /* 统一缩小内边距 */
    font-size: 14px !important;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
    line-height: 1.5;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 保留 hover 效果 */
.xl_auth_product_widget .xl-auth-buy-button:hover,
.xl-auth-product-grid .xl-auth-buy-button:hover,
.xl_auth_product_widget .login-buy-btn:hover,
.xl-auth-product-grid .login-buy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.3);
}

/* 移动端价格字体缩小适配 */
@media (max-width: 768px) {
    .xl-auth-price-value {
        font-size: 22px !important;
    }
}

/* 移动端按钮微调（确保内边距一致） */
@media (max-width: 640px) {
    .xl_auth_product_widget .xl-auth-buy-button,
    .xl-auth-product-grid .xl-auth-buy-button,
    .xl_auth_product_widget .login-buy-btn,
    .xl-auth-product-grid .login-buy-btn {
        font-size: 12px !important;
        padding: 4px 10px !important;
        min-width: 70px;
    }
}

/* 统一控制价格与按钮的间距 */
.xl-auth-product-grid-fullwidth .item-price-2 {
    gap: 4px !important;
}