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

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

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

  /* Type */
  --fb-serif: "Saira Condensed", "Saira", Impact, sans-serif;
  --fb-sans: "Saira", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --fb-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(--fb-sans);
  color: var(--fb-ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* ─── Intro ─── */
.fb-main .eyebrow {
  font-family: var(--fb-mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--fb-red); margin: 0 0 12px; font-weight: 500;
}
.fb-main .display {
  font-family: var(--fb-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;
}
.fb-main .lede { font-size: 17px; color: var(--fb-ink-2); margin: 0; max-width: 56ch; line-height: 1.55; }
.fb-main .intro { margin-bottom: 56px; max-width: 920px; }
.fb-main .catalog-warning {
  margin-top: 16px; padding: 10px 14px;
  background: #fff7e6; border-left: 3px solid var(--fb-red);
  font-size: 13px; color: var(--fb-ink-2);
  font-family: var(--fb-mono);
}

/* ─── Wizard layout ─── */
/* Progress bar across the top: a numbered marker per step (a tick once
   done) joined by a track that fills in navy up to the current step, which
   is red; each step shows what was picked on it under its name. */
.fb-main .rail { flex: 1 1 auto; min-width: 0; }
.fb-main .rail-steps { display: flex; min-width: 0; }
.fb-main .rail-step {
  flex: 1 1 0; min-width: 0; background: none; border: 0; padding: 0;
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  text-align: left; color: var(--fb-ink-3); position: relative;
}
.fb-main .rail-step:last-child { flex: 0 1 auto; }
.fb-main .rail-marker { display: flex; align-items: center; width: 100%; }
.fb-main .rail-dot {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--fb-mono); font-size: 13px; font-weight: 700; line-height: 1;
  background: var(--fb-card); border: 2px solid var(--fb-line-2); color: var(--fb-ink-3);
  transition: background .2s, border-color .2s, box-shadow .2s;
}
/* The track to the next step */
.fb-main .rail-marker::after {
  content: ""; flex: 1 1 auto; height: 6px; margin: 0 6px; border-radius: 3px;
  background: var(--fb-bg-2);
}
.fb-main .rail-step:last-child .rail-marker::after { display: none; }
.fb-main .rail-done .rail-dot { background: var(--fb-navy); border-color: var(--fb-navy); color: #fff; }
.fb-main .rail-done .rail-marker::after { background: var(--fb-navy); }
.fb-main .rail-now .rail-dot { background: var(--fb-red); border-color: var(--fb-red); color: #fff; box-shadow: 0 0 0 5px rgba(194,50,65,0.18); }
.fb-main .rail-done:hover .rail-dot { box-shadow: 0 0 0 4px rgba(27,56,72,0.16); }
.fb-main .rail-todo { cursor: default; }
/* The step name with what was picked on it directly under it. */
.fb-main .rail-line { display: flex; flex-direction: column; min-width: 0; max-width: 100%; padding-right: 8px; }
.fb-main .rail-label {
  font-family: var(--fb-serif); font-size: 17px; font-weight: 700; line-height: 1.1; color: inherit;
  text-transform: uppercase; letter-spacing: 0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fb-main .rail-done .rail-label, .fb-main .rail-now .rail-label { color: var(--fb-ink); }
.fb-main .rail-now .rail-label { color: var(--fb-red); }
.fb-main .rail-val {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13px; font-weight: 500; color: var(--fb-ink-2);
}

/* Sticky header on every step: progress bar (+ Continue) over "Your options" */
.fb-main .fb-progress {
  background: var(--fb-card); border: 1px solid var(--fb-line); border-radius: 14px;
  padding: 16px 20px 14px; margin-bottom: 32px; position: relative; z-index: 20;
}
.fb-main .fb-progress-top { display: flex; align-items: flex-start; gap: 24px; }
.fb-main .fb-progress-next { flex: 0 0 auto; padding: 11px 22px; }
@media (min-width: 1101px) and (min-height: 700px) {
  .fb-main .fb-progress { position: sticky; top: 5px; box-shadow: 0 6px 18px rgba(16,34,44,0.08); }
}

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

/* ─── Option grids ─── */
.fb-main .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fb-main .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
/* Style cards: as many columns as fit at 210px+, so the cards never
   squeeze into narrow strips when the summary column takes the room. */
.fb-main .grid-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .fb-main .grid-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 680px) { .fb-main .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .fb-main .grid-cards { grid-template-columns: 1fr; } }
.fb-main .opt-title { font-family: var(--fb-serif); font-size: 22px; font-weight: 700; letter-spacing: 0.01em; margin-bottom: 4px; text-transform: uppercase; }
.fb-main .opt-note { font-size: 14px; color: var(--fb-ink-3); }
.fb-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(--fb-line-2); color: var(--fb-bg); background: var(--fb-bg);
  transition: all .15s;
}
.fb-main .stylecard-on .opt-check { background: var(--fb-navy); border-color: var(--fb-navy); color: #fff; }

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

/* ─── Buttons ─── */
.fb-main .btn {
  font-family: var(--fb-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;
}
.fb-main .btn-primary { background: var(--fb-red); color: #fff; }
.fb-main .btn-primary:hover { background: var(--fb-red-2); }
.fb-main .btn-primary:disabled { background: var(--fb-line); color: var(--fb-ink-3); cursor: not-allowed; }
.fb-main .btn-ghost { background: transparent; color: var(--fb-ink); border-color: var(--fb-line-2); }
.fb-main .btn-ghost:hover { background: var(--fb-bg-3); border-color: var(--fb-navy); }
.fb-main .btn-ghost:disabled { color: var(--fb-ink-3); cursor: not-allowed; border-color: var(--fb-line); }

/* ─── Summary aside ─── */
.fb-main .summary {
  background: var(--fb-card); border: 1px solid var(--fb-line);
  border-radius: 14px; padding: 22px;
}
.fb-main .summary-h {
  font-family: var(--fb-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--fb-ink-3); margin-bottom: 16px;
}
.fb-main .summary-empty { font-size: 14px; color: var(--fb-ink-3); padding: 4px 0; }
.fb-main .chip-x { background: none; border: 0; color: var(--fb-ink-3); font-size: 18px; line-height: 1; padding: 0; }
.fb-main .chip-x:hover { color: var(--fb-ink); }
.fb-main .summary-link { font-size: 13px; color: var(--fb-red); text-decoration: none; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.fb-main .summary-link:hover { color: var(--fb-red-2); }

/* ─── Responsive ─── */
@media (max-width: 1100px) {
  .fb-main { padding: 32px 20px 40px; }
  .fb-main .fb-progress { margin-bottom: 28px; }
  .fb-main .grid-3 { grid-template-columns: 1fr 1fr; }
  .fb-main .display { font-size: 40px; }
}

.fb-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);
}
.fb-toast a { color: #fff; text-decoration: underline; }
.fb-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
/* Mid-screen (the layout following an Options pick) */
.fb-toast.fb-toast-center { top: 50%; bottom: auto; transform: translate(-50%, calc(-50% + 16px)); max-width: min(560px, calc(100vw - 32px)); padding: 18px 26px; font-size: 15px; text-align: center; }
.fb-toast.fb-toast-center.show { transform: translate(-50%, -50%); }

/* ══ Catalog-driven flow: Material → Style → Options ══ */

.fb-main .btn-sm { padding: 9px 16px; font-size: 12px; }

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

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

/* Style cards — code badge, picket detail, starting price */
/* Cards: same-height image area on every card; the text area fills the rest so
   a row of cards lines up even when one card's text wraps more. (A <button>
   centers its content vertically by default — the flex column overrides that.) */
.fb-main .stylecard { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; height: 100%; }
.fb-main .stylecard-art,
.fb-main .catcard-img { flex: 0 0 160px; height: 160px; box-sizing: border-box; }
/* Material cards are three across the full width: a taller picture. */
.fb-main .step-material .stylecard-art,
.fb-main .step-material .catcard-img { flex-basis: 240px; height: 240px; }
.fb-main .stylecard-art { display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.fb-main .stylecard-art svg { max-height: 100%; }
/* Text area is a column so the starting price sits at its bottom-left on every
   card, level across a row however much the title/description wrap. */
.fb-main .stylecard-meta { flex: 1 1 auto; width: 100%; box-sizing: border-box; display: flex; flex-direction: column; align-items: flex-start; }
.fb-main .stylecard-meta .opt-title { align-self: stretch; }
.fb-main .opt-code {
  display: inline-block; font-family: var(--fb-mono); font-size: 10px; letter-spacing: 0.08em;
  color: var(--fb-ink-2); background: var(--fb-bg-3); border-radius: 3px; padding: 2px 6px; margin-bottom: 6px;
}
.fb-main .opt-detail { font-size: 13px; color: var(--fb-ink-2); margin-bottom: 2px; }

/* ══ Options step ══
   [sticky "Your options"] then a card per component: Panels / Gate #n /
   Posts + Post caps (one card to the eye) / Accessories */

/* "Your options": every option filter but width, sticking under the header */
.fb-main .fb-opts {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px 28px;
  background: var(--fb-card); border: 1px solid var(--fb-line); border-radius: 14px;
  padding: 16px 20px; margin-bottom: 18px; position: relative; z-index: 15;
}
@media (min-width: 1101px) and (min-height: 700px) {
  .fb-main .fb-opts { position: sticky; top: calc(5px + var(--fb-opts-h, 0px) + 10px); box-shadow: 0 6px 18px rgba(16,34,44,0.08); }
}
.fb-main .fb-opts-head { flex: 0 0 auto; max-width: 190px; padding-right: 28px; border-right: 1px solid var(--fb-line); align-self: stretch; }
.fb-main .fb-opts .summary-h { margin-bottom: 6px; }
.fb-main .fb-opts-style { font-family: var(--fb-serif); font-size: 20px; font-weight: 700; line-height: 1.1; text-transform: uppercase; }
.fb-main .fb-opts .fo-block { margin-bottom: 0; }
.fb-main .fb-opts .fo-hint { margin: 0; align-self: center; }
.fb-main .fb-opts .fo-label { font-size: 13px; margin-bottom: 8px; }
.fb-main .fb-opts .fo-current { font-size: 13px; }
.fb-main .fb-opts .fo-swatches, .fb-main .fb-opts .fo-chips { gap: 6px; }
.fb-main .fb-opts .fo-swatch { width: 44px; height: 44px; padding: 3px; }
.fb-main .fb-opts .fo-chip { min-width: 46px; height: 46px; padding: 0 8px; font-size: 15px; }
.fb-main .fb-opts .fo-chip-wide { height: 38px; font-size: 13px; }

.fb-main .fo-block { margin-bottom: 26px; }
.fb-main .fo-label {
  font-family: var(--fb-sans); font-size: 18px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; margin-bottom: 12px;
}
.fb-main .fo-current { font-size: 15px; font-weight: 500; letter-spacing: 0; text-transform: none; }

.fb-main .fo-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.fb-main .fo-swatch {
  width: 66px; height: 66px; padding: 4px; background: transparent;
  border: 2px solid transparent; border-radius: 4px; transition: border-color .15s;
}
.fb-main .fo-swatch-chip {
  display: block; width: 100%; height: 100%; border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12), inset -10px -10px 18px rgba(0,0,0,0.08);
}
.fb-main .fo-swatch:hover { border-color: var(--fb-line-2); }
.fb-main .fo-swatch.is-on { border-color: var(--fb-red); }

/* Color groups (Standard Colors, Woodgrain Colors, Two-Tone Colors):
   a small heading over each group's swatches, groups side by side with a
   light rule between them. Every group draws the rule on its left; the
   wrapper is pulled left and clips, so the group that starts a row (the
   first, or one that wrapped) shows none. */
.fb-main .fo-groups-wrap { overflow: hidden; padding: 3px 0; margin: -3px 0; }
.fb-main .fo-groups { display: flex; flex-wrap: wrap; row-gap: 14px; margin-left: -17px; }
.fb-main .fo-group { margin-left: -1px; padding: 0 18px; border-left: 1px solid var(--fb-line-2); }
.fb-main .fo-group-h {
  font-family: var(--fb-sans); font-size: 14px; font-weight: 700; color: var(--fb-ink-2);
  margin-bottom: 8px; white-space: nowrap;
}
.fb-main .fb-opts .fo-groups { row-gap: 10px; margin-left: -13px; }
.fb-main .fb-opts .fo-group { padding: 0 14px; }
.fb-main .fb-opts .fo-group-h { font-size: 12px; margin-bottom: 5px; }

/* Two-tone: the color top-left, the secondary color bottom-right, split on the diagonal */
.fb-main .fo-swatch-duo { position: relative; overflow: hidden; box-shadow: none; }
.fb-main .fo-duo-a, .fb-main .fo-duo-b { position: absolute; inset: 0; }
.fb-main .fo-duo-b { clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.fb-main .fo-swatch-duo::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(to top left, transparent calc(50% - 1px), rgba(255,255,255,0.9) 50%, transparent calc(50% + 1px));
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12), inset -10px -10px 18px rgba(0,0,0,0.08);
}

/* "None" — the product has no value for this filter (e.g. no secondary color):
   an empty grey tile with a thin slash drawn corner to corner inside it. */
.fb-main .fo-swatch-none {
  background: #e9edf0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cline x1='6' y1='94' x2='94' y2='6' stroke='%239aa6ae' stroke-width='2' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.10);
}

.fb-main .fo-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-main .fo-chip {
  min-width: 74px; height: 74px; padding: 0 14px; background: var(--fb-card);
  border: 2px solid var(--fb-ink); border-radius: 2px; color: var(--fb-ink);
  font-size: 20px; font-weight: 700; transition: all .15s;
}
.fb-main .fo-chip-wide { height: 52px; font-size: 15px; }
.fb-main .fo-chip:hover { background: var(--fb-bg-3); }
.fb-main .fo-chip.is-on { border-color: var(--fb-red); background: var(--fb-red); color: #fff; }

/* Not made with the other picks — still clickable, the other picks adjust */
.fb-main .fo-chip.is-na, .fb-main .fo-swatch.is-na { opacity: 0.35; }
.fb-main .fo-chip.is-na { border-color: var(--fb-line-2); color: var(--fb-ink-3); }
.fb-main .fo-chip.is-na:hover, .fb-main .fo-swatch.is-na:hover { opacity: 0.6; }

/* Panels / Gates / Posts: picture of the current picks beside size picker + item rows */
.fb-main .fc-sec {
  display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 22px;
  background: var(--fb-card); border: 1px solid var(--fb-line); border-radius: 14px; padding: 20px;
}
.fb-main .fc-sec + .fc-sec { margin-top: 18px; }
.fb-main .fc-media { position: sticky; top: 12px; align-self: start; }
/* The header sticks 5px from the top and "Your options" 10px under it;
   the pictures stick 12px under that. */
@media (min-width: 1101px) and (min-height: 700px) {
  .fb-main .fc-media { top: calc(5px + var(--fb-opts-h, 0px) + 10px + var(--fb-bar-h, 0px) + 12px); }
}
.fb-main .fc-art {
  background: linear-gradient(#eef1f3, #e3e8ec); border-radius: 8px; height: 180px;
  padding: 14px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden;
}
.fb-main .fc-art svg { max-height: 100%; }
.fb-main .fc-art-photo { padding: 0; align-items: stretch; background: #fff; border: 1px solid var(--fb-line); }
.fb-main .fc-art-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.fb-main .fc-caption { font-family: var(--fb-mono); font-size: 11px; color: var(--fb-ink-3); text-align: center; margin-top: 8px; letter-spacing: 0.04em; }
.fb-main .fc-h {
  margin: 0 0 4px; font-family: var(--fb-serif); font-size: 26px; font-weight: 700; line-height: 1.1;
  text-transform: uppercase; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px;
}
.fb-main .fc-h .fo-current { font-family: var(--fb-sans); font-size: 14px; color: var(--fb-ink-2); }
.fb-main .fo-hint { font-size: 13px; color: var(--fb-ink-3); margin: 0 0 12px; max-width: 60ch; }
.fb-main .fc-body .fo-chip { min-width: 58px; height: 52px; font-size: 17px; }
.fb-main .fo-chip-size { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.fb-main .fo-chip-size small {
  font-family: var(--fb-mono); font-size: 9px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; margin-top: 3px; opacity: 0.75;
}

.fb-main .fc-row-name { font-weight: 600; font-size: 14px; line-height: 1.3; color: var(--fb-ink); text-decoration: none; }
.fb-main .fc-row-name:hover { color: var(--fb-red); }
.fb-main .fo-sku { font-family: var(--fb-mono); font-size: 11px; color: var(--fb-ink-3); }
.fb-main .fc-sku-link { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; text-decoration: underline dotted; text-underline-offset: 2px; }
.fb-main .fc-sku-link:hover { color: var(--fb-red); text-decoration-style: solid; }
.fb-main .fc-art.is-product { cursor: zoom-in; transition: box-shadow .15s, border-color .15s; }
.fb-main .fc-art.is-product:hover, .fb-main .fc-art.is-product:focus-visible { border-color: var(--fb-navy); box-shadow: 0 0 0 2px rgba(27,56,72,.15); outline: none; }

/* Card heading with an action beside it (a gate's Remove) */
.fb-main .fc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.fb-main .fc-remove {
  flex: 0 0 auto; background: none; border: 0; padding: 4px 0; font-size: 13px; font-weight: 600;
  color: var(--fb-ink-3); text-decoration: underline; text-underline-offset: 3px;
}
.fb-main .fc-remove:hover { color: var(--fb-red); }
.fb-main .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The product the picks come to: name and SKU, price each — nothing to buy here */
.fb-main .fc-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--fb-line);
}
.fb-main .fc-item + .fc-item { margin-top: 0; }
.fb-main .fc-item-meta { display: flex; flex-direction: column; min-width: 0; }
.fb-main .fc-item-kind { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fb-ink-2); }
.fb-main .fc-item-price { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; white-space: nowrap; }
.fb-main .fc-item-each { font-family: var(--fb-serif); font-size: 20px; font-weight: 700; line-height: 1.15; }
.fb-main .fc-item-price small { font-family: var(--fb-sans); font-size: 12px; font-weight: 500; color: var(--fb-ink-3); margin-left: 4px; }
/* Under the price each: price × the suggested quantity */
.fb-main .fc-item-total { font-size: 14px; font-weight: 700; color: var(--fb-navy); }
.fb-main .fc-item-total.is-none small { margin-left: 0; }
/* "Update my layout to match" under a pick the layout doesn't match */
/* Drawn gates: the width is the layout's — a link back to it. */
.fb-main .fc-gate-edit { margin: 12px 0 0; font-size: 13px; color: var(--fb-ink-2); }
.fb-main .fc-link {
  padding: 0; background: none; border: 0; font: inherit; font-weight: 600; color: var(--fb-navy);
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.fb-main .fc-link:hover { color: var(--fb-red); }
.fb-main .fc-sec-note { display: block; }
.fb-main .fc-sec-note .fo-hint { margin: 0; }

/* "Add a gate": a dashed card in the gates' place */
.fb-main .fc-add-gate {
  display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 18px; padding: 18px 20px;
  background: var(--fb-bg); border: 2px dashed var(--fb-line-2); border-radius: 14px;
  color: var(--fb-ink); text-align: left; transition: border-color .15s, background .15s;
}
.fb-main .fc-add-gate:hover { border-color: var(--fb-navy); background: var(--fb-card); }
.fb-main .fc-add-gate + .fc-sec { margin-top: 18px; }
.fb-main .fc-add-gate:focus-visible { outline: 2px solid var(--fb-navy); outline-offset: 2px; }
.fb-main .fc-add-icon {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--fb-navy); color: #fff;
}
.fb-main .fc-add-text { display: flex; flex-direction: column; }
.fb-main .fc-add-text b { font-family: var(--fb-serif); font-size: 21px; text-transform: uppercase; line-height: 1.1; }
.fb-main .fc-add-text small { font-size: 13px; color: var(--fb-ink-3); }

/* Posts and Post caps read as one card: two sections (each picture sticks
   beside its own half) with no gap and a dashed rule between them */
.fb-main .fc-sec-posts.is-joined { border-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.fb-main .fc-sec + .fc-sec-caps.is-joined {
  margin-top: 0; border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; position: relative;
}
.fb-main .fc-sec-caps.is-joined::before {
  content: ""; position: absolute; top: 0; left: 20px; right: 20px; border-top: 1px dashed var(--fb-line-2);
}
.fb-main .fcap-tile:disabled { cursor: default; }

/* Gates: Unassembled / Assembled, each with its price */
.fb-main .fo-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; max-width: 460px; }
.fb-main .fo-seg-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  padding: 10px 14px; background: var(--fb-card); color: var(--fb-ink);
  border: 2px solid var(--fb-line-2); border-radius: 6px; transition: border-color .15s, background .15s;
}
.fb-main .fo-seg-btn:hover:not(:disabled) { border-color: var(--fb-ink); }
.fb-main .fo-seg-btn.is-on { border-color: var(--fb-red); background: rgba(194,50,65,0.06); }
.fb-main .fo-seg-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.fb-main .fo-seg-label { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.fb-main .fo-seg-price { font-family: var(--fb-serif); font-size: 20px; font-weight: 700; line-height: 1.1; }
.fb-main .fo-seg-note { font-size: 12px; color: var(--fb-ink-3); }
.fb-main .fo-seg-btn.is-on .fo-seg-note { color: var(--fb-ink-2); }

/* − qty + on Finalize */
.fb-main .fo-step { display: inline-flex; align-items: stretch; border: 1px solid var(--fb-line-2); border-radius: 4px; height: 34px; overflow: hidden; }
.fb-main .fo-step button {
  width: 32px; border: 0; background: var(--fb-bg-3); color: var(--fb-ink); font-size: 17px; font-weight: 700; line-height: 1; padding: 0;
}
.fb-main .fo-step button:hover:not(:disabled) { background: var(--fb-line); }
.fb-main .fo-step button:disabled { color: var(--fb-ink-3); opacity: 0.5; }
.fb-main .fo-step input {
  width: 44px; border: 0; border-left: 1px solid var(--fb-line-2); border-right: 1px solid var(--fb-line-2);
  text-align: center; font-size: 15px; font-family: var(--fb-sans); color: var(--fb-ink); background: var(--fb-card); padding: 0;
  -moz-appearance: textfield;
}
.fb-main .fo-step input::-webkit-outer-spin-button,
.fb-main .fo-step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

@media (max-width: 1360px) {
  .fb-main .fc-sec { grid-template-columns: 130px minmax(0, 1fr); gap: 18px; padding: 16px; }
  .fb-main .fc-art { height: 140px; padding: 10px; }
}
@media (max-width: 1100px) {
  .fb-main .fb-opts-head { max-width: none; flex-basis: 100%; padding: 0 0 12px; border-right: 0; border-bottom: 1px solid var(--fb-line); }
}
@media (max-width: 640px) {
  .fb-main .grid-3 { grid-template-columns: 1fr; }
  .fb-main .fo-swatch { width: 56px; height: 56px; }
  .fb-main .fo-chip { min-width: 60px; height: 60px; font-size: 17px; }
  .fb-main .fc-sec { grid-template-columns: 1fr; }
  .fb-main .fc-media { position: static; }
  .fb-main .rail-dot { width: 26px; height: 26px; font-size: 11px; }
  .fb-main .rail-marker::after { height: 4px; margin: 0 3px; }
  .fb-main .rail-label { font-size: 12px; }
  .fb-main .rail-val { display: none; }
  .fb-main .rail-step:not(.rail-now) .rail-label { display: none; }
  .fb-main .rail-step.rail-now { flex: 2 1 0; }
  .fb-main .fb-progress { padding: 12px 12px 10px; }
  .fb-main .fb-progress-top { flex-wrap: wrap; gap: 0; }
  .fb-main .fb-progress-top .rail { flex-basis: 100%; }
  .fb-main .fb-progress-next { display: none; }
}

/* ══ Layout step: have measurements? / Enter measurements / Layout Designer ══ */
.fb-main .lq-q { font-size: 18px; font-weight: 600; margin: 0 0 14px; }
.fb-main .lq-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.fb-main .lq-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  background: var(--fb-card); border: 1px solid var(--fb-line); border-radius: 14px;
  padding: 20px 18px; text-align: left; color: var(--fb-ink); transition: border-color .15s, box-shadow .15s;
}
.fb-main .lq-card:hover { border-color: var(--fb-line-2); }
.fb-main .lq-card.is-on { border-color: var(--fb-navy); box-shadow: 0 0 0 1px var(--fb-navy); }
.fb-main .lq-card.is-on .opt-check { background: var(--fb-navy); border-color: var(--fb-navy); color: #fff; }
.fb-main .lq-icon { color: var(--fb-red); margin-bottom: 4px; }
.fb-main .lq-title { font-family: var(--fb-serif); font-size: 21px; font-weight: 700; line-height: 1.1; text-transform: uppercase; padding-right: 28px; }
.fb-main .lq-text { font-size: 14px; color: var(--fb-ink-2); line-height: 1.45; }
.fb-main .lq-guide { margin: 16px 0 0; font-size: 14px; color: var(--fb-ink-2); }
.fb-main .lq-guide a { color: var(--fb-red); font-weight: 600; text-decoration: none; }
.fb-main .lq-guide a:hover { text-decoration: underline; }

.fb-main .lm-h { font-family: var(--fb-serif); font-size: 28px; font-weight: 700; line-height: 1.1; text-transform: uppercase; margin: 0 0 6px; }
.fb-main .lm {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; margin-top: 28px;
  background: var(--fb-card); border: 1px solid var(--fb-line); border-radius: 14px; padding: 24px;
}
.fb-main .lm-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.fb-main .lm-label { font-size: 14px; font-weight: 600; }
.fb-main .lm-len { display: flex; align-items: center; gap: 10px; }
.fb-main .lm-len input {
  width: 170px; height: 50px; padding: 0 12px; font-size: 20px; font-family: var(--fb-sans); color: var(--fb-ink);
  border: 1px solid var(--fb-line-2); border-radius: 4px; background: #fff;
}
.fb-main .lm-len em { font-style: normal; font-size: 13px; color: var(--fb-ink-3); }
.fb-main .lm select {
  height: 46px; min-width: 110px; padding: 0 10px; font-size: 16px; font-family: var(--fb-sans); color: var(--fb-ink);
  border: 1px solid var(--fb-line-2); border-radius: 4px; background: #fff;
}
.fb-main .lm input:focus, .fb-main .lm select:focus { outline: 2px solid var(--fb-navy); outline-offset: 1px; }
.fb-main .lm-row { display: flex; flex-wrap: wrap; gap: 0 16px; }
.fb-main .lm-note { font-size: 12px; color: var(--fb-ink-3); margin: -6px 0 16px; }
.fb-main .lm-gates { display: flex; flex-wrap: wrap; gap: 0 16px; }
.fb-main .lm-result { margin: 4px 0 0; padding: 12px 14px; background: var(--fb-bg-3); border-radius: 8px; font-size: 14px; }
/* Clear measurements: under the result, outlined in red so it stands out */
.fb-main .lm-foot { display: flex; justify-content: flex-start; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--fb-line); }
.fb-main .lm-clear { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--fb-red); border: 2px solid var(--fb-red); }
.fb-main .lm-clear:hover { background: var(--fb-red); color: #fff; }
.fb-main .lm-clear:disabled { background: #fff; color: var(--fb-ink-3); border-color: var(--fb-line); cursor: not-allowed; }
.fb-main .lm-clear svg { flex: none; }
.fb-main .lm-wait { color: var(--fb-ink-3); }
.fb-main .lm-warn { color: var(--fb-red-2); font-weight: 600; }
.fb-main .lm-figure { margin: 0; }
.fb-main .lm-figure figcaption { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.fb-main .lm-figure p { font-size: 13px; font-style: italic; color: var(--fb-ink-2); margin: 8px 0 0; }

/* Layout Designer (layout-designer.js): the map is the stage, and the
   search (top left), tool rail (right) and "Your layout" panel (left)
   float over it — onX-style — in the page and in full screen. */
.fb-main .ld-intro { margin-top: 28px; }
.fb-main .ld {
  position: relative; margin-top: 12px; --ld-gap: 12px; --ld-panel-w: 320px;
  /* --ld-search-h is measured by the designer; the panel starts one gap under the search */
  --ld-panel-top: calc(var(--ld-search-h, 58px) + 2 * var(--ld-gap));
}
.fb-main .ld-canvas {
  position: relative; height: 640px; overflow: hidden;
  background: #dfe5e9; border: 1px solid var(--fb-line); border-radius: 12px;
}
.fb-main .ld-map { position: absolute; inset: 0; }
.fb-main .ld-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; user-select: none; }
.fb-main .ld-is-grid .ld-svg { pointer-events: auto; cursor: crosshair; touch-action: none; }
.fb-main .ld-hit { stroke: transparent; stroke-width: 18; stroke-linecap: round; pointer-events: stroke; cursor: copy; touch-action: none; }
.fb-main .ld-mode-gate .ld-hit { cursor: cell; }
.fb-main .ld-hit-gate { cursor: grab; }
.fb-main .ld-seg-case { stroke: #fff; stroke-width: 7; stroke-linecap: round; opacity: 0.9; }
.fb-main .ld-seg { stroke: var(--fb-red); stroke-width: 4; stroke-linecap: round; }
.fb-main .ld-gate-gap { stroke: #fff; stroke-width: 10; }
.fb-main .ld-gate { stroke: #f0a020; stroke-width: 6; }
.fb-main .ld-gate.is-sel { stroke: var(--fb-navy); }
.fb-main .ld-rubber { stroke: var(--fb-red); stroke-width: 2.5; stroke-dasharray: 6 5; }
.fb-main .ld-label {
  font: 700 12px var(--fb-sans); fill: var(--fb-navy); pointer-events: none;
  paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round;
}
.fb-main .ld-label-gate { fill: #8a5a00; }
.fb-main .ld-label-live { fill: var(--fb-red); }
.fb-main .ld-pt { fill: var(--fb-red); stroke: #fff; stroke-width: 2.5; pointer-events: all; cursor: move; touch-action: none; }
.fb-main .ld-pt-inline, .fb-main .ld-pt-line { fill: #fff; stroke: var(--fb-red); }
.fb-main .ld-pt-line { stroke-width: 2; }
.fb-main .ld-pt-tee, .fb-main .ld-pt-cross { stroke-width: 2; stroke-linejoin: round; }
.fb-main .ld-pt-gatepost { fill: var(--fb-red); stroke: #f0a020; stroke-width: 3; }
/* Line and gate posts come with the runs: not draggable, clicks go through to the fence line. */
.fb-main .ld-pt-line, .fb-main .ld-pt-gatepost { pointer-events: none; }
.fb-main .ld-pt.is-active { fill: var(--fb-navy); }
/* "+" past an end post: add on to that run */
.fb-main .ld-extend { pointer-events: all; cursor: pointer; touch-action: none; }
.fb-main .ld-extend circle { fill: #fff; stroke: var(--fb-navy); stroke-width: 2; stroke-dasharray: 3 2.5; }
.fb-main .ld-extend path { stroke: var(--fb-navy); stroke-width: 2.4; stroke-linecap: round; }
.fb-main .ld-extend:hover circle { fill: var(--fb-navy); stroke-dasharray: none; }
.fb-main .ld-extend:hover path { stroke: #fff; }
.fb-main .ld-pt-ring { fill: none; stroke: var(--fb-navy); stroke-width: 2; opacity: 0.7; pointer-events: none; }
.fb-main .ld-grid-bg { fill: #f7f9fa; }
.fb-main .ld-grid { stroke: #e3e8ec; stroke-width: 1; }
.fb-main .ld-grid-major { stroke: #c9d3da; }
.fb-main .ld-scale rect { fill: var(--fb-navy); }
.fb-main .ld-scale text { font: 500 11px var(--fb-mono); fill: var(--fb-navy); }

/* Floating cards */
.fb-main .ld-float {
  background: #fff; border-radius: 12px;
  box-shadow: 0 4px 18px rgba(16, 34, 44, 0.22), 0 0 0 1px rgba(16, 34, 44, 0.06);
}

/* Search, top left, as wide as the panel under it */
/* Above the panel (z 4), so the address suggestions drop down over it. */
.fb-main .ld-search { position: absolute; z-index: 6; top: var(--ld-gap); left: var(--ld-gap); width: var(--ld-panel-w); padding: 6px; }
.fb-main .ld-search:empty { display: none; }
.fb-main .ld-pac { width: 100%; color-scheme: light; }
.fb-main .ld-find { display: flex; gap: 6px; }
.fb-main .ld-find input {
  flex: 1; min-width: 0; height: 40px; padding: 0 12px; font-size: 14px; font-family: var(--fb-sans);
  border: 1px solid var(--fb-line-2); border-radius: 8px;
}
.fb-main .ld-find button { height: 40px; padding: 0 16px; border: 0; border-radius: 8px; background: var(--fb-navy); color: #fff; font-weight: 600; }

/* Tool rail, right edge */
.fb-main .ld-toolbar {
  position: absolute; z-index: 4; top: var(--ld-gap); right: var(--ld-gap); width: 76px;
  display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 8px 6px;
}
.fb-main .ld-toolbar-h {
  font-family: var(--fb-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fb-ink-3); text-align: center; margin-bottom: 4px;
}
.fb-main .ld-tool {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 2px 7px;
  background: none; border: 0; border-radius: 8px; color: var(--fb-navy);
  font-family: var(--fb-sans); font-size: 11px; font-weight: 600; line-height: 1.15; cursor: pointer;
}
.fb-main .ld-tool svg { width: 22px; height: 22px; }
.fb-main .ld-tool:hover:not(:disabled) { background: var(--fb-bg-3); }
.fb-main .ld-tool.is-on { background: var(--fb-navy); color: #fff; }
.fb-main .ld-tool:disabled { opacity: 0.35; cursor: default; }
.fb-main .ld-tool-finish { background: var(--fb-red); color: #fff; }
.fb-main .ld-tool-finish:hover:not(:disabled) { background: var(--fb-red-2); }
.fb-main .ld-tool-next { background: var(--fb-red); color: #fff; }
.fb-main .ld-tool-next:hover:not(:disabled) { background: var(--fb-red-2); }
.fb-main .ld-tool[hidden] { display: none; }
/* Download PDF on the tool rail; amber like the save bar's note when the fence changed since the last PDF. */
.fb-main .ld-tool-pdf { position: relative; }
/* No drawing → no PDF tool, and no separator after it */
.fb-main .ld-pdf-box:empty, .fb-main .ld-pdf-box:empty + .ld-sep { display: none; }
.fb-main .ld-tool-pdf.is-stale { background: #fff3d6; color: #8a5a00; box-shadow: inset 3px 0 0 #f0a020; }
.fb-main .ld-tool-pdf.is-stale:hover:not(:disabled) { background: #ffe9b8; }
.fb-main .ld-tool-dot {
  position: absolute; top: 6px; right: 14px; width: 10px; height: 10px; border-radius: 50%;
  background: #f0a020; box-shadow: 0 0 0 2px #fff;
}
.fb-main .ld-sep { height: 1px; margin: 4px 8px; background: var(--fb-line); }

/* Grid zoom (the map has its own), bottom right */
.fb-main .ld-zoom { position: absolute; z-index: 4; right: var(--ld-gap); bottom: 28px; display: flex; flex-direction: column; overflow: hidden; }
.fb-main .ld-zoom button {
  width: 40px; height: 40px; border: 0; background: #fff; font-size: 22px; line-height: 1; color: var(--fb-navy);
}
.fb-main .ld-zoom button + button { border-top: 1px solid var(--fb-line); }
.fb-main .ld-zoom button:hover { background: var(--fb-bg-3); }
.fb-main .ld-status[hidden], .fb-main .ld-zoom[hidden] { display: none; }

/* Hint (bottom centre, under the panel) and status (top, between search and tools) */
.fb-main .ld-tip {
  position: absolute; z-index: 3; left: 50%; bottom: 26px; transform: translateX(-50%);
  max-width: min(520px, calc(100% - 200px));
  padding: 8px 16px; border-radius: 999px; background: rgba(27, 56, 72, 0.92); color: #fff;
  font-size: 13px; line-height: 1.35; text-align: center; pointer-events: none;
  box-shadow: 0 4px 14px rgba(16, 34, 44, 0.3);
}
.fb-main .ld-tip:empty { display: none; }
.fb-main .ld-status {
  position: absolute; z-index: 3; top: var(--ld-gap);
  left: calc(var(--ld-panel-w) + 2 * var(--ld-gap)); right: 100px; max-width: 420px;
  padding: 9px 14px; background: #fff7e6; border-left: 3px solid var(--fb-red); border-radius: 8px;
  font-size: 13px; color: var(--fb-ink-2); box-shadow: 0 4px 14px rgba(16, 34, 44, 0.18);
}

/* "Your layout" panel, over the left of the map, under the search */
.fb-main .ld-panel {
  position: absolute; z-index: 4; top: var(--ld-panel-top); left: var(--ld-gap); width: var(--ld-panel-w);
  max-height: calc(100% - var(--ld-panel-top) - 64px); display: flex; flex-direction: column; overflow: hidden;
}
.fb-main .ld-is-grid .ld-panel { top: var(--ld-gap); max-height: calc(100% - var(--ld-gap) - 64px); }
.fb-main .ld-panel-head {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 16px;
  background: none; border: 0; border-bottom: 1px solid var(--fb-line); text-align: left; cursor: pointer; color: var(--fb-ink);
}
.fb-main .ld-panel-title { font-family: var(--fb-serif); font-size: 19px; font-weight: 700; text-transform: uppercase; line-height: 1; }
.fb-main .ld-panel-sum { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--fb-ink-2); white-space: nowrap; }
.fb-main .ld-panel-caret {
  width: 8px; height: 8px; margin-left: 4px; border-right: 2px solid var(--fb-ink-2); border-bottom: 2px solid var(--fb-ink-2);
  transform: rotate(-135deg) translate(-2px, -2px); flex: none;
}
.fb-main .ld:not(.ld-panel-closed) .ld-panel-sum { display: none; }
.fb-main .ld:not(.ld-panel-closed) .ld-panel-caret { margin-left: auto; }
.fb-main .ld-panel-closed .ld-panel-caret { transform: rotate(45deg) translate(-2px, -2px); }
.fb-main .ld-panel-closed .ld-panel-head { border-bottom: 0; }
.fb-main .ld-panel-body { overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 16px; }
.fb-main .ld-panel-closed .ld-panel-body { display: none; }

.fb-main .ld-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fb-main .ld-stat { padding: 10px 10px 8px; background: var(--fb-bg-3); border-radius: 8px; min-width: 0; }
.fb-main .ld-stat:first-child { grid-column: 1 / -1; background: var(--fb-navy); color: #fff; }
.fb-main .ld-stat b { display: block; font-family: var(--fb-serif); font-size: 24px; line-height: 1.1; }
.fb-main .ld-stat:first-child b { font-size: 30px; }

.fb-main .ld-stats-posts .ld-stat { padding: 8px 8px 6px; }
.fb-main .ld-stats-posts .ld-stat:first-child { grid-column: auto; background: var(--fb-bg-3); color: inherit; }
.fb-main .ld-stats-posts .ld-stat b, .fb-main .ld-stats-posts .ld-stat:first-child b { display: flex; align-items: center; gap: 6px; font-size: 20px; }
.fb-main .ld-stats-posts .ld-stat:first-child span { color: var(--fb-ink-3); }
.fb-main .ld-stat span { font-family: var(--fb-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fb-ink-3); }
.fb-main .ld-stat:first-child span { color: rgba(255, 255, 255, 0.75); }
/* The panel's five foldable areas: Summary, Panels, Gates, Posts, Runs */
.fb-main .ld-sec + .ld-sec { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--fb-line); }
.fb-main .ld-sec-h {
  display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; user-select: none;
  font-size: 14px; font-weight: 600; color: var(--fb-ink);
}
.fb-main .ld-sec-h::-webkit-details-marker { display: none; }
.fb-main .ld-sec-h:focus-visible { outline: 2px solid var(--fb-navy); outline-offset: 2px; border-radius: 4px; }
.fb-main .ld-sec-meta { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--fb-ink-3); white-space: nowrap; }
.fb-main .ld-sec-caret {
  flex: none; width: 7px; height: 7px; margin: 0 3px 0 auto; border-right: 2px solid var(--fb-ink-2); border-bottom: 2px solid var(--fb-ink-2);
  transform: rotate(-135deg) translate(-2px, -2px);
}
.fb-main .ld-sec-meta + .ld-sec-caret { margin-left: 4px; }
.fb-main .ld-sec:not([open]) .ld-sec-caret { transform: rotate(45deg) translate(-2px, -2px); }
.fb-main .ld-sec-body { margin-top: 10px; }
.fb-main .ld-add {
  display: block; width: 100%; margin-top: 8px; padding: 8px 10px; font-size: 13px; font-weight: 600; color: var(--fb-navy);
  background: #fff; border: 1px dashed var(--fb-line-2); border-radius: 8px; cursor: pointer;
}
.fb-main .ld-add:hover { border-color: var(--fb-navy); background: var(--fb-bg-3); }
.fb-main .ld-add.is-on { border-style: solid; border-color: #f0a020; background: #fff6e0; color: #8a5a00; }
.fb-main .ld-h { font-family: var(--fb-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fb-ink-3); margin-bottom: 4px; }
.fb-main .ld-rows { list-style: none; margin: 0; padding: 0; }
.fb-main .ld-rows li { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--fb-line); font-size: 14px; }
.fb-main .ld-rows li.is-sel { background: #fff6e0; }
.fb-main .ld-run-k {
  display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 6px;
  border-radius: 6px; background: var(--fb-navy); color: #fff; font-weight: 700; font-size: 13px;
}
.fb-main .ld-run-gate { background: #f0a020; color: var(--fb-navy); }
.fb-main .ld-run-v { flex: 1; }
.fb-main .ld-run-v small { color: var(--fb-ink-3); }
.fb-main .ld-len {
  width: 92px; height: 30px; padding: 0 8px; font: 600 14px var(--fb-sans); color: var(--fb-ink);
  border: 1px solid var(--fb-line-2); border-radius: 6px; background: #fff;
}
.fb-main .ld-len:hover { border-color: var(--fb-navy); }
.fb-main .ld-len:focus { outline: 2px solid var(--fb-navy); outline-offset: 0; border-color: var(--fb-navy); }
.fb-main .ld-panel-w { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--fb-ink-2); }
.fb-main .ld-panel-w select { height: 32px; padding: 0 6px; font-size: 13px; border: 1px solid var(--fb-line-2); border-radius: 6px; background: #fff; }
.fb-main .ld-note { margin: 4px 0 0; font-size: 12px; line-height: 1.4; color: var(--fb-ink-3); }
.fb-main .ld-help { margin: 0 0 14px; padding: 10px 12px; background: #eef4f8; border-radius: 8px; font-size: 13px; line-height: 1.45; color: var(--fb-ink-2); }
.fb-main .ld-help summary { cursor: pointer; font-weight: 700; color: var(--fb-navy); }
.fb-main .ld-help ol { margin: 8px 0 0; padding-left: 18px; }
.fb-main .ld-help li + li { margin-top: 5px; }
.fb-main .ld-help b { color: var(--fb-ink); }
.fb-main .ld-help-plus {
  display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px dashed var(--fb-navy); color: var(--fb-navy) !important; font-size: 12px; line-height: 1;
}
.fb-main .ld-gate-w select { height: 32px; padding: 0 6px; font-size: 13px; border: 1px solid var(--fb-line-2); border-radius: 6px; background: #fff; }
.fb-main .ld-x { background: none; border: 0; color: var(--fb-ink-3); font-size: 18px; line-height: 1; padding: 0 4px; }
.fb-main .ld-x:hover { color: var(--fb-red); }
.fb-main .ld-empty { font-size: 13px; color: var(--fb-ink-3); margin: 6px 0 0; }
.fb-main .ld-key { flex: none; overflow: visible; }
.fb-main .ld-key .ld-pt { cursor: default; pointer-events: none; }
.fb-main .ld-key .ld-gate { stroke-width: 5; }

/* Save / PDF, docked at the foot of the panel */
.fb-main .ld-dock:empty { display: none; }
.fb-main .ld-dock .ls { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--fb-line); }
.fb-main .ld-dock .ls-bar { flex-direction: column; align-items: stretch; padding: 0; background: none; gap: 10px; }
.fb-main .ld-dock .ls-status { flex: none; }
.fb-main .ld-dock .ls-actions { display: grid; grid-template-columns: 1fr 1fr; }
.fb-main .ld-dock .ls-actions > :only-child, .fb-main .ld-dock .ls-actions > [data-action="layout-load"] { grid-column: 1 / -1; }
.fb-main .ld-dock .ls-actions .btn { text-align: center; padding-left: 8px; padding-right: 8px; }
.fb-main .ld-dock .ls-login { padding: 12px; }

/* Themed confirm dialog (Clear), over the designer */
.fb-main .ld-modal {
  position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(16, 34, 44, 0.55); animation: fb-fade .18s ease both;
}
.fb-main .ld-modal-card {
  width: min(420px, 100%); padding: 24px; background: var(--fb-card); border-radius: 14px;
  border-top: 4px solid var(--fb-red); box-shadow: 0 18px 50px rgba(16, 34, 44, 0.35);
}
.fb-main .ld-modal-h { margin: 0 0 8px; font-family: var(--fb-serif); font-size: 24px; font-weight: 700; text-transform: uppercase; line-height: 1.1; color: var(--fb-ink); }
.fb-main .ld-modal-p { margin: 0 0 20px; font-size: 15px; line-height: 1.45; color: var(--fb-ink-2); }
.fb-main .ld-modal-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.fb-main .ld-modal-btn {
  padding: 11px 20px; border-radius: 4px; border: 1px solid transparent; cursor: pointer;
  font-family: var(--fb-sans); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
}
.fb-main .ld-modal-cancel { background: transparent; color: var(--fb-ink); border-color: var(--fb-line-2); }
.fb-main .ld-modal-cancel:hover { background: var(--fb-bg-3); border-color: var(--fb-navy); }
.fb-main .ld-modal-ok { background: var(--fb-red); color: #fff; }
.fb-main .ld-modal-ok:hover { background: var(--fb-red-2); }
.fb-main .ld-modal-btn:focus-visible { outline: 2px solid var(--fb-navy); outline-offset: 2px; }

/* Full screen: the designer covers the page; same floating layout, more room */
.fb-main .ld-full { position: fixed; inset: 0; z-index: 1000; margin: 0; background: #dfe5e9; --ld-gap: 16px; --ld-panel-w: 340px; }
.fb-main .ld-full .ld-canvas { height: 100%; border: 0; border-radius: 0; }
.fb-main .ld-full .ld-panel { max-height: calc(100% - var(--ld-panel-top) - 72px); }
.fb-main .ld-full.ld-is-grid .ld-panel { top: var(--ld-gap); max-height: calc(100% - var(--ld-gap) - 72px); }
.fb-main .ld-full .ld-modal { position: fixed; }
html.ld-noscroll, html.ld-noscroll body { overflow: hidden; }

/* Narrow screens: in the page the panel sits under the map; in full
   screen it's a bottom sheet (folded to its summary line at first). */
@media (max-width: 899px) {
  .fb-main .ld { --ld-gap: 10px; }
  .fb-main .ld-canvas { height: 460px; }
  .fb-main .ld-search { right: 86px; width: auto; }
  .fb-main .ld-toolbar { width: 64px; padding: 6px 4px; }
  .fb-main .ld-tool { padding: 7px 2px 6px; font-size: 10px; }
  .fb-main .ld-tool svg { width: 20px; height: 20px; }
  .fb-main .ld-tip { max-width: calc(100% - 100px); left: calc(50% - 38px); font-size: 12px; border-radius: 10px; }
  .fb-main .ld-status { top: 64px; left: var(--ld-gap); right: 86px; max-width: none; }
  .fb-main .ld-is-grid .ld-status { top: var(--ld-gap); }
  .fb-main .ld:not(.ld-full) .ld-panel {
    position: static; width: auto; max-height: none; margin-top: 12px; box-shadow: none; border: 1px solid var(--fb-line);
  }
  .fb-main .ld-full .ld-panel {
    top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 55%; border-radius: 16px 16px 0 0;
  }
  .fb-main .ld-full.ld-is-grid .ld-panel { top: auto; max-height: 55%; }
  .fb-main .ld-full .ld-tip { bottom: 76px; }
  .fb-main .ld-full .ld-zoom { bottom: 76px; }
}


/* ══ Save your layout (Layout step) ══ */
.fb-main .ls { margin: 18px 0 14px; }
.fb-main .ls-text a { color: var(--fb-navy); font-weight: 600; }
.fb-main .ls-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  padding: 14px 18px; background: var(--fb-bg-3); border-radius: 10px;
}
.fb-main .ls-status { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 280px; }
.fb-main .ls-h { font-weight: 700; font-size: 15px; color: var(--fb-ink); }
.fb-main .ls-text { font-size: 13px; color: var(--fb-ink-2); }
.fb-main .ls-error { font-size: 13px; color: var(--fb-red); font-weight: 600; }
.fb-main .ls-actions, .fb-main .ls-warn-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* The fence changed since the last PDF: an amber edge and a line under the status. */
.fb-main .ls.is-stale .ls-bar { box-shadow: inset 4px 0 0 #f0a020; }
.fb-main .ls-stale {
  display: flex; align-items: flex-start; gap: 6px; margin-top: 6px;
  font-size: 13px; font-weight: 600; color: #8a5a00;
}
.fb-main .ls-stale svg { flex: none; margin-top: 1px; color: #f0a020; }
.fb-main .ls-login p { margin: 0 0 10px; font-size: 14px; color: var(--fb-ink); }
.fb-main .ls-login {
  margin-top: 10px; padding: 14px 18px; border: 2px solid var(--fb-navy); border-radius: 10px; background: var(--fb-card);
}
.fb-main .fc-plan-acts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.fb-main .fc-plan-link {
  background: none; border: 0; padding: 0; font-size: 13px; font-weight: 600;
  color: var(--fb-navy); text-decoration: underline; cursor: pointer;
}

/* ══ Post caps: joined to Posts, picture on the left ══ */
.fb-main .fc-art-cap { align-items: center; }
.fb-main .fcap-none-lg { font-size: 56px; line-height: 1; }
.fb-main .fcap-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-top: 10px; }
.fb-main .fcap-tile {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px;
  background: var(--fb-card); border: 2px solid var(--fb-line); border-radius: 6px; text-align: center; cursor: pointer;
}
.fb-main .fcap-tile:hover { border-color: var(--fb-line-2); }
.fb-main .fcap-tile.is-on { border-color: var(--fb-red); }
.fb-main .fcap-art { width: 48px; height: 40px; display: flex; align-items: center; justify-content: center; color: var(--fb-navy); }
.fb-main .fcap-art img { max-width: 100%; max-height: 100%; object-fit: contain; }
.fb-main .fcap-none { font-size: 20px; color: var(--fb-ink-3); }
.fb-main .fcap-name { font-size: 13px; font-weight: 600; line-height: 1.2; color: var(--fb-ink); }
.fb-main .fcap-name small { display: block; font-weight: 500; color: var(--fb-ink-3); }
.fb-main .fcap-price { font-size: 12px; color: var(--fb-ink-2); }

/* Accessories: an icon when none has a photo */
.fb-main .fc-art-icon { color: var(--fb-navy); }

/* ══ Finalize: "For your layout" / "Your selections" ══ */
.fb-main .fc-plan { background: var(--fb-card); border: 2px solid var(--fb-navy); border-radius: 14px; padding: 20px; margin-bottom: 18px; }
.fb-main .fc-plan-empty {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border: 1px dashed var(--fb-line-2); background: var(--fb-bg-3);
}
.fb-main .fc-plan-empty p { margin: 0; font-size: 14px; color: var(--fb-ink-2); }
.fb-main .fc-plan-empty .btn { flex-shrink: 0; }
.fb-main .fc-plan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.fb-main .fc-plan-head { align-items: center; }
.fb-main .fc-plan-head .summary-h { margin-bottom: 0; }
.fb-main .fc-plan-notes { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--fb-red-2); }
.fb-main .fc-plan-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--fb-line);
}
.fb-main .fz-title { margin: 0; font-family: var(--fb-serif); font-size: 24px; font-weight: 700; line-height: 1.15; text-transform: uppercase; color: var(--fb-ink); }
/* Subtotal: right-aligned under the line totals */
.fb-main .fz-subtotal {
  display: flex; justify-content: flex-end; align-items: baseline; gap: 18px;
  padding: 14px 0 4px; border-top: 2px solid var(--fb-navy); margin-top: -1px;
}
.fb-main .fz-subtotal span { font-family: var(--fb-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fb-ink-3); }
.fb-main .fz-subtotal b { font-family: var(--fb-serif); font-size: 28px; line-height: 1; }
/* The disclaimer that must be ticked before Add all to cart */
.fb-main .fz-agree {
  flex: 1 1 360px; display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  padding: 12px 14px; background: var(--fb-bg-3); border-radius: 8px;
  font-size: 13px; line-height: 1.45; color: var(--fb-ink-2);
}
.fb-main .fz-agree input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--fb-navy); cursor: pointer; }
.fb-main .fz-agree:has(input:checked) { background: #eaf2f7; color: var(--fb-ink); }
.fb-main .fc-plan .fo-hint { margin: 10px 0 0; }

/* ══ Finalize ══ */
.fb-main .fz-layout {
  background: var(--fb-card); border: 1px solid var(--fb-line); border-radius: 14px; padding: 20px; margin-bottom: 18px;
}
.fb-main .fz-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fb-main .fz-head .summary-h { margin-bottom: 2px; }
.fb-main .fz-facts { margin: 0; font-size: 15px; font-weight: 600; color: var(--fb-ink); }
.fb-main .fz-map { border-radius: 10px; overflow: hidden; }
.fb-main .fz-address { margin: 10px 0 0; font-size: 13px; color: var(--fb-ink-3); }
.fb-main .fz-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fb-main .fz-tile { background: var(--fb-bg-3); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; }
.fb-main .fz-tile b { font-family: var(--fb-serif); font-size: 26px; line-height: 1.1; }
.fb-main .fz-tile span { font-size: 12px; color: var(--fb-ink-3); }
.fb-main .fz-layout .fo-hint { margin: 10px 0 0; }

.fb-main .fz-sub { margin: 2px 0 0; font-size: 14px; color: var(--fb-ink-2); }
.fb-main .fz-cols, .fb-main .fz-line {
  display: grid; grid-template-columns: 112px minmax(0, 1fr) 96px 104px; gap: 14px; align-items: center;
}
.fb-main .fz-cols {
  padding: 8px 0 6px; border-bottom: 1px solid var(--fb-line);
  font-family: var(--fb-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fb-ink-3);
}
.fb-main .fz-cols span:nth-child(n+3) { text-align: right; }
.fb-main .fz-lines { list-style: none; margin: 0; padding: 0; }
.fb-main .fz-qty { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
/* A quantity changed from the layout's: our suggestion under it (click to go back to it) */
.fb-main .fz-suggest {
  background: none; border: 0; padding: 0; font-size: 11px; font-weight: 600; line-height: 1.2;
  color: var(--fb-ink-3); text-decoration: underline dotted; text-underline-offset: 2px; white-space: nowrap;
}
.fb-main .fz-suggest:hover { color: var(--fb-navy); }
.fb-main .fz-suggest[hidden] { display: none; }
.fb-main .fz-line { padding: 10px 0; border-bottom: 1px solid var(--fb-line); transition: opacity .15s; }
.fb-main .fz-line.is-zero .fz-what, .fb-main .fz-line.is-zero .fz-each, .fb-main .fz-line.is-zero .fz-sum { opacity: 0.55; }
.fb-main .fz-what { display: flex; flex-direction: column; min-width: 0; }
.fb-main .fz-what b { font-size: 15px; }
.fb-main .fz-what a { font-size: 12px; color: var(--fb-ink-3); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-main .fz-what a:hover { color: var(--fb-red); }
.fb-main .fz-incart { font-size: 11px; font-weight: 700; color: #1f7a3d; text-transform: uppercase; letter-spacing: 0.04em; }
.fb-main .fz-each { text-align: right; font-size: 14px; color: var(--fb-ink-2); white-space: nowrap; }
.fb-main .fz-sum { text-align: right; font-family: var(--fb-serif); font-size: 19px; font-weight: 700; white-space: nowrap; }
.fb-main .fz-group {
  margin-top: 16px; padding-bottom: 6px; border-bottom: 1px solid var(--fb-line);
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fb-ink-2);
}
.fb-main .fz-group small { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--fb-ink-3); margin-left: 4px; }
.fb-main .fz-list .fc-plan-foot { margin-top: 12px; border-top: 0; padding-top: 0; justify-content: flex-end; }

/* The layout as a still picture: the drawing over a satellite view that
   can't be moved (layout-designer.js createStatic) */
.fb-main .ld-static { position: relative; height: 440px; background: #dfe5e9; overflow: hidden; }
.fb-main .ld-static-map { position: absolute; inset: 0; }
.fb-main .ld-static .ld-svg { pointer-events: none; }
.fb-main .ld-static .ld-pt { cursor: default; pointer-events: none; }
.fb-main .ld-static-scale rect { fill: #fff; stroke: var(--fb-navy); stroke-width: 1; }
.fb-main .ld-static-scale text { font: 600 12px var(--fb-sans); fill: #fff; paint-order: stroke; stroke: rgba(16,34,44,0.75); stroke-width: 3px; }
.fb-main .ld-static-grid .ld-static-scale rect { fill: var(--fb-navy); }
.fb-main .ld-static-grid .ld-static-scale text { fill: var(--fb-navy); stroke: none; }

/* Measurements filled in from the drawing */
.fb-main .lm-from {
  margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: #eaf2f7; border-left: 3px solid var(--fb-navy);
  font-size: 13px; color: var(--fb-ink-2);
}

@media (max-width: 900px) {
  .fb-main .lq-cards { grid-template-columns: 1fr; }
  .fb-main .fz-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fb-main .ld-static { height: 340px; }
  .fb-main .lm { grid-template-columns: 1fr; }
  .fb-main .lm-figure { max-width: 340px; }
}
@media (max-width: 640px) {
  .fb-main .fc-plan-empty { flex-direction: column; align-items: flex-start; }
  .fb-main .fz-cols { display: none; }
  .fb-main .fz-line { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "what what" "qty sum"; row-gap: 8px; }
  .fb-main .fz-line .fz-qty { grid-area: qty; justify-self: start; }
  .fb-main .fz-what { grid-area: what; }
  .fb-main .fz-each { display: none; }
  .fb-main .fz-sum { grid-area: sum; }
  .fb-main .fc-sec-caps.is-joined::before { left: 16px; right: 16px; }
}

/* ══ Product details dialog (appended to <body>, so not under .fb-main) ══ */
.fb-pm-back { position: fixed; inset: 0; background: rgba(16, 34, 44, 0.6); z-index: 9992; }
.fb-pm {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 9993;
  width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto;
  background: #fff; border-radius: 14px; box-shadow: 0 20px 60px rgba(16, 34, 44, 0.4);
  font-family: "Saira", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; color: #1B3848;
  font-size: 15px; line-height: 1.5;
}
.fb-pm *, .fb-pm *::before, .fb-pm *::after { box-sizing: border-box; }
.fb-pm-x {
  position: absolute; top: 10px; right: 10px; z-index: 1; width: 38px; height: 38px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,0.9); color: #7a8a93; font-size: 28px; line-height: 1;
}
.fb-pm-x:hover { background: #edf1f4; color: #1B3848; }
.fb-pm-body { padding: 28px; }
.fb-pm-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.fb-pm-main {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1;
  background: #f4f6f8; border-radius: 10px; overflow: hidden;
}
.fb-pm-main img { max-width: 100%; max-height: 100%; object-fit: contain; }
.fb-pm-noimg { font-size: 14px; color: #7a8a93; }
.fb-pm-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.fb-pm-thumb {
  width: 64px; height: 64px; padding: 4px; background: #fff; border: 2px solid #d8dfe4; border-radius: 6px; cursor: pointer;
}
.fb-pm-thumb.is-on { border-color: #C23241; }
.fb-pm-thumb img { width: 100%; height: 100%; object-fit: contain; }
.fb-pm-name {
  margin: 0 40px 6px 0; font-family: "Saira Condensed", "Saira", Impact, sans-serif; font-size: 26px; font-weight: 700;
  line-height: 1.15; text-transform: uppercase;
}
.fb-pm-sku { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; color: #7a8a93; }
.fb-pm-skurow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; }
.fb-pm-spec { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border: 1px solid #d8dfe4; border-radius: 999px; font-size: 12px; font-weight: 600; color: #1B3848; text-decoration: none; }
.fb-pm-spec:hover { border-color: #C23241; color: #C23241; }
/* The main picture enlarges on click (.fb-pm-zoom) */
.fb-pm-zoomable { position: relative; width: 100%; padding: 0; border: 0; cursor: zoom-in; font: inherit; }
.fb-pm-zoom-hint { position: absolute; right: 8px; bottom: 8px; display: flex; padding: 6px; border-radius: 50%; background: rgba(255,255,255,.92); color: #1B3848; box-shadow: 0 1px 4px rgba(16,34,44,.25); }
.fb-pm-zoom { position: fixed; inset: 0; z-index: 9995; display: flex; align-items: center; justify-content: center; padding: 48px 64px; background: rgba(10, 22, 30, 0.92); cursor: zoom-out; }
.fb-pm-zoom-img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; border-radius: 4px; cursor: default; }
.fb-pm-zoom-x { position: absolute; top: 12px; right: 16px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.fb-pm-zoom-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 34px; line-height: 1; cursor: pointer; }
.fb-pm-zoom-nav.is-prev { left: 10px; }
.fb-pm-zoom-nav.is-next { right: 10px; }
.fb-pm-zoom-x:hover, .fb-pm-zoom-nav:hover { background: rgba(255,255,255,.28); }
.fb-pm-zoom-count { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 13px; opacity: .8; }
@media (max-width: 640px) { .fb-pm-zoom { padding: 56px 8px; } .fb-pm-zoom-nav { top: auto; bottom: 8px; transform: none; } }
.fb-pm-price { margin: 12px 0 0; font-family: "Saira Condensed", "Saira", sans-serif; font-size: 28px; font-weight: 700; }
.fb-pm-price small { font-family: "Saira", sans-serif; font-size: 13px; font-weight: 500; color: #7a8a93; }
.fb-pm-short { margin-top: 12px; color: #3d5663; }
.fb-pm-h {
  margin: 22px 0 8px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: #7a8a93;
}
.fb-pm-attrs { width: 100%; border-collapse: collapse; font-size: 14px; }
.fb-pm-attrs th, .fb-pm-attrs td { padding: 8px 0; border-bottom: 1px solid #d8dfe4; text-align: left; vertical-align: top; }
.fb-pm-attrs th { width: 45%; padding-right: 12px; font-weight: 600; color: #3d5663; }
.fb-pm-desc { margin-top: 8px; border-top: 1px solid #d8dfe4; color: #3d5663; overflow-wrap: anywhere; }
.fb-pm-desc img { max-width: 100%; height: auto; }
.fb-pm-loading, .fb-pm-error { margin: 18px 0 0; font-size: 14px; color: #7a8a93; }
.fb-pm-error { color: #a82a37; }
@media (max-width: 720px) {
  .fb-pm { width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .fb-pm-body { padding: 20px 16px; }
  .fb-pm-grid { grid-template-columns: 1fr; gap: 18px; }
}

/* Add all to cart: a screen over the page until the shopper is on their way to checkout */
.fb-busy { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(16, 34, 44, 0.55); }
.fb-busy-card { background: #fff; border-radius: 10px; padding: 28px 32px; max-width: 380px; width: 100%; text-align: center; box-shadow: 0 16px 50px rgba(16,34,44,0.35); font-family: "Saira", sans-serif; color: #1B3848; }
.fb-busy-text { margin: 14px 0 0; font-size: 15px; line-height: 1.5; }
.fb-busy-spin { display: inline-block; width: 40px; height: 40px; border-radius: 50%; border: 4px solid #D5DDE2; border-top-color: #C23241; animation: fb-spin .8s linear infinite; }
@keyframes fb-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .fb-busy-spin { animation-duration: 2.4s; } }
