/*
 * Redesign mounts3d.ro — configuratorul v2 (setup-v2.php + setup2.js): câte o întrebare pe ecran.
 * Se încarcă peste setup.css și refolosește de acolo cardul căștii, listele, camerele, chip-urile
 * modelului și viziera. Aici: ecranul de început, progresul, cardul cu întrebarea, rândurile cu
 * „de ce”, lista cu bife, livrarea gratuită și navigarea (fixă jos pe mobil).
 */

body.m3d-rd .rd-setup2 { padding-bottom: 32px; }
body.m3d-rd .rd-s2-start,
body.m3d-rd .rd-s2-flow { max-width: 860px; margin: 0 auto; }
body.m3d-rd .rd-setup2 [hidden] { display: none !important; }

/* ── Începutul ───────────────────────────────────────────────────────────────────────── */
body.m3d-rd .rd-s2-start { display: flex; flex-direction: column; gap: 18px; padding: 8px 0 24px; }
body.m3d-rd .rd-s2-start__title { margin: 0; font-size: 36px; line-height: .95; }
body.m3d-rd .rd-s2-start__lead { margin: 0; color: var(--rd-ink); font-size: 17px; line-height: 1.5; }
body.m3d-rd .rd-s2-tiles { display: grid; gap: 10px; margin: 4px 0 0; padding: 0; list-style: none; }
body.m3d-rd .rd-s2-tiles li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  grid-template-areas: "n t" "n s";
  align-items: center;
  gap: 2px 12px;
  padding: 14px 16px;
  border-radius: var(--rd-r-lg);
  background: var(--rd-s1);
}
body.m3d-rd .rd-s2-tiles__n {
  grid-area: n;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--rd-ink);
  color: var(--rd-bg);
  font-weight: 700;
}
body.m3d-rd .rd-s2-tiles strong { grid-area: t; font-size: 17px; line-height: 1.25; }
body.m3d-rd .rd-s2-tiles li > span:last-child { grid-area: s; color: var(--rd-muted); font-size: 14px; line-height: 1.35; }
body.m3d-rd .rd-s2-start__go { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 6px; }
body.m3d-rd .rd-s2-start__note { color: var(--rd-muted); font-size: 14px; }

/* ── Antetul fluxului + progresul ────────────────────────────────────────────────────── */
body.m3d-rd .rd-s2-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
body.m3d-rd .rd-s2-head .rd-eyebrow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.m3d-rd .rd-s2-head__n { flex: none; color: var(--rd-muted); font-size: 13px; font-weight: 600; }
body.m3d-rd .rd-s2-progress { display: flex; gap: 6px; margin: 10px 0 14px; padding: 0; list-style: none; }
body.m3d-rd .rd-s2-progress li { flex: 1 1 0; min-width: 0; }
body.m3d-rd .rd-s2-progress__btn {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--rd-muted);
  font-family: var(--rd-font);
  text-align: left;
  cursor: pointer;
}
body.m3d-rd .rd-s2-progress__btn:disabled { cursor: default; }
body.m3d-rd .rd-s2-progress__bar { display: block; height: 5px; border-radius: 3px; background: var(--rd-s2); transition: background-color .2s var(--rd-ease); }
body.m3d-rd .rd-s2-progress__label { font-size: 11px; font-weight: 700; letter-spacing: .05em; line-height: 1.2; text-transform: uppercase; }
body.m3d-rd .rd-s2-progress li.is-done .rd-s2-progress__btn { color: var(--rd-ok-fg); }
body.m3d-rd .rd-s2-progress li.is-done .rd-s2-progress__bar { background: var(--rd-ok-mid); }
body.m3d-rd .rd-s2-progress li.is-current .rd-s2-progress__btn { color: var(--rd-ink); }
body.m3d-rd .rd-s2-progress li.is-current .rd-s2-progress__bar { background: var(--rd-accent); }
body.m3d-rd .rd-s2-progress__btn:not(:disabled):hover .rd-s2-progress__label { text-decoration: underline; text-underline-offset: 3px; }

