/* ============================================================
   family/fert.css — 비료 제품 템플릿 (sub02-01 ~ sub02-05)
   시안: Cover02 · Product Detail 94:7271 / 94:7448 / 94:7749 / 94:7915 / 94:8069
         검증 자료 94:7606 (sub02-02 전용)
   소유: 비료 패밀리 페이지 워커. 공유 클래스(subvisual·locbar·tabs3·btn·sec-title)는 재정의하지 않는다.
   수치: 1920 실측 → clamp(하한 @390, vw, 시안값 @1920)
   ============================================================ */

:root {
  --fert-stage-bg: #f9f9f9;          /* Product Stage 배경 (sub02-02 만 #f8f8f8 → 페이지에서 덮음) */
  --fert-chart-muted: #cbd3dd;       /* 0선 · 320kg 막대 */
  --fert-chart-axis: #9ca3af;        /* y축 눈금 */
  --fert-bp-gap: clamp(24px, calc(21.96px + 0.523vw), 32px);   /* 블록 간 32 */
  --fert-card-px: clamp(20px, calc(16.94px + 0.784vw), 32px);  /* 카드 좌우 32 */
  --fert-card-py: clamp(20px, calc(17.96px + 0.523vw), 28px);  /* 카드 상하 28 */
  --fert-fs-stat: clamp(26px, calc(23.96px + 0.523vw), 34px);  /* 성분 수치 34 */
  --fert-fs-dose: clamp(24px, calc(22.47px + 0.392vw), 30px);  /* 시비량 수치 30 */
}

/* ── Product Detail — 상 44 · 하 72 · 블록 간 32 ── */
.fert-detail {
  padding-block: clamp(28px, calc(23.92px + 1.046vw), 44px) clamp(48px, calc(41.88px + 1.569vw), 72px);
  background: #ffffff;
}
.fert-detail__inner { display: flex; flex-direction: column; gap: var(--fert-bp-gap); }

/* ── Product Hero — 정보(가변) + 스테이지 360×450 · 간격 56 ── */
.fert-hero { display: flex; align-items: flex-start; gap: clamp(32px, 2.92vw, 56px); }
.fert-hero__info {
  flex: 1 1 0; min-width: 0; align-self: stretch;
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--fert-bp-gap);
}
.fert-hero__title {
  margin: 0; font-size: var(--fs-title); font-weight: 700; line-height: 1.3; letter-spacing: -1.5px; color: var(--gray-900);
}

/* 특성 및 효과 · 성분함량 — 위 선 · 상 24 · 간격 14 */
.fert-block { display: flex; flex-direction: column; gap: 14px; padding-top: 24px; border-top: 1px solid var(--line); }
.fert-block__title { margin: 0; font-size: var(--fs-h3); font-weight: 700; line-height: 1.4; letter-spacing: -0.3px; color: var(--gray-900); }

