/* ============================================
   SMART VIDEO COMMERCE - STYLES
   ============================================ */

/* ==================== HOMEPAGE TRENDING VIDEOS ==================== */

.trending-videos-container {
    width: 100%;
    overflow: hidden;
    margin: 20px 0;
}

.trending-videos-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 10px 0 20px 0;
    /* Hide scrollbar but keep functionality */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.trending-videos-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.video-card {
    flex: 0 0 auto;
    width: 200px;
    height: 356px;
    /* 9:16 aspect ratio */
    scroll-snap-align: start;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #000;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.video-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.trending-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.video-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shop-now-badge {
    display: inline-block;
    background: #fff;
    color: #000;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    align-self: flex-start;
}

/* ==================== FULLSCREEN VIDEO MODAL ==================== */

.video-fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    z-index: 9999;
    display: none;
    overflow: hidden;
}

.video-fullscreen-modal.active {
    display: block;
}

.video-fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: background 0.3s ease;
}

.video-fullscreen-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.video-fullscreen-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.video-fullscreen-item {
    width: 100%;
    max-width: 500px;
    height: 100%;
    position: relative;
    display: none;
}

.video-fullscreen-item.active {
    display: block;
}

.video-fullscreen-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ==================== VIDEO STORE PAGE ==================== */

.video-store-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    z-index: 9998;
    overflow: hidden;
}

.video-store-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    padding: 20px;
    display: flex;
    justify-content: flex-end;
}

.video-store-close {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 20px;
    transition: background 0.3s ease;
}

.video-store-close:hover {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    text-decoration: none;
}

.video-store-scroll {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.video-store-scroll::-webkit-scrollbar {
    display: none;
}

.video-store-item {
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-store-video {
    width: 100%;
    max-width: 500px;
    height: 100%;
    object-fit: contain;
}

.video-store-info {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: white;
    pointer-events: none;
}

.video-info-content {
    max-width: 500px;
    margin: 0 auto;
    pointer-events: all;
}

.video-product-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.video-product-description {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0.9;
}

.video-product-price {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-price-current {
    font-size: 24px;
    font-weight: 700;
}

.video-price-original {
    font-size: 16px;
    text-decoration: line-through;
    opacity: 0.6;
}

.video-shop-now-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #000;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-shop-now-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
    color: #000;
    text-decoration: none;
}

.video-stats {
    position: absolute;
    right: 15px;
    bottom: 200px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    color: white;
    font-size: 14px;
}

.video-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.video-stat i {
    font-size: 24px;
}

.video-mute-btn {
    position: absolute;
    top: 80px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.3s ease;
}

.video-mute-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.video-store-loading {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

/* ==================== RESPONSIVE DESIGN ==================== */

@media (max-width: 768px) {
    .video-card {
        width: 180px;
        height: 320px;
    }

    .video-store-video {
        max-width: 100%;
    }

    .video-store-info {
        bottom: 60px;
        padding: 15px;
    }

    .video-product-title {
        font-size: 16px;
    }

    .video-price-current {
        font-size: 20px;
    }
}

@media (min-width: 769px) {

    /* Desktop: center video with max-width */
    .video-store-item {
        background: #000;
    }

    .video-store-video {
        max-width: 450px;
    }
}

/* ==================== PERFORMANCE OPTIMIZATIONS ==================== */

.trending-video,
.video-store-video,
.video-fullscreen-video {
    /* Hardware acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
}

/* Smooth animations */
.video-card,
.video-shop-now-btn,
.video-store-close,
.video-fullscreen-close {
    -webkit-tap-highlight-color: transparent;
}