.product-stories-container {
    margin: 0;
    padding: 0;
}

/* Desktop Layout */
.product-stories-container .desktop-layout {
    display: flex;
    min-height: 500px;
    gap: 40px;
    align-items: flex-start;
}

.product-stories-container .mobile-layout {
    display: none;
}

.video-section {
    flex: 1.2;
    max-width: 60%;
}

.product-info-section {
    flex: 1;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

/* Video Player Styles */
.video-player-container {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.video-player-container iframe,
.video-player-container video {
    width: 100%;
    height: 400px;
    display: block;
    border: none;
}

.youtube-player iframe {
    aspect-ratio: 16/9;
    height: auto;
    min-height: 400px;
}

/* Video Thumbnails */
.video-thumbnails {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding: 10px 0;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.video-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.video-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.video-thumbnails::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.video-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.video-thumbnail {
    min-width: 140px;
    height: 90px;
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    background: #f0f0f0;
}

.video-thumbnail:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.video-thumbnail.active {
    border-color: #0073aa;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,115,170,0.3);
}

.video-thumbnail img,
.video-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-thumbnail:hover img,
.video-thumbnail:hover video {
    transform: scale(1.05);
}

.video-thumbnail .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.3);
}

.video-thumbnail:hover .play-button {
    background: rgba(0,115,170,0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-thumbnail .video-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 20px 8px 8px;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
}

/* Product Info Section */
.product-info-content {
    padding: 0;
}

.product-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #333;
    line-height: 1.3;
}

.price-section {
    margin-bottom: 20px;
}

.price-section .price {
    font-size: 24px;
    font-weight: 600;
    color: #4CAF50;
}

.price-section .price del {
    color: #999;
    font-size: 18px;
    margin-right: 8px;
}

.rating-section {
    margin-bottom: 20px;
}

.description-section {
    margin-bottom: 30px;
    color: #666;
    line-height: 1.6;
}

.add-to-cart-section {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.add-to-cart-section .single_add_to_cart_button {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    background: #0073aa;
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.add-to-cart-section .single_add_to_cart_button:hover {
    background: #005a87;
}

/* Mobile Layout */
@media (max-width: 768px) {
    .product-stories-container .desktop-layout {
        display: none;
    }
    
    .product-stories-container .mobile-layout {
        display: block;
    }
    
    .mobile-video-container {
        position: relative;
        height: 100vh;
        width: 100vw;
        margin-left: calc(50% - 50vw);
        overflow: hidden;
    }
    
    .video-player-wrapper {
        position: relative;
        height: 100%;
        width: 100%;
        background: #000;
    }
    
    .video-player-wrapper iframe,
    .video-player-wrapper video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border: none;
    }
    
    .mobile-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(transparent, rgba(0,0,0,0.9));
        color: white;
        padding: 60px 20px 30px;
        z-index: 10;
        pointer-events: none;
    }
    
    .mobile-overlay * {
        pointer-events: auto;
    }
    
    .mobile-product-info {
        max-width: 100%;
    }
    
    .mobile-product-title {
        font-size: 24px;
        font-weight: 700;
        margin: 0 0 15px 0;
        line-height: 1.3;
        text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    }
    
    .mobile-price {
        font-size: 20px;
        font-weight: 600;
        margin-bottom: 25px;
        color: #4CAF50;
        text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    }
    
    .mobile-add-to-cart {
        margin-top: 20px;
    }
    
    .mobile-add-to-cart .single_add_to_cart_button {
        width: 100%;
        padding: 18px 24px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 30px;
        background: #0073aa;
        border: none;
        color: white;
        cursor: pointer;
        transition: all 0.3s ease;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        box-shadow: 0 4px 15px rgba(0,115,170,0.3);
    }
    
    .mobile-add-to-cart .single_add_to_cart_button:hover,
    .mobile-add-to-cart .single_add_to_cart_button:active {
        background: #005a87;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0,115,170,0.4);
    }
    
    /* Mobile Navigation */
    .mobile-video-nav {
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        transform: translateY(-50%);
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 20px;
        z-index: 11;
        pointer-events: none;
    }
    
    .mobile-video-nav * {
        pointer-events: auto;
    }
    
    .video-nav-btn {
        background: rgba(0,0,0,0.6);
        color: white;
        border: none;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        font-size: 18px;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(10px);
        border: 2px solid rgba(255,255,255,0.1);
    }
    
    .video-nav-btn:hover {
        background: rgba(0,115,170,0.8);
        transform: scale(1.1);
    }
    
    .video-nav-btn:active {
        transform: scale(0.95);
    }
    
    .video-nav-btn:disabled {
        opacity: 0.3;
        cursor: not-allowed;
        transform: none;
    }
    
    .video-nav-btn:disabled:hover {
        background: rgba(0,0,0,0.6);
        transform: none;
    }
    
    .video-counter {
        background: rgba(0,0,0,0.7);
        color: white;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 14px;
        font-weight: 500;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255,255,255,0.1);
        text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    }
}

/* Tablet Layout */
@media (max-width: 1024px) and (min-width: 769px) {
    .product-stories-container .desktop-layout {
        flex-direction: column;
        gap: 30px;
    }
    
    .video-section {
        max-width: 100%;
    }
    
    .product-info-section {
        position: static;
        max-height: none;
    }
    
    .video-player-container iframe,
    .video-player-container video {
        height: 300px;
    }
}

/* Loading States */
.video-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    background: #f0f0f0;
    color: #666;
    font-size: 16px;
}

.video-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Accessibility */
.video-thumbnail:focus {
    outline: 3px solid #0073aa;
    outline-offset: 2px;
}

.video-nav-btn:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .video-thumbnail {
        border-width: 2px;
    }
    
    .mobile-overlay {
        background: linear-gradient(transparent, rgba(0,0,0,0.95));
    }
    
    .video-nav-btn {
        background: rgba(0,0,0,0.9);
        border: 2px solid white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .video-thumbnail,
    .video-thumbnail img,
    .video-thumbnail video,
    .play-button,
    .video-nav-btn,
    .single_add_to_cart_button {
        transition: none;
    }
    
    .video-thumbnail:hover {
        transform: none;
    }
    
    .video-thumbnail:hover img,
    .video-thumbnail:hover video {
        transform: none;
    }
    
    .video-nav-btn:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    .product-stories-container .mobile-layout,
    .video-thumbnails,
    .video-nav-btn {
        display: none;
    }
    
    .product-stories-container .desktop-layout {
        flex-direction: column;
    }
    
    .video-section {
        height: 200px;
        background: #f0f0f0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .video-section::before {
        content: 'Video content available online';
        color: #666;
    }
}