/* "I dettagli dell'eccellenza": cut-out car with hotspots, lines and buttons (details.js). */
.car-features { margin: 0 clamp(20px, 6.5vw, 125px); padding: 0 0 clamp(36px, 4vw, 56px); }
/* After the two buttons (placement 'middle'): the same breathing room as before the gallery. */
.detail-actions-row + .car-features { margin-top: clamp(56px, 6vw, 88px); }
.car-features-stage { position: relative; max-width: 1280px; margin: 0 auto; padding: 32px 180px 64px; isolation: isolate; }
.car-features-stage::before { content: ''; position: absolute; inset: 4% 8% 0; z-index: -2; background: radial-gradient(ellipse 52% 46% at 50% 58%, rgb(255 255 255 / 5.5%), transparent 72%); pointer-events: none; }
.car-features-photo { position: relative; }
.car-features-photo::after { content: ''; position: absolute; left: 6%; right: 4%; bottom: -1.2%; height: 6.5%; z-index: -1; background: radial-gradient(closest-side, rgb(0 0 0 / 58%), rgb(0 0 0 / 22%) 60%, transparent); pointer-events: none; }
.car-features-photo img { display: block; width: 100%; height: auto; user-select: none; opacity: 0; transform: translateY(10px) scale(.985); transition: opacity .6s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.car-features-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.car-feature-mark path { fill: none; stroke: #f3f3f0; stroke-opacity: .42; stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .55s cubic-bezier(.6, 0, .25, 1) calc(.55s + var(--i) * .1s), stroke-opacity .25s ease; }
.car-feature-dot, .car-feature-halo { transform-box: fill-box; transform-origin: center; opacity: 0; transform: scale(.4); transition: opacity .3s ease calc(.4s + var(--i) * .1s), transform .3s ease calc(.4s + var(--i) * .1s); }
.car-feature-dot { fill: #e32630; stroke: #fff; stroke-width: 1.2; }
.car-feature-halo { fill: rgb(20 20 20 / 28%); stroke: rgb(255 255 255 / 55%); stroke-width: 1; }
.car-feature { position: absolute; z-index: 2; min-width: 136px; min-height: 42px; padding: 0 18px; border: 1px solid rgb(255 255 255 / 30%); background: rgb(var(--surface-deep-rgb) / 62%); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; font-size: .75rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; opacity: 0; transition: opacity .35s ease calc(1.05s + var(--i) * .1s), border-color .25s, background .25s, box-shadow .25s; }
.car-feature.to-right { transform: translate(0, -50%); }
.car-feature.to-left { transform: translate(-100%, -50%); }
.car-feature:not(:disabled):hover, .car-feature:not(:disabled):focus-visible { border-color: #e32630; background: rgb(227 38 48 / 16%); box-shadow: 0 0 22px rgb(227 38 48 / 22%); }
.car-feature:disabled { cursor: default; color: rgb(255 255 255 / 55%); border-color: rgb(255 255 255 / 16%); }
/* Information tag (FULL PPF…): same frame as the buttons, plain text, highlights its line on hover. */
.car-feature.is-tag { display: inline-flex; align-items: center; justify-content: center; cursor: default; white-space: nowrap; }
.car-feature.is-tag:hover { border-color: rgb(255 255 255 / 55%); }
.car-features.is-visible .car-features-photo img { opacity: 1; transform: none; }
.car-features.is-visible .car-feature-mark path { stroke-dashoffset: 0; }
.car-features.is-visible .car-feature-dot, .car-features.is-visible .car-feature-halo { opacity: 1; transform: none; }
.car-features.is-visible .car-feature { opacity: 1; }
.car-feature-mark.is-active path { stroke-opacity: .95; }
.car-features.is-visible .car-feature-mark.is-active .car-feature-dot { transform: scale(1.45); transition-delay: 0s; }
.car-features.is-visible .car-feature-mark.is-active .car-feature-halo { transform: scale(1.3); transition-delay: 0s; }
/* After the entrance, hover changes respond immediately. */
.car-features.is-visible .car-feature-mark.is-active path { transition-delay: 0s, 0s; }

/* Photo pop-up: same frame as the equipment pop-up, wider for the picture. */
.feature-dialog { width: min(1120px, calc(100vw - 48px)); }
.feature-body { padding-top: 22px; }
.feature-figure { margin: 0; }
.feature-viewer { position: relative; background: var(--surface-deep); touch-action: pan-y; }
.feature-viewer img { display: block; width: 100%; height: min(68svh, 640px); object-fit: contain; transition: opacity .35s ease; }
.feature-viewer img.is-loading { opacity: .25; }
.feature-nav { display: none; position: absolute; top: 50%; width: 46px; height: 46px; place-items: center; transform: translateY(-50%); border: 1px solid rgb(255 255 255 / 28%); background: rgb(var(--surface-deep-rgb) / 55%); color: #fff; transition: border-color .2s, background .2s; }
.feature-nav svg { width: 20px; height: 20px; }
.feature-nav.prev { left: 14px; } .feature-nav.next { right: 14px; }
.feature-nav:hover, .feature-nav:focus-visible { border-color: #e32630; background: rgb(227 38 48 / 18%); }
.has-many .feature-nav { display: grid; }
.feature-strip { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; scrollbar-width: thin; }
.feature-strip:empty { display: none; }
.feature-strip button { flex: 0 0 auto; width: 84px; height: 56px; padding: 0; border: 1px solid transparent; background: var(--surface-deep); opacity: .55; transition: opacity .2s, border-color .2s; }
.feature-strip button[aria-current="true"] { opacity: 1; border-color: #e32630; }
.feature-strip img { width: 100%; height: 100%; object-fit: cover; }
.feature-figure figcaption { margin-top: 18px; max-width: 680px; color: #d6d6d3; line-height: 1.75; }

@media (max-width: 900px) {
  .car-features-stage { padding: 20px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 8px; }
  .car-features-photo { grid-column: 1 / -1; margin-bottom: 64px; }
  .car-feature { position: relative; min-width: 0; padding: 0 6px; letter-spacing: .14em; font-size: .6875rem; }
  .car-feature.to-right, .car-feature.to-left { transform: none; }
  .car-feature.is-tag { white-space: normal; text-align: center; line-height: 1.3; padding-block: 6px; }
  /* A long word (ELETTROCROMICO) widens its own column instead of overflowing the tag. */
  .car-features-stage:has(.is-tag) { grid-template-columns: repeat(3, minmax(min-content, 1fr)); }
  .feature-viewer img { height: auto; max-height: 60svh; }
}
@media (max-width: 700px) {
  .feature-dialog { width: 100vw; }
  .feature-nav { width: 40px; height: 40px; }
}
/* Information tags on the large photo behind the specifications (details.js, mountShowcase). */
.showcase-tags { position: absolute; z-index: 1; pointer-events: none; }
.showcase-tags svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.showcase-tag { position: absolute; display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; transform: translate(0, -50%); border: 1px solid rgb(255 255 255 / 30%); background: rgb(var(--surface-deep-rgb) / 55%); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; font-size: .6875rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; white-space: nowrap; pointer-events: auto; opacity: 0; transition: opacity .35s ease calc(1.05s + var(--i) * .1s), border-color .25s; }
.showcase-tag.to-left { transform: translate(-100%, -50%); }
.showcase-tag.is-centred { transform: translate(-50%, -50%); }
.showcase-tag:hover { border-color: rgb(255 255 255 / 60%); }
.showcase-tags.is-visible .showcase-tag { opacity: 1; }
.showcase-tags.is-visible .car-feature-mark path { stroke-dashoffset: 0; }
.showcase-tags.is-visible .car-feature-dot, .showcase-tags.is-visible .car-feature-halo { opacity: 1; transform: none; }
.showcase-tags .car-feature-mark.is-active path { stroke-opacity: .95; transition-delay: 0s, 0s; }
@media (max-width: 1000px) {
  .showcase-tag { min-height: 30px; padding: 0 10px; font-size: .625rem; letter-spacing: .16em; }
}

@media (prefers-reduced-motion: reduce) {
  .car-features-photo img, .car-feature-mark path, .car-feature-dot, .car-feature-halo, .car-feature, .showcase-tag { transition: none; }
}
