/* Butcher's chart add-on (live since 2026-11-20; added by fx-preview.cjs from build.cjs): seams draw in, the tapped cut lifts
   out, the rest dims, a product card appears; plus the mini chart on product
   pages. Loaded after catalogue-v2.css. */

/* ---------- seams draw in (one time, when the chart comes on screen) ---------- */
.k2-chart .k2-part { stroke-dasharray: var(--len, 2000); stroke-dashoffset: 0; }
.k2-chart.fx-pre .k2-part { stroke-dashoffset: var(--len, 2000); fill-opacity: 0.35; }
.k2-chart.fx-pre .k2-chart__labels { opacity: 0; }
.k2-chart.fx-draw .k2-part { animation: fxseam 1.1s cubic-bezier(0.45, 0, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }
.k2-chart.fx-draw .k2-chart__labels { animation: fxfade 0.5s ease both; animation-delay: 0.8s; }
@keyframes fxseam { from { stroke-dashoffset: var(--len, 2000); fill-opacity: 0.35; } 55% { fill-opacity: 1; } to { stroke-dashoffset: 0; fill-opacity: 1; } }
@keyframes fxfade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- the rest dims: one layer fading, not every shape ---------- */
.fx-dim { fill: #120c0a; opacity: 0; pointer-events: none; transition: opacity 0.22s ease-out; }
.k2-chart.fx-has .fx-dim { opacity: 0.55; }
.k2-chart.fx-has .k2-chart__labels text:not(.is-on) { opacity: 0.4; }
.k2-chart.fx-has .k2-chart__far { opacity: 0.5; }

/* ---------- the tapped cut lifts out, on its own GPU layer ---------- */
.fx-liftsvg {
  position: absolute; z-index: 2; display: block; overflow: visible; pointer-events: none;
  opacity: 0; transform: translate3d(0, 0, 0); will-change: transform, opacity; backface-visibility: hidden;
  transition: opacity 0.12s linear;
}
.fx-liftsvg.is-on { opacity: 1; }
.fx-piece__path { fill: var(--k-gold); stroke: #fff6e6; stroke-width: 2.2; stroke-linejoin: round; }
.fx-lift__labels text { fill: #241605; }

/* ---------- the product card: under the animal, pointing at the cut ---------- */
.fx-card {
  position: relative; z-index: 3; width: min(100%, 380px); margin: 10px auto 0; display: grid; grid-template-columns: 56px 1fr auto auto; align-items: center; gap: 10px;
  padding: 8px; border-radius: 16px; background: var(--k-paper); color: var(--k-ink);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.fx-card::before {
  content: ""; position: absolute; top: -7px; left: 0; width: 14px; height: 14px; border-radius: 3px;
  background: var(--k-paper); transform: translateX(calc(var(--px, 50%) - 7px)) rotate(45deg); will-change: transform;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.fx-card[hidden] { display: none; }
.fx-card.is-in { animation: fxcard 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes fxcard { from { opacity: 0; transform: translateY(-6px); } }
.fx-card__img { position: relative; display: block; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; background: #e9dcc8; }
.fx-card__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fx-card__body { min-width: 0; }
.fx-card__cut { margin: 0; font-family: var(--display); font-weight: 700; font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: #a5770c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-card__name { display: block; margin: 1px 0 2px; font-family: var(--display); font-weight: 700; font-size: 0.98rem; line-height: 1.15; color: var(--k-ink) !important; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-card .k2-price b { color: var(--k-ink); font-size: 0.98rem; }
.fx-card .k2-price span { color: #7b6253; }
.fx-card .k2-plus { width: 40px; height: 40px; }
.fx-card__next { width: 34px; height: 34px; border: 0; border-radius: 50%; background: #ece2d2; color: var(--k-ink); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.fx-card__next:hover { background: #e2d4bd; }

/* ---------- mini chart on product pages ---------- */
.fx-pdp { padding: 46px 0; border-top: 1px solid var(--k-line); border-bottom: 1px solid var(--k-line); background: radial-gradient(90% 70% at 20% 0%, #2b1b15 0%, var(--k-bg) 70%); }
.fx-pdp__in { display: grid; gap: 22px; align-items: center; }
.fx-pdp__chart { max-width: 560px; }
.fx-pdp__chart .k2-chart { pointer-events: none; }
.fx-pdp__chart .k2-part { cursor: default; }
.fx-pdp__chart .k2-chart .k2-part:not(.is-on) { fill-opacity: 0.4; }
.fx-pdp__chart .k2-chart__labels text:not(.is-on) { opacity: 0.35; }
.fx-pdp__chart .k2-part.is-on { filter: drop-shadow(0 0 10px rgba(242, 181, 48, 0.45)); }
.fx-pdp h2 { margin: 6px 0 10px; font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 5.6vw, 2.2rem); line-height: 1.08; color: #fff; }
.fx-pdp h2 em { font-style: normal; color: var(--k-gold); }
.fx-pdp p.fx-pdp__note { margin: 0 0 18px; color: var(--k-dim); line-height: 1.6; max-width: 520px; }
.fx-pdp .k2-btn { color: #fff; text-decoration: none; }
@media (min-width: 900px) {
  .fx-pdp { padding: 70px 0; }
  .fx-pdp__in { grid-template-columns: 1.2fr 1fr; gap: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .fx-liftsvg { transition: none; }
  .k2-chart.fx-draw .k2-part, .k2-chart.fx-draw .k2-chart__labels { animation: none; }
}
