/* =============================================================
   武汉工品紧固件 — 产品图纸查看器样式
   ============================================================= */

/* -------- Overlay -------- */
.gpin-drawing-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: gpinDrawingFadeIn 0.2s ease-out;
}

@keyframes gpinDrawingFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* -------- Modal -------- */
.gpin-drawing-modal {
    background: #fff;
    border-radius: 8px;
    width: 92vw;
    max-width: 820px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
    overflow: hidden;
    animation: gpinDrawingSlideIn 0.25s ease-out;
}

@keyframes gpinDrawingSlideIn {
    from { transform: translateY(20px); opacity: 0.5; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* -------- Header -------- */
.gpin-drawing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
    flex-shrink: 0;
}

.gpin-drawing-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.gpin-drawing-tab {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    background: #eee;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}

.gpin-drawing-tab:hover {
    background: #e0e0e0;
    color: #333;
}

.gpin-drawing-tab.active {
    background: #d32f2f;
    color: #fff;
}

.gpin-drawing-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gpin-drawing-dia-select {
    padding: 6px 28px 6px 10px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    appearance: auto;
    -webkit-appearance: auto;
    min-width: 70px;
}

.gpin-drawing-dia-select:focus {
    outline: none;
    border-color: #d32f2f;
}

.gpin-drawing-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.15s;
}

.gpin-drawing-close:hover {
    background: #eee;
    color: #333;
}

/* -------- Body / SVG -------- */
.gpin-drawing-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
    min-height: 300px;
}

.gpin-drawing-svg-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gpin-drawing-svg {
    width: 100%;
    height: auto;
    max-height: 68vh;
    display: block;
}

/* -------- 查看图纸按钮（产品详情页） -------- */
.gpin-btn-drawing {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #d32f2f;
    background: #fff;
    border: 1.5px solid #d32f2f;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.gpin-btn-drawing:hover {
    background: #d32f2f;
    color: #fff;
}

.gpin-btn-drawing i {
    font-size: 15px;
}

/* -------- Responsive -------- */
@media (max-width: 576px) {
    .gpin-drawing-modal {
        width: 100vw;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }

    .gpin-drawing-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .gpin-drawing-svg {
        max-height: 55vh;
    }
}
