/* 产品快速预览弹窗样式 */

/* 弹窗遮罩 */
.pqv-modal-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pqv-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

/* 弹窗内容 */
.pqv-modal-content {
    position: relative;
    background: #fff;
    max-width: 1000px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
    padding: 20px 20px;
    box-sizing: border-box;
}

.pqv-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    z-index: 10;
    line-height: 1;
    transition: color 0.3s;
}

.pqv-modal-close:hover {
    color: #333;
}

/* 弹窗主体布局 */
.pqv-modal-body {
    display: flex;
    gap: 30px;
    max-width: 100%;
    box-sizing: border-box;
}

/* 左侧图片区 */
.pqv-left-column {
    flex-shrink: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.pqv-main-image {
    width: 400px;
    max-width: 100%;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f5;
    margin-bottom: 15px;
    box-sizing: border-box;
    position: relative;
}

/* 左右切换箭头按钮 */
.pqv-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}

.pqv-nav-btn:hover {
    opacity: 0.7;
}

.pqv-nav-btn svg {
    color: #e67e22;
    stroke: #e67e22;
    width: 32px;
    height: 32px;
}

.pqv-nav-prev {
    left: 5px;
}

.pqv-nav-next {
    right: 5px;
}

.pqv-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    max-width: 100%;
}

