/* American Upholstery — Cushion Configurator */

.tool-app {
  --navy: #2c3e5e;
  --navy-dark: #1f2d46;
  --accent: #b86a4f;
  --accent-dark: #9c5540;
  --cream: #faf7f2;
  --paper: #ffffff;
  --ink: #2a2a28;
  --ink-soft: #6b6b66;
  --line: #e4ddd2;
  --ok: #3d6b4a;
  --err: #a63c38;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(42, 42, 40, 0.08);
}

.tool-app * { box-sizing: border-box; }

.tool-app {
  margin: 0;
  padding: 0;
}

.tool-app {
  font-family: Georgia, "Times New Roman", serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.5;
}

.tool-app button, .tool-app input, .tool-app select, .tool-app textarea {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
}

.tool-app .wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* ---------- Header ---------- */
.tool-app .tool-header {
  text-align: center;
  margin-bottom: 28px;
}
.tool-app .tool-header h1 {
  font-size: 30px;
  font-weight: normal;
  letter-spacing: 0.02em;
  margin: 0 0 6px;
  color: var(--navy);
}
.tool-app .tool-header p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
}

/* ---------- Layout ---------- */
.tool-app .layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
@media (max-width: 860px) {
  .tool-app .layout { grid-template-columns: 1fr; }
}

.tool-app .panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin-bottom: 16px;
}

.tool-app .panel h2 {
  font-size: 12px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--navy);
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

/* ---------- Dimensions ---------- */
.tool-app .dims {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.tool-app .dim-field label {
  display: block;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.tool-app .dim-field input {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 16px;
}
.tool-app .dim-field input:focus {
  outline: 2px solid var(--navy);
  outline-offset: -1px;
}
.tool-app .dim-field .range-hint {
  font-size: 11px;
  color: var(--ink-soft);
  font-family: "Helvetica Neue", Arial, sans-serif;
  margin-top: 3px;
}
.tool-app .dim-error {
  color: var(--err);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  margin-top: 8px;
  min-height: 18px;
}

/* ---------- Option cards (firmness, piping) ---------- */
.tool-app .option-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.tool-app .option-card {
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 7px 6px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s;
}
.tool-app .option-card:hover { border-color: var(--navy); }
.tool-app .option-card.selected {
  border-color: var(--navy);
  background: #eef1f6;
}
.tool-app .option-card .opt-label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
}
.tool-app .option-card .opt-desc {
  display: block;
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 1px;
  line-height: 1.25;
}

/* ---------- Fabric swatches ---------- */
.tool-app .fabric-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.tool-app .fabric-tab {
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.tool-app .fabric-tab.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
/* Each collection's colors scroll horizontally in a single row
   instead of wrapping into a tall grid — a collection of 30+ colors
   used to run to several rows; now it's one ~90px-tall strip you
   scroll sideways (drag, trackpad swipe, or the mouse wheel — see
   the wheel-to-horizontal-scroll handler in app.js), so the fabric
   step stays compact and the visualizer above it stays reachable
   without much scrolling. */
.tool-app .swatch-row {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  padding: 2px 2px 10px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.tool-app .swatch-row::-webkit-scrollbar { height: 6px; }
.tool-app .swatch-row::-webkit-scrollbar-track { background: transparent; }
.tool-app .swatch-row::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.tool-app .swatch-row::-webkit-scrollbar-thumb:hover { background: var(--ink-soft); }
.tool-app .swatch-coll-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  border-bottom: 1px solid var(--line);
  padding: 10px 2px 8px;
  margin: 10px 0 4px;
}
.tool-app .swatch-coll-heading:first-child { margin-top: 0; }
.tool-app .swatch-coll-heading .coll-name {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--navy);
}
.tool-app .swatch-coll-heading .coll-count {
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-soft);
  text-transform: none;
  letter-spacing: normal;
}
.tool-app .swatch-coll-heading .coll-selected-tag {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.tool-app .swatch {
  flex: 0 0 76px;
  scroll-snap-align: start;
  border: 2px solid var(--line);
  border-radius: 7px;
  padding: 5px;
  background: var(--paper);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s;
}
.tool-app .swatch:hover { border-color: var(--navy); }
.tool-app .swatch.selected { border-color: var(--accent); background: #faf1ec; }
.tool-app .swatch .chip {
  height: 34px;
  border-radius: 5px;
  border: 1px solid rgba(0,0,0,0.12);
  margin-bottom: 4px;
}

/* Fabric texture hints on swatches and cart thumbnails */
.tool-app .tex-canvas, .tool-app .tex-linen, .tool-app .tex-weave {
  background-image:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.05) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.07) 0 1px, transparent 1px 4px);
}
.tool-app .tex-linen {
  background-image:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.05) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 3px);
}
.tool-app .tex-weave {
  background-image:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.05) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.07) 0 1px, transparent 1px 6px);
}
.tool-app .tex-twill {
  background-image:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.06) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.05) 2px 3px, transparent 3px 4px);
}
.tool-app .tex-velvet {
  background-image:
    linear-gradient(115deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0) 45%, rgba(0,0,0,0.14) 100%);
}
.tool-app .tex-tweed {
  background-image:
    radial-gradient(rgba(0,0,0,0.10) 0.5px, transparent 1px),
    radial-gradient(rgba(255,255,255,0.12) 0.5px, transparent 1px),
    repeating-linear-gradient(0deg, rgba(0,0,0,0.05) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 5px);
  background-size: 5px 5px, 7px 7px, auto, auto;
  background-position: 0 0, 3px 3px, 0 0, 0 0;
}
.tool-app .swatch .sw-name {
  display: block;
  font-size: 11px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  line-height: 1.25;
}
.tool-app .swatch .sw-price {
  display: block;
  font-size: 10.5px;
  color: var(--ink-soft);
  font-family: "Helvetica Neue", Arial, sans-serif;
}

