/* 新规：网格容器，确保1px border在视觉上与下方参数详情对齐 */
.prod-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    user-select: none;
}

/* 等宽等高卡片项 */
.prod-grid-item {
    position: relative;
    aspect-ratio: 1 / 1; /* 锁定1:1绝对正方形，确保等高 */
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e8ecf1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.prod-grid-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 15px;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.prod-grid-item img:hover {
    transform: scale(1.03);
}

.prod-gallery-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 0 14px;
    font-size: 12px;
    color: #94a3b8;
    pointer-events: none;
}

.prod-spec-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #e8ecf1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e8ecf1;
}

.spec-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 15px 18px;
    cursor: pointer;
    transition: background 0.18s,
    box-shadow 0.18s;
    min-height: 56px;
}

.spec-item:hover {
    background: #f8faff;
    box-shadow: inset 4px 0 0 #2563eb;
}

.spec-item-body {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.spec-tag {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 4px;
}

.spec-text {
    font-size: 14px;
    color: #1e293b;
}

.preview-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.preview-modal.active {
    display: flex;
}

.preview-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
}

.preview-modal-box {
    position: relative;
    max-width: 92vw;
    max-height: 90vh;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
    z-index: 10;
}

.preview-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: rgba(15, 23, 42, 0.5);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
}

.preview-modal-body img {
    max-width: 88vw;
    max-height: 82vh;
    object-fit: contain;
    display: block;
}

.preview-modal-body .pm-text-block {
    padding: 44px 52px;
    text-align: center;
    min-width: 300px;
}

.preview-modal-body .pm-text-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 14px;
}

.preview-modal-body .pm-text-value {
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
}

@media (max-width: 768px) {
    .prod-grid-container {
        grid-template-columns: repeat(
              3,
              1fr
            ); /* 移动端一行两张更利于观看 */
        gap: 8px;
    }

    .prod-grid-item img {
        padding: 8px;
    }
}
