/* Product Cards Slider Styles */
.product-slider-section {
    padding: 80px 0;
    overflow: visible;
}

.product-slider-container {
    position: relative;
    width: 100%;
    min-height: 600px;
    border-radius: 20px;
    overflow: visible;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    cursor: default;
    transition: height 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-slider-container.scroll-active {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(70, 183, 159, 0.3);
}

.product-slider-container.scroll-active::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    /*background: linear-gradient(90deg, #46b79f, #007bff);*/
    border-radius: 2px;
    z-index: 1000;
}

/* Touch feedback styles */
.product-slider-container.touching {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

.product-slider-container.touch-up::after {
    content: '↑ Swipe up to view more.';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(70, 183, 159, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1001;
    pointer-events: none;
}

.product-slider-container.touch-down::after {
    content: '↓ Swipe down to view more.';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 107, 107, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1001;
    pointer-events: none;
}

/* Mobile-specific enhancements */
@media (max-width: 768px) {
    .product-slider-container.scroll-active::before {
        width: 80px;
        height: 6px;
        top: -15px;
    }

    .product-slider-container.touching {
        transform: scale(1.01);
    }

    .product-slider-container.touch-up::after,
    .product-slider-container.touch-down::after {
        font-size: 14px;
        padding: 10px 20px;
        top: 30px;
    }
}

/* Scroll zones removed - no longer needed */

/* Global scroll hint */
.global-scroll-hint {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(70, 183, 159, 0.3);
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.hint-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hint-icon {
    font-size: 16px;
    animation: bounce 1s infinite;
}

.hint-text {
    font-weight: 500;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-1px);
    }
}

.product-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 600px;
    display: flex;
    align-items: center;
    padding: 60px;
    border-radius: 20px;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateY(100%);
    opacity: 0;
    z-index: 1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.product-card.visible {
    opacity: 1;
}

/* Card positioning - each new card covers bottom 4/5 of previous card */
.product-card.card-1 {
    transform: translateY(0); /* Base position */
    z-index: 1;
}

.product-card.card-2 {
    transform: translateY(120px); /* Positioned to cover bottom 4/5 of card 1, leaving top 1/5 visible */
    z-index: 2;
}

.product-card.card-3 {
    transform: translateY(240px); /* Positioned to cover bottom 4/5 of card 2, leaving top 1/5 of both visible */
    z-index: 3;
}

.product-card.card-4 {
    transform: translateY(360px); /* Positioned to cover bottom 4/5 of card 3, leaving top 1/5 of all visible */
    z-index: 4;
}

.product-card.card-5 {
    transform: translateY(480px); /* Positioned to cover bottom 4/5 of card 4, leaving top 1/5 of all visible */
    z-index: 5;
}

/* Ensure all visible cards maintain their stacking order */
.product-card.visible {
    opacity: 1;
}

/* Top card styling */
.product-card.top-card {
    /* Additional styling for top card if needed */
}

.product-card-number {
    position: absolute;
    top: 40px;
    left: 60px;
    z-index: 10;
}

.card-number {
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    opacity: 0.8;
}

.product-card-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
}

.product-text {
    flex: 1;
    max-width: 50%;
    padding-right: 40px;
}

.product-title {
    color: #ffffff;
    font-size: 48px;
    font-weight: 300;
    line-height: 1.1;
    margin: 0 0 40px 0;
    /*background: linear-gradient(180deg, rgb(255, 255, 255) 0%, rgb(70, 183, 159) 100%);*/
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-arrow {
    margin-top: 30px;
}

.product-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    background: transparent;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 24px;
}

.product-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.product-btn span {
    transform: translateX(2px);
}

.product-image {
    flex: 1;
    max-width: 50%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-width: 80%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    /*filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));*/
}

/* Scroll wheel animation */
.scroll-zone::before {
    content: "🖱️";
    display: block;
    font-size: 16px;
    margin-bottom: 5px;
    animation: scrollHint 2s infinite;
}

