/* 
=================================================================
PRODUCTS SLIDESHOW STYLES (SWIPER 2026)
Author: Antigravity AI
=================================================================
*/

/* =====================
   NEBULA BACKGROUND
   ===================== */
.products-swiper::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    transform: translate(-50%, -50%);
    background: 
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(210, 4, 45, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 70% 60%, rgba(210, 4, 45, 0.1) 0%, transparent 40%),
        radial-gradient(ellipse 50% 30% at 50% 80%, rgba(0, 255, 255, 0.05) 0%, transparent 30%),
        radial-gradient(ellipse 70% 50% at 30% 70%, rgba(210, 4, 45, 0.08) 0%, transparent 45%),
        radial-gradient(ellipse 40% 60% at 80% 30%, rgba(0, 255, 255, 0.04) 0%, transparent 35%);
    filter: blur(30px);
    animation: nebula-drift 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

.products-swiper::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 250%;
    height: 250%;
    transform: translate(-50%, -50%);
    background: 
        radial-gradient(ellipse 60% 40% at 60% 20%, rgba(210, 4, 45, 0.12) 0%, transparent 45%),
        radial-gradient(ellipse 50% 50% at 30% 50%, rgba(210, 4, 45, 0.08) 0%, transparent 40%),
        radial-gradient(ellipse 70% 30% at 80% 70%, rgba(0, 255, 255, 0.06) 0%, transparent 35%);
    filter: blur(40px);
    animation: nebula-drift-slow 25s ease-in-out infinite reverse;
    pointer-events: none;
    z-index: 0;
}

@keyframes nebula-drift {
    0%, 100% { transform: translate(-50%, -50%) translate(0, 0) scale(1); }
    25% { transform: translate(-50%, -50%) translate(5%, -3%) scale(1.05); }
    50% { transform: translate(-50%, -50%) translate(-3%, 5%) scale(1.02); }
    75% { transform: translate(-50%, -50%) translate(-5%, -2%) scale(1.08); }
}

@keyframes nebula-drift-slow {
    0%, 100% { transform: translate(-50%, -50%) translate(0, 0); }
    33% { transform: translate(-50%, -50%) translate(4%, 4%); }
    66% { transform: translate(-50%, -50%) translate(-3%, 2%); }
}

.products-swiper {
    width: 100%;
    max-width: 100%;
    padding-top: 50px;
    padding-bottom: 80px;
    padding-left: 20px;
    padding-right: 20px;
    perspective: 1000px;
    box-sizing: border-box;
    overflow: hidden;
    contain: layout style;
    position: relative;
}

.products-swiper .swiper-slide {
    background-position: center;
    background-size: cover;
    width: 380px;
    height: 520px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-frame-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 380px;
    height: 520px;
}

.phone-frame {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    overflow: hidden;
    position: relative;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(210, 4, 45, 0.15),
        inset 0 0 30px rgba(210, 4, 45, 0.03);
    transition: all 0.8s ease;
}

.swiper-slide-active .phone-frame {
    border-color: rgba(210, 4, 45, 0.4);
    box-shadow: 
        0 0 40px rgba(210, 4, 45, 0.5),
        0 0 80px rgba(210, 4, 45, 0.3),
        0 0 120px rgba(210, 4, 45, 0.15),
        inset 0 0 40px rgba(210, 4, 45, 0.08);
    animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { 
        box-shadow: 
            0 0 40px rgba(210, 4, 45, 0.5),
            0 0 80px rgba(210, 4, 45, 0.3),
            0 0 120px rgba(210, 4, 45, 0.15),
            inset 0 0 40px rgba(210, 4, 45, 0.08);
    }
    50% { 
        box-shadow: 
            0 0 50px rgba(210, 4, 45, 0.6),
            0 0 100px rgba(210, 4, 45, 0.35),
            0 0 150px rgba(210, 4, 45, 0.2),
            inset 0 0 50px rgba(210, 4, 45, 0.1);
    }
}

.product-slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    min-height: 100px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: all 0.4s ease;
    pointer-events: none;
    z-index: 100;
}

.btn-shop {
    color: #fff !important;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 12px 24px;
    background: rgba(210, 4, 45, 0.9);
    border: 2px solid rgba(210, 4, 45, 0.8);
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    pointer-events: auto;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    white-space: nowrap;
}

.swiper-slide-active .btn-shop {
    background: var(--cherry-red);
    box-shadow: 0 0 20px rgba(210, 4, 45, 0.5), 0 4px 15px rgba(0,0,0,0.3);
}

