/* 移动端商品弹窗 - 基础样式 */

/* 遮罩层 */
.mobile-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: none; /* 默认不拦截点击事件 */
}

/* 背景遮罩层 - 避开底部导航栏 */
.mobile-modal-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 80px; /* 为底部导航栏留出空间 */
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    z-index: -1;
}

/* 弹窗内容区域恢复点击事件 */
.mobile-modal-overlay .mobile-modal-content {
    pointer-events: auto;
}

/* 弹窗主体 */
.mobile-modal-content {
    background: white;
    border-radius: 12px;
    width: 80%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 关闭按钮 */
.mobile-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    border: none;
    font-size: 18px;
    color: #666;
    transition: all 0.2s ease;
}

.mobile-modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #333;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.3s ease-in-out forwards;
}

.slide-up {
    animation: slideUp 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
    }
    to { 
        opacity: 1; 
    }
}

@keyframes slideUp {
    from { 
        transform: translateY(20px); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0); 
        opacity: 1; 
    }
}

/* 响应式调整 */
@media (max-width: 480px) {
    .mobile-modal-overlay {
        padding: 10px;
    }
    
    .mobile-modal-content {
        max-height: 90vh;
    }
}
