﻿/* =============================================================================
   SITE VIDEO PLAYER BACKDROP TRANSITION
============================================================================= */

/* Site Video Backdrop with smooth transition */
.site-video-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: backdropFadeIn 0.3s ease-out;
}

/* Video container entrance animation */
.site-video-container {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    animation: playerSlideIn 0.4s ease-out forwards;
}

/* Close guide styling and animation */
.site-video-close-guide {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) !important;
    color: white;
    font-size: 14px;
    opacity: 0;
    z-index: 10002;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 25px;
    text-align: center;
    pointer-events: none;
    animation: fadeInDown 0.5s ease-out forwards;
}

/* Backdrop fade animation */
@keyframes backdropFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Player slide in animation */
@keyframes playerSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Close guide animation - starts and stays centered */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }

    to {
        opacity: 0.9;
        transform: translateX(-50%) translateY(0);
    }
}



.video-slider-section {
    padding: 60px 0;
    position: relative;
}

.video-slider-wrapper {
    position: relative;
}

.video-slider-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

    .video-slider-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }

.video-cover-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.video-cover-image {
    transition: transform 0.3s ease;
    display: block;
    width: 100%;
}

.video-slider-item:hover .video-cover-image {
    transform: scale(1.05);
}

.video-slider-wrapper .play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    transition: all 0.3s ease;
    pointer-events: none;
}

.video-slider-item:hover .play-button-overlay {
    transform: translate(-50%, -50%) scale(1.1);
}

