/* On-demand model viewing; the rest of the page keeps its normal scroll. */
.product3d{margin-block:28px;background:#fff;border:1px solid var(--line,#d8e2ef);border-radius:20px;overflow:hidden;color:var(--ink,#173b60);min-width:0}
.product3d [hidden],.product3d-admin [hidden]{display:none!important}
.product3d-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px 28px;border-bottom:1px solid var(--line,#d8e2ef)}
.product3d-eyebrow{font-size:.78rem;color:#785b30}
.product3d-heading h2{font:700 clamp(1.2rem,2.5vw,1.6rem)/1.8 Vazirmatn,Tahoma,sans-serif;margin:3px 0 0;color:var(--navy,#103b65)}
.product3d-orbit-mark{display:grid;place-items:center;width:56px;height:56px;flex-shrink:0;border:1px solid #d9c4a5;border-radius:50%;color:#876532;font-size:1rem}
.product3d-stage{position:relative;min-height:390px;isolation:isolate;background:radial-gradient(ellipse at 50% 45%,#fff 5%,#f0f5fa 75%);overflow:hidden}
.product3d-placeholder{min-height:390px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:28px;text-align:center}
.product3d-placeholder p{margin:0;font-size:.95rem;line-height:1.9;color:var(--navy,#103b65)}
.product3d-cube{color:#547796;width:100px;height:100px;flex-shrink:0}
.product3d-file-size{font-size:.75rem;line-height:1.9;color:var(--muted,#62768b)}
.product3d-canvas{height:480px;max-height:68vh;min-height:340px;direction:ltr}
.product3d-canvas model-viewer{display:block;width:100%;height:100%;outline:none;--poster-color:transparent;--progress-bar-color:#c5a26c;--progress-bar-height:4px;--progress-mask:transparent;--min-hotspot-opacity:0;touch-action:none}
.product3d-canvas model-viewer:focus-visible{outline:3px solid #bf955c;outline-offset:-5px}
.product3d-loading{position:absolute;inset:0;display:flex;flex-direction:column;gap:18px;align-items:center;justify-content:center;z-index:2;padding:28px;background:#eff4faee;color:var(--navy,#103b65);font-size:.9rem;pointer-events:none}
.product3d-loading progress,.product3d-upload-progress{accent-color:#b4894d;width:min(100%,280px);height:7px;border:0;border-radius:10px;overflow:hidden;direction:ltr}
.product3d-controls{padding:18px 28px 22px;border-top:1px solid var(--line,#d8e2ef)}
.product3d-help{font-size:.82rem;line-height:2;color:var(--muted,#62768b);margin:0 0 12px;max-width:740px}
.product3d-actions{display:flex;align-items:center;gap:10px 18px;flex-wrap:wrap;font-size:.85rem}
.product3d-actions>a:not(.btn){display:inline-flex;align-items:center;min-height:44px}
.product3d .btn,.product3d-admin .btn{min-height:44px;cursor:pointer}
.product3d button:disabled,.product3d-admin button:disabled{opacity:.6;cursor:wait}
.product3d-status{font-size:.85rem;line-height:1.95;margin:0;padding:12px 28px;color:var(--navy,#103b65)}
.product3d-status:empty{display:none}
.product3d-status.is-error{background:#fff1ef;color:#923727;border-top:1px solid #f0d0c9}
.product3d-admin{min-width:0}
.product3d-admin h1{font-size:clamp(1.65rem,3vw,2.1rem)}
.product3d-admin-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-block:26px}
.product3d-admin-card{display:flex;flex-direction:column;padding:25px;background:#fff;border:1px solid var(--line,#d8e2ef);border-radius:16px;min-width:0}
.product3d-admin-card-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.product3d-admin-card h2{font:700 1.7rem/1.5 Vazirmatn,Tahoma,sans-serif;margin:0;color:var(--navy,#103b65)}
.product3d-admin-card .product3d-actions{margin-top:auto;padding-top:20px}
.product3d-badge{font-size:.72rem;padding:5px 11px;background:#e7f3e9;color:#256038;border-radius:99px}
.product3d-badge.is-empty{background:#eef2f6;color:#52687c}
.product3d-muted{font-size:.82rem;line-height:1.95;color:var(--muted,#62768b)}
.product3d-file-name{font-size:.85rem;line-height:1.9;overflow-wrap:anywhere;margin:12px 0 4px}
.product3d-admin-note{font-size:.85rem;line-height:2;background:#eaf1f8;border-inline-start:3px solid #c5a26c;border-radius:8px;padding:14px 18px}
.product3d-admin-panel{background:#fff;border:1px solid var(--line,#d8e2ef);border-radius:15px;padding:24px;margin-block:25px;min-width:0}
.product3d-admin-panel legend{font-weight:700;color:var(--navy,#103b65);padding-inline:10px}
.product3d-admin input[type=file]{max-width:100%;padding:14px;border:1px dashed #aac0d6;background:#f8fafd;font-size:.85rem}
.product3d-admin input[type=file]::file-selector-button{font:inherit;color:var(--navy,#103b65);border:1px solid var(--line,#d8e2ef);background:#eaf1f8;border-radius:7px;padding:8px 12px;margin-inline-end:10px;cursor:pointer}
.product3d-field-error{display:block;color:#a33127;font-size:.82rem;line-height:1.95}
.product3d-field-error:empty{display:none}
.product3d-upload-progress{display:block;margin-top:22px}
.product3d-upload-status{margin:12px 0 0;font-size:.85rem;line-height:1.95}
.product3d-upload-status:empty{display:none}
.product3d-current-file{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;padding-top:12px;font-size:.85rem}
.product3d-current-file>div{min-width:0}
.product3d-delete-panel{background:#fff;border:1px solid #e6c7c1;border-radius:12px;margin-top:30px;padding:18px 22px;font-size:.85rem}
.product3d-delete-panel summary{min-height:28px;cursor:pointer;color:#923727;font-weight:700}
.product3d-delete-panel form{padding-top:10px}
.product3d-check{display:flex;align-items:flex-start;gap:9px;min-height:44px;margin:18px 0;line-height:1.95}
.product3d-check input[type=checkbox]{flex-shrink:0;width:18px;height:18px;margin:5px 0 0}
.product3d-admin .product3d-delete-button{background:#933429;color:#fff}
.product3d-admin .product3d-delete-button:hover{background:#75241b}
@media(max-width:700px){.product3d-admin-grid{grid-template-columns:minmax(0,1fr)}.product3d-heading{padding:18px}.product3d-orbit-mark{width:46px;height:46px;font-size:.9rem}.product3d-stage,.product3d-placeholder{min-height:350px}.product3d-placeholder{padding:24px 18px}.product3d-canvas{height:430px;max-height:66vh;min-height:320px}.product3d-controls,.product3d-status{padding:16px 18px}.product3d-controls .product3d-actions{gap:10px}.product3d-controls .btn{flex:1;white-space:normal;font-size:.8rem;padding-inline:10px}.product3d-admin-panel,.product3d-admin-card{padding:20px}.product3d-admin-panel .product3d-actions .btn{width:100%}}
@media print{.product3d,.product3d-delete-panel,.product3d-admin-form{display:none}}

/* UI-16: per-SKU labels can be longer than K100/K300. */
.product3d-heading>div{min-width:0}.product3d-heading h2,.product3d-placeholder .btn{overflow-wrap:anywhere;white-space:normal}
.product3d-placeholder .btn{max-width:100%;text-align:center}.product3d .more{font-size:.83rem}