/* ── Cardul cu întrebarea ────────────────────────────────────────────────────────────── */
body.m3d-rd .rd-s2-card {
  padding: 18px 16px 16px;
  border: 2px solid var(--rd-accent);
  border-radius: var(--rd-r-lg);
  background: var(--rd-bg);
  box-shadow: var(--rd-shadow-sm);
}
body.m3d-rd .rd-s2-screen { display: flex; flex-direction: column; gap: 14px; }
body.m3d-rd .rd-s2-h { margin: 0; color: var(--rd-ink); font-family: var(--rd-font); font-size: 26px; font-weight: 700; letter-spacing: 0; line-height: 1.15; text-transform: none; }
body.m3d-rd .rd-s2-h:focus:not(:focus-visible) { outline: none; }
body.m3d-rd .rd-s2-h3 { margin: 8px 0 0; font-size: 18px; font-weight: 700; line-height: 1.25; }
body.m3d-rd .rd-s2-sub { margin: -4px 0 0; color: var(--rd-muted); font-size: 15px; line-height: 1.45; }
body.m3d-rd .rd-s2-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
body.m3d-rd .rd-s2-foot .rd-wa-link { min-height: 36px; font-size: 14px; }
body.m3d-rd .rd-setup2 .rd-setup__result { margin-top: 0; }
body.m3d-rd .rd-setup2 .rd-setup__models { margin-top: 2px; }
body.m3d-rd .rd-setup2 .rd-setup__opt--none:not([aria-pressed="true"]) { border: 2px dashed var(--rd-line); background: transparent; }

body.m3d-rd .rd-s2-note { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--rd-s1); font-size: 15px; line-height: 1.45; }
body.m3d-rd .rd-s2-note--ok { background: var(--rd-ok-bg); color: var(--rd-ok-fg); }
body.m3d-rd .rd-s2-note--warn { background: var(--rd-warn-bg); color: var(--rd-warn-fg); }

/* ── Cum filmezi ─────────────────────────────────────────────────────────────────────── */
body.m3d-rd .rd-s2-answers { display: grid; gap: 8px; }
body.m3d-rd .rd-s2-answer strong { font-size: 16px; }
body.m3d-rd .rd-s2-opts { display: flex; flex-direction: column; gap: 8px; }
body.m3d-rd .rd-s2-opts > .rd-label { margin: 4px 0 0; }

/* ── Rândurile: variante de filmare, piese, lista ────────────────────────────────────── */
body.m3d-rd .rd-s2-list,
body.m3d-rd .rd-s2-rows { display: flex; flex-direction: column; gap: 8px; }
body.m3d-rd .rd-s2-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 14px;
  padding: 10px 12px 10px 10px;
  border: 2px solid transparent;
  border-radius: 18px;
  background: var(--rd-s1);
}
body.m3d-rd .rd-s2-item.is-on { border-color: var(--rd-ink); background: var(--rd-bg); }
body.m3d-rd .rd-s2-item.is-out { border: 2px dashed var(--rd-line); background: transparent; }
/* Variantele și rândurile listei: un <label> cu bifa / butonul radio, apoi „Detalii”. */
body.m3d-rd .rd-s2-item--opt,
body.m3d-rd .rd-s2-item--row { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; }
body.m3d-rd .rd-s2-item__main {
  display: grid;
  grid-template-columns: 22px auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
  min-height: 64px;
  padding: 10px 12px;
  cursor: pointer;
}
body.m3d-rd .rd-s2-item.is-out .rd-s2-item__main,
body.m3d-rd .rd-s2-item.is-noted .rd-s2-item__main { cursor: default; }
body.m3d-rd .rd-s2-radio,
body.m3d-rd .rd-s2-check { grid-column: 1; width: 22px; height: 22px; margin: 0; accent-color: var(--rd-ink); cursor: inherit; }
body.m3d-rd .rd-s2-thumbs { grid-column: 2; display: flex; gap: 4px; }
body.m3d-rd .rd-s2-item__main .rd-s2-item__text { grid-column: 3; }
body.m3d-rd .rd-s2-item__main .rd-s2-item__side { grid-column: 4; }
body.m3d-rd .rd-s2-thumbs img,
body.m3d-rd .rd-s2-media img { width: 100%; height: 100%; object-fit: contain; }
body.m3d-rd .rd-s2-thumbs img { flex: none; width: 56px; height: 56px; border-radius: 10px; background: #FFFFFF; }
body.m3d-rd .rd-s2-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #FFFFFF;
  cursor: zoom-in;
}
body.m3d-rd .rd-s2-item.is-out img { opacity: .6; }
body.m3d-rd .rd-s2-item__text { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; line-height: 1.3; }
body.m3d-rd .rd-s2-item__title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
body.m3d-rd .rd-s2-item__title strong,
body.m3d-rd .rd-s2-item__name { font-size: 15px; }
body.m3d-rd .rd-s2-item__why { color: var(--rd-ink); font-size: 14px; line-height: 1.4; }
body.m3d-rd .rd-s2-item--row .rd-s2-item__why { color: var(--rd-muted); font-size: 13px; }
body.m3d-rd .rd-s2-item__out { color: var(--rd-err-fg); font-size: 13px; font-weight: 600; }
body.m3d-rd .rd-s2-item__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
body.m3d-rd .rd-s2-item__note { max-width: 180px; color: var(--rd-ok-fg); font-size: 13px; font-weight: 600; line-height: 1.3; }
/* Sub text: padding 12 + bifa 22 + 12 + miniatura 56 + 12. */
body.m3d-rd .rd-s2-item__more { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0 12px 10px 114px; }
body.m3d-rd .rd-s2-item__details,
body.m3d-rd .rd-s2-item__tether { align-self: flex-start; margin: -6px 12px 10px 114px; }
body.m3d-rd .rd-s2-item__tether {
  min-height: 24px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--rd-ok-mid);
  font-family: var(--rd-font);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