/* =====================
   PROGRESS BAR
   ===================== */
.autoplay-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 50;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.autoplay-progress.is-active {
    opacity: 1;
}

.autoplay-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(210, 4, 45, 0.8), var(--cherry-red));
    border-radius: 0 2px 2px 0;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(210, 4, 45, 0.5);
}

/* Custom Swiper Navigation */
.products-swiper .swiper-button-next,
.products-swiper .swiper-button-prev {
    color: var(--cherry-red) !important;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 9999 !important;
    pointer-events: auto !important;
    position: fixed;
}

.products-swiper .swiper-button-next:after,
.products-swiper .swiper-button-prev:after {
    font-size: 20px;
    font-weight: bold;
}

.products-swiper .swiper-button-next {
    right: 5%;
}

.products-swiper .swiper-button-prev {
    left: 5%;
}

.products-swiper .swiper-button-next:hover,
.products-swiper .swiper-button-prev:hover {
    transform: scale(1.2);
    background: rgba(210, 4, 45, 0.8);
    text-shadow: 0 0 10px #fff;
}

.products-swiper .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.5;
}

.products-swiper .swiper-pagination-bullet-active {
    background: var(--cherry-red);
    opacity: 1;
    box-shadow: 0 0 10px var(--cherry-red);
}

/* 2026 Modern Gloss Effect */
.phone-frame::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        115deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        transparent 100%
    );
    transform: translateX(-100%);
    transition: transform 0.8s ease;
}

.swiper-slide-active .phone-frame:hover::before {
    transform: translateX(100%);
}

/* 2026 FUTURISTIC DISTORTION EFFECT
   Advanced liquid/wave animation for phone background layers */

.phone-frame-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 380px;
    height: 520px;
}

.phone-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.distortion-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-origin: center center;
    animation: distortion-breathe 6s ease-in-out infinite;
}

.distortion-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.1) saturate(1.2);
    animation: 
        distortion-wave 4s ease-in-out infinite,
        chromatic-shift 3s ease-in-out infinite alternate;
}

.distortion-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(210, 4, 45, 0.1) 0%,
        transparent 25%,
        rgba(0, 255, 255, 0.05) 50%,
        transparent 75%,
        rgba(210, 4, 45, 0.1) 100%
    );
    animation: overlay-pulse 5s ease-in-out infinite;
    pointer-events: none;
}

/* Product image sits above the distortion layer */
.phone-frame .product-image {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 20px;
    transition: transform 0.8s ease, opacity 0.8s ease;
    opacity: 1;
    animation: image-float 6s ease-in-out infinite;
}

@keyframes image-float {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.02) translateY(-3px); }
}

.swiper-slide-active .phone-frame .product-image {
    animation: image-float-active 6s ease-in-out infinite;
}

@keyframes image-float-active {
    0%, 100% { transform: scale(1.03) translateY(-2px); }
    50% { transform: scale(1.05) translateY(-5px); }
}

/* Lifestyle images fill more of the frame */
.phone-frame .product-image.lifestyle {
    object-fit: cover;
    padding: 0;
}

/* Subtle zoom on active slide */
.swiper-slide-active .phone-frame .product-image {
    animation: subtle-float 8s ease-in-out infinite;
}

/* Keyframe Animations */

@keyframes distortion-breathe {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.05) rotate(0.5deg); }
}

@keyframes distortion-wave {
    0% { 
        filter: contrast(1.1) saturate(1.2) blur(0px);
        transform: scale(1) translate(0, 0);
    }
    25% { 
        filter: contrast(1.15) saturate(1.3) blur(0.5px);
        transform: scale(1.02) translate(-1%, 1%);
    }
    50% { 
        filter: contrast(1.1) saturate(1.2) blur(0px);
        transform: scale(1.03) translate(1%, -1%);
    }
    75% { 
        filter: contrast(1.15) saturate(1.3) blur(0.5px);
        transform: scale(1.02) translate(1%, 1%);
    }
    100% { 
        filter: contrast(1.1) saturate(1.2) blur(0px);
        transform: scale(1) translate(0, 0);
    }
}

@keyframes chromatic-shift {
    0% { 
        filter: contrast(1.1) saturate(1.2) hue-rotate(0deg);
    }
    100% { 
        filter: contrast(1.1) saturate(1.2) hue-rotate(5deg);
    }
}

@keyframes overlay-pulse {
    0%, 100% { 
        opacity: 0.3;
        background-position: 0% 0%;
    }
    50% { 
        opacity: 0.6;
        background-position: 100% 100%;
    }
}