.pqv-thumbs-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pqv-thumb-item {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.pqv-thumb-item:hover,
.pqv-thumb-item.active {
    border-color: #EF7800;
}

.pqv-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

/* 右侧信息区 */
.pqv-right-column {
    flex: 1;
    min-width: 0;
}

.pqv-product-title {
    font-size: 24px;
    font-weight: 600;
    color: #1A1A1A;
    margin: 0 0 15px;
    line-height: 1.3;
}

/* 标签 */
.pqv-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.pqv-tag {
    display: inline-block;
    padding: 5px 15px;
    background: #f5f5f5;
    color: #666;
    font-size: 13px;
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pqv-tag:hover {
    background: #e0e0e0;
    color: #333;
}

.pqv-category-link {
    cursor: pointer;
}

/* SKU */
.pqv-sku {
    font-size: 13px;
    color: #999;
    margin-bottom: 20px;
}

/* 产品详情标题 */
.pqv-detail-title {
    font-size: 16px;
    font-weight: 600;
    color: #1A1A1A;
    margin: 0 0 10px;
    display: none; /* 彻底隐藏，无任何占位 */
}

/* 简短描述：强制渲染为H5样式，Woocommerce输纯文字即可自动适配 */
.pqv-short-description {
    font-size: 20px; /* H4字号，可按需调 */
    font-weight: 600; /* H5加粗 */
    color: #1A1A1A; /* 深黑色，B端醒目 */
    line-height: 1.5; /* 紧凑行高，贴合B端 */
    margin-bottom: 20px;
    white-space: pre-line; /* 保留后台输入的换行，排版不混乱 */
}


/* 订购数量 */
.pqv-quantity-section {
    margin-bottom: 15px;
}

.pqv-qty-label {
    display: block;
    font-size: 16px; /* 原14px，调大到16px */
    color: #1A1A1A;
    margin-bottom: 10px;
    font-weight: 500;
    position: relative; 
    height: auto; /* 取消固定高度，让容器自适应文字高度，核心解决遮挡 */
    overflow: hidden; 
}

.pqv-qty-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pqv-qty-option {
    padding: 8px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background: #fff;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.pqv-qty-option:hover {
    background: #f5f5f5;
}

.pqv-qty-option.active {
    background: #1A1A1A;
    color: #fff;
    border-color: #1A1A1A;
}

/* 数量输入 */
.pqv-input-quantity {
    margin-bottom: 20px;
}

.pqv-qty-input {
    width: 120px;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    text-align: center !important;
    -moz-appearance: textfield;
    appearance: textfield;
}

.pqv-qty-input::-webkit-outer-spin-button,
.pqv-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pqv-qty-input:focus {
    outline: none;
    border-color: #EF7800;
}

/* 按钮 */
.pqv-buttons {
    display: flex;
    gap: 15px;
}

.pqv-whatsapp-btn,
.pqv-cart-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.pqv-whatsapp-btn {
    background: #25D366;
    color: #fff;
    border: 2px solid #25D366;
}

.pqv-whatsapp-btn:hover {
    background: #1da851;
    border-color: #1da851;
    color: #fff;
}

.pqv-whatsapp-btn svg {
    fill: currentColor;
}

.pqv-cart-btn {
    background: #EF7800;
    color: #fff;
    border: 2px solid #EF7800;
}

.pqv-cart-btn:hover {
    background: #d66a00;
    border-color: #d66a00;
}

.pqv-cart-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.pqv-cart-btn.added {
    background: #27ae60;
    border-color: #27ae60;
}

/* 初始状态按钮顺序 */
.pqv-buttons .pqv-cart-btn {
    order: 0;
}

.pqv-buttons .pqv-whatsapp-btn {
    order: 1;
}

/* 添加到购物车后的按钮状态 - 购物车按钮变成取消按钮，位置互换 */
.pqv-buttons.added-state .pqv-cart-btn {
    background: #666666 !important;
    color: #ffffff !important;
    border: 1px solid #666666 !important;
    order: 2 !important;
}

.pqv-buttons.added-state .pqv-cart-btn:hover {
    background: #555555 !important;
    border-color: #555555 !important;
    color: #ffffff !important;
}

.pqv-buttons.added-state .pqv-cart-btn svg {
    display: none !important;
}

.pqv-buttons.added-state .pqv-whatsapp-btn {
    order: 0 !important;
    background: #25D366 !important;
    color: #fff !important;
    border-color: #25D366 !important;
}

/* 底部产品描述 */
.pqv-description-title {
    font-size: 18px;
    font-weight: 600;
    color: #1A1A1A;
    margin: 0 0 15px;
    display: none; /* 彻底隐藏，无任何占位 */
}

/* 底部产品描述：父容器样式，沿用框架+微调边距（去掉标题后优化） */
.pqv-description-section {
    margin-top: 30px; /* 原30px，去掉标题后减小，可微调 */
    padding-top: 0px; /* 原20px → 改为8px，仅保留少量内边距，避免内容贴分隔线 */
    border-top: 1px solid #f5f5f5; /* 替换原#eee，和你修改版统一 */
}
/* 产品详情内容容器：基础样式，沿用框架 */
.pqv-description-content {
    font-size: 14px;
    color: #666;
    line-height: 1.9; /* 你修改版的舒展开行距，保留 */
    padding: 20px 0; /* 避免内容贴边，保留 */
}
/* 详情内容：文字样式，沿用框架 */
.pqv-description-content p {
    color: #444;
    margin: 0 0 15px;
}
/* 详情内容：标题样式（h3/h4，你后续可加二级标题，保留框架） */
.pqv-description-content h3, 
.pqv-description-content h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1A1A1A;
    margin: 30px 0 15px;
    border-left: 3px solid #EF7800; /* 你的主题色，保留 */
    padding-left: 12px;
    letter-spacing: 0.5px;
}
/* 详情内容：列表样式（修复圆点颜色bug，仅圆点橙色，文字黑色） */
.pqv-description-content ul {
    margin: 0 0 15px 25px;
    /* 新增：控制列表圆点颜色 */
    list-style-type: disc;
    color: #EF7800; /* 仅圆点为主题色 */
}
.pqv-description-content li {
    color: #444; /* 列表文字恢复黑色，仅圆点橙色 */
    font-size: 14px;
    margin: 0 0 10px;
    /* 移除原错误的color: #EF7800; */
}
/* 详情内容：参数文字样式（你修改版的param-text，保留框架） */
.pqv-description-content .param-text {
    color: #333;
    font-size: 14px;
    background: #f9f9f9;
    padding: 12px 15px;
    border-radius: 8px;
    margin: 10px 0;
    display: inline-block;
}
/* 核心：详情图片样式（沿用你的尺寸框架+提高选择器权重，无!important） */
.pqv-modal-content .pqv-description-content img {
    width: 100%;
    max-width: 950px; /* 适配弹窗1000px宽度，留边距，保留 */
    height: auto; /* 不变形，保留 */
    object-fit: cover; /* 高清裁剪，保留 */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin: 20px 0;
    display: block;
}
/* 图片和文字间距：避免拥挤，保留 */
.pqv-modal-content .pqv-description-content p + img {
    margin-top: 25px;
}
.pqv-modal-content .pqv-description-content img + p {
    margin-top: 25px;
}

/* 整合所有移动端样式（统一一个@media块，结构更清晰） */
@media (max-width: 768px) {
    /* 底部产品描述-移动端适配 */
    .pqv-modal-content .pqv-description-content img {
        max-width: 100%;
        margin: 15px 0;
        border-radius: 8px;
    }
    .pqv-description-content h3 {
        margin: 25px 0 12px;
        font-size: 16px;
    }

    /* 全局响应式（移除所有!important，提高选择器权重） */
    .pqv-modal-content .pqv-modal-content {
        padding: 10px;
        width: calc(100% - 20px);
        position: relative;
    }
    
    .pqv-modal-content .pqv-modal-close {
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 100;
        font-size: 24px;
    }
    
    .pqv-modal-content .pqv-modal-body {
        flex-direction: column;
        gap: 15px;
    }
    
    .pqv-modal-content .pqv-left-column {
        width: 100%;
        max-width: 100%;
    }
    
    .pqv-modal-content .pqv-main-image {
        width: 100%;
        max-width: 100%;
        height: 280px;
        object-fit: cover; /* 新增：避免图片变形 */
    }
    
    .pqv-modal-content .pqv-main-image img {
        width: 100%;
        max-width: 100%;
    }
    
    .pqv-modal-content .pqv-thumbs-list {
        max-width: 100%;
        overflow-x: auto;
    }
    
    .pqv-modal-content .pqv-buttons {
        flex-direction: column;
    }
}