@keyframes scrollHint {
    0%, 20%, 50%, 80%, 100% {
        transform: scale(1);
    }
    40% {
        transform: scale(1.2);
    }
    60% {
        transform: scale(1.1);
    }
}

/* Dynamic container height classes - downward stacking */
.product-slider-container.cards-1 {
    height: 600px; /* Single card */
}

.product-slider-container.cards-2 {
    height: 720px; /* 600 + 120 (second card extends down) */
}

.product-slider-container.cards-3 {
    height: 840px; /* 600 + 240 (third card extends further down) */
}

.product-slider-container.cards-4 {
    height: 960px; /* 600 + 360 (fourth card extends further down) */
}

.product-slider-container.cards-5 {
    height: 1080px; /* 600 + 480 (fifth card extends furthest down) */
}

/* Card number visibility for stacked cards */
.product-card.stacked-1 .product-card-number,
.product-card.stacked-2 .product-card-number,
.product-card.stacked-3 .product-card-number,
.product-card.stacked-4 .product-card-number {
    opacity: 1;
    z-index: 10;
}

/* Visible portion styling for stacked cards */
.product-card.stacked-1,
.product-card.stacked-2,
.product-card.stacked-3,
.product-card.stacked-4 {
    overflow: hidden;
}

/* Stacked cards maintain full content but positioned to show 1/5 */
.product-card.stacked-1,
.product-card.stacked-2,
.product-card.stacked-3,
.product-card.stacked-4,
.product-card.stacked-5 {
    overflow: visible;
}

/* Add subtle shadow to create depth */
.product-card.stacked-1::after,
.product-card.stacked-2::after,
.product-card.stacked-3::after,
.product-card.stacked-4::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.1) 100%);
    pointer-events: none;
    z-index: 1;
    border-radius: 20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .product-card {
        padding: 40px;
        height: 500px;
    }

    .product-title {
        font-size: 36px;
    }

    .product-card-content {
        flex-direction: column;
        text-align: center;
    }

    .product-text {
        max-width: 100%;
        padding-right: 0;
        margin-bottom: 30px;
    }

    .product-image {
        max-width: 100%;
    }

    .drag-indicator {
        font-size: 12px;
    }

    /* Adjust container heights for tablet */
    .product-slider-container.cards-1 {
        height: 500px;
    }

    .product-slider-container.cards-2 {
        height: 600px; /* 500 + 100 */
    }

    .product-slider-container.cards-3 {
        height: 700px; /* 500 + 200 */
    }

    .product-slider-container.cards-4 {
        height: 800px; /* 500 + 300 */
    }

    .product-slider-container.cards-5 {
        height: 900px; /* 500 + 400 */
    }

    /* Adjust stacking for tablet - downward stacking */
    .product-card.card-1 {
        transform: translateY(0);
    }

    .product-card.card-2 {
        transform: translateY(100px); /* Cover bottom 4/5, leave top 100px visible */
    }

    .product-card.card-3 {
        transform: translateY(200px); /* Stack further down */
    }

    .product-card.card-4 {
        transform: translateY(300px); /* Stack further down */
    }

    .product-card.card-5 {
        transform: translateY(400px); /* Stack furthest down */
    }
}

