/* Zbotic 3D Print - Frontend Styles */
:root {
    --tdp-accent: #06b6d4;
    --tdp-accent-light: #22d3ee;
    --tdp-accent-dark: #0891b2;
    --tdp-accent-glow: rgba(6, 182, 212, 0.15);
    --tdp-bg: #F1F3F6;
    --tdp-white: #FFFFFF;
    --tdp-text: #1e293b;
    --tdp-text-muted: #64748b;
    --tdp-border: #e2e8f0;
    --tdp-viewer-bg: #1e293b;
    --tdp-radius: 10px;
    --tdp-radius-sm: 6px;
    --tdp-shadow: 0 1px 3px rgba(0,0,0,0.08);
    --tdp-shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --tdp-transition: 0.2s ease;
}

.zbotic-3dp-wrap { max-width: 1200px; margin: 0 auto; padding: 20px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--tdp-text); }
.zbotic-3dp-wrap *, .zbotic-3dp-wrap *::before, .zbotic-3dp-wrap *::after { box-sizing: border-box; }

/* Grid */
.tdp-grid { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.tdp-steps { display: flex; flex-direction: column; gap: 20px; }

/* Cards */
.tdp-card { background: var(--tdp-white); border-radius: var(--tdp-radius); box-shadow: var(--tdp-shadow); overflow: hidden; transition: box-shadow var(--tdp-transition); }
.tdp-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.tdp-card-header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--tdp-border); }
.tdp-step-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--tdp-accent); color: #fff; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.tdp-card-header h3 { margin: 0; font-size: 16px; font-weight: 600; }
.tdp-card-body { padding: 20px; }

