.videos-short-block {
    --vs-purple: #642195;
    --vs-purple-dark: #4f087f;
    --vs-yellow: #eff400;
    --vs-ease-soft: cubic-bezier(.2, .72, .2, 1);
    --vs-ease-pop: cubic-bezier(.22, 1, .36, 1);
    position: relative;
    margin: 30px 0;
    overflow: hidden;
    background: #fff;
}

.videos-short-title {
    position: relative;
    z-index: 3;
    display: inline-flex;
    min-height: 60px;
    margin: 0;
    padding: 0 32px;
    align-items: center;
    border-radius: 15px 15px 0 0;
    background: linear-gradient(135deg, #7430a5 0%, #4f087f 100%);
    color: #fff;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.15;
    text-transform: uppercase;
}

.videos-short-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    width: 100%;
}

.videos-short-item {
    position: relative;
    min-width: 0;
    overflow: hidden;
    background: #111;
}

.videos-short-media {
    position: relative;
    min-height: 510px;
    overflow: hidden;
    aspect-ratio: 9 / 16;
    background: #151515;
}

.videos-short-poster,
.videos-short-player {
    position: absolute;
    inset: 0;
}

.videos-short-poster::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(to bottom, rgba(0, 0, 0, .02) 50%, rgba(0, 0, 0, .52) 100%);
    pointer-events: none;
}

.videos-short-poster-img,
.videos-short-poster picture,
.videos-short-poster picture img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .9s var(--vs-ease-soft);
}

.videos-short-item:hover .videos-short-poster-img,
.videos-short-item:hover .videos-short-poster picture img {
    transform: scale(1.014);
}

.videos-short-hits {
    position: absolute;
    z-index: 4;
    top: 11px;
    right: 10px;
    display: inline-flex;
    min-height: 23px;
    padding: 2px 7px;
    align-items: center;
    gap: 4px;
    border-radius: 4px;
    background: rgba(0, 0, 0, .84);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.videos-short-hits svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.videos-short-play {
    position: absolute;
    z-index: 5;
    top: 47%;
    left: 50%;
    width: 70px;
    height: 70px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    outline: none;
    background: transparent;
    transform: translate(-50%, -50%) scale(1);
    cursor: pointer;
    transition: transform .55s var(--vs-ease-pop), filter .55s ease, opacity .4s ease;
}

.videos-short-play:hover,
.videos-short-play:focus-visible {
    transform: translate(-50%, -50%) scale(1.045);
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .3));
}

.videos-short-play svg {
    display: block;
    width: 100%;
    height: 100%;
}

.videos-short-play circle {
    fill: rgba(0, 0, 0, .52);
    stroke: rgba(255, 255, 255, .9);
    stroke-width: 1.8;
}

.videos-short-play path {
    fill: #fff;
}

/* Product card: compact state */
.videos-short-product {
    --vs-card-left: 22px;
    --vs-card-right: 22px;
    --vs-card-bottom: 48px;
    --vs-card-height: 104px;
    position: absolute;
    z-index: 6;
    right: var(--vs-card-right);
    bottom: var(--vs-card-bottom);
    left: var(--vs-card-left);
    min-height: var(--vs-card-height);
    color: #fff;
}