@media (max-width: 768px) {
    .product-card {
        padding: 20px;
        height: 400px;
        /* 保持原有的 position: absolute, top, left, width 等叠加相关属性 */
    }

    .product-card-number {
        position: absolute;
        top: 15px;
        left: 15px;
        z-index: 10;
        margin: 0;
    }

    .product-card-content {
        display: flex;
        flex-direction: row;
        align-items: center;
        width: 100%;
        height: calc(100% - 40px);
        gap: 15px;
        margin-top: 40px; /* 为编号留出空间 */
        position: relative;
    }

    .product-text {
        flex: 0 0 45%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 0;
        margin: 0;
        text-align: left;
        min-height: calc(100% - 40px); /* 减去顶部编号空间 */
    }

    .product-title {
        font-size: 20px;
        margin-bottom: 25px;
        margin-top: 10px;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .product-arrow {
        margin-top: auto;
        padding-top: 20px;
    }

    .product-btn {
        width: 50px;
        height: 50px;
        font-size: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid;
        border-radius: 50%;
        background: transparent;
        text-decoration: none;
        transition: all 0.3s ease;
    }

    .product-image {
        flex: 0 0 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        max-width: none;
        padding: 10px;
    }

    .product-image img {
        max-width: 100%;
        max-height: 85%;
        object-fit: contain;
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    }

    /* Adjust container heights for mobile */
    .product-slider-container.cards-1 {
        height: 400px;
    }

    .product-slider-container.cards-2 {
        height: 480px; /* 400 + 80 */
    }

    .product-slider-container.cards-3 {
        height: 560px; /* 400 + 160 */
    }

    .product-slider-container.cards-4 {
        height: 640px; /* 400 + 240 */
    }

    .product-slider-container.cards-5 {
        height: 720px; /* 400 + 320 */
    }

    /* Adjust stacking for mobile - downward stacking */
    .product-card.card-1 {
        transform: translateY(0);
    }

    .product-card.card-2 {
        transform: translateY(80px); /* Cover bottom 4/5, leave top 80px visible */
    }

    .product-card.card-3 {
        transform: translateY(160px); /* Stack further down */
    }

    .product-card.card-4 {
        transform: translateY(240px); /* Stack further down */
    }

    .product-card.card-5 {
        transform: translateY(320px); /* Stack furthest down */
    }
}

@media (max-width: 480px) {
    .product-card {
        height: 350px;
        padding: 15px;
        /* 保持原有的 position: absolute, top, left, width 等叠加相关属性 */
    }

    .product-card-number {
        position: absolute;
        top: 12px;
        left: 12px;
        z-index: 10;
        margin: 0;
    }

    .card-number {
        font-size: 14px;
    }

    .product-card-content {
        display: flex;
        flex-direction: row;
        align-items: center;
        width: 100%;
        height: calc(100% - 35px);
        gap: 12px;
        margin-top: 35px; /* 为编号留出空间 */
        position: relative;
    }

    .product-text {
        flex: 0 0 40%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 0;
        margin: 0;
        text-align: left;
        min-height: calc(100% - 35px); /* 减去顶部编号空间 */
    }

    .product-title {
        font-size: 15px;
        margin-bottom: 20px;
        margin-top: 8px;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .product-arrow {
        margin-top: auto;
        padding-top: 15px;
    }

    .product-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid;
        border-radius: 50%;
        background: transparent;
        text-decoration: none;
        transition: all 0.3s ease;
    }

    .product-image {
        flex: 0 0 55%;
        display: flex;
        align-items: center;
        justify-content: center;
        max-width: none;
        padding: 8px;
    }

    .product-image img {
        max-width: 100%;
        max-height: 80%;
        object-fit: contain;
        filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.1));
    }

    /* Adjust container heights for small screens */
    .product-slider-container.cards-1 {
        height: 350px;
    }

    .product-slider-container.cards-2 {
        height: 420px; /* 350 + 70 */
    }

    .product-slider-container.cards-3 {
        height: 490px; /* 350 + 140 */
    }

    .product-slider-container.cards-4 {
        height: 560px; /* 350 + 210 */
    }

    .product-slider-container.cards-5 {
        height: 630px; /* 350 + 280 */
    }

    /* Adjust stacking for small screens - downward stacking */
    .product-card.card-1 {
        transform: translateY(0);
    }

    .product-card.card-2 {
        transform: translateY(70px); /* Cover bottom 4/5, leave top 70px visible */
    }

    .product-card.card-3 {
        transform: translateY(140px); /* Stack further down */
    }

    .product-card.card-4 {
        transform: translateY(210px); /* Stack further down */
    }

    .product-card.card-5 {
        transform: translateY(280px); /* Stack furthest down */
    }
}

/* Smooth transitions for better UX */
.product-slider-container:hover .product-card {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Enhanced visual feedback */
.product-slider-container:hover .mouse-indicator {
    opacity: 0.5;
}
