/* ============================================================
   USFence Fence Picker — planner widget styles
   ============================================================
   Scoped to the .fp-main wrapper so the planner won't fight
   Hyva's storefront styles. Variables are declared on the
   wrapper, not :root, for the same reason.
   ============================================================ */

.fp-main {
  /* Brand */
  --fp-navy: #1B3848;
  --fp-navy-2: #143040;
  --fp-blue-med: #56768C;
  --fp-blue-light: #C7D6E0;
  --fp-red: #C23241;
  --fp-red-2: #a82a37;

  /* Surfaces */
  --fp-bg: #f4f6f8;
  --fp-bg-2: #e6ecf1;
  --fp-bg-3: #edf1f4;
  --fp-ink: #1B3848;
  --fp-ink-2: #3d5663;
  --fp-ink-3: #7a8a93;
  --fp-line: #d8dfe4;
  --fp-line-2: #b8c3cb;
  --fp-card: #ffffff;

  /* Type */
  --fp-serif: "Saira Condensed", "Saira", Impact, sans-serif;
  --fp-sans: "Saira", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --fp-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  flex: 1;
  max-width: 1340px;
  margin: 0 auto;
  padding: 48px 40px 60px;
  width: 100%;
  font-family: var(--fp-sans);
  color: var(--fp-ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.fp-main *, .fp-main *::before, .fp-main *::after { box-sizing: border-box; }
.fp-main button { font-family: inherit; cursor: pointer; }

/* ─── Intro ─── */
.fp-main .eyebrow {
  font-family: var(--fp-mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--fp-red); margin: 0 0 12px; font-weight: 500;
}
.fp-main .display {
  font-family: var(--fp-serif); font-weight: 700; font-size: 60px; line-height: 1.0;
  letter-spacing: -0.01em; margin: 0 0 16px; max-width: 18ch; text-wrap: balance;
  text-transform: uppercase;
}
.fp-main .lede { font-size: 17px; color: var(--fp-ink-2); margin: 0; max-width: 56ch; line-height: 1.55; }
.fp-main .intro { margin-bottom: 56px; max-width: 920px; }
.fp-main .catalog-warning {
  margin-top: 16px; padding: 10px 14px;
  background: #fff7e6; border-left: 3px solid var(--fp-red);
  font-size: 13px; color: var(--fp-ink-2);
  font-family: var(--fp-mono);
}

/* ─── Wizard layout ─── */
.fp-main .wizard {
  display: grid; grid-template-columns: 220px 1fr; gap: 56px; align-items: start;
}
.fp-main .rail {
  position: sticky; top: 92px;
  display: flex; flex-direction: column; gap: 4px;
  border-left: 1px solid var(--fp-line); padding-left: 0;
}
.fp-main .rail-step {
  background: none; border: 0; padding: 14px 0 14px 18px;
  display: flex; gap: 14px; align-items: center;
  text-align: left; color: var(--fp-ink-3); position: relative;
}
.fp-main .rail-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--fp-bg); border: 1.5px solid var(--fp-line-2);
  margin-left: -23px; flex-shrink: 0;
}
.fp-main .rail-meta { display: flex; flex-direction: column; }
.fp-main .rail-num { font-family: var(--fp-mono); font-size: 11px; letter-spacing: 0.1em; }
.fp-main .rail-label { font-family: var(--fp-serif); font-size: 18px; font-weight: 700; color: inherit; text-transform: uppercase; letter-spacing: 0.01em; }
.fp-main .rail-done { color: var(--fp-ink); }
.fp-main .rail-done .rail-dot { background: var(--fp-navy); border-color: var(--fp-navy); }
.fp-main .rail-now { color: var(--fp-ink); }
.fp-main .rail-now .rail-dot { background: var(--fp-red); border-color: var(--fp-red); box-shadow: 0 0 0 4px rgba(194,50,65,0.22); }
.fp-main .rail-todo { cursor: default; }

/* ─── Stage ─── */
.fp-main .stage { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.fp-main .step { animation: fp-fade .35s ease both; }
@keyframes fp-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.fp-main .step-head { margin-bottom: 28px; }
.fp-main .step-count {
  font-family: var(--fp-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--fp-ink-3); margin-bottom: 10px;
}
.fp-main .step-title {
  font-family: var(--fp-serif); font-weight: 700; font-size: 40px;
  line-height: 1.05; margin: 0 0 10px;
  text-wrap: balance; text-transform: uppercase;
}
.fp-main .step-sub { color: var(--fp-ink-2); margin: 0; max-width: 56ch; }
.fp-main .step-body { margin-bottom: 32px; }
.fp-main .step-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--fp-line);
}

