/* ===== WASHER HERO — интерактивная схема стиральной машины ===== */

.washer-hero {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.washer-hero svg {
  width: 100%;
  height: auto;
  display: block;
}

.washer-hero__hint {
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin: 6px 0 0;
}

.washer-hero__hint b { color: var(--color-accent); }

/* --- узлы --- */
#washerSvg .wpart {
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8);
  opacity: 0;
  transform: translate(var(--dx, 150px), var(--dy, 150px));
  animation: wIn 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: var(--delay, 0s);
  transition: color 0.2s;
}

@keyframes wIn { to { opacity: 1; transform: translate(0, 0); } }

#washerSvg .wfloat {
  animation: wFloat 4.5s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  transition: opacity 0.25s, filter 0.25s;
}

@keyframes wFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

#washerSvg.dimmed .wpart:not(.active) .wfloat { opacity: 0.16; }
#washerSvg .wpart.active { color: var(--color-accent); }
#washerSvg .wpart.active .wfloat { filter: drop-shadow(0 0 9px rgba(243, 176, 0, 0.55)); }

/* --- активные зоны на машинке --- */
#washerSvg .wzone { cursor: pointer; }
#washerSvg .wzone-hl { opacity: 0; transition: opacity 0.2s; }
#washerSvg .wzone.on .wzone-hl { opacity: 1; }

/* --- корпус и анимации схемы --- */
#washerSvg .machine { color: rgba(255, 255, 255, 0.48); }

#washerSvg .drum {
  transform-box: fill-box;
  transform-origin: center;
  animation: spin 24s linear infinite;
  color: rgba(255, 255, 255, 0.5);
}

@keyframes spin { to { transform: rotate(360deg); } }

#washerSvg .leader {
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 1.5;
  stroke-dasharray: 4 8;
  animation: dashmove 40s linear infinite;
}

@keyframes dashmove { to { stroke-dashoffset: -480; } }

@keyframes wdraw { to { stroke-dashoffset: 0; } }

/* --- тач-маркеры (видны только на сенсорных) --- */
#washerSvg .wmarker { display: none; }

@media (hover: none) {
  #washerSvg .wmarker { display: block; }
}

#washerSvg .wmarker-p {
  transform-box: fill-box;
  transform-origin: center;
  animation: wpulse 2.4s ease-out infinite;
}

@keyframes wpulse {
  0% { transform: scale(0.5); opacity: 0.9; }
  70%, 100% { transform: scale(2.4); opacity: 0; }
}

/* --- тултип --- */
.washer-hero .wtip {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -6px);
  background: rgba(24, 25, 28, 0.97);
  border: 1px solid rgba(243, 176, 0, 0.45);
  border-radius: 12px;
  padding: 12px 16px;
  min-width: 190px;
  max-width: 250px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
  z-index: 5;
}

.washer-hero .wtip.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.washer-hero .wtip__name { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.washer-hero .wtip__price { color: var(--color-accent); font-weight: 700; font-size: 16px; margin-bottom: 5px; }
.washer-hero .wtip__desc { font-size: 12px; color: #9aa0a6; line-height: 1.45; }

.washer-hero .wtip__btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 9px 14px;
  border: none;
  border-radius: 8px;
  background: var(--color-accent);
  color: #1f2a37;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.washer-hero .wtip__btn:hover { background: var(--color-accent-hover); }

/* --- адаптив --- */
@media (max-width: 1024px) {
  .washer-hero { max-width: 460px; }
}

@media (max-width: 640px) {
  .washer-hero { max-width: 380px; }
  .washer-hero__hint { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  #washerSvg .wpart,
  #washerSvg .wfloat,
  #washerSvg .drum,
  #washerSvg .leader,
  #washerSvg .wmarker-p { animation: none !important; }
  #washerSvg .wpart { opacity: 1; transform: none; }
}
