/* Video Products Container */
.video-products-container {
    position: relative;
    width: 100%;
    overflow: visible;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Standalone Product Cards Carousel Container */
.product-cards-carousel-container {
    position: relative;
    width: 100%;
    padding: 60px 0;
    overflow: visible;
}

.video-background {
    position: relative;
    width: 100%;
    z-index: 1;
}

.video-background-element {
    display: block;
    width: 100vw;
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* Video Features Overlay */
.video-features-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, transparent 100%);
    padding: 20px 0;
    z-index: 5;
}

.video-features-overlay .features-marquee {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.video-features-overlay .marquee-track {
    display: flex;
    width: fit-content;
    animation: marquee 30s linear infinite;
}

.video-features-overlay .marquee-content {
    display: flex;
    gap: 40px;
    white-space: nowrap;
    padding: 0 20px;
}

.video-features-overlay .feature-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    user-select: none;
}

.video-features-overlay .feature-item i {
    font-size: 1.3em;
    font-style: normal;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Mobile styles for overlay */
@media (max-width: 768px) {
    /* Remove gap between navigation and video */
    .video-products-container {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .video-features-overlay {
        padding: 15px 0;
    }

    .video-features-overlay .feature-item {
        font-size: 0.95rem;
        padding: 10px 16px;
        gap: 8px;
    }

    .video-features-overlay .marquee-content {
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .video-features-overlay {
        padding: 10px 0;
    }

    .video-features-overlay .feature-item {
        font-size: 0.85rem;
        padding: 8px 12px;
        gap: 6px;
    }

    .video-features-overlay .feature-item i {
        font-size: 1.1em;
    }

    .video-features-overlay .marquee-content {
        gap: 20px;
        padding: 0 10px;
    }
}

/* Bottom Products Carousel */
.video-products-container .bottom-products-carousel {
    position: absolute;
    bottom: -60px; /* Поднимаем немного выше */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 100%;
    max-width: 1000px;
}

/* Standalone carousel positioning */
.product-cards-carousel-container .bottom-products-carousel {
    position: relative;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    margin: 0 auto;
    max-width: 1000px;
    width: 100%;
}


.carousel-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 15px;
    padding: 0 20px;
    overflow: visible;
}

/* Carousel Positions */
.carousel-position {
    position: relative;
    flex: 0 0 auto;
}

.carousel-card-wrapper {
    position: relative;
}

/* Card Styles */
.carousel-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Different sizes for positions */
.carousel-far-left .carousel-card,
.carousel-far-right .carousel-card {
    width: 180px;
    opacity: 1;
    transform: scale(0.8);
}

.carousel-left .carousel-card,
.carousel-right .carousel-card {
    width: 240px;
    opacity: 1;
    transform: scale(0.95);
}

.carousel-center .carousel-card {
    width: 280px;
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Hide far cards on smaller screens */
.desktop-only {
    display: block;
}

@media (max-width: 991px) {
    .desktop-only {
        display: none;
    }
}

.carousel-card.active {
    z-index: 2;
}

/* Hover effects for all cards */
.carousel-card:hover {
    transform: scale(1.05) !important;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-far-left .carousel-card:hover {
    transform: scale(0.85) !important;
}

.carousel-far-right .carousel-card:hover {
    transform: scale(0.85) !important;
}

.carousel-left .carousel-card:hover,
.carousel-right .carousel-card:hover {
    transform: scale(1) !important;
}

.carousel-center .carousel-card:hover {
    transform: scale(1.05) !important;
}

/* Carousel sliding animations */
.carousel-card.fade-out {
    animation: slideOut 0.4s ease forwards;
}

.carousel-card.fade-in {
    animation: slideIn 0.4s ease forwards;
}

/* Initial state for cards during animation */
.carousel-card.fade-in {
    opacity: 0;
}

.carousel-card.fade-out {
    opacity: 1;
}

/* Animation for left card moving out */
.carousel-left .carousel-card.fade-out {
    animation: slideOutLeft 0.4s ease forwards;
    animation-delay: 0.1s;
    animation-fill-mode: both;
}

/* Animation for right card moving out */
.carousel-right .carousel-card.fade-out {
    animation: slideOutRight 0.4s ease forwards;
    animation-delay: 0.1s;
    animation-fill-mode: both;
}

/* Animation for new card sliding in from right */
.carousel-right .carousel-card.fade-in {
    opacity: 0;
    animation: slideInRight 0.4s ease forwards;
    animation-delay: 0.1s;
    animation-fill-mode: both;
}

.carousel-far-right .carousel-card.fade-in {
    opacity: 0;
    animation: slideInFarRight 0.4s ease forwards;
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

/* Animation for new card sliding in from left */
.carousel-left .carousel-card.fade-in {
    opacity: 0;
    animation: slideInLeft 0.4s ease forwards;
    animation-delay: 0.1s;
    animation-fill-mode: both;
}

.carousel-far-left .carousel-card.fade-in {
    opacity: 0;
    animation: slideInFarLeft 0.4s ease forwards;
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

/* Special animations for far positions */
@keyframes slideInFarLeft {
    from {
        opacity: 0;
        transform: translateX(-100px) scale(0.7);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(0.8);
    }
}

@keyframes slideInFarRight {
    from {
        opacity: 0;
        transform: translateX(100px) scale(0.7);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(0.8);
    }
}

/* Special animations for far cards */
.carousel-far-left .carousel-card.fade-out {
    animation: fadeOutFar 0.4s ease forwards;
    animation-delay: 0s;
    animation-fill-mode: both;
}

.carousel-far-right .carousel-card.fade-out {
    animation: fadeOutFar 0.4s ease forwards;
    animation-delay: 0s;
    animation-fill-mode: both;
}

@keyframes fadeOutFar {
    from {
        opacity: 1;
        transform: scale(0.8);
    }
    to {
        opacity: 0;
        transform: scale(0.7);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0) scale(0.95);
    }
    to {
        opacity: 0;
        transform: translateX(-100px) scale(0.85);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0) scale(0.95);
    }
    to {
        opacity: 0;
        transform: translateX(100px) scale(0.85);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px) scale(0.85);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(0.95);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px) scale(0.85);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(0.95);
    }
}

/* Special sliding animations for center card */
.carousel-center .carousel-card.fade-out {
    animation: centerOut 0.4s ease forwards;
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.carousel-center .carousel-card.fade-in {
    opacity: 0;
    animation: centerIn 0.4s ease forwards;
    animation-delay: 0s;
    animation-fill-mode: both;
}

@keyframes centerOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9) rotateY(15deg);
    }
}

