/* Styling untuk Flash Sale yang ditingkatkan */
.flashsale-container {
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(255, 107, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Styling untuk card flash sale */
.swiper-slide-link {
    position: relative;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: center;
    will-change: transform, box-shadow;
    overflow: hidden;
    border-radius: 12px;
    margin: 10px;
}

/* Efek hover pada card flash sale */
.swiper-slide-link:hover {
    transform: scale(1.03) translateY(-5px) rotate(3deg);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

/* Styling untuk gantungan diskon */
.discount-tag {
    position: absolute;
    top: 0px;
    right: -15px;
    background: #ff0000;
    color: white;
    padding: 5px 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    z-index: 5;
    transform-origin: center;
    animation: pulse-discount 1.5s infinite;
    font-weight: bold;
    line-height: 1;
    transition: transform 0.3s ease;
    transform: rotate(0deg);
    clip-path: polygon(0 0, 100% 0, 85% 50%, 100% 100%, 0 100%, 15% 50%);
}

/* Efek bayangan untuk kedalaman */
.discount-tag::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    clip-path: polygon(0 0, 100% 0, 85% 50%, 100% 100%, 0 100%, 15% 50%);
}

/* Efek bayangan di bawah tag */
.discount-tag::before {
    content: '';
    position: absolute;
    top: 100%;
    right: 0;
    width: 8px;
    height: 8px;
    background: #990000;
    transform: translateY(-4px) rotate(45deg);
    z-index: -1;
    box-shadow: -5px 5px 5px rgba(0, 0, 0, 0.2);
}

.swiper-slide-link:hover .discount-tag {
    transform: translateX(-3px) scale(1.05);
}

.discount-percentage {
    font-size: 16px;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin-right: 2px;
}

.discount-label {
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Animasi jedag-jedug untuk gantungan diskon */
@keyframes pulse-discount {
    0% {
        transform: translateY(0);
    }
    10% {
        transform: translateY(-3px);
    }
    20% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-3px);
    }
    40% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(0);
    }
}

/* Media query untuk responsivitas */
@media (max-width: 768px) {
    .discount-tag {
        padding: 6px 12px;
    }
    
    .discount-percentage {
        font-size: 18px;
    }
    
    .discount-label {
        font-size: 14px;
    }
}

/* Efek active (klik) pada card flash sale */
.swiper-slide-link:active {
    transform: scale(0.95) translateY(6px) rotate(3deg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.08s ease;
    outline: 1px solid var(--warna_3);
}

/* Efek shine pada hover */
.swiper-slide-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    transition: left 0.7s ease;
    z-index: 1;
    pointer-events: none;
}

.swiper-slide-link:hover::before {
    left: 150%;
}

/* Styling untuk gambar dalam card */
.flash-sale-img {
    transition: transform 0.5s ease;
}

.swiper-slide-link:hover .flash-sale-img {
    transform: scale(1.1);
}

/* Styling untuk progress bar */
.swiper-slide-link .bar {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.swiper-slide-link:hover .progress {
    background: linear-gradient(90deg, var(--warna_3), #ff6b00);
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.5);
}

/* Efek pada teks harga */
.swiper-slide-link .rate {
    transition: all 0.3s ease;
}

.swiper-slide-link:hover .rate {
    transform: scale(1.05);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.flashsale-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMTkyMCAxMDAwIj48c3R5bGUgdHlwZT0idGV4dC9jc3MiPnBhdGh7b3BhY2l0eTouMTtjbGlwLXBhdGg6dXJsKCNjbGlwUGF0aCk7ZmlsbDp1cmwoI2xpbmVhckdyYWRpZW50KTt9PC9zdHlsZT48Y2xpcFBhdGggaWQ9ImNsaXBQYXRoIj48cmVjdCB3aWR0aD0iMTkyMCIgaGVpZ2h0PSIxMDAwIi8+PC9jbGlwUGF0aD48bGluZWFyR3JhZGllbnQgaWQ9ImxpbmVhckdyYWRpZW50IiB4MT0iMCUiIHkxPSIwJSIgeDI9IjkwJSIgeTI9IjAlIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9ImhzbCgwIDAlIDEwMCUvMSkiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9ImhzbCgwIDAlIDEwMCUvMCkiLz48L2xpbmVhckdyYWRpZW50PjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDE5MjAsMTAwMClzY2FsZSgtMSwtMSkiPjxwYXRoIGQ9Ik0xMzg0LjUgMzQzLjJMMTkyLjcgMTUzNWwtMjEzLjUtM0wxMzgzIDEyOC4ybDEuNSAyMTV6Ii8+PHBhdGggZD0iTTE5MTkuNyA0NDguM0wxMzU5IDEwMDlsLTEwMC40LTEuNEwxOTE5IDM0Ny4xbC43IDEwMS4yeiIvPjxwYXRoIGQ9Ik0xMTc2LjcgNTE0LjNMNjE2IDEwNzVsLTEwMC40LTEuNEwxMTc2IDQxMy4xbC43IDEwMS4yeiIvPjxwYXRoIGQ9Ik02NDQuNyA0NTc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A0NzIuOHoiLz48L2c+PC9zdmc+');
    background-size: cover;
    opacity: 0.1;
    z-index: 0;
}

.flashsale-title-container {
    display: flex;
    align-items: center;
    position: relative;
    gap: 8px;
}

.flashsale-icon {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.7));
    animation: pulse 2s infinite;
}

/* Media query untuk layar yang lebih kecil */
@media (max-width: 768px) {
    .flashsale-icon {
        width: 100px;
        height: 100px;
    }
    
    .flashsale-title-container {
        gap: 12px;
    }
}

/* Media query untuk layar yang sangat kecil */
@media (max-width: 480px) {
    .flashsale-icon {
        width: 120px;
        height: 120px;
    }
    
    .flashsale-title-container {
        gap: 15px;
    }
}

.flash-text {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    font-weight: 800;
    letter-spacing: 1px;
}

.flashsale-subtitle {
    position: relative;
    z-index: 1;
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Timer styling */
.fs-countdown {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 8px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.fs-countdown .time {
    background: linear-gradient(to bottom, #ff6b00, #ff3c00);
    color: white;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    min-width: 30px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.fs-countdown .separator {
    color: white;
    font-weight: bold;
    margin: 0 2px;
}

/* Animation for flash icon */
@keyframes pulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.7));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.9));
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.7));
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .flashsale-icon {
        width: 24px;
        height: 24px;
    }
    
    .flash-text {
        font-size: 16px;
    }
    
    .fs-countdown .time {
        padding: 3px 6px;
        min-width: 24px;
    }
}
