/* Collect Item 收藏项组件样式 */
.collect-item .rank_item,
.rank_item-collect {
    width: var(--card-width) !important;
    flex-shrink: 0 !important;
    z-index: 1;
    --real-card-width: var(--card-width);
    --real-card-height: var(--card-height);
    --light-theme-background-color: var(--sl-color-neutral-0);
    --dark-theme-background-color: var(--sl-color-neutral-50);
    --common-background-color: var(--light-theme-background-color);
}

/* 收藏项产品链接样式 */
.collect-item .product,
.rank_item-collect .product {
    --card-padding: 0;
    position: relative;
    aspect-ratio: var(--aspect-ratio, 16 / 9);
    display: block;
    width: 100%;
    padding-bottom: calc(100% / var(--aspect-ratio, 16 / 9));
    overflow: hidden;
    border-radius: var(--sl-border-radius-large, 8px);
    text-decoration: none;
    color: inherit;
}

/* 收藏项标题和描述样式 */
.collect-item .product .title,
.rank_item-collect .product .title {
    font-size: var(--sl-font-size-x-large, 1.5rem);
    font-family: var(--header-font, sans-serif);
    color: var(--sl-default-white, #fff);
    transition: all var(--sl-transition-fast, 0.15s) ease;
    transform: translateY(30px);
    margin: 0;
    font-weight: var(--sl-font-weight-semibold, 600);
    line-height: 1.4;
}

.collect-item .product .desc,
.rank_item-collect .product .desc {
    font-size: 14px;
    color: var(--sl-default-white, #fff);
    transition: all var(--sl-transition-fast, 0.15s) ease-out;
    opacity: 0;
    transform: scaleY(0);
    transform-origin: center bottom;
    margin-top: var(--sl-spacing-small, 0.75rem);
    height: 36px;
    line-height: 18px;
}

/* 收藏项背景图片样式 */
.collect-item .module-bg,
.rank_item-collect .module-bg {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    inset: -5px;
    position: absolute;
    border-radius: var(--sl-border-radius-large, 8px);
    transition: all var(--sl-transition-fast, 0.15s) ease;
    transform-origin: center center;
    z-index: 0;
}

/* 收藏项 hover 效果 */
.collect-item .product:hover .title,
.collect-item .product:focus .title,
.rank_item-collect .product:hover .title,
.rank_item-collect .product:focus .title {
    transform: translateY(0px);
}

.collect-item .product:hover .desc,
.collect-item .product:focus .desc,
.rank_item-collect .product:hover .desc,
.rank_item-collect .product:focus .desc {
    opacity: 1;
    transform: scaleY(1);
}

/* 收藏项模糊遮罩样式 */
.collect-item .blur,
.rank_item-collect .blur {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        transparent 100%
    );
    border-radius: var(--sl-border-radius-large, 8px);
    z-index: 1;
    pointer-events: none;
}

/* 收藏项内容容器样式 */
.collect-item .contain,
.rank_item-collect .contain {
    position: absolute;
    left: var(--sl-spacing-medium, 1rem);
    right: var(--sl-spacing-medium, 1rem);
    bottom: var(--sl-spacing-medium, 1rem);
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: var(--sl-spacing-2x-small, 0.25rem);
    pointer-events: none;
}

/* 确保收藏项有正确的高度 */
.rank_item-collect .product {
    position: relative;
    width: 100%;
    padding-bottom: calc(100% / var(--aspect-ratio, 16 / 9));
    overflow: hidden;
    border-radius: var(--sl-border-radius-large, 8px);
}

/* 修复 aspect-ratio 兼容性 */
@supports not (aspect-ratio: 16 / 9) {
    .rank_item-collect .product {
        height: calc(var(--card-width, 100%) * 9 / 16);
    }
}