body.m3d-rd .rd-s2-price { font-size: 15px; font-weight: 700; white-space: nowrap; }
body.m3d-rd .rd-s2-price del { margin-right: 4px; color: var(--rd-muted); font-size: 13px; font-weight: 500; }
body.m3d-rd .rd-s2-price ins { text-decoration: none; }
body.m3d-rd .rd-s2-badge { padding: 1px 8px; border-radius: 10px; background: var(--rd-accent); color: var(--rd-on-accent); font-size: 11px; font-weight: 700; line-height: 18px; white-space: nowrap; }
body.m3d-rd .rd-s2-badge--need { background: var(--rd-ink); color: var(--rd-bg); }
body.m3d-rd .rd-s2-add { min-width: 104px; white-space: nowrap; }
body.m3d-rd .rd-s2-add.is-on { border-color: var(--rd-ok-mid); background: var(--rd-ok-mid); color: #FFFFFF; }
body.m3d-rd .rd-s2-rows__h { margin: 12px 0 0; color: var(--rd-muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
body.m3d-rd .rd-s2-rows__h:first-child { margin-top: 0; }
body.m3d-rd .rd-s2-rows > .rd-s2-note { padding: 10px 14px; font-size: 14px; }

/* Baza care intră în chin mount: titlul cu „Necesar · alege una”, nota, cardurile. */
body.m3d-rd .rd-s2-base { display: flex; flex-direction: column; gap: 10px; }
body.m3d-rd .rd-s2-base[hidden] { display: none; }
body.m3d-rd .rd-s2-h3--badge { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
body.m3d-rd .rd-s2-h3--badge .rd-s2-badge[hidden] { display: none; }

/* Produsul cu variante din listă: lista de variante și „Detalii”, aliniate cu textul. */
body.m3d-rd .rd-s2-item__opts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: -4px 12px 10px 114px; }
body.m3d-rd .rd-s2-var {
  max-width: 100%;
  min-height: 40px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--rd-line);
  border-radius: 12px;
  background-color: var(--rd-bg);
  color: var(--rd-ink);
  font-family: var(--rd-font);
  font-size: 14px;
  font-weight: 600;
}

/* Garajul, sub total (ca în v1): butonul și nota. */
body.m3d-rd .rd-s2-garage { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
body.m3d-rd .rd-s2-garage__note { display: inline-flex; align-items: center; gap: 6px; color: var(--rd-muted); font-size: 13px; line-height: 1.4; }
body.m3d-rd .rd-s2-garage__note svg { flex: none; }
body.m3d-rd .rd-s2-garage__save[disabled] { opacity: 1; border-color: var(--rd-ok-mid); color: var(--rd-ok-fg); }

/* ── Livrarea gratuită + totalul ─────────────────────────────────────────────────────── */
body.m3d-rd .rd-s2-ship { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--rd-s1); font-size: 14px; font-weight: 600; line-height: 1.35; }
body.m3d-rd .rd-s2-ship__bar { display: block; height: 8px; overflow: hidden; border-radius: 4px; background: var(--rd-s2); }
body.m3d-rd .rd-s2-ship__bar span { display: block; height: 100%; border-radius: 4px; background: var(--rd-accent); transition: width .3s var(--rd-ease); }
body.m3d-rd .rd-s2-ship.is-ok { background: var(--rd-ok-bg); color: var(--rd-ok-fg); }
body.m3d-rd .rd-s2-ship.is-ok .rd-s2-ship__bar span { background: var(--rd-ok-mid); }
body.m3d-rd .rd-s2-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--rd-line); }
body.m3d-rd .rd-s2-total span { color: var(--rd-muted); font-size: 14px; }
body.m3d-rd .rd-s2-total strong { font-size: 32px; font-stretch: 80%; line-height: 1; }

