body.wallviz-open{overflow:hidden}.wallviz[hidden]{display:none}.wallviz{position:fixed;inset:0;z-index:3000;display:grid;place-items:center;padding:1rem}.wallviz-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.72);backdrop-filter:blur(4px)}.wallviz-dialog{position:relative;width:min(1460px,98vw);max-height:96vh;overflow:auto;background:#fff;border-radius:22px;box-shadow:0 28px 80px rgba(0,0,0,.35)}.wallviz-head{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;padding:1.35rem 1.5rem;border-bottom:1px solid #e5e7eb}.wallviz-head h2{margin:.15rem 0;font-size:clamp(1.5rem,2vw,2.1rem)}.wallviz-head p{margin:.35rem 0 0;color:#667085}.wallviz-eyebrow{font-size:.72rem;letter-spacing:.1em;font-weight:800;color:#475467}.wallviz-close{border:0;background:#f2f4f7;border-radius:999px;width:40px;height:40px;font-size:1.6rem;cursor:pointer}.wallviz-body{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:1.35rem;padding:1.4rem}.wallviz-main{display:grid;gap:1rem;min-width:0}.wallviz-scene-wrap{display:grid;gap:.5rem}.wallviz-scene{position:relative;overflow:hidden;aspect-ratio:3/2;background:#ebe8e2;border-radius:15px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.06)}.wallviz-scene-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;pointer-events:none;user-select:none}.wallviz-empty-scene{position:absolute;inset:0;display:grid;place-content:center;gap:.75rem;text-align:center;color:#667085;background:linear-gradient(145deg,#f8f6f2,#ebe8e2)}.wallviz-empty-scene span{display:grid;place-items:center;margin:auto;width:64px;height:64px;border-radius:50%;background:#fff;font-size:2rem}.wallviz-placement-guide{position:absolute;border:1px dashed rgba(255,255,255,.35);background:rgba(255,255,255,.015);border-radius:5px;pointer-events:none;opacity:0}.wallviz-product{position:absolute;box-sizing:content-box;background:#fff;box-shadow:0 10px 24px rgba(0,0,0,.28);cursor:grab;touch-action:none;user-select:none;z-index:3;border-style:solid;border-color:#2f3438;border-image-repeat:stretch}.wallviz-product.dragging{cursor:grabbing}.wallviz-product img{display:block;width:100%;height:100%;object-fit:fill;pointer-events:none}.wallviz-info{display:flex;flex-direction:column;gap:1rem;min-width:0}.wallviz-product-card{display:grid;grid-template-columns:64px 1fr;gap:12px;align-items:center;padding:14px 16px;border:1px solid #e4e7ec;border-radius:14px;background:linear-gradient(135deg,#fbfcfe,#f5f7fa)}.wallviz-product-card-icon{display:grid;place-items:center;width:54px;height:54px;border:1px solid #d8dee8;border-radius:12px;background:#fff;color:#667085;font-size:1.5rem}.wallviz-product-card strong{display:block;font-size:1.15rem}.wallviz-product-card span{display:block;margin-top:4px;color:#344054}.wallviz-scenes-block{display:grid;gap:.6rem}.wallviz-scenes-block>strong{font-size:.95rem}.wallviz-scenes{display:grid;grid-template-columns:1fr 1fr;gap:.55rem}.wallviz-scene-choice{display:grid;gap:.35rem;padding:.35rem;border:1px solid #d0d5dd;border-radius:10px;background:#fff;text-align:left;font:inherit;font-size:.8rem;color:#344054;cursor:pointer;transition:border-color .15s,box-shadow .15s,transform .15s}.wallviz-scene-choice:hover{transform:translateY(-1px);border-color:#98a2b3}.wallviz-scene-choice.active{border-color:#182230;box-shadow:0 0 0 1px #182230}.wallviz-scene-thumb{display:block;aspect-ratio:3/2;border-radius:7px;background:#f2f4f7 center/cover no-repeat}.wallviz-scene-choice.custom{place-items:center;min-height:110px;text-align:center}.wallviz-scene-upload-icon{display:grid;place-items:center;width:46px;height:46px;border-radius:999px;background:#f2f4f7;font-size:1.7rem}.wallviz-custom{display:grid;gap:.7rem;padding:.85rem;border:1px solid #e4e7ec;border-radius:12px;background:#fcfcfd}.wallviz-calibration-tools{display:grid;gap:.5rem}.wallviz-calibration-tools[hidden]{display:none}.wallviz-calibration-tools label{font-size:.82rem;font-weight:700;color:#344054}.wallviz-distance-row{display:grid;grid-template-columns:1fr auto;align-items:center;gap:.45rem}.wallviz-distance-row input{width:100%;box-sizing:border-box;border:1px solid #d0d5dd;border-radius:8px;padding:.58rem .65rem;font:inherit}.wallviz-calibration-actions{display:flex;gap:.4rem;align-items:center;flex-wrap:wrap}.wallviz-calibration-status{margin:0;padding:.55rem .65rem;border-radius:8px;background:#f8fafc;color:#475467;font-size:.82rem}.wallviz-calibration-status[data-kind="ok"]{background:#ecfdf3;color:#027a48}.wallviz-calibration-status[data-kind="error"]{background:#fef3f2;color:#b42318}.wallviz-calibration-status[data-kind="working"]{background:#eff8ff;color:#175cd3}.wallviz-secondary,.wallviz-primary,.wallviz-link{font:inherit;cursor:pointer}.wallviz-secondary,.wallviz-primary{border-radius:10px;padding:.72rem .9rem}.wallviz-secondary{border:1px solid #d0d5dd;background:#fff;color:#344054}.wallviz-primary{border:1px solid #263f58;background:#263f58;color:#fff;font-weight:800}.wallviz-link{border:0;background:transparent;color:#475467;text-decoration:underline;padding:.45rem .2rem}.wallviz-calibration-layer{position:absolute;inset:0;z-index:5;pointer-events:none}.wallviz-calibration-layer.active{cursor:crosshair}.wallviz-scene:has(.wallviz-calibration-layer.active){cursor:crosshair}.wallviz-calibration-point{position:absolute;transform:translate(-50%,-50%);display:grid;place-items:center;width:28px;height:28px;border-radius:999px;background:#111827;color:#fff;font-weight:800;font-size:.78rem;box-shadow:0 0 0 3px rgba(255,255,255,.92),0 2px 8px rgba(0,0,0,.25)}.wallviz-calibration-line{position:absolute;height:3px;background:#111827;transform-origin:0 50%;box-shadow:0 0 0 1px rgba(255,255,255,.8)}.wallviz-sizes-block{display:grid;gap:.65rem;padding-top:.15rem}.wallviz-sizes-head{display:grid;gap:.15rem}.wallviz-sizes-head>strong{font-size:1rem}.wallviz-sizes-head>small{color:#667085}.wallviz-sizes{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:.6rem}.wallviz-size-choice{display:grid;gap:.25rem;min-width:0;padding:.9rem 1rem;border:1px solid #d0d5dd;border-radius:11px;background:#fff;color:#344054;text-align:left;font:inherit;cursor:pointer}.wallviz-size-choice strong{font-size:.95rem}.wallviz-size-choice .wallviz-size-price{font-size:.78rem;color:#667085}.wallviz-size-choice .wallviz-size-warning{font-size:.72rem;color:#c56b00;font-weight:700}.wallviz-size-choice:hover{border-color:#98a2b3}.wallviz-size-choice.active{border-color:#182230;box-shadow:0 0 0 1px #182230;background:#f8fafc}.wallviz-size-actions{display:flex;gap:.75rem;align-items:center;justify-content:flex-end;min-height:48px}.wallviz-size-status{flex:1 1 auto;padding:.65rem .75rem;border-radius:9px;background:#f8fafc;color:#475467;font-size:.82rem}.wallviz-size-status[data-kind="error"]{background:#fef3f2;color:#b42318}.wallviz-size-status[data-kind="working"]{background:#eff8ff;color:#175cd3}.wallviz-apply-size{min-width:220px}.wallviz-scale-note{display:none}@media(max-width:900px){.wallviz{padding:.5rem}.wallviz-body{grid-template-columns:1fr}.wallviz-info{display:grid;grid-template-columns:1fr 1fr}.wallviz-product-card,.wallviz-scenes-block,.wallviz-custom{grid-column:1/-1}.wallviz-scenes{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:600px){.wallviz-scenes{grid-template-columns:1fr 1fr}.wallviz-sizes{grid-template-columns:1fr 1fr}.wallviz-size-actions{display:grid}.wallviz-apply-size{width:100%}}

/* WALL-VISUALIZER-07: scene state + responsive fit */
.wallviz-empty-scene[hidden],
.wallviz-custom[hidden],
.wallviz-calibration-tools[hidden],
.wallviz-sizes-block[hidden],
.wallviz-size-status[hidden],
.wallviz-apply-size[hidden]{display:none!important}

#wallvizSourceModal,
#wallvizQrModal{z-index:3400!important}

.wallviz-dialog{
  height:min(900px,96vh);
  max-height:96vh;
  overflow:hidden;
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
}
.wallviz-head{
  padding:1rem 1.25rem .9rem;
}
.wallviz-head h2{
  margin:.1rem 0;
  font-size:clamp(1.35rem,1.8vw,1.9rem);
}
.wallviz-head p{
  margin:.2rem 0 0;
  font-size:.92rem;
}
.wallviz-body{
  min-height:0;
  overflow:hidden;
  padding:1rem 1.2rem 1.15rem;
  gap:1rem;
}
.wallviz-main{
  min-height:0;
  grid-template-rows:minmax(0,1fr) auto;
  align-content:stretch;
}
.wallviz-scene-wrap{
  min-height:0;
  display:flex;
}
.wallviz-scene{
  width:100%;
  height:100%;
  min-height:260px;
  aspect-ratio:auto;
}
.wallviz-info{
  min-height:0;
  overflow:auto;
  padding-right:2px;
  gap:.75rem;
}
.wallviz-product-card{
  padding:10px 12px;
}
.wallviz-product-card-icon{
  width:46px;
  height:46px;
}
.wallviz-scenes{
  gap:.45rem;
}
.wallviz-scene-choice{
  gap:.25rem;
  padding:.28rem;
  font-size:.74rem;
}
.wallviz-scene-choice.custom{
  min-height:88px;
}
.wallviz-scene-upload-icon{
  width:38px;
  height:38px;
  font-size:1.4rem;
}
.wallviz-sizes-block{
  gap:.45rem;
  padding-top:.1rem;
}
.wallviz-sizes-head{
  gap:.08rem;
}
.wallviz-sizes-head>strong{
  font-size:.93rem;
}
.wallviz-sizes-head>small{
  font-size:.78rem;
}
.wallviz-sizes{
  grid-template-columns:repeat(auto-fit,minmax(120px,1fr));
  gap:.45rem;
}
.wallviz-size-choice{
  padding:.65rem .75rem;
}
.wallviz-size-choice strong{
  font-size:.88rem;
}
.wallviz-size-actions{
  min-height:40px;
}
.wallviz-apply-size{
  min-width:190px;
  padding:.62rem .8rem;
}

@media (max-height:820px) and (min-width:901px){
  .wallviz-dialog{height:98vh;max-height:98vh}
  .wallviz-head{padding:.7rem 1rem .6rem}
  .wallviz-head h2{font-size:1.35rem}
  .wallviz-head p{font-size:.82rem}
  .wallviz-body{padding:.75rem .9rem .85rem;gap:.8rem;grid-template-columns:minmax(0,1fr) 300px}
  .wallviz-product-card{grid-template-columns:48px 1fr;padding:8px 10px}
  .wallviz-product-card-icon{width:40px;height:40px}
  .wallviz-product-card strong{font-size:1rem}
  .wallviz-scenes{gap:.35rem}
  .wallviz-scene-choice{font-size:.68rem}
  .wallviz-scene-choice.custom{min-height:76px}
  .wallviz-sizes-head>strong{font-size:.85rem}
  .wallviz-sizes-head>small{font-size:.72rem}
  .wallviz-size-choice{padding:.5rem .6rem}
  .wallviz-size-choice strong{font-size:.8rem}
  .wallviz-size-choice .wallviz-size-price{font-size:.7rem}
  .wallviz-size-choice .wallviz-size-warning{font-size:.66rem}
}

@media(max-width:900px){
  .wallviz-dialog{height:auto;max-height:96vh;overflow:auto;display:block}
  .wallviz-body{overflow:visible}
  .wallviz-main{display:grid}
  .wallviz-scene{height:auto;aspect-ratio:3/2}
  .wallviz-info{overflow:visible}
}

/* WALL-VISUALIZER-08: tabs, product fidelity and custom-room workflow */
.wallviz-product img{object-fit:contain}
.wallviz-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:4px;border:1px solid #e4e7ec;border-radius:12px;background:#f8fafc}
.wallviz-tabs button{min-height:38px;border:0;border-radius:9px;background:transparent;color:#667085;font:inherit;font-weight:800;cursor:pointer}
.wallviz-tabs button.active{background:#fff;color:#263f58;box-shadow:0 2px 8px rgba(16,24,40,.08)}
.wallviz-tab-panel{display:none;min-height:0}
.wallviz-tab-panel.active{display:block}
.wallviz-custom{display:grid;gap:.8rem}
.wallviz-custom-head{display:flex;justify-content:space-between;gap:.6rem;align-items:center}
.wallviz-custom-head .wallviz-secondary{padding:.48rem .65rem;font-size:.78rem}
.wallviz-custom-empty{display:grid;gap:.65rem;padding:.8rem;border:1px dashed #d0d5dd;border-radius:10px;background:#fff}
.wallviz-custom-empty[hidden]{display:none!important}
.wallviz-custom-empty p{margin:0;color:#667085;font-size:.82rem;line-height:1.4}
.wallviz-size-actions-side{margin-top:auto;padding-top:.5rem;display:grid;gap:.5rem}
.wallviz-size-actions-side .wallviz-apply-size{width:100%;min-width:0}
.wallviz-info{display:flex;flex-direction:column}
.wallviz-scenes{grid-template-columns:1fr 1fr}
.wallviz-scene-thumb{background-size:cover;background-position:center}
.wallviz-product{overflow:visible}

@media(max-height:820px) and (min-width:901px){
  .wallviz-tabs button{min-height:32px;font-size:.78rem}
  .wallviz-custom{padding:.65rem}
  .wallviz-custom-empty{padding:.6rem}
}

/* WALL-VISUALIZER-09: custom room flow + regenerated room assets */
.wallviz-tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:.45rem;
  padding:.2rem;
  border:1px solid #e4e7ec;
  border-radius:14px;
  background:#f8fafc;
}
.wallviz-tab{
  border:0;
  background:transparent;
  border-radius:10px;
  padding:.78rem .85rem;
  font:inherit;
  font-weight:700;
  color:#475467;
  cursor:pointer;
}
.wallviz-tab.active{
  background:#fff;
  color:#182230;
  box-shadow:0 1px 2px rgba(16,24,40,.08),0 0 0 1px #e4e7ec inset;
}
.wallviz-empty-scene{
  z-index:2;
  padding:1rem;
}
.wallviz-empty-scene small{
  display:block;
  max-width:360px;
  margin:0 auto;
  line-height:1.4;
}
.wallviz-scene-image{
  object-position:center center;
}
.wallviz-placement-guide{
  display:none;
}
.wallviz-product{
  z-index:6;
}
.wallviz-calibration-layer{
  z-index:5;
}
.wallviz-scenes{
  grid-template-columns:1fr 1fr;
}
.wallviz-scene-choice{
  overflow:hidden;
}
.wallviz-scene-choice .wallviz-scene-thumb{
  aspect-ratio:4/3;
  background-position:center;
}
.wallviz-custom{
  gap:.85rem;
}
.wallviz-custom-actions-row{
  display:flex;
  gap:.55rem;
  flex-wrap:wrap;
  align-items:center;
}
.wallviz-custom-help{
  font-size:.84rem;
  color:#667085;
  line-height:1.45;
}
.wallviz-calibration-tools{
  margin-top:.1rem;
}
.wallviz-calibration-point{
  width:26px;
  height:26px;
}
.wallviz-size-actions{
  justify-content:space-between;
  align-items:flex-end;
}
.wallviz-size-status{
  min-height:42px;
}
.wallviz-apply-size{
  align-self:flex-end;
}
@media(min-width:901px){
  .wallviz-info{
    overflow:auto;
  }
}
@media(max-width:900px){
  .wallviz-tabs{
    grid-column:1/-1;
  }
  .wallviz-custom-actions-row{
    display:grid;
    grid-template-columns:1fr;
  }
}


/* WALL-VISUALIZER-10: tab-specific panel + side actions */
.wallviz-scenes-block[hidden],
.wallviz-custom[hidden],
.wallviz-side-actions[hidden]{display:none!important}

.wallviz-main{grid-template-rows:minmax(0,1fr) auto}
.wallviz-info{display:flex;flex-direction:column;min-height:0}
.wallviz-scenes-block,
.wallviz-custom{flex:0 0 auto}
.wallviz-side-actions{margin-top:auto;display:grid;gap:.55rem;padding-top:.25rem}
.wallviz-side-buttons{display:grid;grid-template-columns:1fr 1fr;gap:.55rem}
.wallviz-side-buttons .wallviz-secondary,
.wallviz-side-buttons .wallviz-primary{width:100%;min-width:0;padding:.8rem .9rem}
.wallviz-size-status{min-height:0}
.wallviz-sizes-block{gap:.55rem}
.wallviz-size-actions{display:none!important}

@media (max-width:900px){
  .wallviz-side-buttons{grid-template-columns:1fr}
}

/* Keep the dialog inside the padded viewport, including narrow phones. */
.wallviz{box-sizing:border-box;min-width:0}
.wallviz-dialog{box-sizing:border-box;width:100%;max-width:1460px;min-width:0}
.wallviz-body,.wallviz-head,.wallviz-scene-wrap,.wallviz-product-card>div{min-width:0}
.wallviz-close{flex-shrink:0}
@media(max-width:900px){
 .wallviz-dialog{max-height:calc(100dvh - 16px);overflow-x:hidden}
 .wallviz-head{padding:16px;gap:8px}
 .wallviz-body{grid-template-columns:minmax(0,1fr);padding:12px;gap:12px}
 .wallviz-product-card{grid-template-columns:48px minmax(0,1fr);padding:10px}
 .wallviz-product-card strong,.wallviz-head h2{overflow-wrap:anywhere}
}