.fert-feats { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.fert-feats li { display: flex; align-items: flex-start; gap: 10px; }
.fert-feats__icon { flex: none; width: 18px; height: 18px; margin-top: 5px; }
.fert-feats p {
  flex: 1 1 0; min-width: 0; margin: 0;
  font-size: var(--fs-body); line-height: 1.7; letter-spacing: -0.2px; color: var(--text-soft);
}
.fert-feats strong { font-weight: 700; color: var(--navy-700); }

/* 성분함량 타일 — 간격 12 · 높이 96 · r12 · 첫 타일(입도)은 흰 바탕+선, 나머지는 회색 바탕+남색 수치 */
.fert-tiles { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
.fert-tile {
  flex: 1 1 140px;
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  min-height: 96px; padding: 18px 20px; border-radius: 12px;
  background: var(--gray-50); color: var(--navy-700);
}
.fert-tile--base { background: #ffffff; box-shadow: inset 0 0 0 1px var(--line); color: var(--gray-900); }
.fert-tile--fixed { flex: 0 0 220px; }                 /* sub02-05 입도 타일 220 고정 */
.fert-tile__label { font-size: 14px; font-weight: 500; line-height: 1.2; letter-spacing: -0.2px; color: var(--text-soft); }
.fert-tile__value { display: flex; align-items: baseline; gap: 3px; white-space: nowrap; }
.fert-tile__num { font-family: var(--font-num); font-size: var(--fert-fs-stat); font-weight: 600; line-height: 1.1; letter-spacing: -1px; }
.fert-tile__unit { font-family: var(--font-num); font-size: 16px; font-weight: 500; line-height: 1.2; }
.fert-tile__unit--ko { font-family: var(--font-ko); font-weight: 700; }
.fert-tile__note { font-size: 16px; font-weight: 500; line-height: 1.5; color: var(--text-muted); }
.fert-tile__text { font-size: 16px; font-weight: 700; line-height: 1.5; letter-spacing: -0.5px; }

/* 스테이지 — 360×450 · r24 · glow / floor-shadow / 포대 (시안 좌표를 캔버스 % 로) */
.fert-stage {
  position: relative; flex: none; width: 360px; height: 450px; margin: 0;
  border-radius: 24px; background: var(--fert-stage-bg); overflow: hidden;
}
.fert-stage__canvas {
  position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  height: 100%; aspect-ratio: 360 / 450;
}
.fert-stage__canvas img { position: absolute; max-width: none; pointer-events: none; }
.fert-stage__glow   { left: 0; top: 10%; width: 100%; height: 80%; }                  /* 280 원 + 블러 40 → 360 @(0,45) */
.fert-stage__shadow { left: 18.06%; top: 70.89%; width: 63.89%; height: 15.11%; }    /* 230×68 @(65,319) */
.fert-stage__bag    { left: 16.67%; top: 14.44%; width: 66.67%; height: 71.11%; object-fit: contain; } /* 240×320 @(60,65) */
.fert-stage--wide .fert-stage__bag { left: 13.33%; top: 16.67%; width: 73.61%; height: 66.67%; }      /* 265×300 @(48,75) */

/* ── 적용작물 / 시비방법 카드 — 간격 24 · r16 · 같은 높이 ── */
.fert-cards { display: flex; align-items: stretch; gap: 24px; }
.fert-card {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; gap: 16px;
  padding: var(--fert-card-py) var(--fert-card-px);
  border: 1px solid var(--line); border-radius: 16px; background: #ffffff;
}
.fert-card__title { margin: 0; font-size: var(--fs-h3); font-weight: 700; line-height: 1.4; letter-spacing: -0.3px; color: var(--gray-900); }
.fert-rows { flex: 1 1 auto; display: flex; flex-direction: column; }
.fert-rows > .fert-crop, .fert-rows > .fert-method { flex: 1 1 auto; }
.fert-rows--top > .fert-crop { flex: 0 0 auto; }       /* sub02-03 · 04: 행이 늘어나지 않고 위로 붙음 */

.fert-crop, .fert-method {
  display: flex; align-items: center; gap: 12px;
  padding-block: 12px; border-top: 1px solid var(--line);
}
.fert-crop__group { flex: none; width: 88px; font-size: var(--fs-body); font-weight: 700; line-height: 1.7; color: var(--gray-900); }
.fert-chips { flex: 1 1 0; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; margin: 0; padding: 0; list-style: none; }
.fert-chip {
  padding: 3px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--gray-50);
  font-size: 14px; font-weight: 500; line-height: 1.2; color: var(--text-soft); white-space: nowrap;
}
.fert-chips__etc { font-size: 14px; line-height: 1.2; color: var(--text-muted); }

/* 시비량 — 초록 박스 r12 · px20 py14 · 수치 Outfit 30 */
.fert-doses { flex: none; display: flex; flex-wrap: wrap; gap: 12px; padding-bottom: 16px; }
.fert-doses--fill { flex: 1 1 auto; padding-bottom: 0; }     /* sub02-05: 시비량 박스만 있어 카드 높이를 채움 */
.fert-dose {
  flex: 1 1 200px;
  display: flex; flex-direction: column; justify-content: center;
  padding: 14px 20px; border-radius: 12px; background: var(--green-100);
}
.fert-dose__label { font-size: 14px; font-weight: 500; line-height: 1.2; color: var(--text-soft); }
.fert-dose__value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; color: var(--green-600); }
.fert-dose__num { font-family: var(--font-num); font-size: var(--fert-fs-dose); font-weight: 600; line-height: 1.1; letter-spacing: -1px; }
.fert-dose__unit { font-family: var(--font-num); font-size: 16px; font-weight: 500; line-height: 1.2; }
.fert-dose__note { font-size: 14px; font-weight: 500; line-height: 1.2; color: var(--text-muted); }

.fert-method__label {
  flex: none; width: 80px; padding-block: 3px; border-radius: 8px; background: var(--blue-100);
  font-size: 13px; font-weight: 700; line-height: 1.2; color: var(--navy-700); text-align: center;
}
.fert-method__text { flex: 1 1 0; min-width: 0; margin: 0; font-size: var(--fs-body); font-weight: 500; line-height: 1.7; letter-spacing: -0.2px; color: var(--gray-900); }

/* ── 구매처 (sub02-01) — 연파랑 띠 r14 · px28 py20 ── */
.fert-buy {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  padding: 20px clamp(20px, calc(17.96px + 0.523vw), 28px); border-radius: 14px; background: var(--blue-100);
}
.fert-buy__badge { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: #ffffff; }
.fert-buy__badge img { width: 20px; height: 20px; }
.fert-buy__body { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; min-height: 63px; }
.fert-buy__eyebrow { font-family: var(--font-latin); font-size: 14px; font-weight: 600; letter-spacing: 2px; color: var(--navy-700); }
.fert-buy__title { margin: 0; font-size: var(--fs-h3); font-weight: 700; line-height: 1.4; letter-spacing: -0.5px; color: var(--navy-900); }
.fert-buy__aside { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-left: auto; }
.fert-buy__url { font-family: var(--font-latin); font-size: 14px; font-weight: 500; color: var(--text-muted); }

/* ── 검증 자료 (sub02-02) — 회색 섹션 · 상 64 하 72 · 제목→본문 28 ── */
.fert-verify {
  padding-block: clamp(44px, calc(38.9px + 1.307vw), 64px) clamp(48px, calc(41.88px + 1.569vw), 72px);
  background: var(--gray-50);
}
.fert-verify__head { margin-bottom: 28px; }
.fert-verify__body { display: flex; align-items: stretch; gap: 24px; }
.fert-verify__source { margin: 20px 0 0; font-size: 14px; line-height: 1.5; color: var(--text-muted); }

.fert-vcard {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 16px; background: #ffffff;
}
.fert-vcard--chart { flex: 0 0 560px; gap: 16px; padding: var(--fert-card-py) var(--fert-card-px) clamp(20px, 1.25vw, 24px); }
.fert-vcard--table { flex: 1 1 0; min-width: 0; gap: 12px; padding: var(--fert-card-py) var(--fert-card-px) 20px; }
.fert-vcard__title { margin: 0; font-size: var(--fs-h3); font-weight: 700; line-height: 1.2; color: var(--gray-900); }
.fert-vcard--table .fert-vcard__title { line-height: 1.4; }
.fert-vcard__note { margin: 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 700; line-height: 1.2; color: var(--text-soft); }

/* 막대그래프 — 축 0~600 · 그리드 196px · 막대 84 · 배지 128 (시안 chart 496×272) */
.fert-chart { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.fert-chart__plot { flex: 1 1 300px; max-width: 340px; padding-left: 40px; }
.fert-chart__area { position: relative; height: 196px; margin-top: 30px; }
.fert-chart__line {
  position: absolute; left: 0; right: 0; height: 1px; background: var(--line);
  bottom: calc(var(--v) / 600 * 100%);
}
.fert-chart__line--zero { background: var(--fert-chart-muted); }
.fert-chart__tick {
  position: absolute; left: -40px; width: 30px; transform: translateY(50%);
  bottom: calc(var(--v) / 600 * 100%);
  font-family: var(--font-num); font-size: 12px; font-weight: 500; line-height: 16px; color: var(--fert-chart-axis); text-align: right;
}
.fert-chart__bars { position: absolute; inset: 0; display: flex; margin: 0; padding: 0; list-style: none; }
.fert-chart__slot { position: relative; flex: 1 1 0; }
.fert-chart__bar {
  position: absolute; left: 50%; bottom: 0; width: min(84px, 56%); height: calc(var(--v) / 600 * 100%);
  margin-left: calc(min(84px, 56%) / -2);
  border-radius: 6px 6px 0 0; background: var(--fert-chart-muted); transform-origin: 50% 100%;
}
.fert-chart__val {
  position: absolute; left: 0; right: 0; bottom: calc(var(--v) / 600 * 100% + 6px);
  font-family: var(--font-num); font-size: 16px; font-weight: 600; line-height: 22px; color: var(--text-soft); text-align: center;
}
.fert-chart__slot--key .fert-chart__bar { background: var(--navy-700); }
.fert-chart__slot--key .fert-chart__val { color: var(--navy-700); }
.fert-chart__xlabels { display: flex; margin: 0; padding: 10px 0 0; list-style: none; }
.fert-chart__xlabels li { flex: 1 1 0; padding-inline: 4px; font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--text-soft); text-align: center; }

.fert-chart__badge {
  flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 128px; height: 128px; border: 7px solid var(--green-600); border-radius: 50%; background: #ffffff; color: var(--green-600);
}
.fert-chart__badge-label { font-size: 14px; font-weight: 700; line-height: 1.2; }
.fert-chart__badge-value { display: flex; align-items: baseline; gap: 1px; font-family: var(--font-num); line-height: 1.2; }
.fert-chart__badge-num { font-size: 38px; font-weight: 700; }
.fert-chart__badge-unit { font-size: 18px; font-weight: 600; }

/* 진입 모션 — 막대가 아래에서 차오름 · 1회 · JS(fert.js)가 무장할 때만 (JS 없음/동작 줄이기 = 정지 최종 상태) */
.fert-chart.is-armed .fert-chart__bar { transform: scaleY(0); }
.fert-chart.is-armed .fert-chart__val { opacity: 0; transform: translateY(6px); }
.fert-chart.is-in .fert-chart__bar { transform: scaleY(1); transition: transform .9s var(--ease); }
.fert-chart.is-in .fert-chart__slot--key .fert-chart__bar { transition-delay: .12s; }
.fert-chart.is-in .fert-chart__val { opacity: 1; transform: none; transition: opacity .4s var(--ease) .7s, transform .4s var(--ease) .7s; }
.fert-chart.is-in .fert-chart__slot--key .fert-chart__val { transition-delay: .82s; }

/* 작물별 효과 표 */
.fert-vrows { flex: 1 1 auto; display: flex; flex-direction: column; }
.fert-vrow {
  flex: 1 1 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  padding-block: 13px; border-top: 1px solid var(--line);
}
.fert-vrow__label {
  flex: none; width: 150px; padding: 5px 12px; border-radius: 8px; background: var(--gray-50);
  font-size: 14px; font-weight: 700; line-height: 1.4; color: var(--navy-700); text-align: center;
}
.fert-vrow__text { flex: 1 1 240px; min-width: 0; margin: 0; font-size: var(--fs-body); font-weight: 500; line-height: 1.7; color: var(--text-soft); }

/* ── 반응형 ───────────────────────────────────────────────
   ≥1200  시안 배치 그대로
   <1200  검증 자료 두 카드 세로 (그래프 카드 560 + 표 카드가 들어갈 폭 부족)
   <960   히어로·카드 세로. 히어로 순서: 제품명 → 제품 이미지 → 특성 → 성분 (⚠ 순서 변경, notes)
   ─────────────────────────────────────────────────────── */
@media (max-width: 1199.98px) {
  .fert-verify__body { flex-direction: column; }
  .fert-vcard--chart { flex: none; }
}
@media (max-width: 959.98px) {
  .fert-hero { flex-direction: column; align-items: stretch; gap: 24px; }
  .fert-hero__info { display: contents; }
  .fert-hero__title { order: 0; }
  .fert-stage { order: 1; width: 100%; height: clamp(340px, 60vw, 450px); }
  .fert-block { order: 2; }
  .fert-cards { flex-direction: column; }
}
@media (max-width: 599.98px) {
  .fert-tile--fixed { flex: 1 1 140px; }
  .fert-crop { align-items: flex-start; }
  .fert-crop__group { width: 72px; }
  .fert-chips { padding-top: 4px; }
  .fert-method { align-items: flex-start; }
  .fert-method__label { margin-top: 3px; }
  .fert-buy { align-items: flex-start; }
  .fert-buy__body { flex: 1 1 calc(100% - 56px); min-height: 40px; }
  .fert-buy__aside { margin-left: 0; }
  .fert-chart { justify-content: center; }
  .fert-chart__plot { max-width: none; }
}
