/* ============================================
   SHORT VIDEO COMPONENT - TikTok Style
   ============================================ */

.short-video-section {
    margin: 10px 0;
    padding: 10px 0;
    background: transparent !important;
}

/* .short-video-section,
.short-video-section *:not(.video-product-card):not(.discount-badge):not(.btn-cta):not(.sidebar-btn):not(.play-overlay) {
    background-color: transparent !important;
} */

.short-video-section .owl-carousel,
.short-video-section .owl-stage-outer,
.short-video-section .owl-stage,
.short-video-section .owl-item,
.short-video-section .owl-dots,
.short-video-section .kg-short-video-slider {
    background: transparent !important;
    background-color: transparent !important;
}

.short-video-section .section-title {
    text-align: center;
    margin-bottom: 10px;
}

.short-video-section .section-title h4 {
    font-size: 30px;
    font-weight: 700;
    color: #006edc;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
}

.short-video-section .section-title h4::before,
.short-video-section .section-title h4::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #006edc);
}

.short-video-section .section-title h4::before {
    right: 100%;
    margin-right: 15px;
    background: linear-gradient(90deg, transparent, #006edc);
}

.short-video-section .section-title h4::after {
    left: 100%;
    margin-left: 15px;
    background: linear-gradient(90deg, #006edc, transparent);
}

/* Carousel Container */
.kg-short-video-slider {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 20px 0;
    scrollbar-width: none;
}

/* Fade effect at edges */
.short-video-section .owl-stage-outer {
    overflow: visible;
    padding: 20px 0;
    /* Gradient mask for smooth fade at edges (left, right, bottom) */
    -webkit-mask-image:
        linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%),
        linear-gradient(to bottom, black 0%, black 90%, transparent 100%);
    -webkit-mask-composite: destination-in;
    mask-image:
        linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%),
        linear-gradient(to bottom, black 0%, black 90%, transparent 100%);
    mask-composite: intersect;
}

/* Video Item - Liquid Glass Style */
.short-video-item {
    flex: 0 0 280px;
    width: 280px;
    height: 500px;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    scroll-snap-align: start;
    /* Floating shadow effect */
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        0 20px 60px rgba(0, 0, 0, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        box-shadow 0.4s ease;
    /* Liquid glass border */
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.short-video-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.3),
        0 30px 80px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.15);
}

/* Video Player */
.short-video-item .video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.short-video-item .video-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* YouTube Video Thumbnail & Iframe */
.short-video-item .video-thumbnail-wrapper {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
}

.short-video-item .video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.short-video-item .video-iframe-wrapper {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.short-video-item .video-iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
}

/* Play Button Overlay */
.short-video-item .play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.short-video-item:hover .play-overlay,
.short-video-item.paused .play-overlay {
    opacity: 1;
}

.play-overlay i {
    font-size: 24px;
    color: #333;
    margin-left: 4px;
}

/* Video Sidebar - Right side buttons */
.video-sidebar {
    position: absolute;
    right: 12px;
    bottom: 180px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 20;
}

.video-sidebar .sidebar-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
}

.video-sidebar .sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.video-sidebar .sidebar-btn i {
    font-size: 20px;
}

.video-sidebar .sidebar-btn span {
    font-size: 10px;
    margin-top: 2px;
}

.video-sidebar .btn-like.liked {
    color: #ff2d55;
}

.video-sidebar .btn-like.liked i::before {
    content: "\f004";
}

/* Video Info - Bottom left */
.video-info {
    position: absolute;
    left: 12px;
    bottom: 150px;
    right: 70px;
    z-index: 15;
}

.video-info .video-description {
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Product Card Overlay (compact) */
.video-product-card {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7) 15%, rgba(0, 0, 0, 0.9));
    padding: 15px 10px 10px;
    z-index: 25;
}

/* Video Description inside product card */
.video-product-card .video-description {
    color: #fff;
    font-size: 11px;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 8px 0;
}

.video-product-card .product-inner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-product-card .product-image {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: visible;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    display: block;
}

.video-product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 5px;
}

.video-product-card .product-details {
    flex: 1;
    min-width: 0;
}

.video-product-card .product-name {
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    text-decoration: none;
}

.video-product-card .product-name:hover {
    text-decoration: underline;
}

