/* ==========================================================================
   product-configurator.css
   بخش «انتخاب نوع، ابعاد و قیمت» صفحه product-panels.html
   همه قواعد زیر فقط داخل .bp-cfg کار می‌کنند.
   ========================================================================== */

.bp-cfg {
  --c-navy: #12204c;
  --c-orange: #ffad06;
  --c-orange-deep: #b45f06;
  --c-bg: #f3f1ec;
  --c-line: rgba(18, 32, 76, .12);
  --c-text: #36405f;
  --c-muted: #5b6585;
  --c-ok: #1f7a4d;
  margin-top: 48px;
  color: var(--c-text);
}
.bp-cfg *, .bp-cfg *::before, .bp-cfg *::after { box-sizing: border-box; }
.bp-cfg button, .bp-cfg input, .bp-cfg select { font: inherit; color: inherit; }

/* ---------- سربرگ بخش ---------- */
.bp-cfg-eyebrow {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .06em;
  color: var(--c-orange-deep); background: #fff7e5; border: 1px solid #ffe2a6;
  padding: 4px 12px; border-radius: 999px;
}
.bp-cfg-head h2 { margin: 12px 0 0; font-size: 22px; line-height: 1.5; font-weight: 900; color: var(--c-navy); }
.bp-cfg-head p { margin: 10px 0 0; font-size: 13.5px; line-height: 2; color: rgba(0,0,0,.65); text-align: justify; }

/* ---------- شبکه اصلی: گزینه‌ها + خلاصه ---------- */
.bp-cfg-grid { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
@media (min-width: 1024px) {
  .bp-cfg-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; }
  .bp-cfg-sum { position: sticky; top: 92px; }
}

/* ---------- نوار خلاصه موبایل ---------- */
.bp-cfg-mini {
  position: sticky; top: 74px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--c-navy); color: #fff; border-radius: 14px; padding: 10px 14px; font-size: 12px; line-height: 1.7;
  box-shadow: 0 6px 18px rgba(18, 32, 76, .25); margin-bottom: 14px;
}
.bp-cfg-mini b { color: var(--c-orange); white-space: nowrap; font-weight: 900; }
@media (min-width: 1024px) { .bp-cfg-mini { display: none; } }

