/* Ciclobottega – pagina Motori e-bike. Riusa le classi blueprint di ricellaggio.css (.rcl-*). */
.mt-explode.is-3d { height: 420vh; }
.mt-explode .rcl-parts li strong { font-size: .98rem; }

/* Etichette 3D: nome nella lingua della pagina + le altre tre lingue */
.mt-tag { display: grid; gap: .1rem; line-height: 1.2; transition: opacity .2s; }
.mt-tag b { font-weight: 800; }
.mt-tag small { font-weight: 500; font-size: .66rem; color: #9fc0e0; letter-spacing: .02em; }
.mt-tag.is-active { border-color: var(--cb-orange); box-shadow: 0 0 0 3px rgba(236, 73, 19, .3); }
.mt-tag.is-active b { color: #ffb08a; }
.mt-tag.is-compact small { display: none; }
.mt-tag.is-below { margin-top: .5rem; }

/* Esploso / spaccato */
.mt-modes[hidden], .mt-section-ui[hidden], .mt-howstage[hidden] { display: none !important; }
.mt-modes { display: inline-flex; gap: .25rem; margin-top: 1.25rem; padding: .25rem; border: 1px solid var(--line2); border-radius: 999px; background: rgba(143, 208, 255, .06); }
.mt-mode { font: 700 .9rem var(--cb-font); color: #cfe6ff; background: none; border: 0; border-radius: 999px; padding: .5rem 1rem; cursor: pointer; min-height: 40px; }
.mt-mode[aria-pressed="true"] { background: #c23a0c; color: #fff; }
.mt-mode:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.mt-section-ui { position: absolute; left: .75rem; right: .75rem; bottom: .6rem; display: grid; gap: .35rem; font: 700 .8rem var(--cb-font); color: #cfe6ff; }
.mt-section-ui label { display: flex; align-items: center; gap: .6rem; }
.mt-section-ui input[type=range] { flex: 1; accent-color: var(--cb-orange); height: 28px; }
.mt-status { margin: 0; font-size: .85rem; font-weight: 600; color: #e8f3ff; min-height: 2.6em; }
.mt-explode.is-section .rcl-parts li { opacity: .55; }
.mt-explode.is-section .rcl-parts li span { display: none; }

/* SVG statico */
.s-axle { fill: rgba(159, 180, 200, .35); stroke: #9fb4c8; stroke-width: 1.5; }
.s-coil { fill: rgba(217, 130, 43, .45); stroke: #d9822b; stroke-width: 1.5; }
.s-mag { fill: rgba(224, 86, 91, .55); stroke: #e0565b; }
.s-mag--s { fill: rgba(79, 143, 230, .55); stroke: #4f8fe6; }
.s-gear { fill: rgba(191, 228, 255, .15); stroke: #bfe4ff; stroke-width: 1.5; }
.s-bearing { fill: rgba(127, 178, 255, .3); stroke: #7fb2ff; stroke-width: 1.5; }
.mt-explode .s-wire { stroke: #ffc24d; stroke-width: 5; }

/* Nota e dati sotto il 3D */
.mt-disc { padding-top: 1.25rem; padding-bottom: 1.5rem; }
.mt-disc .rcl-note { margin-top: 0; }
.mt-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; margin: 1rem 0 0; }
.mt-specs div { border: 1px solid var(--cb-line); border-radius: 12px; padding: .6rem .8rem; }
.mt-specs dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--cb-muted); font-weight: 700; }
.mt-specs dd { margin: .2rem 0 0; font-weight: 700; }

/* Come funziona */
.mt-how__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; margin-top: 2rem; }
.mt-how__grid.has-3d { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.mt-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1rem; }
.has-3d .mt-steps { grid-template-columns: 1fr; }
.mt-step { width: 100%; height: 100%; text-align: left; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "n svg" "t t" "p p"; gap: .5rem 1rem; align-items: center; padding: 1.2rem; border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; background: rgba(255, 255, 255, .04); color: inherit; font: inherit; cursor: pointer; transition: border-color .25s, background .25s; }
.has-3d .mt-step { grid-template-columns: auto 96px 1fr; grid-template-areas: "n svg t" "n svg p"; }
.mt-step[aria-pressed="true"] { border-color: var(--cb-orange); background: rgba(236, 73, 19, .1); }
.mt-step:focus-visible { outline: 2px solid var(--cb-orange); outline-offset: 2px; }
.mt-step__n { grid-area: n; font: 800 1.8rem var(--cb-font); color: var(--cb-orange); align-self: start; }
.mt-step__svg { grid-area: svg; justify-self: center; width: min(100%, 180px); }
.has-3d .mt-step__svg { width: 96px; }
.mt-step__svg svg { width: 100%; height: auto; display: block; }
.mt-step strong { grid-area: t; color: #fff; font-size: 1.05rem; }
.mt-step__txt { grid-area: p; color: var(--cb-muted-dark); font-size: .93rem; line-height: 1.5; }
.mt-howstage { aspect-ratio: 4 / 3; background-color: #071a2f; }
.mt-howstage .mt-status { position: absolute; left: .9rem; right: .9rem; bottom: .6rem; }

/* SVG animati dei tre passaggi */
.h-ring { fill: none; stroke: #5c7fa3; stroke-width: 6; }
.h-core { fill: #0f3157; stroke: #8fd0ff; stroke-width: 1.5; }
.h-tooth { fill: #13406e; stroke: #8fd0ff; stroke-width: 1; }
.h-coil { fill: #5a3410; stroke: #d9822b; stroke-width: 1.5; }
.h-mag { fill: #e0565b; }
.h-mag--s { fill: #4f8fe6; }
.h-axle { fill: #9fb4c8; }
.h-gear { fill: rgba(191, 228, 255, .16); stroke: #bfe4ff; stroke-width: 1.2; transform-box: fill-box; transform-origin: center; }
.h-ringgear { fill: rgba(92, 127, 163, .45); }
.h-pin { fill: #9fb4c8; }
.h-race { fill: none; stroke: #9fb4c8; stroke-width: 3; }
.h-ramp { fill: #13406e; stroke: #8fd0ff; stroke-width: 1; }
.h-roller { fill: #ffc24d; }
.h-pawl { fill: #ffc24d; transform-box: fill-box; transform-origin: 50% 100%; }
.h-rotor, .h-clutch { transform-box: view-box; transform-origin: 50% 50%; }

@media (prefers-reduced-motion: no-preference) {
	.h-rotor { animation: mt-spin 6s linear infinite; }
	.h-coil { animation: mt-coil 1.2s ease-in-out infinite; animation-delay: var(--d, 0s); }
	.h-sun { animation: mt-spin 4s linear infinite; }
	.h-planet { animation: mt-spin 6s linear infinite reverse; }   /* Zp / Zs = 18 / 12 → 1,5 × più lento, verso opposto */
	.h-ringgear { animation: mt-spin 16s linear infinite reverse; } /* Zr / Zs = 48 / 12 → 4 × più lento, verso opposto */
	.h-clutch { animation: mt-spin 5s linear infinite; }
	.h-roller { animation: mt-roll 2.5s ease-in-out infinite; }
	.h-pawl { animation: mt-pawl .5s ease-in-out infinite; }
	.b-flow { animation: mt-flow 1s linear infinite; }
}
@keyframes mt-spin { to { transform: rotate(360deg); } }
@keyframes mt-coil { 0%, 100% { fill: #5a3410; } 50% { fill: #ff7a3d; } }
@keyframes mt-roll { 0%, 45% { transform: translate(0, 0); } 55%, 100% { transform: translate(-7px, -1px); } }
@keyframes mt-pawl { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.55); } }
@keyframes mt-flow { to { stroke-dashoffset: -24; } }

/* Mid-drive vs mozzo */
.mt-vs__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1.25rem; margin-top: 2rem; }
.mt-vs__item { margin: 0; padding: 1.2rem; border-radius: 18px; background: var(--bp); color: #e8f3ff; }
.mt-vs__item svg { width: 100%; height: auto; display: block; }
.mt-vs__item figcaption { margin-top: .6rem; color: #b9d8f5; font-size: .95rem; }
.mt-vs__item figcaption strong { color: #fff; display: block; }
.b-wheel { fill: none; stroke: #8fd0ff; stroke-width: 3; }
.b-frame { fill: none; stroke: #8fd0ff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.b-motor { fill: var(--cb-orange); stroke: #ffb08a; stroke-width: 2; }
.b-flow { fill: none; stroke: #ffc24d; stroke-width: 4; stroke-dasharray: 8 4; stroke-linecap: round; }
.b-flow--chain { stroke-width: 2.5; }
.b-flow--ring { stroke-width: 5; }
.mt-table { margin-top: 1.75rem; border: 1px solid var(--cb-line); border-radius: 16px; overflow: hidden; }
.mt-table [role=row] { display: grid; grid-template-columns: minmax(110px, .7fr) 1fr 1fr; }
.mt-table [role=row] + [role=row] { border-top: 1px solid var(--cb-line); }
.mt-table span { padding: .75rem .9rem; font-size: .93rem; }
.mt-table__h span { font-weight: 800; background: var(--cb-ink, #111); color: #fff; }
.mt-table [role=rowheader] { font-weight: 700; color: var(--cb-muted); }

/* Sintomi */
.mt-sym__ui { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 1.5rem; margin-top: 1.75rem; align-items: start; }
.mt-sym__tabs { display: grid; gap: .5rem; }
.mt-sym__tabs button { text-align: left; font: 700 .95rem var(--cb-font); padding: .8rem 1rem; border: 1px solid var(--cb-line); border-radius: 12px; background: #fff; cursor: pointer; min-height: 44px; }
.mt-sym__tabs button[aria-selected="true"] { background: var(--cb-ink, #111); color: #fff; border-color: var(--cb-ink, #111); }
.mt-sym__tabs button:focus-visible { outline: 2px solid var(--cb-orange); outline-offset: 2px; }
.mt-sym__panel { background: #fff; border-radius: 18px; padding: clamp(1.2rem, 3vw, 1.8rem); box-shadow: var(--cb-shadow); }
.mt-sym__panel h3 { margin-top: 0; }
.mt-sym__panel dl { display: grid; gap: 1rem; margin: 0 0 1.25rem; }
.mt-sym__panel dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: #b23509; font-weight: 800; }
.mt-sym__panel dd { margin: .25rem 0 0; }

/* Marchi */
.mt-brands__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1.25rem; margin-top: 2rem; }
.mt-brand { padding: 1.4rem; border: 1px solid var(--cb-line); border-radius: 18px; background: #fff; display: flex; flex-direction: column; }
.mt-brand__logo { height: 56px; display: flex; align-items: center; padding: .5rem .9rem; border-radius: 10px; background: var(--bp); align-self: flex-start; }
.mt-brand__logo img { max-height: 36px; width: auto; filter: brightness(0) invert(1); }
.mt-brand__logo span { font: 800 1.3rem var(--cb-font); color: #fff; letter-spacing: .08em; }
.mt-brand__badge { margin: 1rem 0 0; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--cb-muted); }
.mt-brand__badge.is-auth { color: #b23509; }
.mt-brand h3 { margin: .3rem 0 .4rem; }
.mt-brand p { margin: 0 0 .6rem; }
.mt-brand__links { margin-top: auto !important; display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-weight: 700; font-size: .92rem; }

/* Form */
.rcl-form select { padding: .75rem .9rem; border: 1px solid var(--cb-line); border-radius: 10px; font: inherit; font-weight: 400; background: #fff; }
.mt-file input[type=file] { padding: .6rem; border: 1px dashed var(--cb-line); border-radius: 10px; font: inherit; font-weight: 400; }
.mt-file__msg { color: #7f1d1d; font-weight: 700; min-height: 1em; }

@media (max-width: 900px) {
	.mt-explode.is-3d { height: 360vh; }
	.mt-how__grid.has-3d { grid-template-columns: 1fr; }
	.has-3d .mt-howstage { order: -1; position: sticky; top: calc(var(--cb-header-h) + .5rem); z-index: 1; aspect-ratio: 16 / 10; }
	.mt-sym__ui { grid-template-columns: 1fr; }
	.mt-table [role=row] { grid-template-columns: 1fr 1fr; }
	.mt-table [role=rowheader] { grid-column: 1 / -1; padding-bottom: 0; }
	.mt-table__h span:first-child { display: none; }
	.mt-tag small { display: none; }
	.mt-modes { margin-top: .5rem; }
}
