/* ============================================
   Product View Widget — Popup Styles
   ============================================ */

/* Trigger Button */
.wd-product-view-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #4054b2;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 1;
}

.wd-product-view-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(64, 84, 178, 0.4);
}

/* Overlay */
.wd-product-view-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.wd-product-view-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Popup Dialog */
.wd-product-view-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 1000000;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
}

.wd-product-view-dialog.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Close Button */
.wd-product-view-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    color: #333;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.wd-product-view-close:hover {
    background: #e0e0e0;
}

/* iframe */
.wd-product-view-iframe {
    width: 100%;
    height: 100%;
    border: none;
    flex: 1;
}

/* Loading Spinner */
.wd-product-view-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #666;
    font-size: 14px;
}

.wd-product-view-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e0e0e0;
    border-top-color: #4054b2;
    border-radius: 50%;
    animation: wd-pv-spin 0.8s linear infinite;
}

@keyframes wd-pv-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .wd-product-view-dialog {
        width: 95vw !important;
        height: 90vh !important;
        border-radius: 8px;
    }
}