.play-button-overlay .play-icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.video-content-box {
    padding: 20px;
    cursor: pointer;
    height: calc(100% - 250px);
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.video-slider-item:hover .video-title {
    color: #007bff;
}

.video-description {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

/* Swiper Navigation Customizations */
.video-slider-section .swiper-button-next,
.video-slider-section .swiper-button-prev {
    color: #333;
    background: rgba(255, 255, 255, 0.9);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    margin-top: -22px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

    .video-slider-section .swiper-button-next:hover,
    .video-slider-section .swiper-button-prev:hover {
        background: rgba(255, 255, 255, 1);
        transform: scale(1.1);
    }

    .video-slider-section .swiper-button-next:after,
    .video-slider-section .swiper-button-prev:after {
        font-size: 18px;
        font-weight: bold;
    }

.video-slider-section .swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Swiper Pagination */
.video-slider-section .swiper-pagination {
    position: relative;
    margin-top: 30px;
}

.video-slider-section .swiper-pagination-bullet {
    background: #333;
    opacity: 0.3;
    width: 10px;
    height: 10px;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.video-slider-section .swiper-pagination-bullet-active {
    opacity: 1;
    transform: scale(1.2);
}

/* =============================================================================
   TOPRAYAN STYLE VIDEO SLIDER (TYPE 27)
============================================================================= */

.video-slider-section .list-by-category {
    margin-bottom: 40px;
}

.video-slider-section .kala.kala-simple {
    background: transparent;
    border: none;
    box-shadow: none;
}

.video-slider-section .pad {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 20px 0;
    border-bottom: 2px solid #eee;
    margin-bottom: 30px;
}

    .video-slider-section .pad h2 {
        margin: 0;
        font-size: 1.5rem;
        font-weight: 700;
        color: #333;
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .video-slider-section .pad h2 i {
            font-size: 1.3rem;
        }

.video-slider-section .section-description {
    margin: 10px 0 0 0;
    font-size: 0.95rem;
    color: #666;
    max-width: 60%;
}

.video-slider-section .btn-more {
    background: #007bff;
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

    .video-slider-section .btn-more:hover {
        background: #0056b3;
        transform: translateY(-2px);
        color: white;
    }

.video-slider-section .video-list {
    position: relative;
}

.video-slider-section .video-slider-container {
    overflow: hidden;
    position: relative;
}

.video-slider-section .video-index {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

    .video-slider-section .video-index:hover {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }

.video-slider-section .video-pic {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: #000;
}

.video-slider-section .vi-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

    .video-slider-section .vi-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

.video-slider-section .video-index:hover .vi-image img {
    transform: scale(1.05);
}

.video-slider-section .video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    color: white;
    font-size: 3rem;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.video-slider-section .video-pic:hover .video-play-overlay {
    transform: translate(-50%, -50%) scale(1.1);
    color: #fff;
}

.video-slider-section .vi-box {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

    .video-slider-section .vi-box .name-text {
        flex-grow: 1;
    }

.video-slider-section .vi-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-slider-section .vi-text {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-slider-section .vi-bottom {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.video-slider-section .read-more {
    color: #e74c3c;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.video-slider-section .vi-box[data-link-url]:hover .read-more {
    color: #c0392b;
}

/* Swiper Navigation Buttons */
.video-slider-section .swiper-button-next,
.video-slider-section .swiper-button-prev {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    margin-top: -22px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

    .video-slider-section .swiper-button-next:hover,
    .video-slider-section .swiper-button-prev:hover {
        background: white;
        transform: scale(1.1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    .video-slider-section .swiper-button-next:after,
    .video-slider-section .swiper-button-prev:after {
        font-size: 18px;
        font-weight: bold;
    }

/* Swiper Pagination */
.video-slider-section .swiper-pagination {
    position: relative;
    margin-top: 30px;
}

.video-slider-section .swiper-pagination-bullet {
    background: #333;
    opacity: 0.3;
    width: 10px;
    height: 10px;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.video-slider-section .swiper-pagination-bullet-active {
    opacity: 1;
    background: #e74c3c;
    transform: scale(1.2);
}

/* =============================================================================
   DARK THEME FOR VIDEO SLIDER
============================================================================= */

/* General dark theme adjustments */
.video-slider-section .video-slider-item {
    background: #121212;
    color: #e0e0e0;
}

.video-slider-section .video-title,
.video-slider-section .video-description {
    color: #e0e0e0;
}

.video-slider-section .video-title:hover {
    color: #1976d2;
}

.video-slider-section .video-description {
    color: #b0b0b0;
}

.video-slider-section .swiper-button-next,
.video-slider-section .swiper-button-prev {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

.video-slider-section .swiper-pagination-bullet {
    background: #444;
}

.video-slider-section .swiper-pagination-bullet-active {
    background: #1976d2;
}

/* Mobile adjustments for dark theme */
@media (max-width: 768px) {
    .video-slider-section .video-title,
    .video-slider-section .video-description {
        color: #e0e0e0;
    }

    .video-slider-section .swiper-pagination-bullet {
        background: #444;
    }

    .video-slider-section .swiper-pagination-bullet-active {
        background: #1976d2;
    }
}

/* =============================================================================
   LOADING SPINNER STYLES
============================================================================= */

/* Loading spinner styles */
.video-loading-spinner {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 10;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-ring {
    display: inline-block;
    position: relative;
    width: 24px;
    height: 24px;
}

.spinner-ring div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 20px;
    height: 20px;
    margin: 2px;
    border: 2px solid #fff;
    border-radius: 50%;
    animation: spinner-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: #fff transparent transparent transparent;
}

.spinner-ring div:nth-child(1) {
    animation-delay: -0.45s;
}

.spinner-ring div:nth-child(2) {
    animation-delay: -0.3s;
}

.spinner-ring div:nth-child(3) {
    animation-delay: -0.15s;
}

@keyframes spinner-ring {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Manual play button */
.video-play-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.video-play-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.video-play-btn i {
    font-size: 12px;
    margin-left: 2px;
}

/* Mute button styles */
.video-mute-btn {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.video-mute-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.video-mute-btn i {
    font-size: 14px;
}

@media (max-width: 480px) {
    .video-mute-btn {
        bottom: 8px;
        left: 8px;
        width: 32px;
        height: 32px;
    }

    .video-mute-btn i {
        font-size: 12px;
    }
}

/* Responsive adjustments for smaller screens */
@media (max-width: 480px) {
    .video-loading-spinner,
    .video-play-btn {
        bottom: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
    }

    .spinner-ring {
        width: 20px;
        height: 20px;
    }

    .spinner-ring div {
        width: 16px;
        height: 16px;
    }

    .video-play-btn i {
        font-size: 10px;
    }
}

/* =============================================================================
   MOBILE VIDEO CARDS -   (Type 3)
============================================================================= */

/* Mobile video card container */
.mobile-video-card {
    margin-bottom: 24px;
    border-radius: 16px;
    transform: translateY(20px);
    overflow: hidden;
    background: #fff;
    box-shadow: 0 0px 7px rgba(0, 0, 0, 0.34);
    transition: all 0.3s ease;
    padding-block: 2rem;
}

    .mobile-video-card:hover {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    }

/* Video container */
.mobile-video-container {
    position: relative;
}

/* Media wrapper for images and video */
.mobile-media-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Mobile card images */
.mobile-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Mobile card video */
.mobile-card-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 5px;
    z-index: 2;
}

/* Video time indicator */
.video-time-indicator {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.time-text {
    font-family: 'Courier New', monospace;
}

/* Video stop button */
.video-stop-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

    .video-stop-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(1.1);
    }

    .video-stop-btn i {
        font-size: 14px;
    }

/* Image swiper for mobile */
.mobile-image-swiper {
    width: 100%;
    height: 100%;
}

    .mobile-image-swiper .swiper-wrapper {
        height: 100%;
    }

    .mobile-image-swiper .swiper-slide {
        width: 100%;
        height: 100%;
    }

/* Card content section */
.mobile-card-content {
    padding: 16px;
    background: #fff;
}

/* Product header */
.mobile-product-header {
    margin-bottom: 12px;
}

.mobile-product-title {
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

    .mobile-product-title:hover {
        color: #e74c3c;
    }

/* Properties section */
.mobile-properties {
    margin-bottom: 12px;
}

.mobile-color-section,
.mobile-prop2-section {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
    justify-content:space-between
}

.mobile-prop-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    min-width: 40px;
}

.mobile-color-options {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.mobile-color-option a {
    display: block;
    text-decoration: none;
}

.mobile-color-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
    display: block;
    transition: transform 0.2s ease;
}

.mobile-color-option:hover .mobile-color-circle {
    transform: scale(1.2);
}

.mobile-prop2-options {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.mobile-prop2-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 4px 8px;
    transition: background-color 0.3s ease;
}

    .mobile-prop2-item:hover {
        background: #e9ecef;
    }

    .mobile-prop2-item a {
        color: #495057;
        text-decoration: none;
        font-size: 12px;
        font-weight: 500;
    }

/* Product tags */
.mobile-product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.mobile-product-tag {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

    .mobile-product-tag i {
        font-size: 10px;
    }

/* Price section */
.mobile-price-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.mobile-discount-info {
    display: flex;
    align-items: center;
}

.mobile-discount-badge {
    background: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.mobile-price-info {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
}

.mobile-final-price {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}

.mobile-currency {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.mobile-original-price {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
    font-weight: 500;
}

.mobile-out-of-stock {
    color: #e74c3c;
    font-size: 14px;
    font-weight: 600;
}

/* Video loading states */
.mobile-video-card[data-video-loading="true"] .mobile-media-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    z-index: 5;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Intersection observer animation */
.mobile-video-card {
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

    .mobile-video-card.visible {
        opacity: 1;
    }

/* Responsive adjustments */
@media (max-width: 480px) {
    .mobile-video-card {
        margin-bottom: 20px;
        border-radius: 12px;
    }



    .mobile-card-content {
        padding: 14px;
    }

    .mobile-product-title {
        font-size: 15px;
    }

    .mobile-final-price {
        font-size: 15px;
    }

    .video-time-indicator {
        top: 8px;
        left: 8px;
        font-size: 11px;
        padding: 3px 6px;
    }

    .video-stop-btn {
        bottom: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
    }

        .video-stop-btn i {
            font-size: 12px;
        }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .mobile-video-card {
        background: #2a2a2a;
        box-shadow: 0 0px 7px rgba(0, 0, 0, 0.34);
    }

    .mobile-card-content {
        background: #2a2a2a;
    }

    .mobile-product-title {
        color: #fff;
    }

        .mobile-product-title:hover {
            color: #ff6b6b;
        }

    .mobile-prop-label {
        color: #ccc;
    }

    .mobile-prop2-item {
        background: #3a3a3a;
    }

        .mobile-prop2-item:hover {
            background: #4a4a4a;
        }

        .mobile-prop2-item a {
            color: #ccc;
        }

    .mobile-final-price {
        color: #fff;
    }

    .mobile-currency {
        color: #aaa;
    }
}

/* Performance optimizations */
.mobile-card-video {
    will-change: opacity;
}

.mobile-media-wrapper {
    contain: layout style paint;
}
