
/* VIRAL PHOTO STUDIO - PREMIUM INTERACTIVE UI V4 */

/* PREMIUM STYLE CARDS */

.vps-trending-card,
.look,
.v2-category,
.season-card {
    border-radius: 18px;
    box-shadow: 0 5px 0 #e4e0d8,
                0 10px 24px #25221c12;
    transition: transform .22s ease, box-shadow .22s ease;
    overflow: hidden;
}

.vps-trending-card img,
.look img,
.v2-category img {
    transition: transform .25s ease;
}

/* CATEGORY TABS */

.vps-tabbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding: 8px 4px 14px;
    overscroll-behavior-x: contain;
}

.vps-tabbar button {
    flex: none;
    scroll-snap-align: start;
    min-height: 46px;
    padding: 12px 18px;
    font-size: 16px;
    font-weight: 600;
}

/* CREATE PHOTO DEMO */

.ui-demo {
    padding: 28px 20px;
    border: 1px solid #dce6dc;
    border-radius: 22px;
    background: #f1f8f3;
    margin: 24px 0;
}

.ui-demo h2 {
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.3;
    color: #183c2b;
}

.ui-demo p {
    font-size: 17px;
    line-height: 1.7;
    color: #53665a;
}

.ui-demo .cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 14px 22px;
    border-radius: 12px;
    background: #176b47;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
}

/* BEFORE AND AFTER PHOTO */

.ui-compare[hidden] {
    display: none !important;
}

.ui-compare {
    margin: 24px 0;
}

.ui-compare h3 {
    font-size: 24px;
    font-weight: 700;
    color: #183c2b;
    margin-bottom: 16px;
}

.ui-compare-stage {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #222;
    aspect-ratio: 4/5;
    max-height: 520px;
    --split: 50%;
}

.ui-compare-stage img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ui-compare-stage #uiBefore {
    clip-path: inset(
        0 calc(100% - var(--split)) 0 0
    );
    background: #222;
}

.ui-handle {
    position: absolute;
    left: var(--split);
    top: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    background: white;
    color: #176b47;
    border-radius: 50%;
    font-size: 24px;
    font-weight: 700;
    pointer-events: none;
    box-shadow: 0 0 0 3px #2225;
}

.ui-before-label,
.ui-after-label {
    position: absolute;
    top: 12px;
    background: #222d;
    color: white;
    padding: 8px 12px;
    border-radius: 9px;
    font-size: 15px;
    font-weight: 600;
}

.ui-before-label {
    left: 10px;
}

.ui-after-label {
    right: 10px;
}

.ui-compare label {
    display: block;
    margin-top: 14px;
    font-size: 17px;
    font-weight: 600;
    text-align: center;
}

#uiRange {
    width: 100%;
    accent-color: #176b47;
    min-height: 48px;
    cursor: pointer;
}

/* MOBILE NAVIGATION */

.ui-bottom {
    display: none;
}

/* DESKTOP HOVER EFFECTS */

@media (hover: hover) and (pointer: fine) {

    .vps-trending-card:hover,
    .look:hover,
    .v2-category:hover,
    .season-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 0 #e4e0d8,
                    0 18px 30px #25221c20;
    }

    .vps-trending-card:hover img {
        transform: scale(1.025);
    }
}

/* PREMIUM MOBILE BOTTOM BAR */

@media (max-width: 700px) {

    body {
        padding-bottom: calc(
            110px + env(safe-area-inset-bottom)
        );
    }

    .ui-bottom {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 90;

        display: grid;
        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1fr)
            minmax(0, 1.35fr)
            minmax(0, 1fr)
            minmax(0, 1fr);

        align-items: center;
        gap: 4px;

        background: #ffffff;
        border-top: 1px solid #dce6dc;
        border-radius: 20px 20px 0 0;

        padding: 10px 6px
            calc(10px + env(safe-area-inset-bottom));

        box-shadow: 0 -6px 30px #183c2b18;
        box-sizing: border-box;
    }

    .ui-bottom a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;

        min-width: 0;
        min-height: 64px;
        padding: 6px 2px;

        color: #183c2b;
        text-decoration: none;
        text-align: center;
        font-size: 29px;
        font-weight: 600;
        line-height: 1.2;
        border-radius: 12px;
        box-sizing: border-box;
    }

    .ui-bottom a span {
        font-size: 13px;
        font-weight: 700;
        line-height: 1.3;
        white-space: normal;
    }

    .ui-bottom a svg {
        width: 27px;
        height: 27px;
        flex-shrink: 0;
    }

    .ui-bottom a:active {
        background: #e7f2e9;
    }

    /* MAIN CREATE PHOTO BUTTON */

    .ui-bottom .ui-create {
        background: linear-gradient(
            135deg, #218858, #125b3b
        );
        color: #ffffff;
        min-height: 82px;
        margin-top: -20px;
        border: 3px solid #fff;
        border-radius: 20px;
        font-size: 34px;
        box-shadow: 0 5px 18px #176b4740;
    }

    .ui-bottom .ui-create span {
        color: #ffffff;
        font-size: 14px;
        font-weight: 800;
    }

    .ui-bottom .ui-create:active {
        background: #125b3b;
    }

    .ui-bottom a:focus-visible {
        outline: 3px solid #77a88a;
        outline-offset: 2px;
    }

    .ui-compare-stage {
        max-height: 420px;
    }

    .ui-demo {
        padding: 22px 16px;
    }

    .ui-demo .cta {
        width: 100%;
        box-sizing: border-box;
    }

    #studio,
    #styles,
    #uiCompare {
        scroll-margin-top: 100px;
    }
}

/* SMALL MOBILE SCREENS */

@media (max-width: 360px) {

    .ui-bottom {
        gap: 2px;
        padding-left: 3px;
        padding-right: 3px;
    }

    .ui-bottom a span {
        font-size: 12px;
    }

    .ui-bottom .ui-create span {
        font-size: 13px;
    }

    .ui-bottom a {
        font-size: 26px;
    }
}

/* ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {

    .vps-trending-card,
    .look,
    .v2-category,
    .season-card,
    .vps-trending-card img {
        transition: none;
    }
}
