.wp3d-workspace {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 12px;
    min-height: 640px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    position: relative;
}
@media (max-width: 1024px) {
    .wp3d-workspace { grid-template-columns: 1fr; }
}
.wp3d-sidebar {
    background: #fff;
    border: 1px solid #e0e4e8;
    border-radius: 8px;
    padding: 12px;
    overflow-y: auto;
}
.wp3d-sidebar h3 {
    margin: 12px 0 8px;
    font-size: 13px;
    text-transform: uppercase;
    color: #555;
    letter-spacing: 0.5px;
}
.wp3d-sidebar h3:first-child { margin-top: 0; }
.wp3d-sidebar label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    color: #333;
}
.wp3d-sidebar select,
.wp3d-sidebar input[type=number],
.wp3d-sidebar textarea {
    width: 100%;
    padding: 6px 8px;
    margin-top: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
}
.wp3d-sidebar select:disabled { background: #f6f7f7; color: #999; }
.wp3d-viewer-wrap {
    background: #fafbfc;
    border: 1px solid #e0e4e8;
    border-radius: 8px;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}
.wp3d-viewer-canvas {
    width: 100%;
    flex: 1;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wp3d-viewer-canvas canvas { display: block; }

.wp3d-controls {
    padding: 10px;
    border-top: 1px solid #e0e4e8;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    background: #fff;
    border-radius: 0 0 8px 8px;
}
.wp3d-ctrl-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.wp3d-ctrl-group strong {
    font-size: 12px;
    color: #555;
    margin-right: 4px;
}
.wp3d-rot-btn, .wp3d-fit-btn {
    padding: 4px 8px;
    border: 1px solid #ccc;
    background: #f6f7f7;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}
.wp3d-rot-btn:hover, .wp3d-fit-btn:hover { background: #e6f0f7; border-color: #2271b1; }
.wp3d-fit-btn { background: #fff3e0; border-color: #ff9800; color: #e65100; font-weight: 600; }
.wp3d-fit-btn:hover { background: #ffe0b2; }

.wp3d-upload-zone {
    border: 2px dashed #b0b8c0;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-size: 13px;
    color: #666;
}
.wp3d-upload-zone:hover, .wp3d-upload-zone.wp3d-dragover {
    border-color: #2271b1;
    background: #f0f6fc;
}
.wp3d-upload-zone input { display: none; }

.wp3d-stats-table, .wp3d-price-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wp3d-stats-table td, .wp3d-price-table td { padding: 4px 6px; border-bottom: 1px solid #eee; }
.wp3d-price-table .wp3d-total td {
    font-weight: 700;
    font-size: 15px;
    color: #2271b1;
    border-top: 2px solid #2271b1;
    border-bottom: none;
}
.wp3d-btn {
    width: 100%;
    padding: 10px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 8px;
}
.wp3d-btn:hover:not(:disabled) { background: #135e96; }
.wp3d-btn:disabled { background: #ccc; cursor: not-allowed; }
.wp3d-btn-secondary { background: #6c757d; }
.wp3d-btn-secondary:hover:not(:disabled) { background: #565e64; }

.wp3d-muted { color: #888; font-size: 13px; }
.wp3d-hint { font-size: 11px; color: #999; margin-top: 8px; }
.wp3d-success { color: #00a32a; font-weight: 600; }
.wp3d-error { color: #d63638; font-weight: 600; }
.wp3d-project-item {
    padding: 6px 8px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    font-size: 13px;
}
.wp3d-project-item:hover { background: #f0f6fc; }
#wp3d-infill-label { font-weight: 600; color: #2271b1; margin-left: 6px; }

/* ---------- Модалка ---------- */

.wp3d-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.wp3d-modal-content {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.wp3d-modal-content h2 { margin-top: 0; margin-bottom: 16px; }
.wp3d-modal-content label {
    display: block;
    margin-bottom: 12px;
    font-size: 13px;
}
.wp3d-modal-content input[type=text],
.wp3d-modal-content input[type=tel],
.wp3d-modal-content input[type=email],
.wp3d-modal-content textarea {
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}
.wp3d-consent { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; margin: 12px 0; }
.wp3d-consent input { margin-top: 2px; }
.wp3d-order-actions { display: flex; gap: 8px; margin-top: 16px; }
.wp3d-order-actions .wp3d-btn { margin: 0; flex: 1; }
.wp3d-modal-content .g-recaptcha { margin: 12px 0; }