/* ─── Option grids ─── */
.fp-main .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fp-main .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.fp-main .opt-title { font-family: var(--fp-serif); font-size: 22px; font-weight: 700; letter-spacing: 0.01em; margin-bottom: 4px; text-transform: uppercase; }
.fp-main .opt-note { font-size: 14px; color: var(--fp-ink-3); }
.fp-main .opt-check {
  position: absolute; top: 18px; right: 18px;
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--fp-line-2); color: var(--fp-bg); background: var(--fp-bg);
  transition: all .15s;
}
.fp-main .stylecard-on .opt-check,
.fp-main .bigcard-on .opt-check { background: var(--fp-navy); border-color: var(--fp-navy); color: #fff; }

/* ─── Style cards ─── */
.fp-main .stylecard {
  background: var(--fp-card); border: 1px solid var(--fp-line); border-radius: 14px;
  overflow: hidden; padding: 0; text-align: left; color: var(--fp-ink);
  transition: border-color .15s, transform .15s;
}
.fp-main .stylecard:hover { border-color: var(--fp-line-2); }
.fp-main .stylecard-on { border-color: var(--fp-navy); box-shadow: 0 0 0 1px var(--fp-navy) inset; }
.fp-main .stylecard-art { background: var(--fp-bg-3); padding: 22px 18px 14px; }
.fp-main .stylecard-meta { padding: 14px 18px 18px; position: relative; }
.fp-main .stylecard-meta .opt-title { font-size: 19px; }

/* ─── Material big cards ─── */
.fp-main .bigcard {
  position: relative; background: var(--fp-card); border: 1px solid var(--fp-line);
  border-radius: 14px; padding: 24px 22px 22px; text-align: left; color: var(--fp-ink);
  transition: border-color .15s; display: flex; flex-direction: column; gap: 12px;
}
.fp-main .bigcard:hover { border-color: var(--fp-line-2); }
.fp-main .bigcard-on { border-color: var(--fp-navy); box-shadow: 0 0 0 1px var(--fp-navy) inset; }
.fp-main .bigcard-head { display: flex; justify-content: space-between; align-items: flex-start; }
.fp-main .bigcard-swatch {
  height: 84px; border-radius: 8px; border: 1px solid;
  box-shadow: inset 0 -16px 24px rgba(0,0,0,0.18);
}
.fp-main .bigcard-note { font-size: 14px; color: var(--fp-ink-2); line-height: 1.5; }
.fp-main .pros {
  list-style: none; padding: 0; margin: 16px 0 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.fp-main .pros li {
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  background: var(--fp-bg-3); color: var(--fp-ink-2);
  font-family: var(--fp-mono); letter-spacing: 0.02em;
}

/* ─── Height & color ─── */
.fp-main .hc { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.fp-main .hc-block {
  background: var(--fp-card); border: 1px solid var(--fp-line);
  border-radius: 14px; padding: 24px;
}
.fp-main .hc-label {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 16px;
}
.fp-main .hc-label > span:first-child {
  font-family: var(--fp-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--fp-ink-3);
}
.fp-main .hc-val { font-family: var(--fp-serif); font-size: 30px; font-weight: 700; }

.fp-main .slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; background: var(--fp-line);
  border-radius: 999px; outline: none; margin: 8px 0 12px;
}
.fp-main .slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--fp-red); cursor: pointer; border: 3px solid var(--fp-bg);
  box-shadow: 0 0 0 1px var(--fp-red);
}
.fp-main .slider::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--fp-red); cursor: pointer; border: 3px solid var(--fp-bg);
}
.fp-main .ticks { display: flex; justify-content: space-between; font-family: var(--fp-mono); font-size: 10px; color: var(--fp-ink-3); margin-bottom: 12px; }
.fp-main .tick { padding: 2px 4px; }
.fp-main .tick-on { color: var(--fp-ink); font-weight: 500; }
.fp-main .height-vis {
  position: relative; background: var(--fp-bg-3); border-radius: 10px;
  padding: 16px; margin-top: 8px; min-height: 220px;
  display: flex; align-items: flex-end; justify-content: center;
}
.fp-main .height-person {
  position: absolute; right: 24px; bottom: 16px;
  width: 18px; border-left: 1px dashed var(--fp-ink-3);
  display: flex; align-items: flex-end; padding-left: 6px;
}
.fp-main .person-label { font-family: var(--fp-mono); font-size: 9px; color: var(--fp-ink-3); white-space: nowrap; margin-bottom: -4px; }
.fp-main .swatches { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 8px; }
.fp-main .sw {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 10px;
  background: var(--fp-bg-3); border: 1px solid transparent;
  color: var(--fp-ink); text-align: left;
}
.fp-main .sw:hover { background: var(--fp-bg-2); }
.fp-main .sw-on { border-color: var(--fp-navy); background: var(--fp-card); }
.fp-main .sw-dot {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid; flex-shrink: 0;
  box-shadow: inset 0 -8px 12px rgba(0,0,0,0.08);
}
.fp-main .sw-name { font-size: 14px; font-weight: 500; }