@keyframes subtle-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-5px) scale(1.02); }
}

/* Enhanced glow effect on active slide */
.swiper-slide-active .phone-frame {
    box-shadow: 
        0 0 40px rgba(210, 4, 45, 0.4),
        0 0 80px rgba(210, 4, 45, 0.2),
        inset 0 0 30px rgba(210, 4, 45, 0.1);
}

/* Holographic shimmer effect on hover */
.swiper-slide-active .phone-frame:hover .distortion-overlay {
    background: linear-gradient(
        135deg,
        rgba(210, 4, 45, 0.2) 0%,
        rgba(0, 255, 255, 0.1) 25%,
        rgba(210, 4, 45, 0.2) 50%,
        rgba(0, 255, 255, 0.1) 75%,
        rgba(210, 4, 45, 0.2) 100%
    );
    background-size: 200% 200%;
    animation: holographic-shimmer 2s linear infinite;
}

@keyframes holographic-shimmer {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 200%; }
}

/* ================================================================
   MOBILE RESPONSIVENESS - Products Slideshow
   ================================================================ */

/* Extra Small Devices (320px - 480px) */
@media (max-width: 480px) {
    .products-swiper {
        padding-top: 30px;
        padding-bottom: 50px;
        padding-left: 10px;
        padding-right: 10px;
        perspective: none;
        will-change: scroll-position;
    }

    .products-swiper .swiper-slide {
        width: 85vw;
        max-width: 280px;
        height: auto;
        aspect-ratio: 9 / 16;
        will-change: transform;
    }

    .phone-frame-link {
        width: 100%;
        height: 100%;
    }

    .phone-frame {
        width: 100%;
        height: 100%;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5) !important;
        transform: translateZ(0);
    }

    .phone-frame::before {
        display: none;
    }

    .products-swiper::before,
    .products-swiper::after {
        display: none;
    }

    .distortion-wrapper,
    .distortion-bg,
    .distortion-overlay,
    .phone-frame .product-image,
    .swiper-slide-active .phone-frame .product-image,
    .swiper-slide-active .phone-frame {
        animation: none !important;
        filter: none !important;
        box-shadow: none !important;
        transform: none !important;
        will-change: auto;
    }

    .distortion-bg {
        display: none !important;
    }

    .product-slide-overlay {
        padding: 30px 15px;
        min-height: 80px;
    }

    .btn-shop {
        font-size: 0.8rem;
        padding: 10px 20px;
        letter-spacing: 1px;
    }

    .products-swiper .swiper-button-next,
    .products-swiper .swiper-button-prev {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .products-swiper .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
    }

    .products-swiper .swiper-pagination-bullet-active {
        width: 24px;
        border-radius: 4px;
    }
}

/* Small Devices (480px - 768px) */
@media (max-width: 768px) {
    .products-swiper {
        padding-top: 40px;
        padding-bottom: 65px;
        padding-left: 15px;
        padding-right: 15px;
        will-change: scroll-position;
    }

    .products-swiper .swiper-slide {
        width: 80vw;
        max-width: 320px;
        height: auto;
        aspect-ratio: 9 / 16;
        will-change: transform;
    }

    .phone-frame-link {
        width: 100%;
        height: 100%;
    }

    .phone-frame {
        width: 100%;
        height: 100%;
        border: 6px solid #111;
        border-radius: 35px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
        transform: translateZ(0);
    }

    .distortion-wrapper,
    .distortion-bg,
    .distortion-overlay,
    .phone-frame .product-image,
    .swiper-slide-active .phone-frame .product-image {
        animation: none !important;
        filter: none !important;
        transform: none !important;
        will-change: auto;
    }

    .distortion-bg {
        display: none !important;
    }

    .products-swiper::before,
    .products-swiper::after {
        display: none;
    }

    .product-slide-overlay {
        padding: 35px 18px;
        min-height: 90px;
    }

    .btn-shop {
        font-size: 0.85rem;
        padding: 11px 22px;
    }

    .products-swiper .swiper-button-next,
    .products-swiper .swiper-button-prev {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .products-swiper .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
    }

    .products-swiper .swiper-pagination-bullet-active {
        width: 28px;
        border-radius: 5px;
    }
}

/* Medium Devices (768px - 1024px) */
@media (max-width: 1024px) {
    .products-swiper {
        padding-top: 45px;
        padding-bottom: 75px;
    }

    .products-swiper .swiper-slide {
        width: 350px;
        height: 500px;
    }

    .phone-frame-link {
        width: 350px;
        height: 500px;
    }
}