/* Step reveal animation */
.tdp-step { animation: tdpSlideIn 0.3s ease; }
@keyframes tdpSlideIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Upload Zone */
.tdp-upload-zone { border: 2px dashed var(--tdp-border); border-radius: var(--tdp-radius); padding: 40px 20px; text-align: center; cursor: pointer; transition: all var(--tdp-transition); }
.tdp-upload-zone:hover, .tdp-upload-zone.dragover { border-color: var(--tdp-accent); background: var(--tdp-accent-glow); }
.tdp-upload-icon { color: var(--tdp-text-muted); margin-bottom: 12px; }
.tdp-upload-text { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.tdp-upload-hint { font-size: 13px; color: var(--tdp-text-muted); margin: 0 0 16px; }

/* Progress */
.tdp-upload-progress { text-align: center; padding: 20px; }
.tdp-progress-ring { position: relative; width: 80px; height: 80px; margin: 0 auto 12px; }
.tdp-progress-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tdp-progress-ring circle { transition: stroke-dashoffset 0.3s; }
.tdp-progress-pct { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 16px; font-weight: 700; color: var(--tdp-accent); }

/* File result */
.tdp-file-result { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tdp-file-info { display: flex; align-items: center; gap: 8px; flex: 1; }
.tdp-file-size { color: var(--tdp-text-muted); font-size: 13px; }
.tdp-mesh-warnings { display: flex; align-items: center; gap: 8px; }
.tdp-warning-badge { background: #fef3c7; color: #92400e; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }

/* Viewer */
.tdp-viewer-wrap { position: relative; border-radius: var(--tdp-radius); overflow: hidden; }
.tdp-viewer { width: 100%; height: 350px; background: var(--tdp-viewer-bg); border-radius: var(--tdp-radius); }
.tdp-viewer canvas { display: block; width: 100% !important; height: 100% !important; }
.tdp-viewer-toolbar { position: absolute; top: 10px; right: 10px; display: flex; gap: 4px; }
.tdp-tool-btn { width: 34px; height: 34px; border: none; border-radius: var(--tdp-radius-sm); background: rgba(255,255,255,0.9); color: var(--tdp-text); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all var(--tdp-transition); }
.tdp-tool-btn:hover, .tdp-tool-btn.active { background: var(--tdp-accent); color: #fff; }

/* Plate selector */
.tdp-plate-selector { margin-top: 12px; }
.tdp-plate-selector label { display: block; font-size: 12px; font-weight: 600; color: var(--tdp-text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.tdp-plate-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tdp-plate-tab { padding: 6px 14px; border: 2px solid var(--tdp-border); border-radius: var(--tdp-radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; transition: all var(--tdp-transition); background: var(--tdp-white); }
.tdp-plate-tab:hover { border-color: var(--tdp-accent); }
.tdp-plate-tab.active { border-color: var(--tdp-accent); background: var(--tdp-accent-glow); color: var(--tdp-accent-dark); }

/* Stats grid */
.tdp-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.tdp-stat { background: var(--tdp-bg); border-radius: var(--tdp-radius-sm); padding: 10px 12px; text-align: center; }
.tdp-stat-label { display: block; font-size: 11px; color: var(--tdp-text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.tdp-stat-value { display: block; font-size: 15px; font-weight: 700; }
.tdp-printability { margin-top: 12px; }
.tdp-badge { display: inline-block; padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.tdp-badge-ok { background: #d1fae5; color: #065f46; }
.tdp-badge-warn { background: #fef3c7; color: #92400e; }
.tdp-badge-err { background: #fce7f3; color: #9d174d; }

/* Technology cards */
.tdp-tech-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.tdp-tech-card { border: 2px solid var(--tdp-border); border-radius: var(--tdp-radius); padding: 20px; text-align: center; cursor: pointer; transition: all var(--tdp-transition); position: relative; }
.tdp-tech-card:hover { border-color: var(--tdp-accent); transform: translateY(-2px); box-shadow: 0 4px 15px var(--tdp-accent-glow); }
.tdp-tech-card.selected { border-color: var(--tdp-accent); background: var(--tdp-accent-glow); }
.tdp-tech-icon { color: var(--tdp-accent); margin-bottom: 12px; }
.tdp-tech-card h4 { margin: 0 0 4px; font-size: 18px; }
.tdp-tech-desc { margin: 0 0 10px; font-size: 13px; color: var(--tdp-text-muted); }
.tdp-tech-specs { list-style: none; padding: 0; margin: 0 0 10px; font-size: 12px; color: var(--tdp-text-muted); }
.tdp-tech-specs li { padding: 2px 0; }
.tdp-tech-tag { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 11px; font-weight: 600; background: var(--tdp-accent-glow); color: var(--tdp-accent-dark); }

/* Material cards */
.tdp-material-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.tdp-mat-card { border: 2px solid var(--tdp-border); border-radius: var(--tdp-radius); padding: 16px; cursor: pointer; transition: all var(--tdp-transition); }
.tdp-mat-card:hover { border-color: var(--tdp-accent); }
.tdp-mat-card.selected { border-color: var(--tdp-accent); background: var(--tdp-accent-glow); }
.tdp-mat-card h5 { margin: 0 0 8px; font-size: 15px; }
.tdp-mat-props { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.tdp-prop-bar { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--tdp-text-muted); }
.tdp-prop-bar-fill { height: 4px; border-radius: 2px; background: var(--tdp-accent); flex-shrink: 0; }
.tdp-prop-bar-track { height: 4px; border-radius: 2px; background: var(--tdp-border); width: 60px; position: relative; }
.tdp-prop-bar-track .tdp-prop-bar-fill { position: absolute; top: 0; left: 0; height: 100%; }
.tdp-mat-desc { font-size: 12px; color: var(--tdp-text-muted); margin: 0 0 8px; line-height: 1.4; }
.tdp-mat-colors-preview { display: flex; align-items: center; gap: 3px; margin-bottom: 8px; }
.tdp-mat-color-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.15); flex-shrink: 0; }
.tdp-mat-color-more { font-size: 10px; color: var(--tdp-text-muted); margin-left: 2px; }
.tdp-mat-price { font-size: 12px; color: var(--tdp-text-muted); }
.tdp-mat-badge { display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 10px; font-weight: 600; background: #dbeafe; color: #1d4ed8; margin-top: 4px; }

/* Color grid — named swatches with tooltip */
.tdp-color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.tdp-color-swatch { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 2px solid var(--tdp-border); border-radius: var(--tdp-radius-sm); cursor: pointer; transition: all var(--tdp-transition); position: relative; }
.tdp-color-swatch:hover { border-color: var(--tdp-accent); transform: translateY(-1px); }
.tdp-color-swatch.selected { border-color: var(--tdp-accent); background: var(--tdp-accent-glow); }
.tdp-color-dot { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.15); flex-shrink: 0; }
.tdp-color-label { font-size: 11px; font-weight: 600; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
.tdp-color-swatch[data-has-image]:hover .tdp-color-tooltip-popup { display: block; }
.tdp-color-tooltip-popup { display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 8px; z-index: 100; background: var(--tdp-white); border-radius: var(--tdp-radius-sm); box-shadow: var(--tdp-shadow-lg); padding: 4px; width: 140px; }
.tdp-color-tooltip-popup img { width: 100%; border-radius: 4px; display: block; }
.tdp-color-tooltip { display: none; }

/* Quality cards (replaces layer height slider) */
.tdp-quality-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.tdp-quality-card { border: 2px solid var(--tdp-border); border-radius: var(--tdp-radius-sm); padding: 14px; cursor: pointer; transition: all var(--tdp-transition); text-align: center; }
.tdp-quality-card:hover { border-color: var(--tdp-accent); }
.tdp-quality-card.selected { border-color: var(--tdp-accent); background: var(--tdp-accent-glow); }
.tdp-quality-card h5 { margin: 0 0 4px; font-size: 14px; }
.tdp-quality-card .tdp-quality-detail { font-size: 12px; color: var(--tdp-text-muted); }
.tdp-quality-card .tdp-quality-price { font-size: 11px; color: var(--tdp-accent-dark); font-weight: 600; margin-top: 4px; }

/* Tabs */
.tdp-color-tabs { display: flex; gap: 4px; margin-bottom: 16px; background: var(--tdp-bg); border-radius: var(--tdp-radius-sm); padding: 3px; }
.tdp-tab { flex: 1; padding: 8px 16px; border: none; border-radius: var(--tdp-radius-sm); background: transparent; font-size: 13px; font-weight: 600; cursor: pointer; transition: all var(--tdp-transition); color: var(--tdp-text-muted); }
.tdp-tab.active { background: var(--tdp-white); color: var(--tdp-text); box-shadow: var(--tdp-shadow); }
.tdp-tab:disabled { opacity: 0.4; cursor: not-allowed; }

/* Color mapping panel */
.tdp-color-mapping { margin-bottom: 16px; }
.tdp-color-mapping-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding: 10px 14px; background: #f0f9ff; border: 1px solid #bae6fd; border-radius: var(--tdp-radius-sm); }
.tdp-color-mapping-header p { margin: 0; font-size: 13px; }
.tdp-mapping-subtitle { color: var(--tdp-text-muted); font-size: 12px !important; margin-top: 2px !important; }
.tdp-color-mapping-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--tdp-border); }
.tdp-color-mapping-row:last-child { border-bottom: none; }
.tdp-color-mapping-original { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.tdp-color-mapping-arrow { color: var(--tdp-text-muted); font-size: 18px; flex-shrink: 0; }
.tdp-color-mapping-target { flex: 1; }
.tdp-color-mapping-select { display: flex; flex-wrap: wrap; gap: 6px; }
.tdp-mapping-swatch { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: all var(--tdp-transition); }
.tdp-mapping-swatch.selected { border-color: var(--tdp-accent); box-shadow: 0 0 0 2px var(--tdp-white), 0 0 0 4px var(--tdp-accent); }
.tdp-mapping-swatch:hover { transform: scale(1.15); }
.tdp-color-mapping-label { font-size: 12px; font-weight: 600; }
.tdp-mapping-parts-count { font-size: 11px; color: var(--tdp-text-muted); }
.tdp-color-mode-toggle { font-size: 12px; color: var(--tdp-accent); cursor: pointer; text-decoration: underline; background: none; border: none; padding: 0; font-family: inherit; }
.tdp-color-mode-toggle:hover { color: var(--tdp-accent-dark); }

/* Sliders */
.tdp-slider-wrap { display: flex; align-items: center; gap: 12px; }
.tdp-slider-wrap input[type="range"] { flex: 1; accent-color: var(--tdp-accent); }
.tdp-slider-val { font-size: 14px; font-weight: 700; color: var(--tdp-accent); min-width: 50px; text-align: right; }
.tdp-setting-row { margin-bottom: 16px; }
.tdp-setting-row:last-child { margin-bottom: 0; }
.tdp-setting-row > label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.tdp-quality-labels, .tdp-infill-icons { display: flex; justify-content: space-between; font-size: 11px; color: var(--tdp-text-muted); margin-top: 2px; }

/* Radio card */
.tdp-toggle-group { display: flex; gap: 8px; flex-wrap: wrap; }
.tdp-radio-card { cursor: pointer; }
.tdp-radio-card input { display: none; }
.tdp-radio-card span { display: inline-block; padding: 8px 16px; border: 1px solid var(--tdp-border); border-radius: var(--tdp-radius-sm); font-size: 13px; transition: all var(--tdp-transition); }
.tdp-radio-card input:checked + span { border-color: var(--tdp-accent); background: var(--tdp-accent-glow); color: var(--tdp-accent-dark); font-weight: 600; }

/* Post-processing grid */
.tdp-pp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tdp-pp-card { border: 1px solid var(--tdp-border); border-radius: var(--tdp-radius-sm); padding: 14px; cursor: pointer; transition: all var(--tdp-transition); }
.tdp-pp-card:hover { border-color: var(--tdp-accent); }
.tdp-pp-card.selected { border-color: var(--tdp-accent); background: var(--tdp-accent-glow); }
.tdp-pp-card .tdp-pp-name { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.tdp-pp-card .tdp-pp-detail { font-size: 12px; color: var(--tdp-text-muted); }

/* Quantity */
.tdp-qty-wrap { display: inline-flex; align-items: center; border: 1px solid var(--tdp-border); border-radius: var(--tdp-radius-sm); overflow: hidden; }
.tdp-qty-btn { width: 36px; height: 36px; border: none; background: var(--tdp-bg); cursor: pointer; font-size: 18px; font-weight: 600; }
.tdp-qty-btn:hover { background: var(--tdp-accent-glow); color: var(--tdp-accent); }
.tdp-qty-wrap input { width: 50px; height: 36px; border: none; text-align: center; font-size: 15px; font-weight: 600; -moz-appearance: textfield; }
.tdp-qty-wrap input::-webkit-outer-spin-button, .tdp-qty-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; }
.tdp-qty-tiers { display: flex; gap: 8px; margin-top: 6px; }
.tdp-qty-tiers span { font-size: 11px; color: var(--tdp-text-muted); padding: 2px 8px; background: var(--tdp-bg); border-radius: 8px; }
.tdp-rush-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.tdp-rush-toggle input { accent-color: var(--tdp-accent); width: 18px; height: 18px; }
textarea#tdp-instructions { width: 100%; border: 1px solid var(--tdp-border); border-radius: var(--tdp-radius-sm); padding: 10px; font-size: 14px; resize: vertical; font-family: inherit; }

/* Review summary */
.tdp-review-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 20px; padding: 16px; background: var(--tdp-bg); border-radius: var(--tdp-radius-sm); }
.tdp-review-item { font-size: 13px; }
.tdp-review-item strong { display: block; font-size: 11px; color: var(--tdp-text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* Sidebar — sticky requires no overflow:hidden on ANY ancestor up to viewport */
.page-id-609131 .template-container,
.page-id-609131 .template-content,
.page-id-609131 .page-wrapper,
.page-id-609131 .content-page,
.page-id-609131 .sidebar-position-without,
.page-id-609131 .row,
.page-id-609131 .content,
.page-id-609131 .zbotic-3dp-wrap,
.page-id-609131 .tdp-grid { overflow: visible !important; }
.tdp-sidebar { position: -webkit-sticky; position: sticky; top: 100px; align-self: start; height: fit-content; }
.tdp-sidebar-inner { background: var(--tdp-white); border-radius: var(--tdp-radius); box-shadow: var(--tdp-shadow-lg); padding: 20px; max-height: calc(100vh - 120px); overflow-y: auto; }

/* Inline Get Quote button at end of steps */
.tdp-inline-quote-wrap { margin-top: 16px; text-align: center; }
.tdp-inline-quote-wrap .tdp-btn { width: 100%; }


/* Sidebar quantity */
.tdp-sidebar-qty { margin: 12px 0; }
.tdp-sidebar-qty label { display: block; font-size: 12px; font-weight: 600; color: var(--tdp-text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.tdp-qty-row { display: flex; align-items: center; gap: 10px; }
.tdp-qty-tiers { display: flex; gap: 4px; flex-wrap: wrap; }
.tdp-qty-tiers span { font-size: 10px; color: var(--tdp-text-muted); padding: 1px 6px; background: var(--tdp-bg); border-radius: 6px; }
.tdp-sidebar-specs { display: flex; flex-direction: column; gap: 6px; }
.tdp-spec-row { display: flex; justify-content: space-between; font-size: 13px; }
.tdp-spec-row span:first-child { color: var(--tdp-text-muted); }
.tdp-spec-row span:last-child { font-weight: 600; }
.tdp-sidebar-divider { height: 1px; background: var(--tdp-border); margin: 14px 0; }

/* Price breakdown */
.tdp-price-breakdown { display: flex; flex-direction: column; gap: 6px; }
.tdp-price-row { display: flex; justify-content: space-between; font-size: 13px; }
.tdp-price-row span:last-child { font-weight: 600; }
.tdp-discount { color: #16a34a; }
.tdp-total-wrap { text-align: center; }
.tdp-total-row { display: flex; justify-content: space-between; align-items: center; }
.tdp-total-row span:first-child { font-size: 14px; font-weight: 600; }
.tdp-total-price { font-size: 28px; font-weight: 800; color: var(--tdp-accent-dark); }
.tdp-estimate-badge { display: inline-block; padding: 2px 10px; border-radius: 8px; font-size: 11px; color: var(--tdp-text-muted); background: var(--tdp-bg); margin-top: 4px; }
.tdp-sidebar-meta { display: flex; flex-direction: column; gap: 6px; }
.tdp-meta-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--tdp-text-muted); }

/* Buttons */
.tdp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border: none; border-radius: 25px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all var(--tdp-transition); font-family: inherit; }
.tdp-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.tdp-btn-sm { font-size: 12px; padding: 6px 14px; }
.tdp-btn-lg { width: 100%; padding: 14px; font-size: 15px; margin-top: 12px; }
.tdp-btn-primary { background: var(--tdp-accent); color: #fff; }
.tdp-btn-primary:hover:not(:disabled) { background: var(--tdp-accent-dark); }
.tdp-btn-accent { background: linear-gradient(135deg, var(--tdp-accent), var(--tdp-accent-dark)); color: #fff; box-shadow: 0 4px 15px var(--tdp-accent-glow); }
.tdp-btn-accent:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(6, 182, 212, 0.3); }
.tdp-btn-outline { background: transparent; border: 1px solid var(--tdp-border); color: var(--tdp-text); }
.tdp-btn-outline:hover { border-color: var(--tdp-accent); color: var(--tdp-accent); }
.tdp-btn-ghost { background: transparent; color: var(--tdp-text-muted); padding: 4px 8px; }
.tdp-btn-ghost:hover { color: var(--tdp-accent); }

/* Popup */
.tdp-popup { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; }
.tdp-popup-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.tdp-popup-box { position: relative; background: var(--tdp-white); border-radius: var(--tdp-radius); max-width: 440px; width: 90%; box-shadow: var(--tdp-shadow-lg); overflow: hidden; }
.tdp-popup-header { padding: 14px 20px; border-bottom: 1px solid var(--tdp-border); font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.tdp-popup-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--tdp-text-muted); }
.tdp-popup-body { padding: 20px; }
.tdp-popup-body p { margin: 0 0 16px; font-size: 14px; }
.tdp-popup-actions { display: flex; gap: 8px; }

/* Mobile bottom bar */
.tdp-mobile-bar { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--tdp-white); border-top: 1px solid var(--tdp-border); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); z-index: 100000; box-shadow: 0 -4px 20px rgba(0,0,0,0.18); align-items: center; justify-content: space-between; }
.tdp-mobile-bar .tdp-btn { padding: 12px 22px; font-size: 15px; }
.tdp-mobile-price { font-size: 13px; color: var(--tdp-text-muted); }
.tdp-mobile-total { display: block; font-size: 20px; font-weight: 800; color: var(--tdp-accent-dark); }

/* Counter animation */
@keyframes tdpCountUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.tdp-price-animate { animation: tdpCountUp 0.3s ease; }

/* Responsive — legacy 900px/600px blocks consolidated into the 1024px/640px
   blocks at the end of the file (they were being overridden by the v21 layer). */
@media (max-width: 1200px) {
    .tdp-grid { grid-template-columns: 1fr 320px; gap: 16px; }
}

/* --- Slicing progress (staged + animated; the slicer has no real %) --- */
.tdp-slice-progress { margin: 14px 0 4px; }
.tdp-slice-bar {
    height: 8px; border-radius: 6px; overflow: hidden; position: relative;
    background: var(--tdp-border);
}
.tdp-slice-bar-fill {
    position: absolute; top: 0; height: 100%; width: 40%; border-radius: 6px;
    background: linear-gradient(90deg, var(--tdp-accent-light), var(--tdp-accent));
    animation: tdp-slice-indeterminate 1.2s ease-in-out infinite;
}
@keyframes tdp-slice-indeterminate {
    0%   { left: -42%; }
    100% { left: 100%; }
}
.tdp-slice-status {
    margin-top: 8px; font-size: 13px; font-weight: 600;
    color: var(--tdp-text-muted); text-align: center;
}

/* ============================================================
   v21 PREMIUM LAYER — "precision studio" configurator
   Scoped to .zbotic-3dp-wrap; overrides + new components.
   ============================================================ */
.zbotic-3dp-wrap {
    --tdp-accent: #0fb6cf;
    --tdp-accent-light: #38d3e8;
    --tdp-accent-dark: #0a91a6;
    --tdp-accent-glow: rgba(15,182,207,.12);
    --tdp-ink: #0c1b34;
    --tdp-bg: #eceff5;
    --tdp-surface: #ffffff;
    --tdp-surface-2: #f6f8fc;
    --tdp-border: #e6eaf2;
    --tdp-text: #122036;
    --tdp-text-muted: #6a7589;
    --tdp-radius: 18px;
    --tdp-radius-sm: 11px;
    --tdp-shadow: 0 1px 2px rgba(16,32,64,.04), 0 8px 24px -10px rgba(16,32,64,.13);
    --tdp-shadow-lg: 0 28px 64px -24px rgba(12,27,52,.30);
    --tdp-spectrum: linear-gradient(95deg,#ff5d8f,#ff9e44,#ffd23f,#4ecb71,#34c5e6,#6a7bff,#b066ff);
    --tdp-font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
    --tdp-font-body: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    max-width: 1240px;
    padding: 28px 20px 48px;
    font-family: var(--tdp-font-body);
    letter-spacing: -0.011em;
    background:
        radial-gradient(1100px 420px at 80% -10%, rgba(15,182,207,.07), transparent 60%),
        radial-gradient(900px 380px at -5% 0%, rgba(176,102,255,.05), transparent 55%);
}
.zbotic-3dp-wrap h1, .zbotic-3dp-wrap h3, .zbotic-3dp-wrap h4, .zbotic-3dp-wrap h5 { font-family: var(--tdp-font-display); letter-spacing: -0.02em; }

/* Layout: a touch wider sidebar to host the persistent viewer.
   align-items:stretch makes the sidebar column span the full row height so the
   sticky inner panel can travel (keeping the viewer pinned) as you scroll. */
.zbotic-3dp-wrap .tdp-grid { grid-template-columns: minmax(0,1fr) 396px; gap: 28px; align-items: stretch; }
.zbotic-3dp-wrap .tdp-steps { gap: 16px; }

/* Cards — refined surface, hairline border, layered shadow */
.zbotic-3dp-wrap .tdp-card {
    border: 1px solid var(--tdp-border);
    border-radius: var(--tdp-radius);
    box-shadow: var(--tdp-shadow);
    transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}
.zbotic-3dp-wrap .tdp-card:hover { box-shadow: var(--tdp-shadow-lg); border-color: #dbe2ee; }
.zbotic-3dp-wrap .tdp-card-header { padding: 17px 22px; border-bottom: 1px solid var(--tdp-border); }
.zbotic-3dp-wrap .tdp-card-header h3 { font-size: 16.5px; font-weight: 600; }
.zbotic-3dp-wrap .tdp-step-num {
    width: 30px; height: 30px; font-size: 12.5px; font-weight: 700;
    background: linear-gradient(150deg, var(--tdp-accent-light), var(--tdp-accent-dark));
    box-shadow: 0 4px 10px -3px var(--tdp-accent);
}
/* completed-step tick */
.zbotic-3dp-wrap .tdp-step.is-done .tdp-step-num { background: linear-gradient(150deg,#34d399,#059669); box-shadow:0 4px 10px -3px #10b981; }
.zbotic-3dp-wrap .tdp-step-help { margin: 2px 0 0; font-size: 12.5px; color: var(--tdp-text-muted); font-weight: 500; }
.zbotic-3dp-wrap .tdp-card-header { align-items: flex-start; }
.zbotic-3dp-wrap .tdp-card-header > div { display:flex; flex-direction:column; }

/* Staggered reveal */
.zbotic-3dp-wrap .tdp-step { animation: tdpRise .42s cubic-bezier(.22,1,.36,1) both; }
@keyframes tdpRise { from { opacity:0; transform: translateY(16px); } to { opacity:1; transform:none; } }

/* Buttons */
.zbotic-3dp-wrap .tdp-btn { border-radius: 12px; font-family: var(--tdp-font-body); font-weight: 700; letter-spacing: -0.01em; transition: transform .15s ease, box-shadow .2s ease, background .2s ease; }
.zbotic-3dp-wrap .tdp-btn-primary, .zbotic-3dp-wrap .tdp-btn-accent {
    background: linear-gradient(135deg, var(--tdp-accent-light), var(--tdp-accent-dark));
    color:#fff; border:0; box-shadow: 0 10px 24px -10px var(--tdp-accent);
}
.zbotic-3dp-wrap .tdp-btn-primary:hover, .zbotic-3dp-wrap .tdp-btn-accent:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -10px var(--tdp-accent); }
.zbotic-3dp-wrap .tdp-btn-primary:disabled { background:#c3cad6; box-shadow:none; transform:none; cursor:not-allowed; }
.zbotic-3dp-wrap .tdp-btn-ghost { background:#fff; color: var(--tdp-ink); border:1.5px solid var(--tdp-border); }
.zbotic-3dp-wrap .tdp-btn-ghost:hover { border-color: var(--tdp-accent); color: var(--tdp-accent-dark); }

/* ---------- Colour USP hero ---------- */
.tdp-hero {
    position: relative; overflow: hidden;
    display: grid; grid-template-columns: 1.35fr .9fr; gap: 28px; align-items: center;
    margin: 0 0 26px; padding: 34px 34px;
    background: linear-gradient(135deg,#0c1b34 0%, #122a52 60%, #0e3450 100%);
    border-radius: 24px; color: #eaf2ff;
    box-shadow: var(--tdp-shadow-lg);
}
.tdp-hero::before { /* spectrum glow */
    content:""; position:absolute; inset:auto -10% -60% auto; width:60%; height:160%;
    background: var(--tdp-spectrum); filter: blur(70px); opacity:.30; pointer-events:none;
}
.tdp-hero::after { content:""; position:absolute; inset:0; background:
    radial-gradient(600px 200px at 12% 0%, rgba(255,255,255,.06), transparent 60%);
    pointer-events:none; }
.tdp-hero-main { position: relative; z-index:1; }
.tdp-hero-badge {
    display:inline-flex; align-items:center; gap:7px; padding:6px 13px; border-radius:999px;
    font-size:12.5px; font-weight:700; letter-spacing:.01em; color:#0c1b34;
    background: var(--tdp-spectrum); background-size:160% 100%; animation: tdpSpectrum 8s linear infinite;
}
@keyframes tdpSpectrum { to { background-position: 160% 0; } }
.tdp-hero h1 { margin: 16px 0 10px; font-size: clamp(26px, 3.4vw, 40px); line-height:1.04; color:#fff; }
.tdp-hero-spectrum { background: var(--tdp-spectrum); -webkit-background-clip:text; background-clip:text; color: transparent; }
.tdp-hero p { margin:0 0 20px; font-size:15.5px; line-height:1.55; color:#b9c8e4; max-width: 46ch; }
.tdp-hero p strong { color:#fff; }
.tdp-hero-actions { display:flex; gap:12px; flex-wrap:wrap; }
.tdp-hero-actions .tdp-btn { padding: 13px 22px; font-size:15px; }
.tdp-hero-actions .tdp-btn-ghost { background: rgba(255,255,255,.06); color:#fff; border-color: rgba(255,255,255,.22); }
.tdp-hero-actions .tdp-btn-ghost:hover { background: rgba(255,255,255,.13); border-color:#fff; color:#fff; }
.tdp-hero-trust { display:flex; gap:18px; flex-wrap:wrap; margin-top:20px; font-size:12.5px; color:#9fb0d0; }
.tdp-hero-trust span { display:inline-flex; align-items:center; gap:6px; }
.tdp-hero-trust b { color:#eaf2ff; font-weight:700; }
.tdp-hero-gallery { position:relative; z-index:1; display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.tdp-hero-thumb { aspect-ratio:1; border-radius:14px; background:#0a1730 center/cover no-repeat; border:1px solid rgba(255,255,255,.10); position:relative; overflow:hidden; }
.tdp-hero-thumb:first-child { grid-row: span 2; aspect-ratio:auto; }
.tdp-hero-thumb.is-placeholder::after { content:"colour print"; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:11px; letter-spacing:.08em; text-transform:uppercase; color: rgba(255,255,255,.9); text-shadow:0 1px 4px rgba(0,0,0,.25); }
.tdp-hero-thumb.is-placeholder { background:
    linear-gradient(135deg, rgba(255,255,255,.05), rgba(255,255,255,0)),
    var(--tdp-spectrum); background-blend-mode:overlay; opacity:.9; }

/* ---------- Sticky sidebar + persistent viewer ---------- */
.zbotic-3dp-wrap .tdp-sidebar-inner {
    position: sticky; top: 84px;
    max-height: calc(100vh - 100px);
    display: flex; flex-direction: column;
    border:1px solid var(--tdp-border); border-radius: var(--tdp-radius);
    background: var(--tdp-surface); box-shadow: var(--tdp-shadow); padding:0; overflow:hidden;
}
/* Pin the viewer; let the price panel / empty-state scroll inside the sticky rail
   so the model stays visible no matter how far you scroll the configurator. */
.zbotic-3dp-wrap .tdp-sidebar .tdp-viewer-wrap { flex: 0 0 auto; }
.zbotic-3dp-wrap .tdp-sidebar-pad, .zbotic-3dp-wrap #tdp-howitworks { flex: 1 1 auto; overflow-y: auto; min-height: 0; }
.zbotic-3dp-wrap .tdp-sidebar-pad { padding: 18px 18px 20px; }
.zbotic-3dp-wrap .tdp-sidebar .tdp-viewer {
    height: 300px; width:100%; border-radius:0; border:0; border-bottom:1px solid var(--tdp-border);
}
.tdp-viewer {
    position: relative; border-radius: 14px; overflow:hidden;
    background:
      radial-gradient(120% 90% at 50% 8%, #ffffff 0%, #eef2f8 48%, #dfe6f1 100%);
}
.tdp-viewer canvas { display:block; }
.tdp-viewer-fallback { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; text-align:center; padding:24px; color: var(--tdp-text-muted); font-size:13.5px; }
/* "colour model detected" chip over the viewer */
.tdp-color-chip {
    position:absolute; top:12px; left:12px; z-index:2; display:none;
    align-items:center; gap:6px; padding:5px 11px; border-radius:999px;
    font-size:11.5px; font-weight:700; color:#0c1b34; background: rgba(255,255,255,.92);
    box-shadow: 0 4px 14px -4px rgba(12,27,52,.3); backdrop-filter: blur(4px);
}
.tdp-color-chip::before { content:""; width:11px; height:11px; border-radius:50%; background: var(--tdp-spectrum); }
.tdp-color-chip.is-on { display:inline-flex; }
.tdp-viewer-tools { z-index:2; }

/* ---------- "How it works" empty state (pre-upload sidebar) ---------- */
.tdp-howitworks { padding: 20px 18px 22px; }
.tdp-howitworks h4 { margin:0 0 14px; font-size:15px; }
.tdp-hiw-step { display:flex; gap:12px; align-items:flex-start; padding:9px 0; }
.tdp-hiw-num { flex:0 0 24px; width:24px; height:24px; border-radius:50%; background: var(--tdp-surface-2); border:1px solid var(--tdp-border); display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; color: var(--tdp-accent-dark); }
.tdp-hiw-step p { margin:0; font-size:13px; color: var(--tdp-text-muted); }
.tdp-hiw-step b { color: var(--tdp-text); font-weight:600; display:block; font-size:13.5px; }
.tdp-hiw-foot { margin-top:14px; padding-top:14px; border-top:1px dashed var(--tdp-border); font-size:12px; color: var(--tdp-text-muted); display:flex; flex-direction:column; gap:6px; }

/* ---------- Tooltips / inline "learn while you configure" affordances ----------
   Markup (built by frontend JS, see buildTip()):
     <span class="tdp-tip">
       <button type="button" class="tdp-tip-btn" aria-expanded="false" aria-describedby="tdp-tip-N">i</button>
       <span class="tdp-tip-pop" id="tdp-tip-N">Copy … <a class="tdp-tip-link">Learn more</a></span>
     </span>
   The popover is a SIBLING of the button, never a child — interactive content
   inside a <button> is invalid HTML and the link would not be clickable.
   Opens on hover (fine pointers only), on focus (:focus-within) and on tap/click
   (.is-open, toggled by JS). Escape and an outside tap close it. The link is a
   normal tab stop while the popover is visible, so nothing traps focus. */
.tdp-tip { position: relative; display: inline-flex; vertical-align: middle; margin-left: 6px; line-height: 0; }
.tdp-tip-btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; padding: 0; margin: 0; border-radius: 50%;
    background: var(--tdp-surface-2); border: 1px solid var(--tdp-border); color: var(--tdp-text-muted);
    font-family: inherit; font-size: 11px; font-weight: 700; line-height: 1; font-style: normal;
    -webkit-appearance: none; appearance: none; cursor: help;
    transition: background var(--tdp-transition), color var(--tdp-transition), border-color var(--tdp-transition);
}
.tdp-tip-btn:hover,
.tdp-tip-btn[aria-expanded="true"] { background: var(--tdp-accent); color: #fff; border-color: var(--tdp-accent); }
.tdp-tip-btn:focus-visible { background: var(--tdp-accent); color: #fff; border-color: var(--tdp-accent); outline: 2px solid var(--tdp-accent-dark); outline-offset: 2px; }
/* The glyph stays 18px; an invisible 44px halo catches the tap (WCAG 2.5.5). */
.tdp-tip-btn::after { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); border-radius: 50%; }

.tdp-tip-pop {
    position: absolute; z-index: 60;
    bottom: calc(100% + 10px); left: 50%;
    transform: translateX(-50%) translateY(4px);
    translate: var(--tdp-tip-shift, 0px) 0;   /* viewport clamp — applied instantly, never animated */
    width: max-content; max-width: min(268px, 74vw); padding: 10px 12px; border-radius: 10px;
    background: var(--tdp-ink); color: #eaf2ff; font-size: 12px; font-weight: 500; line-height: 1.5;
    letter-spacing: 0; text-align: left; box-shadow: var(--tdp-shadow-lg);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .16s ease, transform .16s ease;
}
/* Arrow. */
.tdp-tip-pop::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--tdp-ink); }
/* Invisible bridge so the pointer can travel from the glyph into the popover. */
.tdp-tip-pop::before { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }
.tdp-tip.is-open > .tdp-tip-pop,
.tdp-tip:focus-within > .tdp-tip-pop { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
@media (hover: hover) and (pointer: fine) {
    .tdp-tip:hover > .tdp-tip-pop { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
}
/* Escape sets .is-dismissed. It has to out-rank :focus-within and :hover,
   because the affordance normally still holds focus (or the pointer) at that
   moment — otherwise Escape would look like it did nothing. JS clears the flag
   as soon as focus or the pointer leaves. */
.tdp-tip.is-dismissed > .tdp-tip-pop { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
.tdp-tip-pop b, .tdp-tip-pop strong { color: #fff; font-weight: 700; }
.tdp-tip-link {
    display: inline-block; margin-top: 7px; color: var(--tdp-accent-light);
    font-size: 11.5px; font-weight: 700; text-decoration: none;
    border-bottom: 1px solid rgba(34, 211, 238, .45);
}
.tdp-tip-link:hover, .tdp-tip-link:focus-visible { color: #fff; border-bottom-color: #fff; }
.tdp-tip-link:focus-visible { outline: 2px solid var(--tdp-accent-light); outline-offset: 3px; border-radius: 2px; }

/* Card variant — the "i" sits in a choice card's top-right corner and its
   popover opens downwards, so it never overlays the card above it. */
.tdp-tip--card { position: absolute; top: 7px; right: 7px; margin: 0; z-index: 6; }
.tdp-tip--card > .tdp-tip-pop {
    bottom: auto; top: calc(100% + 10px); left: auto; right: -6px;
    transform: translateY(-4px);
}
.tdp-tip--card > .tdp-tip-pop::after { top: auto; bottom: 100%; left: auto; right: 12px; transform: none; border-top-color: transparent; border-bottom-color: var(--tdp-ink); }
.tdp-tip--card > .tdp-tip-pop::before { top: auto; bottom: 100%; }
.tdp-tip--card.is-open > .tdp-tip-pop,
.tdp-tip--card:focus-within > .tdp-tip-pop { transform: translateY(0); }
@media (hover: hover) and (pointer: fine) {
    .tdp-tip--card:hover > .tdp-tip-pop { transform: translateY(0); }
}
/* Choice cards host an absolutely-positioned "i"; keep room for it. */
.tdp-mat-card, .tdp-quality-card { position: relative; }
.tdp-mat-card > h5 { padding-right: 24px; }
.tdp-quality-card > h5 { padding-right: 18px; }
/* .tdp-card clips its children (overflow:hidden); the steps that carry choice
   cards must let their popovers out. */
.zbotic-3dp-wrap .tdp-card.tdp-card--tips { overflow: visible; }

/* ---------- Advanced settings disclosure ---------- */
.tdp-advanced { border-top:1px dashed var(--tdp-border); margin-top:6px; }
.tdp-advanced > summary { list-style:none; cursor:pointer; display:flex; align-items:center; gap:8px; padding:14px 2px 4px; font-weight:700; font-size:14px; color: var(--tdp-ink); }
.tdp-advanced > summary::-webkit-details-marker { display:none; }
.tdp-advanced > summary::before { content:"+"; width:20px; height:20px; border-radius:6px; background: var(--tdp-surface-2); border:1px solid var(--tdp-border); display:inline-flex; align-items:center; justify-content:center; font-size:15px; color: var(--tdp-accent-dark); }
.tdp-advanced[open] > summary::before { content:"\2212"; }
.tdp-advanced > summary .tdp-adv-hint { font-weight:500; font-size:12px; color: var(--tdp-text-muted); margin-left:auto; }

/* ---------- "Help me choose" use-case chips ---------- */
.tdp-usecase { display:flex; gap:8px; flex-wrap:wrap; margin: 4px 0 16px; }
.tdp-usecase-chip { padding:8px 14px; border-radius:999px; border:1.5px solid var(--tdp-border); background:#fff; font-size:13px; font-weight:600; cursor:pointer; transition: all var(--tdp-transition); }
.tdp-usecase-chip:hover { border-color: var(--tdp-accent); color: var(--tdp-accent-dark); }
.tdp-usecase-chip.selected { background: var(--tdp-accent-glow); border-color: var(--tdp-accent); color: var(--tdp-accent-dark); }

/* ---------- Estimate / Exact badges ---------- */
.zbotic-3dp-wrap .tdp-estimate-badge { display:inline-flex; align-items:center; gap:5px; background:#fff7ed; color:#9a3412; border:1px solid #fed7aa; padding:3px 10px; border-radius:999px; font-size:11.5px; font-weight:700; }
.zbotic-3dp-wrap .tdp-total-price { font-family: var(--tdp-font-display); font-size: 30px; letter-spacing:-.02em; }
.tdp-exact-badge { display:none; align-items:center; gap:5px; background:#ecfdf5; color:#047857; border:1px solid #a7f3d0; padding:3px 10px; border-radius:999px; font-size:11.5px; font-weight:700; }
.tdp-exact-badge.is-on { display:inline-flex; }

/* ---------- Multicolour mapping (up to 8) ---------- */
.tdp-color-mapping-rows { display:flex; flex-direction:column; gap:10px; }
.tdp-colors-warning { margin-top:10px; font-size:12.5px; color:#9a3412; background:#fff7ed; border:1px solid #fed7aa; padding:8px 11px; border-radius:10px; }

/* ---------- FAQ + trust ---------- */
.tdp-faq { margin-top:18px; }
.tdp-faq h3 { font-size:18px; margin:0 0 12px; }
.tdp-faq-item { border:1px solid var(--tdp-border); border-radius: var(--tdp-radius-sm); background:#fff; margin-bottom:10px; overflow:hidden; }
.tdp-faq-item > summary { list-style:none; cursor:pointer; padding:15px 18px; font-weight:600; font-size:14.5px; display:flex; justify-content:space-between; align-items:center; gap:12px; }
.tdp-faq-item > summary::-webkit-details-marker { display:none; }
.tdp-faq-item > summary::after { content:"+"; color: var(--tdp-accent); font-size:20px; font-weight:400; }
.tdp-faq-item[open] > summary::after { content:"\2212"; }
.tdp-faq-item .tdp-faq-a { padding:0 18px 16px; font-size:13.5px; color: var(--tdp-text-muted); line-height:1.55; }
.tdp-trust-row { display:flex; gap:14px; flex-wrap:wrap; justify-content:center; margin:18px 0 4px; font-size:12.5px; color: var(--tdp-text-muted); }
.tdp-trust-row span { display:inline-flex; align-items:center; gap:6px; }

/* Upload-zone colour hint + sample link */
.tdp-upload-colorhint { margin:14px auto 12px; max-width:360px; padding:9px 14px; border-radius:12px; font-size:13px; color: var(--tdp-ink); background:#fff; border:1.5px solid transparent; background-image: linear-gradient(#fff,#fff), var(--tdp-spectrum); background-origin:border-box; background-clip:padding-box, border-box; }
.tdp-upload-colorhint strong { color: var(--tdp-accent-dark); }
.tdp-sample-link { display:inline-block; margin-left:12px; background:none; border:0; padding:0; color: var(--tdp-accent-dark); font-weight:700; font-size:13.5px; cursor:pointer; text-decoration:underline; text-underline-offset:3px; }
.tdp-sample-link:hover { color: var(--tdp-accent); }
.tdp-cta-note { margin:10px 2px 0; font-size:11.5px; line-height:1.4; color: var(--tdp-text-muted); text-align:center; }
.tdp-total-badges { display:flex; flex-direction:column; gap:6px; margin-top:6px; }

/* ============================================================
   v27 COMPONENTS — notifications, RFQ panel, inline action
   (migrated from the D1 inline style block in the form view)
   ============================================================ */
.tdp-notify-stack { position: fixed; top: 16px; right: 16px; z-index: 100000; display: flex; flex-direction: column; gap: 8px; max-width: 380px; width: calc(100vw - 32px); }
.tdp-notify { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; border-radius: 12px; font-size: 13px; line-height: 1.45; box-shadow: 0 10px 28px rgba(2,6,23,.16); border: 1px solid #e2e8f0; background: #fff; color: #0f172a; animation: tdpNotifyIn .18s ease-out; }
.tdp-notify-success { border-color: #6ee7b7; background: #ecfdf5; color: #065f46; }
.tdp-notify-error { border-color: #fca5a5; background: #fef2f2; color: #991b1b; }
.tdp-notify-warn { border-color: #fcd34d; background: #fffbeb; color: #92400e; }
.tdp-notify-info { border-color: #93c5fd; background: #eff6ff; color: #1e40af; }
.tdp-notify-msg { flex: 1; }
.tdp-notify-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.tdp-notify-btn { border: 1px solid currentColor; background: transparent; border-radius: 8px; padding: 3px 9px; font-size: 12px; font-weight: 600; cursor: pointer; color: inherit; }
.tdp-notify-btn:hover { background: rgba(0,0,0,.07); }
.tdp-notify-close { background: none; border: none; font-size: 17px; line-height: 1; cursor: pointer; color: inherit; opacity: .55; padding: 0 2px; min-width: 28px; min-height: 28px; }
.tdp-notify-close:hover { opacity: 1; }
@keyframes tdpNotifyIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.tdp-inline-note { margin: 10px 2px 0; font-size: 12.5px; line-height: 1.5; color: var(--tdp-text-muted); background: #f8fafc; border: 1px solid var(--tdp-border, #e2e8f0); border-radius: 10px; padding: 8px 11px; }
.tdp-inline-note.tdp-inline-error { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.tdp-inline-note.tdp-inline-warn, .tdp-inline-note.tdp-inline-info { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.tdp-chip-adder { display: block; font-size: 10.5px; color: #b45309; font-weight: 600; margin-top: 1px; }
.tdp-infill-advisor { margin: 8px 2px 0; font-size: 12px; line-height: 1.5; color: var(--tdp-text-muted); }
#tdp-infill-delta { color: #b45309; font-weight: 600; }
.tdp-inline-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 12px 16px; border: 1px solid var(--tdp-border, #e2e8f0); border-radius: 14px; background: #fff; box-shadow: 0 2px 10px rgba(2,6,23,.05); }
.tdp-inline-label { font-size: 13px; color: var(--tdp-text-muted); }
.tdp-rfq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.tdp-rfq-grid label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.tdp-rfq-grid input, .tdp-rfq-grid textarea { width: 100%; border: 1px solid var(--tdp-border, #cbd5e1); border-radius: 10px; padding: 8px 10px; font-size: 13.5px; }
.tdp-rfq-grid input:focus, .tdp-rfq-grid textarea:focus { border-color: var(--tdp-accent); outline: none; box-shadow: 0 0 0 3px var(--tdp-accent-glow); }
.tdp-rfq-field-wide { grid-column: 1 / -1; }
.tdp-rfq-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.tdp-rfq-promise { font-size: 12.5px; color: var(--tdp-text-muted); }
.tdp-slice-cancel { display: inline-block; margin-top: 6px; background: none; border: none; color: var(--tdp-text-muted); text-decoration: underline; font-size: 12px; cursor: pointer; padding: 6px 2px; }
.tdp-slice-cancel:hover { color: #991b1b; }
.tdp-sample-badge { background: #ecfdf5; color: #047857; border: 1px solid #6ee7b7; border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 600; margin-left: 6px; white-space: nowrap; }
.tdp-link-btn { background: none; border: none; color: var(--tdp-accent-dark, #0891b2); text-decoration: underline; font-size: 12px; cursor: pointer; margin-left: 8px; padding: 0; }
.tdp-trust-ico, .tdp-hiw-check { font-style: normal; color: var(--tdp-accent-dark, #0891b2); margin-right: 6px; }
.tdp-trust-sep { opacity: .45; user-select: none; }
#tdp-estimate-badge { white-space: normal; text-align: left; line-height: 1.35; }

/* ============================================================
   v27 D2 POLISH — step rail, a11y, tap targets, disclosures
   ============================================================ */

/* ---------- Step summary rail ---------- */
.tdp-rail { display: flex; align-items: center; margin: 0 0 16px; padding: 6px 10px; background: var(--tdp-surface, #fff); border: 1px solid var(--tdp-border); border-radius: 999px; box-shadow: var(--tdp-shadow); }
.tdp-rail-list { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; list-style: none; margin: 0; padding: 0; }
.tdp-rail-list li { display: flex; align-items: center; margin: 0; }
.tdp-rail-list li + li::before { content: ""; width: 14px; height: 2px; border-radius: 2px; background: var(--tdp-border); margin: 0 4px; flex-shrink: 0; }
.tdp-rail-step { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 7px 12px; min-height: 34px; border-radius: 999px; font-family: inherit; font-size: 12.5px; font-weight: 600; letter-spacing: -0.01em; color: var(--tdp-text-muted); cursor: default; transition: background var(--tdp-transition), color var(--tdp-transition); }
.tdp-rail-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tdp-border); flex-shrink: 0; transition: background var(--tdp-transition); }
.tdp-rail-step.is-done { color: var(--tdp-text); cursor: pointer; }
.tdp-rail-step.is-done .tdp-rail-dot { background: #10b981; }
.tdp-rail-step.is-done:hover { background: var(--tdp-accent-glow); color: var(--tdp-accent-dark); }
.tdp-rail-step.is-current { color: var(--tdp-accent-dark); background: var(--tdp-accent-glow); cursor: pointer; }
.tdp-rail-step.is-current .tdp-rail-dot { background: var(--tdp-accent); box-shadow: 0 0 0 3px var(--tdp-accent-glow); }
.tdp-rail-step:disabled { opacity: .55; cursor: default; background: none; }
.tdp-rail-mobile { display: none; font-size: 13px; font-weight: 700; color: var(--tdp-ink, #0c1b34); padding: 6px 8px; }

/* ---------- Visible keyboard focus ---------- */
.zbotic-3dp-wrap button:focus-visible,
.zbotic-3dp-wrap input:focus-visible,
.zbotic-3dp-wrap summary:focus-visible,
.zbotic-3dp-wrap [role="radio"]:focus-visible,
.zbotic-3dp-wrap [role="checkbox"]:focus-visible,
.zbotic-3dp-wrap [role="button"]:focus-visible { outline: 3px solid var(--tdp-accent); outline-offset: 2px; }
.tdp-notify button:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }

/* ---------- 44px minimum tap targets ---------- */
.zbotic-3dp-wrap .tdp-qty-btn { width: 44px; height: 44px; }
.zbotic-3dp-wrap .tdp-qty-wrap input { height: 44px; }
/* The info-tooltip 44px tap halo now lives on .tdp-tip-btn::after (Tooltips section). */

/* ---------- Post-processing disclosure (summary shown on mobile only) ---------- */
.tdp-pp-collapse > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 8px 2px; min-height: 44px; font-weight: 700; font-size: 14px; color: var(--tdp-ink, #0c1b34); }
.tdp-pp-collapse > summary::-webkit-details-marker { display: none; }
.tdp-pp-collapse > summary::before { content: "+"; width: 20px; height: 20px; border-radius: 6px; background: var(--tdp-surface-2, #f6f8fc); border: 1px solid var(--tdp-border); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; color: var(--tdp-accent-dark); flex-shrink: 0; }
.tdp-pp-collapse[open] > summary::before { content: "\2212"; }
.tdp-pp-collapse > summary .tdp-adv-hint { font-weight: 500; font-size: 12px; color: var(--tdp-text-muted); margin-left: auto; text-align: right; }
.tdp-pp-collapse[open] > summary { margin-bottom: 4px; }
@media (min-width: 641px) {
    .tdp-pp-collapse > summary { display: none; }
}

/* ---------- Mobile bar label ---------- */
.tdp-mobile-label { display: block; font-size: 11px; font-weight: 600; color: var(--tdp-text-muted); }

/* ---------- Responsive ---------- */
/* ≤1024px: one column. The sidebar (viewer + specs) reorders above the steps and
   its CTA moves to the fixed bottom bar — so a price is always visible from
   641px down (previously the bar only appeared at ≤900px, leaving a gap). */
@media (max-width: 1024px) {
    .zbotic-3dp-wrap .tdp-grid { grid-template-columns: 1fr; }
    .zbotic-3dp-wrap .tdp-sidebar { position: relative; top: 0; display: block; order: -1; }
    .zbotic-3dp-wrap .tdp-sidebar-inner { position: static; max-height: none; display: block; overflow: visible; }
    .zbotic-3dp-wrap .tdp-sidebar-pad, .zbotic-3dp-wrap #tdp-howitworks { overflow: visible; }
    .zbotic-3dp-wrap .tdp-sidebar .tdp-viewer { height: 320px; }
    /* !important: JS show()/hide() leaves inline display on these buttons */
    .tdp-sidebar #tdp-calculate-btn, .tdp-sidebar #tdp-add-cart-btn, #tdp-cta-note { display: none !important; }
    .tdp-mobile-bar.is-active { display: flex; }
    /* Reserve room for the fixed bar only while it is shown (JS toggles the class) */
    .zbotic-3dp-wrap.tdp-has-bar { padding-bottom: 120px; }
    /* Lift the theme's back-to-top FAB clear of the fixed price bar */
    body:has(#tdp-mobile-bar.is-active) .back-top { bottom: 96px !important; }
    .tdp-stats-grid { grid-template-columns: repeat(3, 1fr); }
    .tdp-hero { grid-template-columns: 1fr; padding: 26px; }
    .tdp-hero-gallery { display: none; }
}

/* ≤640px: compact mobile layout */
@media (max-width: 640px) {
    .zbotic-3dp-wrap { padding: 12px 10px 36px; }
    .zbotic-3dp-wrap.tdp-has-bar { padding-bottom: 112px; }
    .zbotic-3dp-wrap .tdp-steps { gap: 12px; }
    .zbotic-3dp-wrap .tdp-card-header { padding: 12px 14px; }
    .zbotic-3dp-wrap .tdp-card-body { padding: 14px; }
    .tdp-hero { padding: 22px 18px; border-radius: 18px; }
    .tdp-hero h1 { margin-top: 12px; }
    /* Hero CTAs: centered pair with a sane max width instead of giant full-bleed */
    .tdp-hero-actions { flex-direction: column; align-items: center; }
    .tdp-hero-actions .tdp-btn { width: 100%; max-width: 320px; }
    .tdp-hero-trust { justify-content: center; }
    /* Rail collapses to "Step 3 of 5 · Material" */
    .tdp-rail { justify-content: center; margin-bottom: 12px; }
    .tdp-rail-list { display: none; }
    .tdp-rail-mobile { display: block; }
    .zbotic-3dp-wrap .tdp-sidebar .tdp-viewer { height: 240px; }
    .tdp-upload-zone { padding: 26px 14px; }
    .tdp-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    /* Technology cards: compact (specs list hidden) */
    .tdp-tech-grid { grid-template-columns: 1fr; gap: 10px; }
    .tdp-tech-card { padding: 12px 14px; }
    .tdp-tech-icon { margin-bottom: 6px; }
    .tdp-tech-icon svg { width: 28px; height: 28px; }
    .tdp-tech-specs { display: none; }
    .tdp-tech-card h4 { font-size: 16px; }
    /* Material cards: 2-up grid with abbreviated stat bars */
    .tdp-material-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .tdp-mat-card { padding: 10px; }
    .tdp-mat-card h5 { font-size: 13.5px; margin-bottom: 4px; }
    .tdp-mat-desc { display: none; }
    .tdp-prop-bar { font-size: 10px; gap: 6px; }
    .tdp-prop-bar > span { flex: 0 0 56px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .tdp-prop-bar-track { width: auto; flex: 1; }
    .tdp-mat-color-dot { width: 10px; height: 10px; }
    .tdp-mat-price { font-size: 11px; }
    .tdp-color-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
    .tdp-pp-grid { grid-template-columns: 1fr; gap: 8px; }
    .tdp-pp-card { padding: 10px 12px; }
    .tdp-review-summary { grid-template-columns: 1fr; }
    .tdp-rfq-grid { grid-template-columns: 1fr; }
    .tdp-inline-action { flex-direction: column; align-items: stretch; text-align: center; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .zbotic-3dp-wrap *, .tdp-hero-badge, .tdp-slice-bar-fill, .tdp-notify { animation: none !important; transition: none !important; }
}

/* Handoff panel: host for an industrial (third-party) configurator. */
#tdp-handoff-panel { display: none; margin-top: 16px; }
#tdp-handoff-panel .tdp-handoff-notice {
    background: #fff8e6; border: 1px solid #f0d98c; border-radius: 8px;
    padding: 14px 16px; margin-bottom: 16px; font-size: 14px; line-height: 1.5;
}
