/* ===================================
   Responsive Styles
   =================================== */

/* 平板设备 */
@media (max-width: 1024px) {
    .vpw-carousel-title {
        font-size: 28px;
    }
    
    .vpw-modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .vpw-desktop-layout {
        grid-template-columns: 1fr 0.9fr;
    }
    
    .vpw-product-content {
        padding: 24px;
    }
    
    .vpw-product-title {
        font-size: 20px;
    }
    
    .vpw-product-price {
        font-size: 24px;
    }
}

/* 移动设备 - 横屏模式优先显示视频 */
@media (max-width: 768px) and (orientation: landscape) {
    .vpw-desktop-layout {
        grid-template-columns: 1.5fr 1fr;
        height: 95vh;
    }
    
    .vpw-product-content {
        padding: 20px;
    }
    
    .vpw-product-gallery img {
        height: 200px;
    }
}

/* 移动设备 - 竖屏模式 */
@media (max-width: 768px) {
    /* 轮播 */
    .vpw-carousel-wrapper {
        padding: 0 15px;
        margin: 30px 0;
    }
    
    .vpw-carousel-title {
        font-size: 24px;
    }
    
    .vpw-carousel-title::before {
        font-size: 16px;
    }
    
    /* 隐藏PC布局，显示移动布局 */
    .vpw-desktop-layout {
        display: none !important;
    }
    
    .vpw-mobile-layout {
        display: flex !important;
        flex-direction: column;
        height: 100vh;
        max-height: 100vh;
    }
    
    .vpw-modal-container {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    /* 视频区域 */
    .vpw-mobile-layout .vpw-video-section {
        flex: 0 0 auto;
        height: 60vh;
    }
    
    /* 产品区域 */
    .vpw-mobile-layout .vpw-product-section {
        flex: 1;
        overflow-y: auto;
        position: relative;
    }
    
    /* 产品预览（未展开状态） */
    .vpw-product-preview {
        padding: 20px;
        background: white;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        margin-top: -20px;
        position: relative;
        z-index: 2;
    }
    
    .vpw-product-preview-content {
        display: flex;
        align-items: center;
        gap: 16px;
        margin-bottom: 16px;
    }
    
    .vpw-preview-image {
        width: 80px;
        height: 80px;
        border-radius: 12px;
        object-fit: cover;
        flex-shrink: 0;
    }
    
    .vpw-preview-info {
        flex: 1;
    }
    
    .vpw-preview-title {
        font-size: 16px;
        font-weight: 700;
        color: #2d3748;
        margin: 0 0 4px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .vpw-preview-price {
        font-size: 20px;
        font-weight: 700;
        color: #4299e1;
    }
    
    /* SHOP NOW 按钮 */
    .vpw-shop-now-btn {
        width: 100%;
        padding: 16px;
        background: #4fd1c5;
        color: white;
        border: none;
        border-radius: 12px;
        font-size: 16px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .vpw-shop-now-btn:active {
        transform: scale(0.98);
    }
    
    /* 完整产品信息（展开状态） */
    .vpw-product-details {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: white;
        z-index: 3;
        animation: vpw-slideUpMobile 0.4s ease;
        overflow-y: auto;
    }
    
    .vpw-product-details.show {
        display: block !important;
    }
    
    .vpw-product-details .vpw-product-content {
        padding: 20px;
        padding-bottom: 80px;
    }
    
    /* 返回按钮 */
    .vpw-back-btn {
        position: sticky;
        top: 0;
        left: 0;
        width: 100%;
        padding: 16px 20px;
        background: white;
        border: none;
        border-bottom: 1px solid #e2e8f0;
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 16px;
        font-weight: 600;
        color: #4a5568;
        cursor: pointer;
        z-index: 10;
    }
    
    .vpw-back-btn svg {
        width: 20px;
        height: 20px;
    }
    
    /* 移动端产品信息样式调整 */
    .vpw-mobile-layout .vpw-product-gallery img {
        height: 250px;
    }
    
    .vpw-mobile-layout .vpw-product-title {
        font-size: 18px;
    }
    
    .vpw-mobile-layout .vpw-product-price {
        font-size: 24px;
    }
    
    .vpw-mobile-layout .vpw-product-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 16px 20px;
        background: white;
        border-top: 1px solid #e2e8f0;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 20;
    }
    
    .vpw-mobile-layout .vpw-btn {
        padding: 14px 20px;
        font-size: 14px;
    }
    
    /* 关闭按钮移动端调整 */
    .vpw-mobile-layout .vpw-modal-close {
        top: 12px;
        right: 12px;
        background: rgba(0, 0, 0, 0.6);
    }
    
    .vpw-mobile-layout .vpw-modal-close svg {
        color: white;
    }
    
    @keyframes vpw-slideUpMobile {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    .vpw-carousel-title {
        font-size: 20px;
    }
    
    .vpw-variation-option {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .vpw-quantity-selector {
        width: 100%;
    }
    
    .vpw-quantity-input {
        flex: 1;
    }
    
    .vpw-product-actions {
        flex-direction: column;
    }
    
    .vpw-btn {
        width: 100%;
    }
}

/* 超大屏幕 */
@media (min-width: 1440px) {
    .vpw-carousel-wrapper {
        max-width: 1600px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .vpw-modal-container {
        max-width: 1400px;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    /* 可选：添加暗色模式样式 */
}

/* 减少动画（辅助功能） */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 打印样式 */
@media print {
    .vpw-modal,
    .vpw-carousel-wrapper {
        display: none !important;
    }
}
