/* Video Moments Section */
.video-moments-section {
    width: 100%;
}

.video-moments-section .page-width {
    overflow: hidden;
    padding: 0px;

}

.video-moments-section video-moments {
    display: block;
}

/* Header */
.video-moments-section .video-moments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.video-moments-section .video-moments-title {
    color: rgb(var(--color-text));
    margin: 0;
}

/* Theme carousel controls */
.video-moments-section .video-moments-navigation {
    display: flex;
    gap: 12px;
}

.video-moments-section .video-moments-carousel__button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    color: rgb(var(--color-button-secondary-text));
    background: rgb(var(--color-button-secondary-background));
    border: 1px solid rgb(var(--color-button-secondary-border));
    border-radius: 50%;
    transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
    cursor: pointer;
}

.video-moments-section .video-moments-carousel__button:disabled {
    display: flex;
    opacity: 0.4;
    cursor: default;
}

.video-moments-section .video-moments-carousel__button svg {
    width: 20px;
    height: 20px;
}

.video-moments-section .video-moments-carousel__button--previous svg {
    transform: rotate(180deg);
}

@media (hover: hover) and (pointer: fine) {
    .video-moments-section .video-moments-carousel__button:not(:disabled):hover {
        color: rgb(var(--color-button-text));
        background: rgb(var(--color-button-background));
        border-color: rgb(var(--color-button-background));
    }
}

/* Theme carousel track */
.video-moments-section .video-moments-track {
    --column-gap: var(--video-moments-card-gap, 20px);
    --row-gap: var(--video-moments-card-gap, 20px);

    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: var(--column-width);
    overflow-x: auto;
    scroll-snap-type: x proximity;
}

.video-moments-section .video-moments-slide {
    min-width: 0;
    height: auto;
}

.video-moments-section .video-moments-slide > * {
    height: 100%;
}

.video-moments-section .video-moments-slide .video-card {
    height: 100%;
}

.video-moments-section video-moments[data-center-mode="true"] .video-moments-track {
    align-items: center;
    padding-block: 48px;
}

.video-moments-section video-moments[data-center-mode="true"] .video-moments-slide {
    z-index: 1;
    transform: scale(0.9);
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.video-moments-section video-moments[data-center-mode="true"] .video-moments-slide.is-active {
    z-index: 2;
    transform: scale(1.08);
}

@media (min-width: 769px) {
    .video-moments-section video-moments[data-center-mode="true"] .video-card-media {
        aspect-ratio: 3 / 4;
    }
}

/* Video Card */
.video-moments-section .video-card {
    position: relative;
    border-radius: var(--video-card-radius, 16px);
    overflow: hidden;
    cursor: pointer;
    background: #f5f5f5;
}

.video-moments-section .video-card--no-video {
    cursor: default;
}

.video-moments-section .video-card-media {
    position: relative;
    aspect-ratio: var(--video-card-ratio, 9 / 16);
    overflow: hidden;
}

.video-moments-section .video-card-media img,
.video-moments-section .video-card-media svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.video-moments-section .video-card:hover .video-card-media img {
    transform: scale(1.05);
}

/* Play Button */
.video-moments-section .video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;

    transition: all 0.3s ease;
    z-index: 2;
}

.video-moments-section .video-play-btn:hover {
    background: #fff;
}

@media (min-width: 769px) {
    .video-moments-section .video-play-btn {
        width: 80px;
        height: 80px;
        background: rgba(255, 255, 255, 0.9);
    }

    .video-moments-section .video-play-btn svg {
        width: 32px;
        height: 32px;
    }
}

/* Card Text */
.video-moments-section .video-card-text {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    line-height: 1.4;
    z-index: 2;
}

/* Product Card */
.video-moments-section .video-card-product {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #fff;
    border-radius: 5px;
    margin-top: -16px;
    position: absolute;
    bottom: 20px;
    z-index: 3;
    left: 20px;
    right: 20px;
}

.video-moments-section .product-thumb {
    display: block;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    overflow: hidden;
    background: #f5f5f5;
}