.tool-app .closure-note {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  color: var(--ink-soft);
  margin: 10px 0 0;
}

.tool-app .piping-fabric-block { margin-top: 14px; }
.tool-app .piping-fabric-block.hidden { display: none; }
.tool-app .sub-label {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

/* ---------- Preview band (top, spans full width) ---------- */
/* The live cushion preview used to live in a sticky right-hand column
   next to the cart, which meant it could visually float on top of the
   cart as you scrolled. It now sits in its own full-width band at the
   very top of the page, above the configurator steps and cart — a
   plain block in normal document flow, not pinned/sticky, so nothing
   can ever scroll underneath it and get covered. */
.tool-app .preview-band { margin-bottom: 20px; }
.tool-app .preview-band-inner {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}
/* Bigger than the old fixed 240px, and bigger again now that the
   caption/disclaimer text moved into the info column instead of
   sitting under the image (see .preview-caption/.preview-disclaimer
   below) — the visualization is the thing people are here to look
   at, so it gets as much of the band as the info column's text
   content leaves reasonable room for. */
.tool-app .preview-stage-wrap { flex: 1 1 480px; max-width: 520px; }
.tool-app .preview-info { flex: 1 1 300px; min-width: 0; }
.tool-app .preview-info .price-line { margin-top: 0; }
@media (max-width: 780px) {
  .tool-app .preview-band-inner { flex-direction: column; }
  .tool-app .preview-stage-wrap { flex: none; width: 100%; max-width: none; }
}
.tool-app .preview-stage {
  background: linear-gradient(180deg, #eae3d3 0%, #d9cfba 100%);
  border-radius: 8px;
  padding: 8px;
}
.tool-app .preview-stage svg { display: block; width: 100%; height: auto; }
/* Both now live at the top of .preview-info, above the price line —
   left-aligned to match the rest of that column instead of centered
   under the image the way they used to be. */
.tool-app .preview-caption {
  text-align: left;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 4px;
  line-height: 1.4;
}
.tool-app .preview-disclaimer {
  text-align: left;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  max-width: none;
  line-height: 1.4;
}

/* ---------- Price + add ---------- */
.tool-app .price-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 2px;
}
.tool-app .price-line .price-label {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  color: var(--ink-soft);
}
.tool-app .price-line .price-value {
  font-size: 24px;
  color: var(--navy);
  font-weight: bold;
}
.tool-app .qty-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 10px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
}
.tool-app .qty-row input {
  width: 60px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
}
.tool-app .estimate-note {
  font-size: 11px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: var(--ink-soft);
  margin: 0 0 10px;
  line-height: 1.35;
}

