/* ===========================================================
   PRC Group — Interactive tools (quote calculator, color
   visualizer, before/after slider)
   Loaded in addition to styles.css
   =========================================================== */

.tools-hero {
  background: linear-gradient(120deg, var(--navy-deep), var(--navy-soft));
  color: #fff; padding: 3.5rem 0; text-align: center;
}
.tools-hero h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.tools-hero p { color: #d7d7d7; margin-top: .6rem; max-width: 620px; margin-inline: auto; }

/* ===== Quote calculator ===== */
.calc { max-width: 760px; margin: 0 auto; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-md); overflow: hidden; }
.calc__bar { display: flex; background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.calc__bar div { flex: 1; text-align: center; padding: .8rem .4rem; font-family: var(--font-head);
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); border-bottom: 3px solid transparent; transition: .2s; }
.calc__bar div.active { color: var(--navy); border-bottom-color: var(--amber); }
.calc__bar div.done { color: var(--amber-dark); }
.calc__body { padding: 2rem; }
.calc__step { display: none; animation: fade .3s ease; }
.calc__step.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.calc__step h3 { font-size: 1.35rem; margin-bottom: .3rem; }
.calc__step .hint { color: var(--muted); font-size: .92rem; margin-bottom: 1.4rem; }

.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .9rem; }
.opt {
  border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 1.1rem; cursor: pointer;
  text-align: center; transition: .2s; background: #fcfdff; font-family: var(--font-head); font-weight: 600;
}
.opt:hover { border-color: var(--amber); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.opt.sel { border-color: var(--amber); background: #f0f0f0; box-shadow: 0 0 0 3px rgba(0,0,0,.12); }
.opt .ico { font-size: 1.7rem; display: block; margin-bottom: .4rem; }
.opt small { display: block; font-weight: 500; color: var(--muted); font-size: .8rem; margin-top: .25rem; }

.calc .field { margin-bottom: 1.1rem; }
.calc label { display: block; font-family: var(--font-head); font-weight: 600; font-size: .85rem;
  margin-bottom: .4rem; color: var(--navy); }
.calc input, .calc select, .calc textarea {
  width: 100%; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: .95rem; background: #fcfdff;
}
.calc input:focus, .calc select:focus, .calc textarea:focus { outline: none; border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(0,0,0,.18); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.stepper { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line);
  border-radius: 50px; overflow: hidden; }
.stepper button { width: 42px; height: 42px; border: 0; background: var(--bg-alt); font-size: 1.2rem;
  cursor: pointer; color: var(--navy); }
.stepper button:hover { background: var(--amber); color: #fff; }
.stepper input { width: 64px; text-align: center; border: 0 !important; border-left: 1px solid var(--line) !important;
  border-right: 1px solid var(--line) !important; border-radius: 0 !important; }

.calc__nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.8rem; }
.calc__nav .btn { min-width: 120px; }
.btn--back { background: transparent; color: var(--muted); border: 2px solid var(--line); }
.btn--back:hover { border-color: var(--muted); color: var(--navy); }
.is-hidden { visibility: hidden; }
.shake { animation: shake .35s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-6px)} 75%{transform:translateX(6px)} }

/* Result */
.result { text-align: center; }
.result__range { font-family: var(--font-head); font-weight: 800; color: var(--navy);
  font-size: clamp(2rem, 6vw, 3.2rem); margin: .4rem 0; }
.result__range span { color: var(--amber-dark); }
.result__sum { display: grid; gap: .5rem; text-align: left; max-width: 420px; margin: 1.4rem auto;
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.2rem; }
.result__sum div { display: flex; justify-content: space-between; font-size: .92rem; }
.result__sum div span:first-child { color: var(--muted); }
.result__sum div span:last-child { font-weight: 600; color: var(--navy); }
.disclaimer { font-size: .8rem; color: var(--muted); max-width: 480px; margin: .8rem auto 0; }

/* ===== Color visualizer ===== */
.viz { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: stretch; }
.viz__room { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); min-height: 360px; position: relative; display: flex; flex-direction: column; }
.viz__wall { flex: 1; transition: background .35s ease; background: #e0e0e0; position: relative; }
.viz__wall::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(0,0,0,.06)); }
.viz__frame { position: absolute; top: 16%; left: 14%; width: 26%; height: 40%;
  border: 8px solid #fff; border-radius: 6px; box-shadow: 0 8px 20px rgba(0,0,0,.18);
  background: repeating-linear-gradient(135deg, #e4ebf2 0 14px, #eef3f8 14px 28px); }
.viz__floor { height: 64px; background: repeating-linear-gradient(90deg, #b98a55 0 30px, #ad7f4c 30px 60px); }
.viz__sofa { position: absolute; bottom: 64px; left: 22%; width: 56%; height: 84px;
  background: #45525f; border-radius: 14px 14px 6px 6px; box-shadow: 0 10px 20px rgba(0,0,0,.2); }
.viz__panel h3 { font-size: 1.15rem; margin-bottom: .2rem; }
.viz__current { font-family: var(--font-head); font-weight: 700; color: var(--navy); margin-bottom: 1rem; }
.viz__current small { display: block; color: var(--muted); font-weight: 500; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: .6rem; }
.swatch { aspect-ratio: 1; border-radius: 10px; cursor: pointer; border: 2px solid rgba(0,0,0,.08);
  transition: transform .15s ease; position: relative; }
.swatch:hover { transform: scale(1.08); }
.swatch.sel { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(0,0,0,.35); }

/* ===== Before / After slider ===== */
.ba { max-width: 760px; margin: 0 auto; }
.ba__stage { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); aspect-ratio: 16/9; user-select: none; }
.ba__img { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 800; font-size: 1.4rem; letter-spacing: .1em; color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.ba__after { background: repeating-linear-gradient(135deg, #2f6f4f 0 26px, #357a57 26px 52px); }
.ba__before { background: repeating-linear-gradient(135deg, #6b6f73 0 26px, #7a7e82 26px 52px);
  clip-path: inset(0 50% 0 0); }
.ba__handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; background: #fff;
  transform: translateX(-2px); box-shadow: 0 0 10px rgba(0,0,0,.3); }
.ba__grip { position: absolute; top: 50%; left: 50%; width: 42px; height: 42px; transform: translate(-50%,-50%);
  background: #fff; border-radius: 50%; box-shadow: var(--shadow-md); display: grid; place-items: center;
  color: var(--navy); font-weight: 800; cursor: ew-resize; }
.ba__tag { position: absolute; top: 12px; padding: .25rem .7rem; border-radius: 50px; font-size: .75rem;
  font-weight: 700; font-family: var(--font-head); color: #fff; background: rgba(0,0,0,.45); }
.ba__tag--b { left: 12px; } .ba__tag--a { right: 12px; }
.ba input[type=range] { width: 100%; margin-top: 1rem; accent-color: var(--amber); }

@media (max-width: 820px) {
  .viz { grid-template-columns: 1fr; }
  .calc__bar div { font-size: .62rem; }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .calc__body { padding: 1.4rem; }
}
