/* ========== WOO VIDEO PRODUCTS GRID ========== */
.wvp-section {
    padding: 0 0 40px;
}

.wvp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.wvp-card {
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.wvp-card:hover {
    transform: translateY(-4px);
    transition: transform 0.2s ease;
}

.wvp-thumb {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 12px;
}

.wvp-thumb img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 9/16;
    object-fit: cover;
}

.wvp-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.wvp-play svg {
    width: 28px;
    height: 28px;
}

.wvp-body {
    padding: 12px 4px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Hide CTA button below cards on video grid — popup has CTAs instead */
.wvp-body .button_section {
    display: none;
}

.wvp-title {
    font-size: 14px;
    font-weight: 400;
    color: #111;
    line-height: 1.4;
    text-transform: capitalize;
    margin: 0 0 8px;
    flex-grow: 1;
}

.wvp-btn {
    display: inline-block;
}

/* ========== FILTERS ========== */
.wvp-filters {
    padding: 10px 0 10px;
}

.wvp-filters form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.wvp-filters select {
    padding: 8px 38px 8px 16px;
    min-width: 160px;
    border-radius: 999px;
    border: 1px solid #FF7396;
    background-color: #fff;
    font-size: 14px;
    font-weight: 500;
    color: #111;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9L12 15L18 9' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    box-shadow: 0 2px 4px rgba(255, 115, 150, 0.12);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.wvp-filters select:hover {
    border-color: #FF7396;
    box-shadow: 0 4px 10px rgba(255, 115, 150, 0.25);
}

.wvp-filters select:focus {
    outline: none;
    border-color: #FF7396;
    box-shadow: 0 0 0 2px #ffb9ca, 0 4px 12px rgba(255, 115, 150, 0.35);
}

.wvp-reset-filter {
    font-size: 14px;
    color: #807676 !important;
    text-decoration: underline;
}

.wvp-reset-filter:hover {
    color: #000 !important;
}

/* ========== POPUP (Enhanced – video left, product info right) ========== */
.wvp-popup {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-y: auto;
}

.wvp-popup.active {
    display: flex;
}

/* Row container — mirrors .product-gallery-popup-wrapper .row-container */
.wvp-popup-row-container {
    position: relative;
    display: flex;
    align-items: flex-start;
    width: 90%;
    max-width: 900px;
    background: #fff;
    padding: 60px 30px 40px;
    border-radius: 10px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Fallback for basic popup (no row-container, e.g. single product page) */
.wvp-popup-inner {
    position: relative;
    width: 100%;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* When inside row-container, constrain video to left column */
.wvp-popup-row-container .wvp-popup-video-container {
    width: 55%;
    flex-shrink: 0;
}

.wvp-popup-row-container .wvp-popup-inner {
    max-height: 70vh;
}

.wvp-popup-inner video,
.wvp-popup-inner .plyr {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 10px;
}

/* Override Plyr's dark background inside popup */
.wvp-popup-inner .plyr,
.wvp-popup-inner .plyr__video-wrapper,
.wvp-popup-inner .plyr--video {
    background: #fff !important;
}

/* Video-only fallback (no product data) — full width, no white card */
.wvp-popup--video-only .wvp-popup-row-container {
    background: transparent;
    padding: 0;
    max-width: 420px;
    max-height: none;
    overflow: visible;
}

.wvp-popup--video-only .wvp-popup-video-container {
    width: 100%;
}

.wvp-popup--video-only .wvp-popup-inner {
    max-width: 420px;
    margin: 0 auto;
    max-height: none;
    background: transparent;
    overflow: visible;
}

.wvp-popup--video-only .wvp-popup-inner video,
.wvp-popup--video-only .wvp-popup-inner .plyr {
    max-height: 92vh;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    display: block;
}

.wvp-popup--video-only .wvp-popup-close {
    color: #fff;
    border-color: #fff;
    background: rgba(0, 0, 0, 0.5);
}

.wvp-popup--video-only .wvp-popup-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.wvp-popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #333;
    line-height: 28px;
    text-align: center;
    font-size: 18px;
    color: #333;
    cursor: pointer;
    z-index: 10001;
    background: #fff;
}

.wvp-popup-close:hover {
    background: #f5f5f5;
}

/* Right column — product info + CTAs */
.wvp-popup-content {
    width: 45%;
    padding-left: 24px;
    display: flex;
    flex-direction: column;
}

.wvp-popup-title {
    font-size: 20px;
    font-weight: 600;
    color: #111;
    margin: 0 0 14px;
    line-height: 1.3;
}

.wvp-popup-features {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
}

.wvp-popup-features li {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #313131;
    margin-bottom: 6px;
}

.wvp-popup-features li svg {
    margin-right: 6px;
    flex-shrink: 0;
}

.wvp-popup-price {
    display: none;
}

.wvp-popup-content .live-counter {
    font-size: 13px;
    color: #666;
    margin-bottom: 16px;
}

.wvp-popup-content .button_section {
    margin-bottom: 12px;
}

.wvp-popup .wvp-popup-content .button_section {
    margin-bottom: 16px !important;
}

.wvp-popup-content .popup-edit-button {
    display: block;
    text-align: center;
    padding: 12px 24px;
    border-radius: 200px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;
    transition: background 0.2s, color 0.2s;
}

.wvp-popup-content .wvp-popup-cta-edit {
    background: #FF7396;
    color: #fff;
    border: 1px solid #FF7396;
}

.wvp-popup-content .wvp-popup-cta-edit:hover {
    background: #ff5a80;
    color: #fff;
}

.wvp-popup-content .wvp-popup-cta-details {
    background: #fff;
    color: #FF7396;
    border: 1px solid #FF7396;
}

.wvp-popup-content .wvp-popup-cta-details:hover {
    background: #fff5f8;
    color: #ff5a80;
}

/* ========== EMPTY STATE ========== */
.wvp-empty {
    text-align: center;
    padding: 60px 20px;
    margin: 30px auto;
    background: #fff5f8;
    border-radius: 16px;
    border: 1px dashed #ffbdd0;
    max-width: 550px;
}

.wvp-empty span {
    font-size: 32px;
    display: block;
    margin-bottom: 12px;
}

.wvp-empty h3 {
    font-size: 1.3rem;
    color: #333;
    margin: 0 0 8px;
}

.wvp-empty p {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
}

/* ========== PAGINATION ========== */
.wvp-pagination {
    margin-top: 30px;
    text-align: center;
}

/* ========== SINGLE PRODUCT VIDEO PLAYER ========== */
.wvp-single-video-wrapper {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 12px;
    max-width: 100%;
}

.wvp-single-video-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 9/16;
    object-fit: cover;
    border-radius: 12px;
}

.wvp-single-video-wrapper .wvp-play {
    width: 72px;
    height: 72px;
    background: rgba(0, 0, 0, 0.5);
    transition: background 0.2s ease, transform 0.2s ease;
}

.wvp-single-video-wrapper:hover .wvp-play {
    background: rgba(0, 0, 0, 0.7);
    transform: translate(-50%, -50%) scale(1.08);
}

.wvp-single-video-wrapper .wvp-play svg {
    width: 32px;
    height: 32px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .wvp-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .wvp-popup-row-container {
        width: 95%;
        padding: 50px 20px 30px;
    }
}

@media (max-width: 768px) {
    .wvp-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Stack popup: video on top, content below */
    .wvp-popup-row-container {
        flex-direction: column;
        width: 100%;
        max-height: 95vh;
        padding: 50px 16px 30px;
        border-radius: 0;
    }

    .wvp-popup-row-container .wvp-popup-video-container,
    .wvp-popup-content {
        width: 100%;
    }

    .wvp-popup-content {
        padding-left: 0;
        padding-top: 16px;
    }

    .wvp-popup-row-container .wvp-popup-inner {
        max-height: 50vh;
    }

    .wvp-popup-inner video,
    .wvp-popup-inner .plyr {
        max-height: 50vh;
    }

    /* Video-only on mobile: let it use full height */
    .wvp-popup--video-only .wvp-popup-row-container {
        max-height: none;
        padding: 0;
        width: auto;
    }

    .wvp-popup--video-only .wvp-popup-row-container .wvp-popup-inner {
        max-height: none;
    }

    .wvp-popup--video-only .wvp-popup-inner video,
    .wvp-popup--video-only .wvp-popup-inner .plyr {
        max-height: 92vh;
    }
}

@media (max-width: 640px) {
    .wvp-filters form {
        flex-direction: column;
        align-items: stretch;
    }

    .wvp-filters select {
        width: 100%;
    }

    .wvp-grid {
        gap: 8px;
    }

    .wvp-body {
        padding: 8px 2px;
    }

    .wvp-title {
        font-size: 13px;
    }

    .wvp-reset-filter {
        margin-top: 0.5rem;
    }

    .wvp-popup-title {
        font-size: 17px;
    }

    .wvp-popup-content .button_section {
        margin-bottom: 16px;
}

    .wvp-popup-content .popup-edit-button {
        font-size: 14px;
        padding: 10px 20px;
    }
}