.videos-short-product-surface {
    position: absolute;
    inset: 0;
    border-radius: 13px;
    background: rgba(12, 8, 8, .8);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.videos-short-product-compact {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: var(--vs-card-height);
    padding: 9px 12px;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
}

.videos-short-product-thumb {
    display: flex;
    width: 70px;
    height: 70px;
    flex: 0 0 70px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 6px;
    background: #fff;
    transform: translate3d(0, 0, 0) scale(1);
    transform-origin: center;
    opacity: 1;
}

.videos-short-product-img,
.videos-short-product-thumb picture,
.videos-short-product-thumb picture img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.videos-short-product-info {
    min-width: 0;
    flex: 1 1 auto;
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

.videos-short-product-name {
    display: -webkit-box;
    overflow: hidden;
    color: #fff;
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.18;
    text-decoration: none;
    text-transform: uppercase;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.videos-short-product-code {
    margin-top: 2px;
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.1;
}

.videos-short-product-bottom {
    display: flex;
    margin-top: 4px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.videos-short-price-wrap {
    min-width: 0;
    max-width: 100%;
}

.videos-short-price {
    display: block;
    overflow: hidden;
    color: var(--vs-yellow);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.videos-short-price-old {
    display: block;
    margin-top: 1px;
    color: rgba(255, 255, 255, .72);
    font-size: 9px;
    line-height: 1;
    text-decoration: line-through;
}

.videos-short-buy {
    display: inline-flex;
    min-height: 24px;
    padding: 3px 8px;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: var(--vs-purple);
    color: #fff;
    box-sizing: border-box;
    font-size: 10px;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.videos-short-buy:hover {
    background: var(--vs-purple-dark);
    color: #fff;
}

.videos-short-buy svg,
.videos-short-expanded-buy svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.videos-short-product-expanded {
    display: none;
}

/* Smooth desktop morph. Only transform, opacity and clip-path are animated,
   so the card no longer reflows or jumps when the pointer enters. */
@media (hover: hover) and (min-width: 1025px) {
    .videos-short-product {
        right: 0;
        bottom: 0;
        left: 0;
        height: 220px;
        min-height: 220px;
        pointer-events: none;
    }

    .videos-short-product-surface {
        border-radius: 0;
        background: rgba(12, 8, 8, .8);
        clip-path: inset(
            calc(220px - var(--vs-card-bottom) - var(--vs-card-height))
            var(--vs-card-right)
            var(--vs-card-bottom)
            var(--vs-card-left)
            round 13px
        );
        transition:
            clip-path .82s var(--vs-ease-soft),
            background-color .72s ease,
            box-shadow .72s ease;
        will-change: clip-path, background-color;
    }

    .videos-short-product-compact {
        position: absolute;
        right: var(--vs-card-right);
        bottom: var(--vs-card-bottom);
        left: var(--vs-card-left);
        min-height: var(--vs-card-height);
        padding: 9px 12px;
        pointer-events: auto;
        transform: translate3d(0, 0, 0) scale(1);
        transform-origin: center bottom;
        opacity: 1;
        transition:
            transform .62s var(--vs-ease-soft) .12s,
            opacity .34s ease .16s;
        will-change: transform, opacity;
    }

    .videos-short-product-thumb {
        transition:
            transform .52s var(--vs-ease-soft) .08s,
            opacity .3s ease .1s;
        will-change: transform, opacity;
    }

    .videos-short-product-info {
        transition:
            transform .56s var(--vs-ease-soft) .12s,
            opacity .32s ease .14s;
        will-change: transform, opacity;
    }

    .videos-short-product-expanded {
        position: absolute;
        z-index: 3;
        inset: 0;
        display: flex;
        padding: 34px 28px 24px;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        box-sizing: border-box;
        text-align: center;
        pointer-events: none;
        transform: translate3d(0, 22px, 0) scale(.965);
        transform-origin: center bottom;
        opacity: 0;
        transition:
            transform .7s var(--vs-ease-pop),
            opacity .34s ease;
        will-change: transform, opacity;
    }

    .videos-short-expanded-name,
    .videos-short-expanded-code,
    .videos-short-expanded-price,
    .videos-short-expanded-buy {
        transform: translate3d(0, 14px, 0);
        opacity: 0;
        will-change: transform, opacity;
    }

    .videos-short-expanded-name {
        display: -webkit-box;
        max-width: 100%;
        overflow: hidden;
        color: #fff;
        font-size: 12.5px;
        font-weight: 500;
        line-height: 1.22;
        text-decoration: none;
        text-transform: uppercase;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        transition: transform .56s var(--vs-ease-pop), opacity .34s ease;
    }

    .videos-short-expanded-code {
        margin-top: 4px;
        color: #fff;
        font-size: 12px;
        font-weight: 700;
        line-height: 1.1;
        transition: transform .56s var(--vs-ease-pop), opacity .34s ease;
    }

    .videos-short-expanded-price {
        margin-top: 20px;
        color: var(--vs-yellow);
        font-size: 19px;
        font-weight: 800;
        line-height: 1;
        transition: transform .6s var(--vs-ease-pop), opacity .36s ease;
    }

    .videos-short-expanded-buy {
        display: inline-flex;
        min-height: 36px;
        margin-top: 14px;
        padding: 5px 16px;
        align-items: center;
        justify-content: center;
        gap: 6px;
        border: 1px solid rgba(255, 255, 255, .9);
        border-radius: 6px;
        background: transparent;
        color: #fff;
        box-sizing: border-box;
        font-size: 14px;
        line-height: 1;
        text-decoration: none;
        white-space: nowrap;
        transition:
            transform .62s var(--vs-ease-pop),
            opacity .36s ease,
            background-color .3s ease,
            box-shadow .3s ease;
    }

    .videos-short-expanded-buy svg {
        width: 19px;
        height: 19px;
    }

    .videos-short-expanded-buy:hover {
        color: #fff;
        background: rgba(255, 255, 255, .12);
        box-shadow: 0 5px 14px rgba(0, 0, 0, .13);
    }

    .videos-short-item:hover .videos-short-product-surface {
        background-color: rgba(101, 34, 151, .97);
        clip-path: inset(0 0 0 0 round 0);
        box-shadow: none;
    }

    .videos-short-item:hover .videos-short-product-compact {
        transform: translate3d(0, -12px, 0) scale(.96);
        opacity: 0;
        pointer-events: none;
        transition-delay: 0s, 0s;
    }

    .videos-short-item:hover .videos-short-product-thumb {
        transform: translate3d(-18px, 0, 0) scale(.72);
        opacity: 0;
        transition-delay: 0s, 0s;
    }

    .videos-short-item:hover .videos-short-product-info {
        transform: translate3d(12px, -2px, 0);
        opacity: 0;
        transition-delay: .04s, .04s;
    }

    .videos-short-item:hover .videos-short-product-expanded {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 1;
        pointer-events: auto;
        transition-delay: .18s, .18s;
    }

    .videos-short-item:hover .videos-short-expanded-name {
        transform: translate3d(0, 0, 0);
        opacity: 1;
        transition-delay: .25s, .25s;
    }

    .videos-short-item:hover .videos-short-expanded-code {
        transform: translate3d(0, 0, 0);
        opacity: 1;
        transition-delay: .31s, .31s;
    }

    .videos-short-item:hover .videos-short-expanded-price {
        transform: translate3d(0, 0, 0);
        opacity: 1;
        transition-delay: .38s, .38s;
    }

    .videos-short-item:hover .videos-short-expanded-buy {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 1;
        transition-delay: .46s, .46s, 0s, 0s;
    }
}

.videos-short-player {
    z-index: 8;
    display: none;
    background: #000;
}

.videos-short-player iframe,
.videos-short-player video {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
    background: #000;
}

.videos-short-close {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    width: 34px;
    height: 34px;
    padding: 0 0 3px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 50%;
    background: rgba(0, 0, 0, .68);
    color: #fff;
    font-size: 25px;
    line-height: 28px;
    cursor: pointer;
}

.videos-short-item.is-playing .videos-short-player {
    display: block;
}

.videos-short-item.is-playing .videos-short-play,
.videos-short-item.is-playing .videos-short-hits,
.videos-short-item.is-playing .videos-short-product {
    display: none;
}

.videos-short-footer {
    display: flex;
    justify-content: flex-end;
}

.videos-short-view-all {
    display: inline-flex;
    width: 25%;
    min-height: 60px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    box-sizing: border-box;
    border-radius: 0 0 15px 15px;
    background: linear-gradient(135deg, #7430a5 0%, #4f087f 100%);
    color: #fff;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.15;
    text-decoration: none;
    text-transform: uppercase;
    transition: background .35s ease;
}

.videos-short-view-all:hover {
    color: #fff;
    background: linear-gradient(135deg, #7f35b4 0%, #5b0c8e 100%);
}

.videos-short-view-all svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

@media (max-width: 1200px) {
    .videos-short-title {
        min-height: 54px;
        padding: 0 26px;
        font-size: 20px;
    }

    .videos-short-media {
        min-height: 470px;
    }

    .videos-short-product {
        --vs-card-left: 12px;
        --vs-card-right: 12px;
        --vs-card-bottom: 28px;
        --vs-card-height: 94px;
    }

    .videos-short-product-compact {
        padding: 8px 9px;
        gap: 8px;
    }

    .videos-short-product-thumb {
        width: 62px;
        height: 62px;
        flex-basis: 62px;
    }

    .videos-short-product-name,
    .videos-short-product-code {
        font-size: 9.5px;
    }

    .videos-short-price {
        font-size: 12px;
    }

    .videos-short-buy {
        min-height: 22px;
        padding: 2px 7px;
        font-size: 9px;
    }

    .videos-short-view-all {
        min-height: 54px;
        font-size: 14px;
    }
}

@media (max-width: 900px) {
    .videos-short-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .videos-short-view-all {
        width: 50%;
    }
}

@media (max-width: 600px) {
    .videos-short-block {
        margin: 20px 0;
        overflow: visible;
    }

    .videos-short-title {
        min-height: 46px;
        padding: 0 18px;
        border-radius: 11px 11px 0 0;
        font-size: 16px;
    }

    .videos-short-list {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding: 0 12px 10px 0;
        scroll-snap-type: x mandatory;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .videos-short-item {
        max-width: 340px;
        flex: 0 0 78vw;
        border-radius: 0 0 11px 11px;
        scroll-snap-align: start;
    }

    .videos-short-media {
        min-height: 500px;
    }

    .videos-short-play {
        width: 60px;
        height: 60px;
    }

    .videos-short-product {
        --vs-card-left: 11px;
        --vs-card-right: 11px;
        --vs-card-bottom: 18px;
        --vs-card-height: 90px;
    }

    .videos-short-product-surface {
        border-radius: 10px;
    }

    .videos-short-product-compact {
        padding: 8px 9px;
        gap: 8px;
    }

    .videos-short-product-thumb {
        width: 58px;
        height: 58px;
        flex-basis: 58px;
    }

    .videos-short-product-name,
    .videos-short-product-code {
        font-size: 9px;
    }

    .videos-short-price {
        font-size: 12px;
    }

    .videos-short-buy {
        min-height: 22px;
        padding: 2px 7px;
        font-size: 9px;
    }

    .videos-short-footer {
        justify-content: stretch;
        padding-right: 0;
    }

    .videos-short-view-all {
        width: 100%;
        min-height: 48px;
        border-radius: 0 0 11px 11px;
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .videos-short-block *,
    .videos-short-block *::before,
    .videos-short-block *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
