/* =========================================================
   Tootoo Image Marquee — 前端样式
   水平无限滚动跑马灯，支持 PC/移动端拖拽
   ========================================================= */

.tim-marquee {
    width: 100%;
    overflow: hidden;
    position: relative;
    /* 触摸设备开启硬件加速 */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* 滚动轨道 */
.tim-track {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 24px;
    will-change: transform;
    /* 拖拽时禁止文字/图片选中 */
    user-select: none;
    -webkit-user-select: none;
    cursor: grab;
}

.tim-track.is-dragging {
    cursor: grabbing;
}

/* ---- 单个条目 ---- */
.tim-card {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    /* 触摸时禁止长按弹出菜单 */
    -webkit-touch-callout: none;
}

a.tim-card:hover {
    text-decoration: none;
    color: inherit;
}

/* 拖拽时显示 grabbing 光标 */

/* ---- 图片区域 ---- */
.tim-card-img {
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tim-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    /* 禁止图片拖拽 */
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

/* ---- 标题 ---- */
.tim-card-title {
    margin-top: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================================
   移动端适配
   ========================================================= */

/* 平板（≤ 1024px） */
@media (max-width: 1024px) {
    .tim-card {
        width: 220px;
    }
    .tim-card-img {
        height: 180px;
    }
    .tim-card-title {
        font-size: 14px;
    }
}

/* 手机（≤ 767px） */
@media (max-width: 767px) {
    .tim-track {
        gap: 12px;
    }
    .tim-card {
        width: 160px;
    }
    .tim-card-img {
        height: 130px;
    }
    .tim-card-title {
        font-size: 13px;
        margin-top: 8px;
    }
}

/* 小屏手机（≤ 480px） */
@media (max-width: 480px) {
    .tim-card {
        width: 130px;
    }
    .tim-card-img {
        height: 110px;
    }
}

/* ---- CSS 关键帧（CSS animation 模式备用，当前由 JS RAF 驱动） ---- */
@keyframes tim-scroll-left {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@keyframes tim-scroll-right {
    0%   { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}