.tool-app .btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.tool-app .btn-primary { background: var(--accent); color: #fff; width: 100%; }
.tool-app .btn-primary:hover { background: var(--accent-dark); }
.tool-app .btn-navy { background: var(--navy); color: #fff; width: 100%; }
.tool-app .btn-navy:hover { background: var(--navy-dark); }
.tool-app .btn-navy:disabled, .tool-app .btn-primary:disabled { background: #b9b4aa; cursor: default; }
.tool-app .btn-ghost {
  background: none;
  color: var(--err);
  border: none;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
  text-decoration: underline;
}

/* ---------- Cart ---------- */
.tool-app .cart-empty {
  color: var(--ink-soft);
  font-size: 14px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  margin: 0;
}
.tool-app .cart-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.tool-app .cart-item:last-of-type { border-bottom: none; }
.tool-app .cart-thumb {
  width: 54px;
  height: 40px;
  border-radius: 5px;
  border: 1px solid rgba(0,0,0,0.15);
  flex-shrink: 0;
  margin-top: 2px;
}
.tool-app .cart-detail { flex: 1; font-family: "Helvetica Neue", Arial, sans-serif; }
.tool-app .cart-detail .ct-title { font-size: 14px; font-weight: 600; margin: 0; }
.tool-app .cart-detail .ct-specs { font-size: 12.5px; color: var(--ink-soft); margin: 2px 0 0; line-height: 1.45; }
.tool-app .cart-price {
  font-weight: bold;
  color: var(--navy);
  white-space: nowrap;
  font-family: "Helvetica Neue", Arial, sans-serif;
}
.tool-app .cart-total {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 2px solid var(--navy);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: bold;
  font-size: 17px;
  color: var(--navy);
}

/* ---------- Order form ---------- */
.tool-app .order-form { margin-top: 16px; }
.tool-app .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 540px) { .tool-app .form-grid { grid-template-columns: 1fr; } }
.tool-app .form-field label {
  display: block;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.tool-app .form-field input, .tool-app .form-field textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 15px;
}
.tool-app .form-field.full { grid-column: 1 / -1; }
.tool-app .form-field textarea { resize: vertical; min-height: 70px; }
.tool-app .hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.tool-app .form-status {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  margin: 12px 0 0;
  min-height: 20px;
  line-height: 1.5;
}
.tool-app .form-status.ok { color: var(--ok); font-weight: 600; }
.tool-app .form-status.err { color: var(--err); }
.tool-app .form-status a { color: var(--navy); }

.tool-app .success-box {
  background: #eef4ee;
  border: 1px solid #c4d8c8;
  border-radius: 8px;
  padding: 18px;
  text-align: center;
  font-family: "Helvetica Neue", Arial, sans-serif;
}
.tool-app .success-box h3 { margin: 0 0 6px; color: var(--ok); }
.tool-app .success-box p { margin: 0; font-size: 14px; color: var(--ink); }

/* ---------- site integration (tool now sits inside the site header/footer) ----------
   Undo the site's element-level styles (css/styles.css) inside the tool, and give the
   tool title the site's display face so the page reads as part of americanupholstery.com. */
.tool-app { display: block; font-size: 16px; }
.tool-app h1, .tool-app h2, .tool-app h3 { text-transform: none; line-height: 1.3; }
.tool-app .tool-header h1 { font-family: var(--display); text-transform: uppercase; font-weight: 700; font-size: clamp(30px, 5vw, 44px); line-height: 1; letter-spacing: 0.02em; margin-bottom: 10px; }
.tool-app .panel h2 { text-transform: uppercase; }
.tool-app section { padding-top: 0; padding-bottom: 0; }
.tool-app .btn { gap: 0; font-family: "Helvetica Neue", Arial, sans-serif; letter-spacing: normal; text-transform: none; text-decoration: none; justify-content: center; transform: none; }
.tool-app img { display: inline-block; }
/* phones: let the grids shrink to the screen (plain 1fr columns grew to ~2800px wide) */
.tool-app .dims { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .tool-app .layout { grid-template-columns: minmax(0, 1fr); } }

/* ---- Designer layout (shared with the outdoor tool, Oct 2026) ----
   Preview and every choice sit side by side, so a click (or hover) on a
   fabric changes the picture without scrolling. Phones: preview, then a
   one-row fabric strip right under it, then pieces. */
.tool-app .designer { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.tool-app .designer-stage .preview-stage { position: relative; min-height: 300px; padding: 18px 18px 40px; }
.tool-app .preview-visual svg.preview-svg { width: 100%; max-height: 420px; height: auto; }
.tool-app .stage-label {
  position: absolute; left: 12px; bottom: 10px; margin: 0; padding: 4px 9px; border-radius: 4px;
  background: rgba(255,255,255,.85); font: 600 12.5px/1.3 "Helvetica Neue", Arial, sans-serif; color: var(--ink);
}
.tool-app .stage-label .code { font-weight: 400; color: var(--ink-soft); }
.tool-app .stage-label .hint { font-weight: 600; color: var(--accent); text-transform: uppercase; font-size: 10px; letter-spacing: .06em; margin-left: 4px; }
.tool-app .designer-stage .preview-caption { margin: 10px 0 4px; font-size: 13.5px; line-height: 1.45; }
.tool-app .designer-stage .preview-disclaimer { font-size: 11.5px; }
.tool-app .designer-controls { display: flex; flex-direction: column; gap: 14px; }
.tool-app .designer-controls h2 { margin: 0 0 8px; }
.tool-app .ctl-sub { font-size: 11px; font-weight: 400; color: var(--ink-soft); text-transform: none; letter-spacing: normal; margin-left: 4px; }
.tool-app .piece-grid--outdoor { grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tool-app .piece-grid--outdoor .piece-tile { padding: 6px 4px 5px; }
.tool-app .piece-grid--outdoor .piece-tile .pt-art { display: flex; align-items: center; justify-content: center; height: 40px; }
.tool-app .piece-grid--outdoor .piece-tile svg.pt-svg { width: 100%; height: 40px; }
.tool-app .piece-grid--outdoor .piece-tile .pt-name { margin-top: 3px; font-size: 11.5px; }
.tool-app .swatch-strip { display: flex; flex-direction: column; gap: 8px; }
.tool-app .swatch-group { display: flex; align-items: center; gap: 8px; }
.tool-app .swatch-group-name { flex: 0 0 66px; font: 600 10.5px/1.2 "Helvetica Neue", Arial, sans-serif; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; }
.tool-app .swatch-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tool-app .swatch-chips .swatch-chip { flex: 0 0 46px; width: 46px; }
.tool-app .swatch-chips .swatch-img { width: 46px; height: 46px; aspect-ratio: auto; border-radius: 6px; }
.tool-app .swatch-chips .swatch-chip:focus-visible .swatch-img { outline: 2px solid var(--navy); outline-offset: 2px; }
.tool-app .ctl-frame .fee-row { margin: 0; }
.tool-app .ctl-frame .fee-row label { margin: 0; font-weight: 400; font-size: 13.5px; }
.tool-app #frame-color-row { margin-top: 8px; }
.tool-app .frame-note { margin: 6px 0 0 !important; font-size: 12px !important; }
.tool-app .ctl-buy { border-top: 1px solid var(--line); padding-top: 12px; }
.tool-app .ctl-buy .price-line { margin: 0 0 8px; }
.tool-app .buy-row { display: flex; gap: 8px; }
.tool-app .buy-row input { width: 64px; flex: 0 0 64px; text-align: center; }
.tool-app .buy-row .btn { flex: 1; margin: 0; }
.tool-app .ctl-buy .estimate-note { margin: 8px 0 6px; }
.tool-app .spec-link { font: 600 13px/1.3 "Helvetica Neue", Arial, sans-serif; color: var(--accent); }
.tool-app .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tool-app .layout--order { grid-template-columns: minmax(0, 1fr); max-width: 760px; margin: 22px auto 0; }
.tool-app .tm-note { font-size: 11.5px !important; opacity: .75; margin-top: 10px !important; }
.tool-app .cart-thumb { width: 64px; height: 48px; background: #fff; }
.tool-app .cart-thumb svg.cart-svg { width: 58px; height: 42px; }
.tool-app .m-only { display: none; }
@media (max-width: 860px) {
  .tool-app .designer-stage .preview-disclaimer { display: none; }
  .tool-app .ctl-buy .m-only { display: block; font-size: 11.5px; margin: 0 0 8px; }
  .tool-app .designer-stage .preview-caption { margin: 8px 0 0; }
  .tool-app .designer { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .tool-app .designer-stage .preview-stage { min-height: 0; padding: 10px 10px 36px; }
  .tool-app .designer-controls .ctl-fabric { order: -1; }
  .tool-app .swatch-strip { flex-direction: row; overflow-x: auto; gap: 12px; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
  .tool-app .swatch-group { flex-direction: column; align-items: flex-start; gap: 4px; }
  .tool-app .swatch-group-name { flex: none; }
  .tool-app .swatch-chips { flex-wrap: nowrap; }
  .tool-app .swatch-chips .swatch-chip { scroll-snap-align: start; }
  .tool-app .piece-grid--outdoor { grid-template-columns: repeat(6, minmax(72px, 1fr)); overflow-x: auto; }
  .tool-app .designer-stage .preview-caption { font-size: 12.5px; }
}
.tool-app .piece-grid--outdoor .piece-tile img.pt-img { width: 100%; height: 40px; object-fit: contain; }
.tool-app .preview-visual svg.is-photo { max-height: 440px; }
.tool-app .designer-stage .preview-stage:has(svg.is-photo) { background: radial-gradient(ellipse at 50% 45%, #ffffff 0%, #f5f2ec 70%, #ece7dc 100%); }
.tool-app .care-link { display: block; margin-top: 6px; font-weight: 500; }
.tool-app .price-extra { margin: -2px 0 8px; font: 12.5px/1.4 "Helvetica Neue", Arial, sans-serif; color: var(--ink-soft); }
.tool-app .price-extra:empty { display: none; }
.tool-app .cart-line { display: flex; justify-content: space-between; font: 600 13.5px/1.4 "Helvetica Neue", Arial, sans-serif; padding: 8px 0; border-top: 1px solid var(--line); }
.tool-app .cart-line--save { color: #2f6b3a; }
.tool-app .delivery { border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px 10px; margin: 10px 0; font: 13.5px/1.5 "Helvetica Neue", Arial, sans-serif; }
.tool-app .delivery legend { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); padding: 0 4px; }
.tool-app .delivery label { display: flex; gap: 8px; align-items: baseline; margin: 4px 0; font-weight: 400; }
.tool-app .delivery label strong { margin-left: auto; }
.tool-app .delivery-note { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.tool-app .addr-row { display: grid; grid-template-columns: 70px 1fr; gap: 10px; }
.tool-app .addr-row input { width: 100%; }
.tool-app .cart-line--tax { font-weight: 400; }
.tool-app .tax-note { font: 12px/1.4 "Helvetica Neue", Arial, sans-serif; color: var(--ink-soft); margin: 6px 0 0; }

/* furniture tool: material tier tabs, collection tabs, swatch grid */
.tool-app .piece-grid--photo { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tool-app .piece-grid--photo .piece-tile { padding: 6px 4px 5px; }
.tool-app .piece-grid--photo .piece-tile img.pt-img { width: 100%; height: 44px; object-fit: contain; display: block; }
.tool-app .piece-grid--photo .piece-tile .pt-name { margin-top: 3px; font-size: 11px; }
.tool-app .tier-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 8px; }
.tool-app .tier-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 10px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; text-align: left; font-family: "Helvetica Neue", Arial, sans-serif; }
.tool-app .tier-tab:hover { border-color: var(--navy); }
.tool-app .tier-tab.selected { border-color: var(--accent); background: #faf1ec; }
.tool-app .tier-tab .tier-name { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.tool-app .tier-tab .tier-range { font-size: 12px; color: var(--ink-soft); }
.tool-app .coll-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.tool-app .coll-tabs:empty { display: none; }
.tool-app .coll-tab { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: 600 12px/1.4 "Helvetica Neue", Arial, sans-serif; color: var(--ink-soft); cursor: pointer; }
.tool-app .coll-tab.selected { border-color: var(--accent); color: var(--accent-dark, var(--accent)); background: #faf1ec; }
.tool-app .coll-tab .coll-count { font-weight: 400; opacity: .7; }
.tool-app #swatch-groups .swatch-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 236px; overflow-y: auto; padding: 2px; }
.tool-app #swatch-groups .swatch-chip { flex: 0 0 42px; width: 42px; }
.tool-app #swatch-groups .swatch-img { width: 42px; height: 42px; aspect-ratio: auto; border-radius: 6px; background-size: cover; }
.tool-app .preview-visual img { display: block; width: 100%; max-height: 420px; object-fit: contain; }
.tool-app .preview-visual svg { width: 100%; max-height: 420px; height: auto; }
.tool-app .designer-stage .preview-stage { background: radial-gradient(ellipse at 50% 45%, #ffffff 0%, #f5f2ec 70%, #ece7dc 100%); }
@media (max-width: 860px) {
  .tool-app .piece-grid--photo { grid-template-columns: repeat(7, minmax(70px, 1fr)); overflow-x: auto; }
  .tool-app #swatch-groups .swatch-chips { flex-wrap: nowrap; overflow-x: auto; max-height: none; }
}

/* cushion tool */
.tool-app .designer .fabric-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.tool-app #fabric-grid .swatch-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 236px; overflow-y: auto; padding: 2px; }
.tool-app #fabric-grid .swatch-chip { flex: 0 0 42px; width: 42px; border: none; background: none; padding: 0; cursor: pointer; }
.tool-app #fabric-grid .swatch-img { display: block; width: 42px; height: 42px; border-radius: 6px; border: 2px solid var(--line); }
.tool-app #fabric-grid .swatch-chip.selected .swatch-img { border-color: var(--accent); box-shadow: 0 0 0 2px #faf1ec inset; }
.tool-app #preview-svg { width: 100%; height: auto; display: block; }
@media (max-width: 860px) { .tool-app #fabric-grid .swatch-chips { flex-wrap: nowrap; overflow-x: auto; max-height: none; } }
.tool-app .ctl-size .dims { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tool-app .ctl-size .range-hint { font-size: 10.5px; }

/* all inputs in the designer panel */
.tool-app .ctl-opts { display: flex; flex-direction: column; gap: 8px; }
.tool-app .opt-line { display: grid; grid-template-columns: 86px 1fr; align-items: center; gap: 8px; }
.tool-app .opt-line.hidden { display: none; }
.tool-app .opt-name { font: 700 11px/1.2 "Helvetica Neue", Arial, sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.tool-app .seg { display: flex; flex-wrap: wrap; gap: 4px; }
.tool-app .seg-btn { padding: 5px 10px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font: 600 12.5px/1.3 "Helvetica Neue", Arial, sans-serif; color: var(--ink); cursor: pointer; }
.tool-app .seg-btn:hover { border-color: var(--navy); }
.tool-app .seg-btn.selected { border-color: var(--accent); background: #faf1ec; color: var(--accent-dark, var(--accent)); }
.tool-app .pip-chips { display: flex; gap: 5px; overflow-x: auto; padding: 2px 2px 4px; }
.tool-app .pip-chips .swatch-chip { flex: 0 0 30px; width: 30px; border: none; background: none; padding: 0; cursor: pointer; }
.tool-app .pip-chips .swatch-img { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 5px; border: 2px solid var(--line); font: 700 8.5px/1 "Helvetica Neue", Arial, sans-serif; color: var(--ink-soft); background: #fff; }
.tool-app .pip-chips .pip-match { flex-basis: 44px; width: 44px; }
.tool-app .pip-chips .pip-match .swatch-img { width: 44px; }
.tool-app .pip-chips .swatch-chip.selected .swatch-img { border-color: var(--accent); }
.tool-app .ctl-size h2, .tool-app .ctl-fabric h2 { margin-bottom: 6px; }
.tool-app .designer-controls { gap: 12px; }
@media (min-width: 861px) { .tool-app .designer-stage { position: sticky; top: 12px; } }

/* "See it in a room" photo under the drawing */
.tool-app .room-photo { margin: 12px 0 0; }
.tool-app .room-photo img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 896; object-fit: cover; border-radius: 10px; background: #ece7dc; }
.tool-app .room-photo figcaption { margin-top: 6px; font-size: 12px; color: #6b6458; line-height: 1.4; }
.tool-app .room-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 0; }
.tool-app .room-photos figure { margin: 0; }
.tool-app .room-photos img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 896; object-fit: cover; border-radius: 8px; background: #ece7dc; }
.tool-app .room-photos figcaption { font-size: 11.5px; color: #6b6458; margin-top: 4px; }
.tool-app .room-photos-note { grid-column: 1 / -1; font-size: 12px; color: #6b6458; margin: 0; }
.tool-app .room-photo figcaption, .tool-app .room-photos figcaption, .tool-app .room-photos-note { font-family: "Helvetica Neue", Arial, sans-serif; }
@media (max-width: 820px) {
  .tool-app .room-photo { display: flex; gap: 10px; align-items: center; }
  .tool-app .room-photo img { width: 38%; flex: none; border-radius: 8px; }
  .tool-app .room-photo figcaption { margin: 0; }
}

/* ===== Boat cover designer ===== */
.tool-app .preview-visual svg.preview-svg { display: block; width: 100%; height: auto; max-height: none; }
.tool-app .designer-stage .preview-stage { background: linear-gradient(180deg, #ffffff 0%, #f4f1ea 62%, #e9e3d6 100%); }
.tool-app .boat-size { display: grid; grid-template-columns: 1fr 110px; gap: 10px; align-items: end; margin-bottom: 8px; }
.tool-app .dim-length label { display: flex; justify-content: space-between; }
.tool-app .dim-length output { font: 700 13px/1 "Helvetica Neue", Arial, sans-serif; color: var(--navy); }
.tool-app input[type="range"] { width: 100%; accent-color: var(--accent); height: 28px; }
.tool-app .ctl-note { margin: 6px 0 0 !important; font-size: 12.5px !important; line-height: 1.45; color: var(--ink-soft); }
.tool-app .ctl-note:empty { display: none; }
.tool-app .seg--tall .seg-btn { display: flex; flex-direction: column; align-items: flex-start; border-radius: 10px; padding: 7px 12px; flex: 1 1 0; min-width: 0; }
.tool-app .seg-sub { font-weight: 400; font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.tool-app .swatch-chips .swatch-img { overflow: hidden; display: block; }
.tool-app .swatch-chips .swatch-img svg { display: block; width: 100%; height: 100%; }
.tool-app #opt-list .fee-row { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 6px; }
.tool-app #opt-list .fee-row input { margin-top: 3px; }
.tool-app #opt-list label { font-weight: 600; font-size: 13.5px; margin: 0; }
.tool-app #opt-list .opt-desc { display: block; font-weight: 400; font-size: 12px; color: var(--ink-soft); }
.tool-app .quote-btn { width: 100%; margin-top: 8px; }
.tool-app .cover-summary { margin: 0 0 14px; padding-left: 18px; font-size: 14px; line-height: 1.55; }
.tool-app .form-field select { width: 100%; padding: 9px 10px; border: 1.5px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; background: #fff; }
.tool-app #opt-list label, .tool-app #opt-list .opt-desc, .tool-app .ctl-note, .tool-app .cover-summary { font-family: "Helvetica Neue", Arial, sans-serif; }
.tool-app #price-value { font-size: 18px; }
.tool-app .price-line #price-value { font: 700 17px/1.2 "Helvetica Neue", Arial, sans-serif !important; color: var(--navy); }