/* ── Navigarea: fixă jos pe telefon (deasupra barei de jos), la capătul cardului pe desktop ── */
body.m3d-rd .rd-setup2 .rd-setup__msg { margin: 12px 0 0; }
body.m3d-rd .rd-s2-nav {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px -16px -16px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--rd-line);
  border-radius: 0 0 var(--rd-r-lg) var(--rd-r-lg);
  background: var(--rd-bar);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
}
body.m3d-rd.rd-has-tabbar .rd-s2-nav { bottom: calc(66px + env(safe-area-inset-bottom, 0px)); padding-bottom: 10px; }
body.m3d-rd .rd-s2-nav__back { flex: none; padding: 0 14px; }
body.m3d-rd .rd-s2-nav__back svg { transform: rotate(180deg); }
body.m3d-rd .rd-s2-nav__sum { flex: 1; display: flex; flex-direction: column; align-items: flex-end; min-width: 0; line-height: 1.15; text-align: right; }
body.m3d-rd .rd-s2-nav__sum span { color: var(--rd-muted); font-size: 12px; }
body.m3d-rd .rd-s2-nav__sum strong { font-size: 22px; font-stretch: 80%; }
body.m3d-rd .rd-s2-nav__next { flex: none; padding: 0 20px; }
body.m3d-rd .rd-s2-nav__next.is-added { background: var(--rd-ok-mid); color: #FFFFFF; opacity: 1; }

@media (max-width: 599px) {
  /* „Înapoi” doar cu săgeata: loc pentru total și pentru butonul principal. */
  body.m3d-rd .rd-s2-nav__back { width: 48px; padding: 0; justify-content: center; }
  body.m3d-rd .rd-s2-nav__back span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  body.m3d-rd .rd-s2-item { grid-template-columns: 56px minmax(0, 1fr); padding: 10px; }
  body.m3d-rd .rd-s2-media { width: 56px; height: 56px; }
  /* Prețul și butonul sub text, pe un rând. */
  body.m3d-rd .rd-s2-item > .rd-s2-item__side { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; text-align: left; }
  body.m3d-rd .rd-s2-item__main { grid-template-columns: 22px auto minmax(0, 1fr); }
  body.m3d-rd .rd-s2-item__main .rd-s2-item__side { grid-column: 3; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; text-align: left; }
  body.m3d-rd .rd-s2-thumbs img { width: 44px; height: 44px; }
  body.m3d-rd .rd-s2-item__note { max-width: none; }
  body.m3d-rd .rd-s2-item__more { padding-left: 102px; }
  body.m3d-rd .rd-s2-item__details,
  body.m3d-rd .rd-s2-item__tether { margin-left: 102px; }
  /* Lista de variante pe toată lățimea, de la bifă încolo: altfel textul variantei se taie. */
  body.m3d-rd .rd-s2-item__opts { margin-left: 46px; }
  body.m3d-rd .rd-s2-var { flex: 1 1 100%; }
}

@media (min-width: 600px) {
  body.m3d-rd .rd-s2-start__title { font-size: 48px; }
  body.m3d-rd .rd-s2-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.m3d-rd .rd-s2-tiles li { grid-template-columns: 1fr; grid-template-areas: "n" "t" "s"; align-content: start; gap: 6px; padding: 18px; }
  body.m3d-rd .rd-s2-answers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.m3d-rd .rd-s2-progress__label { font-size: 12px; }
}

@media (min-width: 1000px) {
  body.m3d-rd .rd-setup2 { padding-top: 40px; padding-bottom: 64px; }
  body.m3d-rd .rd-s2-start { padding-top: 12px; }
  body.m3d-rd .rd-s2-start__title { font-size: clamp(52px, 5vw, 72px); line-height: .92; }
  body.m3d-rd .rd-s2-start__lead { font-size: 19px; }
  body.m3d-rd .rd-s2-progress { margin: 14px 0 18px; }
  body.m3d-rd .rd-s2-progress__label { letter-spacing: 0; text-transform: none; font-size: 14px; }
  body.m3d-rd .rd-s2-card { padding: 28px 30px 24px; border-radius: 30px; }
  body.m3d-rd .rd-s2-h { font-size: 32px; }
  /* Pe desktop navigarea stă la capătul cardului, iar totalul e deja în listă. */
  body.m3d-rd .rd-s2-nav { position: static; margin: 22px 0 0; padding: 18px 0 0; border-radius: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  body.m3d-rd .rd-s2-nav.is-list .rd-s2-nav__sum { visibility: hidden; }
  body.m3d-rd .rd-s2-item--opt .rd-s2-item__main,
  body.m3d-rd .rd-s2-item--row .rd-s2-item__main { padding: 12px 16px; }
  body.m3d-rd .rd-s2-item__more { padding-left: 118px; }
  body.m3d-rd .rd-s2-item__details,
  body.m3d-rd .rd-s2-item__tether,
  body.m3d-rd .rd-s2-item__opts { margin-left: 118px; }
}