/* ─── Buttons ─── */
.fp-main .btn {
  font-family: var(--fp-sans); font-size: 14px; font-weight: 600;
  padding: 12px 24px; border-radius: 4px; border: 1px solid transparent;
  transition: all .15s; text-transform: uppercase; letter-spacing: 0.04em;
  text-decoration: none; display: inline-block;
}
.fp-main .btn-primary { background: var(--fp-red); color: #fff; }
.fp-main .btn-primary:hover { background: var(--fp-red-2); }
.fp-main .btn-primary:disabled { background: var(--fp-line); color: var(--fp-ink-3); cursor: not-allowed; }
.fp-main .btn-ghost { background: transparent; color: var(--fp-ink); border-color: var(--fp-line-2); }
.fp-main .btn-ghost:hover { background: var(--fp-bg-3); border-color: var(--fp-navy); }
.fp-main .btn-ghost:disabled { color: var(--fp-ink-3); cursor: not-allowed; border-color: var(--fp-line); }

/* ─── Summary aside ─── */
.fp-main .summary {
  position: sticky; top: 92px;
  background: var(--fp-card); border: 1px solid var(--fp-line);
  border-radius: 14px; padding: 22px;
}
.fp-main .summary-h {
  font-family: var(--fp-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--fp-ink-3); margin-bottom: 16px;
}
.fp-main .summary-empty { font-size: 14px; color: var(--fp-ink-3); padding: 12px 0 24px; }
.fp-main .summary-chips { display: flex; flex-direction: column; gap: 8px; padding-bottom: 22px; border-bottom: 1px solid var(--fp-line); margin-bottom: 20px; }
.fp-main .chip {
  display: grid; grid-template-columns: 60px 1fr auto; align-items: center;
  gap: 10px; padding: 10px 12px; background: var(--fp-bg-3); border-radius: 8px;
}
.fp-main .chip-k { font-family: var(--fp-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--fp-ink-3); }
.fp-main .chip-v { font-size: 14px; font-weight: 500; }
.fp-main .chip-x { background: none; border: 0; color: var(--fp-ink-3); font-size: 18px; line-height: 1; padding: 0; }
.fp-main .chip-x:hover { color: var(--fp-ink); }
.fp-main .summary-foot-h { font-family: var(--fp-serif); font-size: 19px; font-weight: 700; margin-bottom: 6px; text-transform: uppercase; }
.fp-main .summary-foot-b { font-size: 13px; color: var(--fp-ink-3); margin-bottom: 12px; line-height: 1.5; }
.fp-main .summary-link { font-size: 13px; color: var(--fp-red); text-decoration: none; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.fp-main .summary-link:hover { color: var(--fp-red-2); }

/* ─── Results ─── */
.fp-main .results { animation: fp-fade .4s ease both; }
.fp-main .results-head { margin-bottom: 40px; }
.fp-main .results-head .display { font-size: 48px; }
.fp-main .results-head .lede { max-width: 56ch; }
.fp-main .results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 32px; }
.fp-main .rcard {
  position: relative;
  background: var(--fp-card); border: 1px solid var(--fp-line); border-radius: 14px;
  overflow: hidden;
}
.fp-main .rcard-top { border-color: var(--fp-navy); box-shadow: 0 0 0 1px var(--fp-navy) inset; }
.fp-main .rcard-flag {
  position: absolute; top: 14px; left: 14px;
  background: var(--fp-red); color: #fff;
  font-family: var(--fp-sans); font-weight: 700; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 3px; z-index: 2;
}
.fp-main .rcard-art { padding: 30px 24px 20px; border-bottom: 1px solid var(--fp-line); }
.fp-main .rcard-body { padding: 20px 22px 22px; }
.fp-main .rcard-row { display: flex; justify-content: space-between; align-items: baseline; }
.fp-main .rcard-name { font-family: var(--fp-serif); font-size: 28px; font-weight: 700; margin: 0; letter-spacing: 0.01em; text-transform: uppercase; }
.fp-main .rcard-fit { font-family: var(--fp-mono); font-size: 12px; color: var(--fp-ink-2); }
.fp-main .rcard-meta { font-size: 13px; color: var(--fp-ink-3); margin: 4px 0 14px; }
.fp-main .rcard-bar {
  height: 4px; background: var(--fp-bg-2); border-radius: 999px; overflow: hidden;
  margin-bottom: 18px;
}
.fp-main .rcard-bar span { display: block; height: 100%; background: var(--fp-red); }
.fp-main .rcard-foot { display: flex; justify-content: space-between; align-items: center; }
.fp-main .rcard-price { font-size: 14px; color: var(--fp-ink-2); }
.fp-main .rcard-price strong { font-family: var(--fp-serif); font-size: 24px; font-weight: 700; color: var(--fp-ink); }
.fp-main .results-actions { display: flex; gap: 12px; margin-bottom: 56px; }
.fp-main .results-more-h {
  font-family: var(--fp-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--fp-ink-3); margin-bottom: 16px;
}
.fp-main .results-more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fp-main .mini {
  display: grid; grid-template-columns: 80px 1fr auto; align-items: center; gap: 14px;
  background: var(--fp-card); border: 1px solid var(--fp-line); border-radius: 12px;
  padding: 12px 16px 12px 12px; text-decoration: none; color: inherit;
}
.fp-main .mini:hover { border-color: var(--fp-line-2); }
.fp-main .mini-art { background: var(--fp-bg-3); border-radius: 8px; padding: 8px 4px; }
.fp-main .mini-name { font-family: var(--fp-serif); font-weight: 700; font-size: 18px; text-transform: uppercase; letter-spacing: 0.01em; }
.fp-main .mini-note { font-size: 12px; color: var(--fp-ink-3); }
.fp-main .mini-price { font-family: var(--fp-mono); font-size: 12px; color: var(--fp-ink-2); }

/* ─── Responsive ─── */
@media (max-width: 1100px) {
  .fp-main { padding: 32px 20px 40px; }
  .fp-main .wizard { grid-template-columns: 1fr; gap: 32px; }
  .fp-main .rail {
    flex-direction: row; border-left: 0; border-top: 1px solid var(--fp-line);
    padding-left: 0; flex-wrap: wrap; position: static;
  }
  .fp-main .rail-dot { margin-left: 0; }
  .fp-main .stage { grid-template-columns: 1fr; }
  .fp-main .grid-3 { grid-template-columns: 1fr 1fr; }
  .fp-main .results-grid,
  .fp-main .results-more-grid { grid-template-columns: 1fr; }
  .fp-main .hc { grid-template-columns: 1fr; }
  .fp-main .display { font-size: 40px; }
  .fp-main .summary { position: static; }
}

/* ─── Real-catalog additions (product photos, cart, toast) ─── */
.fp-main .rcard-art { min-height: 200px; display: flex; align-items: center; justify-content: center; }
.fp-main .rcard-art img {
  max-width: 100%; max-height: 180px; object-fit: contain; display: block;
  mix-blend-mode: multiply;
}
.fp-main .mini-art { display: flex; align-items: center; justify-content: center; min-height: 60px; }
.fp-main .mini-art img { max-width: 100%; max-height: 56px; object-fit: contain; display: block; mix-blend-mode: multiply; }
.fp-main .rcard-actions { display: flex; gap: 8px; align-items: center; }
.fp-main .rcard-sku { font-family: var(--fp-mono); font-size: 10px; color: var(--fp-ink-3); letter-spacing: 0.04em; }
.fp-main .btn-sm { padding: 9px 16px; font-size: 12px; }
.fp-main .btn-cart-done { background: var(--fp-navy); color: #fff; border-color: var(--fp-navy); }

.fp-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px);
  background: #1B3848; color: #fff; padding: 12px 22px; border-radius: 6px;
  font-family: "Saira", sans-serif; font-size: 14px; font-weight: 500;
  opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 9999;
  box-shadow: 0 8px 30px rgba(16,34,44,0.35);
}
.fp-toast a { color: #fff; text-decoration: underline; }
.fp-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

/* ══ Category-driven flow additions ══ */

.fp-main .grid-1 { display: grid; grid-template-columns: 1fr; gap: 14px; max-width: 420px; }

/* Category card image (real category image from admin; SVG art is the fallback) */
.fp-main .catcard-img {
  background: var(--fp-bg-3);
  height: 150px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.fp-main .catcard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Height chips — the real HEIGHT attribute values on this branch's products */
.fp-main .hchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.fp-main .hchip {
  border: 1px solid var(--fp-line-2, #d8dee3); border-radius: 8px;
  background: var(--fp-card, #fff); cursor: pointer;
  padding: 10px 14px; font-size: 15px; font-weight: 600; color: var(--fp-ink, #1b2733);
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 62px;
}
.fp-main .hchip:hover { background: var(--fp-bg-2, #f4f6f8); }
.fp-main .hchip-on { border-color: var(--fp-navy, #1B3848); box-shadow: 0 0 0 1px var(--fp-navy, #1B3848) inset; }
.fp-main .hchip-in { font-family: var(--fp-mono, monospace); font-size: 10px; font-weight: 400; color: var(--fp-ink-3, #7d8a94); }

/* Empty-state note inside a step body */
.fp-main .step-empty {
  padding: 32px; text-align: center; color: var(--fp-ink-2, #4d5b66);
  background: var(--fp-bg-2, #f4f6f8); border-radius: 10px; font-size: 15px;
}