@keyframes centerIn {
    from {
        opacity: 0;
        transform: scale(0.9) rotateY(-15deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotateY(0);
    }
}

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Card Badges */
.card-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

.badge-sale,
.badge-new,
.badge-stock {
    display: inline-block;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    border-radius: 4px;
}

.badge-sale {
    background-color: #ff0000;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.3);
}

.badge-new {
    background-color: #EC297B;
    box-shadow: 0 2px 8px rgba(236, 41, 123, 0.3);
}

.badge-stock {
    background-color: #27ae60;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

/* Card Image */
.card-image {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.carousel-far-left .card-image,
.carousel-far-right .card-image {
    height: 150px;
}

.carousel-left .card-image,
.carousel-right .card-image {
    height: 200px;
}

.carousel-center .card-image {
    height: 220px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.carousel-card:hover .card-image img {
    transform: scale(1.1);
}

/* Card Content */
.card-content {
    padding: 15px;
    text-align: center;
    position: relative;
}

.carousel-left .card-content,
.carousel-right .card-content {
    padding: 12px;
}

.card-title {
    font-weight: 600;
    margin: 0 0 8px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.carousel-left .card-title,
.carousel-right .card-title {
    font-size: 13px;
}

.carousel-center .card-title {
    font-size: 15px;
}

.card-price {
    font-weight: bold;
    color: #EC297B;
    margin-bottom: 10px;
}

.carousel-left .card-price,
.carousel-right .card-price {
    font-size: 16px;
}

.carousel-center .card-price {
    font-size: 20px;
}

.card-price del {
    color: #999;
    font-size: 0.85em;
    margin-right: 5px;
}

.card-price ins {
    text-decoration: none;
}

/* Responsive Design - Tablet */
@media (max-width: 991px) {
    .video-products-container {
        padding-bottom: 120px;
    }

    .bottom-products-carousel {
        bottom: -60px;
    }

    .carousel-container {
        gap: 15px;
    }

    .carousel-left .carousel-card,
    .carousel-right .carousel-card {
        width: 200px;
    }

    .carousel-center .carousel-card {
        width: 250px;
    }

    .carousel-left .card-image,
    .carousel-right .card-image {
        height: 160px;
    }

    .carousel-center .card-image {
        height: 200px;
    }
}

/* Responsive Design - Mobile */
@media (max-width: 576px) {
    .video-products-container {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
        min-height: auto !important;
    }

    .video-products-container .bottom-products-carousel {
        display: none !important;
    }

    /* Keep standalone carousel visible on mobile */
    .product-cards-carousel-container .bottom-products-carousel {
        display: block !important;
    }

    .carousel-container {
        gap: 5px;
        padding: 0;
        overflow: hidden;
    }

    .carousel-left .carousel-card,
    .carousel-right .carousel-card {
        width: 100px;
        opacity: 1;
        transform: scale(0.85);
    }

    .carousel-center .carousel-card {
        width: 160px;
    }

    .carousel-left .card-image,
    .carousel-right .card-image {
        height: 110px;
    }

    .carousel-center .card-image {
        height: 140px;
    }

    .card-content {
        padding: 10px;
    }

    .carousel-left .card-content,
    .carousel-right .card-content {
        padding: 8px;
    }

    .carousel-left .card-title,
    .carousel-right .card-title {
        font-size: 10px;
    }

    .carousel-center .card-title {
        font-size: 12px;
        margin-bottom: 5px;
    }

    .carousel-left .card-price,
    .carousel-right .card-price {
        font-size: 12px;
    }

    .carousel-center .card-price {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .carousel-left .card-stock-badge,
    .carousel-right .card-stock-badge {
        font-size: 7px;
        padding: 3px 6px;
    }

    .carousel-center .card-stock-badge {
        font-size: 8px;
        padding: 4px 8px;
    }

    .badge-sale,
    .badge-new,
    .badge-stock {
        font-size: 8px;
        padding: 3px 6px;
    }
}

/* Very small screens */
@media (max-width: 420px) {
    .carousel-left .carousel-card,
    .carousel-right .carousel-card {
        width: 80px;
        transform: scale(0.8);
    }

    .carousel-center .carousel-card {
        width: 140px;
    }

    .carousel-left .card-image,
    .carousel-right .card-image {
        height: 90px;
    }

    .carousel-center .card-image {
        height: 120px;
    }

    .carousel-left .card-title,
    .carousel-right .card-title {
        font-size: 9px;
    }

    .carousel-center .card-title {
        font-size: 11px;
    }

    .carousel-left .card-price,
    .carousel-right .card-price {
        font-size: 11px;
    }

    .carousel-center .card-price {
        font-size: 13px;
    }
}

/* Animation for initial appearance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.bottom-products-carousel {
    animation: fadeInUp 0.8s ease 0.3s both;
}