/* ---------- گام‌ها ---------- */
.bp-cfg-opts { display: grid; gap: 14px; }
.bp-cfg-step { border: 1px solid var(--c-line); background: #fff; border-radius: 18px; padding: 16px 18px 18px; margin: 0; min-width: 0; }
.bp-cfg-step > legend { padding: 0 8px; font-size: 13.5px; font-weight: 900; color: var(--c-navy); display: flex; align-items: center; gap: 8px; }
.bp-cfg-step > legend .n {
  width: 22px; height: 22px; border-radius: 50%; background: var(--c-navy); color: #fff; font-size: 11px;
  display: inline-grid; place-items: center; font-weight: 800;
}
.bp-cfg-step .hint { margin: 2px 0 10px; font-size: 12px; line-height: 1.9; color: var(--c-muted); }
.bp-cfg-step[hidden], .bp-cfg [hidden] { display: none !important; }

.bp-cfg-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* چیپ انتخاب (رادیو واقعی با ظاهر دکمه) */
.bp-chip { position: relative; display: inline-flex; cursor: pointer; }
.bp-chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.bp-chip > span {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 42px; padding: 8px 16px;
  border: 1.5px solid var(--c-line); border-radius: 12px; background: var(--c-bg);
  font-size: 13px; font-weight: 700; color: var(--c-navy); line-height: 1.5;
  transition: background-color .15s, border-color .15s, color .15s;
}
.bp-chip > span small { font-size: 11px; font-weight: 500; color: var(--c-muted); }
.bp-chip:hover > span { border-color: rgba(18, 32, 76, .35); }
.bp-chip input:checked + span { background: var(--c-navy); border-color: var(--c-navy); color: #fff; }
.bp-chip input:checked + span small { color: rgba(255, 255, 255, .7); }
.bp-chip input:focus-visible + span { outline: 2px solid var(--c-orange); outline-offset: 2px; }
.bp-chip input:disabled { cursor: not-allowed; }
.bp-chip input:disabled + span { opacity: .38; background: transparent; border-style: dashed; }
.bp-chip.is-fixed > span { background: #eef1f9; border-color: #d6e1fb; cursor: default; }

/* کارت گزینه با جای عکس (نوع دیوار، مدل، فونداسیون) */
.bp-opt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
@media (max-width: 420px) { .bp-opt-grid { grid-template-columns: minmax(0, 1fr); } }
.bp-opt { position: relative; display: block; cursor: pointer; }
.bp-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.bp-opt > .card {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: center; height: 100%;
  border: 1.5px solid var(--c-line); border-radius: 14px; background: var(--c-bg); padding: 8px;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.bp-opt > .card .t, .bp-opt > .card .d, .bp-opt > .card .p { display: block; }
.bp-opt > .card.no-img { grid-template-columns: minmax(0, 1fr); padding: 12px; }
#cfg-selector, #cfg-table { scroll-margin-top: 92px; }
.bp-opt > .card .t { font-size: 13px; font-weight: 800; color: var(--c-navy); line-height: 1.6; }
.bp-opt > .card .d { margin-top: 2px; font-size: 11.5px; line-height: 1.7; color: var(--c-muted); }
.bp-opt > .card .p { margin-top: 3px; font-size: 11.5px; font-weight: 800; color: var(--c-orange-deep); }
.bp-opt:hover > .card { border-color: rgba(18, 32, 76, .35); }
.bp-opt input:checked + .card { border-color: var(--c-navy); background: #fff; box-shadow: 0 0 0 2px var(--c-navy) inset; }
.bp-opt input:focus-visible + .card { outline: 2px solid var(--c-orange); outline-offset: 2px; }
.bp-opt input:disabled + .card { opacity: .4; }

/* ---------- جای عکس ---------- */
.bp-ph {
  position: relative; display: grid; place-items: center; overflow: hidden; background: #e7e4dc; border-radius: 10px;
  color: rgba(18, 32, 76, .38); aspect-ratio: 1 / 1;
  background-image: repeating-linear-gradient(135deg, rgba(18, 32, 76, .035) 0 10px, transparent 10px 20px);
}
.bp-ph svg { width: 40%; height: 40%; }
.bp-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bp-ph .lbl { position: absolute; inset-inline: 6px; bottom: 6px; font-size: 10px; text-align: center; line-height: 1.5; color: rgba(18, 32, 76, .55); }
.bp-ph.is-wide { aspect-ratio: 4 / 3; border-radius: 14px; }
.bp-ph.is-wide svg { width: 22%; height: 22%; }
.bp-ph.is-wide .lbl { font-size: 11.5px; bottom: 10px; }
.bp-ph.has-img svg, .bp-ph.has-img .lbl { display: none; }

/* ---------- کارت خلاصه ---------- */
.bp-cfg-sum { background: #fff; border: 1px solid var(--c-line); border-radius: 22px; padding: 16px; box-shadow: 0 10px 30px rgba(18, 32, 76, .06); }
.bp-cfg-sum h3 { margin: 14px 0 0; font-size: 15.5px; line-height: 1.8; font-weight: 900; color: var(--c-navy); }
.bp-specs { margin: 12px 0 0; display: grid; gap: 0; }
.bp-specs > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--c-line); font-size: 12.5px; line-height: 1.8; }
.bp-specs dt { color: var(--c-muted); flex: 0 0 auto; }
.bp-specs dd { margin: 0; font-weight: 700; color: var(--c-navy); text-align: left; }
.bp-price { margin-top: 14px; background: var(--c-navy); color: #fff; border-radius: 16px; padding: 14px 16px; }
.bp-price small { display: block; font-size: 11.5px; color: rgba(255, 255, 255, .65); line-height: 1.8; }
.bp-price strong { display: block; margin: 2px 0; font-size: 20px; font-weight: 900; color: var(--c-orange); line-height: 1.6; }
.bp-price.is-call strong { color: #fff; }

.bp-calc { margin-top: 12px; border: 1px solid var(--c-line); border-radius: 14px; padding: 12px 14px; background: var(--c-bg); }
.bp-calc label { display: block; font-size: 12px; font-weight: 800; color: var(--c-navy); }
.bp-calc input {
  margin-top: 8px; width: 100%; min-height: 42px; border: 1.5px solid var(--c-line); border-radius: 10px; background: #fff;
  padding: 8px 12px; font-size: 14px; direction: ltr; text-align: right;
}
.bp-calc input:focus { outline: 2px solid var(--c-orange); outline-offset: 1px; border-color: transparent; }
.bp-calc output { display: block; margin-top: 8px; font-size: 12.5px; line-height: 1.9; color: var(--c-text); }
.bp-calc output b { color: var(--c-navy); }

.bp-cta { margin-top: 12px; display: grid; gap: 8px; }
.bp-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 800; text-align: center; line-height: 1.6; cursor: pointer; text-decoration: none; border: 1.5px solid transparent;
  transition: background-color .2s, color .2s, border-color .2s;
}
.bp-btn.primary { background: var(--c-orange); color: var(--c-navy); }
.bp-btn.primary:hover { background: var(--c-navy); color: #fff; }
.bp-btn.ghost { background: #fff; border-color: var(--c-navy); color: var(--c-navy); }
.bp-btn.ghost:hover { background: var(--c-navy); color: #fff; }
.bp-btn:focus-visible { outline: 2px solid var(--c-orange); outline-offset: 2px; }
.bp-btn bdi { direction: ltr; }
.bp-note { margin: 12px 0 0; font-size: 11.5px; line-height: 1.95; color: var(--c-muted); text-align: justify; }

/* ---------- زیربخش‌ها: جدول، مدل‌ها، فونداسیون ---------- */
.bp-cfg-sec { margin-top: 44px; }
.bp-cfg-sec > h3 { margin: 0; font-size: 18px; font-weight: 900; color: var(--c-navy); line-height: 1.6; }
.bp-cfg-sec > p { margin: 8px 0 0; font-size: 13px; line-height: 2; color: rgba(0, 0, 0, .62); text-align: justify; }

.bp-flt { margin-top: 16px; display: grid; gap: 10px; border: 1px solid var(--c-line); background: #fff; border-radius: 16px; padding: 12px 14px; }
.bp-flt fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.bp-flt legend { float: right; padding: 0; margin-inline-end: 8px; font-size: 12px; font-weight: 800; color: var(--c-navy); line-height: 42px; }
.bp-flt .bp-chip > span { min-height: 34px; padding: 4px 12px; font-size: 12px; border-radius: 999px; }
.bp-flt-count { font-size: 12px; color: var(--c-muted); }

.bp-tbl-wrap { position: relative; margin-top: 14px; overflow-x: auto; border: 1px solid var(--c-line); border-radius: 16px; background: #fff; }
.bp-tbl-wrap:focus-visible { outline: 2px solid var(--c-orange); outline-offset: 2px; }
.bp-tbl { width: 100%; min-width: 820px; border-collapse: collapse; font-size: 12.5px; line-height: 1.8; }
.bp-tbl caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bp-tbl th { background: var(--c-navy); color: #fff; font-weight: 800; padding: 11px 12px; text-align: right; white-space: nowrap; }
.bp-tbl td { padding: 11px 12px; border-top: 1px solid var(--c-line); vertical-align: middle; color: var(--c-text); }
.bp-tbl tbody tr:nth-child(even) td { background: #faf9f6; }
.bp-tbl tbody tr.is-selected td { background: #fff7e5; box-shadow: inset 0 0 0 0 transparent; }
.bp-tbl tbody tr.is-selected td:first-child { box-shadow: inset -3px 0 0 var(--c-orange); }
.bp-tbl td strong { color: var(--c-navy); font-weight: 800; }
.bp-tbl .price { font-weight: 800; color: var(--c-navy); white-space: nowrap; }
.bp-tbl .price small { display: block; font-weight: 500; font-size: 11px; color: var(--c-muted); white-space: normal; max-width: 210px; line-height: 1.7; }
.bp-tbl .call { color: var(--c-orange-deep); }
.bp-tbl .sel {
  border: 1.5px solid var(--c-navy); background: #fff; color: var(--c-navy); border-radius: 999px; padding: 5px 14px;
  font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; transition: background-color .15s, color .15s;
}
.bp-tbl .sel:hover, .bp-tbl tr.is-selected .sel { background: var(--c-navy); color: #fff; }
.bp-tbl .sel:focus-visible { outline: 2px solid var(--c-orange); outline-offset: 2px; }
.bp-tbl tr.is-empty td { text-align: center; color: var(--c-muted); padding: 22px; }

/* کارت‌های فونداسیون و مدل مجزا */
.bp-cards { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 640px) { .bp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .bp-cards.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .bp-cards.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bp-card2 { background: #fff; border: 1px solid var(--c-line); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.bp-card2 h4 { margin: 2px 4px 0; font-size: 14px; font-weight: 900; color: var(--c-navy); line-height: 1.7; }
.bp-card2 ul { margin: 0; padding: 0 4px; list-style: none; display: grid; gap: 4px; font-size: 12.5px; line-height: 1.9; color: var(--c-text); }
.bp-card2 li::before { content: "•"; color: var(--c-orange-deep); margin-inline-end: 6px; font-weight: 900; }
.bp-card2 .more { margin: auto 4px 2px; font-size: 12.5px; font-weight: 800; color: var(--c-navy); text-decoration: underline; text-underline-offset: 4px; }

.bp-sep {
  margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; background: #fff; border: 1px solid var(--c-line);
  border-radius: 20px; overflow: hidden;
}
@media (min-width: 768px) { .bp-sep { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); } }
.bp-sep img { width: 100%; height: 100%; min-height: 220px; object-fit: cover; display: block; }
.bp-sep .tx { padding: 20px; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.bp-sep .tx h4 { margin: 0; font-size: 16px; font-weight: 900; color: var(--c-navy); line-height: 1.7; }
.bp-sep .tx p { margin: 0; font-size: 13px; line-height: 2; color: rgba(0, 0, 0, .65); text-align: justify; }
.bp-sep .tx .bp-btn { align-self: flex-start; }

@media (prefers-reduced-motion: reduce) { .bp-cfg * { transition: none !important; } }
@media (max-width: 640px) {
  .bp-cfg-head h2 { font-size: 19px; }
  .bp-cfg-step { padding: 14px 12px 16px; }
  .bp-cfg-sum { padding: 12px; }
}

/* جدول جمع شونده */
.bp-det > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #fff; border: 1px solid var(--c-line); border-radius: 16px; padding: 14px 18px; }
.bp-det > summary::-webkit-details-marker { display: none; }
.bp-det > summary h3 { margin: 0; font-size: 16px; font-weight: 900; color: var(--c-navy); line-height: 1.7; }
.bp-det > summary::after { content: "⌄"; font-size: 20px; color: var(--c-navy); transition: transform .2s; }
.bp-det[open] > summary::after { transform: rotate(180deg); }
.bp-det > summary:focus-visible { outline: 2px solid var(--c-orange); outline-offset: 2px; }
.bp-det[open] > summary { margin-bottom: 12px; }

/* جزئیات ارتفاع (زیر «ارتفاع کل دیوار») */
.bp-cfg-step .hint strong { font-weight: 700; color: var(--c-navy); }
.bp-cfg-step .hint .is-cur { font-weight: 700; color: var(--c-navy); }
.bp-cfg-step .hint em { font-style: normal; font-weight: 400; margin: 0 3px; }
