/* ============================================================
 * 产品网格小部件
 * ============================================================ */
.qing-pg-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* 产品卡片 */
.qing-pg-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px 12px 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.qing-pg-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* 图片 */
.qing-pg-img-wrap {
    display: block;
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* 1:1 正方形，可被 Elementor 控件覆盖 */
    overflow: hidden;
    border-radius: 4px;
    background: #f7f7f7;
}
.qing-pg-img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    border-radius: 4px;
    transition: transform 0.4s ease;
}
/* 悬停放大 */
.qing-pg-card:hover .qing-pg-img {
    transform: scale(1.08);
}

/* 视频层 */
.qing-pg-video {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}
.qing-pg-img-wrap.playing .qing-pg-video {
    opacity: 1;
}

/* 播放按钮：边框 + 背景 + 三角图标 */
.qing-pg-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.82);
    border: 1px solid rgba(200,200,200,0.6);
    border-style: solid;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.3s ease;
}
.qing-pg-play:hover {
    transform: translate(-50%, -50%) scale(1.1);
}
/* 三角图标 */
.qing-pg-play::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 14px 0 14px calc(14px * 1.6);
    border-color: transparent transparent transparent #555;
    margin-left: calc(14px * 0.25);
}
/* 播放时隐藏播放按钮 */
.qing-pg-img-wrap.playing .qing-pg-play {
    opacity: 0;
}

/* 信息区：flex:1 撑开剩余空间，按钮自动沉底 */
.qing-pg-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
    padding-top: 12px;
}

/* 标题：超出两行隐藏，固定高度 */
.qing-pg-title {
    color: #222;
    font-size: 15px;
    line-height: 1.4;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
}
.qing-pg-title:hover { color: #ff6700; }

/* 标题上方标签（如 Main product） */
.qing-pg-mainlabel {
    display: block;
    font-size: 12px;
    color: #999;
    line-height: 1.2;
    margin-bottom: 2px;
}

.qing-pg-price {
    color: #222;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    min-height: 1.2em;
}

.qing-pg-moq {
    color: #666;
    font-size: 14px;
    min-height: 1.4em;
}

/* 按钮推到底部 */
.qing-pg-btn {
    margin-top: auto;
    padding: 8px 16px;
    background: #fff;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: stretch;
}
.qing-pg-btn:hover {
    border-color: #ff6700;
    color: #ff6700;
}

.qing-pg-empty {
    padding: 30px;
    text-align: center;
    color: #999;
}

/* ============================================================
 * 询盘弹窗
 * ============================================================ */
.qing-inq-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qing-inq-modal[hidden] { display: none; }

.qing-inq-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

.qing-inq-box {
    position: relative;
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 640px;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    z-index: 1;
}

.qing-inq-close {
    position: absolute;
    right: 12px;
    top: 8px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    z-index: 2;
}
.qing-inq-close:hover { color: #333; }

.qing-inq-inner {
    display: flex;
    gap: 24px;
    padding: 28px;
    align-items: center;
}

/* 左侧产品 */
.qing-inq-product {
    flex: 0 0 40%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.qing-inq-product img {
    width: 100%;
    max-width: 240px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    background: #f7f7f7;
}
.qing-inq-pname {
    margin-top: 10px;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

/* 右侧表单 */
.qing-inq-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.qing-inq-row {
    display: flex;
    gap: 10px;
}
.qing-inq-row input { flex: 1; }
.qing-inq-form input,
.qing-inq-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}
.qing-inq-form input:focus,
.qing-inq-form textarea:focus {
    outline: none;
    border-color: #103A8E;
}
.qing-inq-form textarea { resize: vertical; }
.qing-inq-form button[type=submit] {
    padding: 12px;
    background: #103A8E;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.qing-inq-form button[type=submit]:hover { background: #0c2f75; }
.qing-inq-form button[type=submit]:disabled { opacity: 0.6; cursor: default; }
.qing-inq-msg { font-size: 14px; margin: 4px 0 0; }

/* WhatsApp 复选框 */
.qing-inq-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #444;
    cursor: pointer;
}
.qing-inq-form .qing-inq-check input[type=checkbox] {
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    accent-color: #25D366;
}

/* 响应式 */
@media (max-width: 768px) {
    .qing-inq-box { width: 94%; max-height: 88vh; }
    .qing-inq-inner {
        flex-direction: column;
        gap: 16px;
        padding: 22px 18px;
        align-items: stretch;
    }
    .qing-inq-product { flex: none; }
    .qing-inq-product img { max-width: 150px; }
    .qing-inq-pname { font-size: 13px; }
}
@media (max-width: 480px) {
    .qing-inq-box {
        width: 92%;
        max-width: 360px;
        max-height: 85vh;
        border-radius: 10px;
    }
    .qing-inq-inner { padding: 28px 16px 22px; gap: 14px; }
    .qing-inq-product img { max-width: 110px; }
    .qing-inq-row { flex-direction: column; gap: 10px; }
    .qing-inq-close {
        right: 8px;
        top: 6px;
        font-size: 26px;
    }
    .qing-inq-form button[type=submit] { padding: 13px; font-size: 15px; }
}

/* ============================================================
 * 分页
 * ============================================================ */
.qing-pg-pagination {
    --pg-theme: #2a6fdb;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
}

.qing-pg-page,
.qing-pg-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.qing-pg-page:hover,
.qing-pg-arrow:hover {
    border-color: var(--pg-theme);
    color: var(--pg-theme);
}

/* 当前页 */
.qing-pg-page.active {
    background: var(--pg-theme);
    border-color: var(--pg-theme);
    color: #fff !important;
}

/* 箭头图标 */
.qing-pg-arrow svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    display: block;
}
.qing-pg-arrow i {
    font-size: 14px;
}

/* 禁用态 */
.qing-pg-arrow.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}

/* 分页加载态 */
.qing-pg-grid {
    transition: opacity 0.2s ease;
}
.qing-pg-loading {
    display: flex;
    justify-content: center;
    padding: 16px 0;
}
.qing-pg-loading[hidden] { display: none; }
.qing-pg-loading span {
    width: 28px;
    height: 28px;
    border: 3px solid var(--pg-theme, #2a6fdb);
    border-top-color: transparent;
    border-radius: 50%;
    animation: qing-pg-spin 0.7s linear infinite;
}
@keyframes qing-pg-spin {
    to { transform: rotate(360deg); }
}

/* 隐藏产品价格 */
.qing-pg-price { display: none !important; }

/* 可定制内容 / 应用场景（左对齐简单行） */
.qing-pg-moq,
.qing-pg-feat {
    text-align: left;
    color: #555;
    font-size: 13px;
    line-height: 1.5;
}
.qing-pg-feat span {
    color: #103A8E;
    font-weight: 700;
}
.qing-pg-moq span {
    color: #103A8E;
    font-weight: 700;
}