.video-product-card .product-price {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.video-product-card .price-sale {
    color: #ff4757;
    font-size: 12px;
    font-weight: 700;
}

.video-product-card .price-old {
    color: rgba(255, 255, 255, 0.5);
    font-size: 10px;
    text-decoration: line-through;
}

.video-product-card .discount-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    background: #ff4757;
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    z-index: 5;
}

/* Buy Button (compact, icon only) */
.video-product-card .btn-buy-now {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #006edc, #004689);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.video-product-card .btn-buy-now i {
    font-size: 14px;
}

.video-product-card .btn-buy-now:hover {
    background: linear-gradient(135deg, #1b79d7, #006edc);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 110, 220, 0.4);
}

/* Progress Bar */
.video-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 30;
}

.video-progress .progress-bar {
    height: 100%;
    background: #006edc;
    width: 0%;
    transition: width 0.1s linear;
}

/* Owl Carousel Override */
.short-video-section .owl-carousel .owl-stage {
    display: flex;
    gap: 15px;
    padding: 10px 0;
}

.short-video-section .owl-carousel .owl-item {
    opacity: 0.9;
    transition: all 0.3s ease;
}

.short-video-section .owl-carousel .owl-item.active {
    opacity: 1;
}

.short-video-section .owl-nav {
    position: absolute;
    top: 50%;
    left: -5px;
    right: -5px;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 100;
}

.short-video-section .owl-nav button {
    pointer-events: auto;
    width: 48px;
    height: 48px;
    background: #006edc !important;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 110, 220, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px !important;
    color: #fff !important;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    z-index: 100;
  margin: 5px;
}

.short-video-section .owl-nav button:hover {
    background: #006edc !important;
    color: #fff !important;
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 110, 220, 0.5);
}

.short-video-section .owl-dots {
    text-align: center;
    margin-top: 20px;
}

.short-video-section .owl-dots .owl-dot span {
    width: 8px;
    height: 8px;
    background: #ddd;
    border-radius: 50%;
    margin: 0 4px;
    transition: all 0.3s ease;
}

.short-video-section .owl-dots .owl-dot.active span {
    background: #006edc;
    width: 24px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 991px) {
    .short-video-item {
        flex: 0 0 240px;
        width: 240px;
        height: 420px;
    }
}

@media (max-width: 767px) {
    .kg-short-video-slider {
        overflow-x: unset !important;
        padding: 0px 0;
    }

    .short-video-section {
        margin: 0px 0;
        padding: 0px 0;
        overflow: hidden;
    }

    .short-video-section .container {
        padding: 0 0px;
    }

    .short-video-carousel {
        gap: 10px;
    }

    .short-video-item {
        flex: 0 0 220px;
        width: 220px;
        height: 380px;
    }

    /* Owl Carousel mobile - hiển thị 1.5 items */
    .short-video-section .owl-carousel .owl-stage-outer {
        overflow: visible;
        padding-right: 30%;
    }

    .short-video-section .owl-carousel .owl-item {
        opacity: 0.7;
    }

    .short-video-section .owl-carousel .owl-item.active {
        opacity: 1;
    }

    .video-sidebar .sidebar-btn {
        width: 36px;
        height: 36px;
    }

    .video-sidebar .sidebar-btn i {
        font-size: 14px;
    }

    .video-sidebar .sidebar-btn span {
        font-size: 9px;
    }

    .video-sidebar {
        right: 8px;
        bottom: 160px;
        gap: 12px;
    }

    .video-info {
        bottom: 130px;
        right: 55px;
    }

    .video-info .video-description {
        font-size: 11px;
    }

    .video-product-card .product-image {
        width: 40px;
        height: 40px;
    }

    .video-product-card .product-name {
        font-size: 11px;
    }

    .video-product-card .price-sale {
        font-size: 12px;
    }

    .video-product-card .price-old {
        font-size: 10px;
    }

    .video-product-card .btn-cta {
        padding: 7px 8px;
        font-size: 10px;
    }

    .video-product-card {
        padding: 15px 10px 12px;
    }

    /* Hide nav on mobile - swipe instead */
    .short-video-section .owl-nav {
        display: none;
    }
}

/* Very small mobile */
@media (max-width: 480px) {
    .short-video-item {
        flex: 0 0 180px;
        height: 320px;
    }

    .short-video-section .section-title h4 {
        font-size: 16px;
    }

    .short-video-section .section-title h4::before,
    .short-video-section .section-title h4::after {
        width: 40px;
    }
}

/* Animation */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.video-sidebar .btn-like.animating {
    animation: pulse 0.3s ease;
}