/* Webiness — E-commerce: componente quadrato "Sotto la vetrina" */

.sh-project-animation {
  --sh-ink: #0d1628;
  --sh-line: #d8dfeb;
  --sh-white: #ffffff;
  --sh-brand: #cc0090;
  --sh-brand-light: #ffe8f8;
  --sh-shadow: 0 22px 50px rgba(13, 22, 40, .12);
  position: relative;
  isolation: isolate;
  width: 100%;
  min-width: 0;
  max-width: 440px;
  min-height: 440px;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid #dfe5ef;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 24%, rgba(204, 0, 144, .10), transparent 30%),
    linear-gradient(rgba(13, 22, 40, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 22, 40, .035) 1px, transparent 1px),
    var(--sh-white);
  background-size: auto, 24px 24px, 24px 24px, auto;
  box-shadow: var(--sh-shadow);
  color: var(--sh-ink);
  font-family: Nunito, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sh-project-animation *,
.sh-project-animation *::before,
.sh-project-animation *::after { box-sizing: border-box; }

.sh-project-animation::after {
  position: absolute;
  z-index: -1;
  right: -110px;
  bottom: -150px;
  width: 310px;
  height: 310px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(204, 0, 144, .14), rgba(204, 0, 144, 0) 68%);
  content: "";
}

/* ── barra superiore ── */
.sh-board-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 0 20px;
  border-bottom: 1px solid var(--sh-line);
  background: rgba(255, 255, 255, .82);
  color: var(--sh-ink);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.sh-board-name { display: flex; align-items: center; gap: 9px; }

.sh-board-name::before {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--sh-brand);
  box-shadow: 0 0 0 5px var(--sh-brand-light);
  content: "";
}

.sh-active {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #16835c;
}

.sh-active i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #25aa78;
  animation: sh-blink 1.7s ease-in-out infinite;
}

/* ── corpo: la vetrina e i livelli sotto ── */
.sh-stage {
  display: flex;
  height: 330px;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 14px;
}

.sh-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #97a2b3;
  font-size: .55rem;
  font-weight: 800;
  letter-spacing: .085em;
  text-transform: uppercase;
}

.sh-sep::before,
.sh-sep::after {
  height: 1px;
  flex: 1 1 0;
  background: var(--sh-line);
  content: "";
}

.sh-sep::before { max-width: 10px; }

/* la parte visibile */
.sh-top {
  display: flex;
  height: 58px;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid #f1b8dd;
  border-radius: 12px;
  background: linear-gradient(135deg, #fffafd 0%, #fff0fa 100%);
  box-shadow: 0 12px 26px rgba(204, 0, 144, .16);
  animation: sh-rise .7s cubic-bezier(.2, .7, .3, 1) both;
}

.sh-top-ico {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--sh-brand);
  color: #fff;
}

.sh-top strong {
  display: block;
  color: var(--sh-ink);
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.15;
}

.sh-top small {
  display: block;
  margin-top: 2px;
  color: #7d8799;
  font-size: .6rem;
  font-weight: 700;
}

.sh-live {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--sh-brand);
  font-size: .55rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.sh-live::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sh-brand);
  content: "";
  animation: sh-blink 1.7s ease-in-out infinite;
}

/* i livelli sotto la vetrina */
.sh-layers {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
}

.sh-layer {
  position: relative;
  display: flex;
  min-height: 0;
  flex: 1 1 0;
  align-items: center;
  gap: 10px;
  padding: 0 12px 0 16px;
  overflow: hidden;
  border: 1px solid var(--sh-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 8px 18px rgba(13, 22, 40, .055);
  animation: sh-rise .7s cubic-bezier(.2, .7, .3, 1) both;
}

.sh-layer::before {
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #dce3ed;
  content: "";
}

.sh-layer strong {
  color: #46536a;
  font-size: .72rem;
  font-weight: 800;
}

.sh-layer span {
  margin-left: auto;
  color: #7d8799;
  font-size: .57rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-align: right;
  text-transform: uppercase;
}

.sh-top { animation-delay: 0s; }
.sh-layer:nth-child(1) { animation-delay: .09s; }
.sh-layer:nth-child(2) { animation-delay: .18s; }
.sh-layer:nth-child(3) { animation-delay: .27s; }
.sh-layer:nth-child(4) { animation-delay: .36s; }

.sh-layer:nth-child(1)::before { animation: sh-scan 6.4s linear infinite; }
.sh-layer:nth-child(2)::before { animation: sh-scan 6.4s 1.6s linear infinite; }
.sh-layer:nth-child(3)::before { animation: sh-scan 6.4s 3.2s linear infinite; }
.sh-layer:nth-child(4)::before { animation: sh-scan 6.4s 4.8s linear infinite; }

/* ── barra inferiore ── */
.sh-foot {
  display: flex;
  height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 21px;
  border-top: 1px solid var(--sh-line);
}

.sh-status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #16835c;
  font-size: .64rem;
  font-weight: 800;
}

.sh-status::before {
  display: grid;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #e7f8f0;
  content: "✓";
  font-size: .65rem;
}

.sh-metric {
  color: #7d8799;
  font-size: .61rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.sh-metric b {
  color: var(--sh-brand);
  font-size: .72rem;
  font-weight: 900;
}

.sh-project-animation:not(.is-visible) .sh-top,
.sh-project-animation:not(.is-visible) .sh-layer,
.sh-project-animation:not(.is-visible) .sh-layer::before,
.sh-project-animation:not(.is-visible) .sh-live::before,
.sh-project-animation:not(.is-visible) .sh-active i { animation-play-state: paused; }

@keyframes sh-blink { 50% { opacity: .3; transform: scale(.78); } }
@keyframes sh-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes sh-scan {
  0%, 14% { background: var(--sh-brand); box-shadow: 0 0 11px rgba(204, 0, 144, .6); }
  22%, 100% { background: #dce3ed; box-shadow: none; }
}

@media (max-width: 560px) {
  .sh-project-animation { min-height: 430px; }
  .sh-stage { padding-inline: 14px; }
  .sh-top { gap: 10px; padding-inline: 11px; }
  .sh-layer strong { font-size: .66rem; }
  .sh-layer span { display: none; }
  .sh-foot { padding-inline: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .sh-project-animation *,
  .sh-project-animation *::before,
  .sh-project-animation *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