.video-moments-section .product-title-link {
    display: block;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.video-moments-section .product-title-link:hover .product-title {
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.video-moments-section .product-thumb img,
.video-moments-section .product-thumb svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-moments-section .product-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.video-moments-section .product-title {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-moments-section .product-price {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.4;
}

.video-moments-section .product-cart-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #FF8F43;
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.3s ease;
    text-decoration: none;
    position: absolute;
    right: -10px;
    top: -10px;
    padding: 0;
    border: 0;
    cursor: pointer;
}

.video-moments-section .product-cart-btn:hover {
    background: #e87d35;
}

.video-moments-section .product-cart-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.video-moments-section .product-cart-btn__spinner { display: none; }
.video-moments-section .product-cart-btn.loading .product-cart-btn__icon { visibility: hidden; }
.video-moments-section .product-cart-btn.loading .product-cart-btn__spinner {
    position: absolute;
    display: block;
    width: 20px;
    height: 20px;
    transform-origin: center;
    animation: animation-circling 1s linear infinite;
}

.video-cart-status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    white-space: nowrap;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
}

/* Mouse-capable desktop: keep the video cover clean until the card is
   hovered or reached with the keyboard. Touch layouts remain always visible. */
@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
    .video-moments-section video-moments[data-desktop-product-display="hover"]
    .video-card:not(.video-card--no-video) > .video-card-product {
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transform: translateY(14px);
        transition:
            opacity 0.22s ease,
            transform 0.22s ease,
            visibility 0s linear 0.22s;
        will-change: opacity, transform;
    }

    .video-moments-section video-moments[data-desktop-product-display="hover"]
    .video-card:not(.video-card--no-video):hover > .video-card-product,
    .video-moments-section video-moments[data-desktop-product-display="hover"]
    .video-card:not(.video-card--no-video):focus-within > .video-card-product {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
        transition-delay: 0s;
    }
}

@media (min-width: 769px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: reduce) {
    .video-moments-section video-moments[data-desktop-product-display="hover"]
    .video-card:not(.video-card--no-video) > .video-card-product {
        transform: none;
        transition: none;
    }
}

/* Pagination */
.video-moments-section .video-moments-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-block-start: var(--carousel-pagination-spacing, 24px);
}

.video-moments-section .video-moments-pagination:empty {
    display: none;
}

/* Lightbox */
.video-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-index-modal) - 1);
    align-items: center;
    justify-content: center;
}

 .video-lightbox.active {
    display: flex;
}

.video-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.video-lightbox-body {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: min(900px, calc(90vh * var(--video-preview-ratio, 9 / 16)));
    max-height: 90vh;
    aspect-ratio: var(--video-preview-ratio, 9 / 16);
}

.video-lightbox-player,
.video-lightbox-player video,
.video-lightbox-player iframe {
    width: 100%;
    height: 100%;
}

.video-lightbox-player video,
.video-lightbox-player iframe {
    display: block;
    border: 0;
    border-radius: 12px;
    object-fit: contain;
    background: #000;
}

.video-lightbox-product {
    position: absolute;
    inset-inline: 16px;
    inset-block-end: 16px;
    z-index: 3;
}

.video-lightbox-product[hidden] {
    display: none;
}

.video-lightbox-product-card {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    color: #1a1a1a;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
}

.video-lightbox-product-card .product-info {
    flex: 1 1 auto;
    min-width: 0;
}

.video-lightbox-product-card .product-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-lightbox-product-card .product-cart-btn {
    flex: 0 0 auto;
}

.video-lightbox-close {
    position: absolute;
    inset-block-start: 14px;
    inset-inline-end: 14px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    background: rgba(24, 18, 16, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.video-lightbox-close:hover {
    background: rgba(24, 18, 16, 0.86);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.video-lightbox-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}


/* ======================================== */
/* Mobile Styles */
/* ======================================== */
@media (max-width: 959px) {
    .video-moments-section .video-moments-track {
        --column-gap: var(--video-moments-mobile-card-gap, 14px);
        --row-gap: var(--video-moments-mobile-card-gap, 14px);

        width: calc(100% + var(--page-padding) * 2);
        padding-inline: var(--page-padding);
        margin-inline: calc(-1 * var(--page-padding));
        scroll-padding-inline: var(--page-padding);
    }

   .video-moments-section  .video-moments-header {
        margin-bottom: 24px;
    }

   .video-moments-section .video-moments-navigation {
        display: none;
    }

    .video-moments-section video-moments[data-center-mode="true"] .video-moments-track {
        padding-block: 28px;
    }

    .video-moments-section video-moments[data-center-mode="true"] .video-moments-slide.is-active {
        transform: scale(1.04);
    }

    .video-moments-section .page-width {
        padding: 0px 20px;
    }
}

@media (max-width: 768px) {
    .video-moments-section .video-play-btn {
        width: 40px;
        height: 40px;
    }

    .video-moments-section .video-card-text {
        font-size: 13px;
    }

    .video-moments-section .video-card-media {
        aspect-ratio: var(--video-moments-mobile-ratio, 3 / 4);
    }

    .video-lightbox-body {
        width: min(90%, calc(86vh * var(--video-preview-ratio, 9 / 16)));
        max-height: 86vh;
    }

    .video-lightbox-close {
        inset-block-start: 10px;
        inset-inline-end: 10px;
    }

    .video-lightbox-product {
        inset-inline: 10px;
        inset-block-end: 10px;
    }

    .video-lightbox-product-card {
        padding: 8px 10px;
    }
}


