/* MSW Product Coverflow */

.msw-cf {
    --msw-cf-w: 560px;
    --msw-cf-h: 560px;
    --msw-cf-ease: cubic-bezier(.2,.85,.2,1);
    position: relative;
    width: 100%;
    max-width: var(--msw-cf-w);
    height: var(--msw-cf-h);
    margin: 0 auto;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
}

/* Stage */
.msw-cf__stage {
    position: relative;
    width: 100%;
    height: 100%;
    perspective: 1200px;
    perspective-origin: 50% 45%;
}

.msw-cf__stack {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    cursor: grab;
}
.msw-cf__stack:active { cursor: grabbing; }

/* Card item */
.msw-cf-item {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    will-change: transform, opacity;
    pointer-events: none;
    text-decoration: none;
}
.msw-cf-item.is-active { pointer-events: auto; }

/* Image */
.msw-cf-item img {
    width: min(86%, 420px);
    height: auto;
    transform: translateZ(62px);
    filter:
        drop-shadow(0 30px 30px rgba(0,0,0,.38))
        drop-shadow(0 10px 14px rgba(0,0,0,.24));
}

/* CTA button */
.msw-cf-cta {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%) translateZ(70px);
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(35, 22, 18, .74);
    color: rgba(255,255,255,.92);
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 10px 22px rgba(0,0,0,.22);
    font: 600 12px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    letter-spacing: .2px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    white-space: nowrap;
    opacity: 0;
    transition: opacity .25s var(--msw-cf-ease), transform .35s var(--msw-cf-ease);
    pointer-events: none;
    text-decoration: none;
}
.msw-cf-item.is-active .msw-cf-cta {
    opacity: 1;
    transform: translateX(-50%) translateZ(70px) translateY(0);
    pointer-events: auto;
}
.msw-cf-cta i {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(160, 210, 120, .95);
    box-shadow: 0 0 0 5px rgba(160, 210, 120, .16);
    flex: 0 0 auto;
}

/* Navigation arrows */
.msw-cf__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(20,20,20,.26);
    color: rgba(255,255,255,.92);
    cursor: pointer;
    display: grid;
    place-items: center;
    font: 700 20px/1 system-ui, sans-serif;
    transition: transform .2s var(--msw-cf-ease), background .2s var(--msw-cf-ease);
    z-index: 20;
}
.msw-cf__nav:hover { transform: translateY(-50%) scale(1.03); background: rgba(20,20,20,.36); }
.msw-cf__nav:active { transform: translateY(-50%) scale(.98); }
.msw-cf__nav--prev { left: 8px; }
.msw-cf__nav--next { right: 8px; }

/* ── MOBILE ── */
@media (max-width: 767px) {
    .msw-cf {
        --msw-cf-w: 100%;
        --msw-cf-h: min(420px, 58vh);
    }
    .msw-cf__stage {
        perspective: none;
    }
    .msw-cf__stack {
        transform-style: flat;
    }
    .msw-cf-item {
        transform-style: flat;
    }
    .msw-cf-item img {
        width: min(75%, 300px);
        transform: none;
        filter: drop-shadow(0 16px 20px rgba(0,0,0,.30));
    }
    .msw-cf-cta { display: none; }
    .msw-cf__nav {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .msw-cf * { transition: none !important; animation: none !important; }
}
