/* ===================================
   Modal Styles
   =================================== */

.vpw-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vpw-modal.vpw-modal-open {
    display: flex !important;
}

/* 遮罩层 */
.vpw-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    animation: vpw-fadeIn 0.3s ease;
}

/* 容器 */
.vpw-modal-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    animation: vpw-slideUp 0.4s ease;
    z-index: 1;
}

/* 关闭按钮 */
.vpw-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}

.vpw-modal-close:hover {
    background: white;
    transform: scale(1.1);
}

.vpw-modal-close svg {
    color: #2d3748;
}

/* PC端双栏布局 */
.vpw-desktop-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    height: 85vh;
}

.vpw-mobile-layout {
    display: none;
}

/* 视频区域 */
.vpw-video-section {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.vpw-video-section .video-js {
    width: 100%;
    height: 100%;
}

/* 产品区域 */
.vpw-product-section {
    background: white;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.vpw-product-content {
    padding: 30px;
}

/* 产品图片轮播 */
.vpw-product-gallery {
    margin-bottom: 24px;
}

.vpw-product-gallery .swiper {
    border-radius: 12px;
    overflow: hidden;
}

.vpw-product-gallery img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.vpw-product-gallery .swiper-pagination {
    bottom: 12px;
}

.vpw-product-gallery .swiper-pagination-bullet {
    background: white;
    opacity: 0.6;
}

.vpw-product-gallery .swiper-pagination-bullet-active {
    opacity: 1;
}

/* 产品信息 */
.vpw-product-title {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 12px;
    line-height: 1.3;
}

.vpw-product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.vpw-product-stars {
    display: flex;
    gap: 2px;
}

.vpw-product-stars svg {
    width: 16px;
    height: 16px;
}

.vpw-product-rating-count {
    font-size: 14px;
    color: #718096;
}

.vpw-product-price {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 24px;
}

.vpw-product-price del {
    font-size: 20px;
    color: #a0aec0;
    margin-left: 8px;
}

/* 变体选择 */
.vpw-product-variations {
    margin-bottom: 24px;
}

.vpw-variation-group {
    margin-bottom: 20px;
}

.vpw-variation-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vpw-variation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.vpw-variation-option {
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.vpw-variation-option:hover {
    border-color: #cbd5e0;
}

.vpw-variation-option.selected {
    border-color: #4299e1;
    background: #ebf8ff;
    color: #2c5282;
}

.vpw-variation-option.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 颜色变体 */
.vpw-variation-color {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.vpw-variation-color:hover {
    transform: scale(1.1);
}

.vpw-variation-color.selected {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

.vpw-variation-color.selected::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-weight: bold;
}

/* 数量选择 */
.vpw-quantity-wrapper {
    margin-bottom: 24px;
}

.vpw-quantity-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vpw-quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    width: fit-content;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.vpw-quantity-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f7fafc;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: #4a5568;
    transition: all 0.2s ease;
}

.vpw-quantity-btn:hover {
    background: #edf2f7;
}

.vpw-quantity-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.vpw-quantity-input {
    width: 60px;
    height: 40px;
    border: none;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

/* 按钮 */
.vpw-product-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.vpw-btn {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vpw-btn-primary {
    background: #4299e1;
    color: white;
}

.vpw-btn-primary:hover {
    background: #3182ce;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.4);
}

.vpw-btn-secondary {
    background: white;
    color: #4299e1;
    border: 2px solid #4299e1;
}

.vpw-btn-secondary:hover {
    background: #ebf8ff;
}

.vpw-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.vpw-btn-loading::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: vpw-spin 0.6s linear infinite;
}

/* 动画 */
@keyframes vpw-fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes vpw-slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes vpw-spin {
    to {
        transform: rotate(360deg);
    }
}
