:root {
    --card-width: 200px;
    --card-height: 150px;
    --gap: 25px;
    --item-count: 8; /* 默认项目数量 */
    --animation-duration: 40s;
}


/* 背景图片层 */
.background-layer-display {

    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.background-image-display  {
    width: 100%;
    height: 100%;
    object-fit: cover;

    filter: brightness(0.8) contrast(1.2);
}

/* 背景装饰元素 */
.bg-decoration-display  {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    z-index: -1;
}

.decoration-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.3) 0%, transparent 70%);
}

.decoration-2 {
    width: 400px;
    height: 400px;
    bottom: -150px;
    left: -150px;
    background: radial-gradient(circle, rgba(231, 76, 60, 0.2) 0%, transparent 70%);
}

.decoration-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 10%;
    background: radial-gradient(circle, rgba(46, 204, 113, 0.2) 0%, transparent 70%);
}

.container-display  {
    width: 100%;
    max-width: 1200px;
    margin-top: -500px;
    margin-left: 20%;
    text-align: center;
    position: relative;
    z-index: 1;
}


.subtitle-display  {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    font-size: 1.2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.3);
}

.marquee-container-display  {
    position: absolute;
    margin-left: 0.5%;
    margin-bottom: 2%;
    padding: 15px;
    overflow: hidden;
    left: 0;
    bottom: 0;
    display: flex;
    width: 99%;
    height: 300px;
    z-index: 2;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.marquee-track-display  {
    display: flex;
    width: max-content;
}

/* 当项目数量足够多时的正常滚动 */
.marquee-container-display .many-items-display{
    animation: scroll-normal-display 40s linear infinite;
}

/* 当项目数量较少时的短距离滚动 */
.marquee-container-display .few-items-display{
    animation: scroll-short-display calc(30s / 2) linear infinite;
}

/* 当只有1-2个项目时的交替动画 */
.marquee-container-display .very-few-items-display{
    animation: scroll-alternate-display 5s ease-in-out infinite;
}

.marquee-container-display :hover .marquee-track-display  {
    animation-play-state: paused;
}

.product-card-display {
    flex: 0 0 auto;
    width: 300px;
    height: 270px;
    margin: 0 var(--gap);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    overflow: hidden;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.product-card-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71, #e74c3c);
    border-radius: 16px 16px 0 0;
}

.product-card-display:hover {
    transform: translateY(-12px) scale(1.05);
    box-shadow: 0 15px 25px rgba(0,0,0,0.25);
    background: white;
}

.product-image-display  {
    width: 2640px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 12px;
    transition: all 0.4s ease;
    filter: grayscale(0.3);
}

.product-card-display:hover .product-image-display  {
    transform: scale(1.15);
    filter: grayscale(0);
}

.product-info-display {
    padding-top: 12px;
    text-align: center;
}

.product-name-display {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    letter-spacing: 0.5px;
}

.controls-display  {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 15px;
}

.control-btn-display  {
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 1rem;
}

.control-btn-display :hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.control-btn-display :active {
    transform: translateY(0);
}

.item-count-controls-display  {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.count-btn-display  {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.count-btn-display :hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.status-info-display  {
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: inline-block;
    backdrop-filter: blur(5px);
}

/* 正常滚动动画 - 用于多个项目 */
@keyframes scroll-normal-display {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-1 * (300px + 2 * var(--gap)) * var(--item-count)));
    }
}

/* 短距离滚动动画 - 用于较少项目 */
@keyframes scroll-short-display {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-1 * (300px + 2 * var(--gap)) * 2));
    }
}

/* 交替动画 - 用于非常少的项目 */
@keyframes scroll-alternate-display {
    0%, 20% {
        transform: translateX(0);
    }
    40%, 60% {

        transform: translateX(calc(-1 * (200px + 50px) * 8));
    }
    80%, 100% {
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    :root {
        --card-width: 160px;
        --card-height: 130px;
        --gap: 15px;
    }

    .product-image-display  {
        width: 60px;
        height: 60px;
    }
    .decoration-1, .decoration-2, .decoration-3 {
        display: none;
    }
}