/* Modular Sofa Designer — storefront UI 0.5.0 */
.msd-panel{display:block;box-sizing:border-box;width:100%;max-width:100%;clear:both;margin:26px 0 20px;padding:22px;border:1px solid #e8e1d7;border-radius:14px;background:#fff;box-shadow:0 8px 26px rgba(47,38,28,.055);color:#302b26}
.msd-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:7px}
.msd-heading h3{margin:0;font-size:20px;line-height:1.3;font-weight:650;letter-spacing:-.02em;color:#302b26}
.msd-live{display:inline-flex;align-items:center;gap:7px;font-size:11px;font-weight:600;color:#64745c;white-space:nowrap}
.msd-live:before{content:"";width:7px;height:7px;border-radius:50%;background:#78936c;box-shadow:0 0 0 3px #edf3e9}
.msd-hint,.msd-status{font-size:12px;line-height:1.65;color:#817a72;margin:7px 0 15px}
.msd-canvas-wrap{width:100%;min-height:240px;background:#faf8f5;border:1px solid #e8dfd3;border-radius:10px;overflow:hidden}
.msd-canvas{display:block;width:100%;height:clamp(270px,34vw,450px);min-height:240px;touch-action:none}
.msd-module{cursor:pointer;user-select:none}
.msd-module-shape{fill:#e8ddcd;stroke:#62564a;stroke-width:1.15;vector-effect:non-scaling-stroke;stroke-linejoin:round}
.msd-module.is-selected .msd-module-shape{stroke:#9a7954;stroke-width:2.7}
.msd-module-label{fill:#3d3730;font-size:5px;text-anchor:middle;pointer-events:none;user-select:none}
.msd-module-size{fill:#71675b;font-size:3.7px;text-anchor:middle;pointer-events:none;user-select:none}
.msd-measures{display:flex;flex-wrap:wrap;gap:9px 22px;padding:14px 0 4px;font-size:13px;color:#4b443c}
.msd-measures strong{font-weight:650}
.msd-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:12px}
.msd-actions .button{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:7px 14px;border:1px solid #d8cfc3;border-radius:7px;background:#fff;color:#51483e;font-size:11px;font-weight:650;letter-spacing:.01em;box-shadow:none;transition:background .15s ease,border-color .15s ease,transform .15s ease}
.msd-actions .button:hover{background:#f5f0e9;border-color:#bca88e;color:#3d352c;transform:translateY(-1px)}
.msd-actions .msd-auto{background:#51483e;border-color:#51483e;color:#fff}
.msd-actions .msd-auto:hover{background:#3d352e;border-color:#3d352e;color:#fff}
.msd-status{margin:10px 0 0;color:#8a6841;min-height:0}
.msd-configurator-hidden{display:block!important}
.woosb-products.msd-bundle-collapsed{display:block!important}
.msd-start-configurator{display:none!important}
.msd-corner-shape{stroke-linejoin:round}
.msd-backrest{fill:#cfc2af;stroke:#62564a;stroke-width:.8;vector-effect:non-scaling-stroke;pointer-events:none}.msd-armrest{fill:#b9a78f;stroke:#62564a;stroke-width:1;vector-effect:non-scaling-stroke;pointer-events:none}
@media(max-width:768px){.msd-panel{padding:14px;margin:18px 0 14px;border-radius:11px}.msd-heading h3{font-size:18px}.msd-canvas{height:260px;min-height:220px}.msd-canvas-wrap{min-height:220px}.msd-actions{gap:7px}.msd-actions .button{flex:1 1 42%;font-size:10px;padding:7px 8px}.msd-measures{font-size:12px;gap:8px 14px}}

.msd-legend{display:flex;flex-wrap:wrap;gap:14px;margin:9px 2px 0;color:#71675b;font-size:11px}
.msd-legend span{display:inline-flex;align-items:center;gap:6px}
.msd-legend i{display:inline-block;width:19px;height:8px;border:1px solid #62564a;border-radius:2px}
.msd-legend-back{background:#cfc2af}
.msd-legend-arm{background:#b9a78f}

/* Match the active storefront typography and remove theme text shadows. */
.msd-panel,
.msd-panel *{
  font-family:inherit!important;
  text-shadow:none!important;
}
.msd-hint{
  font-size:13px;
  line-height:1.55;
  font-weight:400;
  color:#817a72;
  margin:7px 0 15px;
}
.msd-actions .button,
.msd-actions .button:hover,
.msd-actions .button:focus{
  text-shadow:none!important;
  box-shadow:none!important;
}


/* Upholstered top-down 3D drawing layer */
.msd-module-shadow{fill:#b8aa98;stroke:#65584b;stroke-width:1.2;vector-effect:non-scaling-stroke;opacity:.72;transform:translate(1.5px,2px)}
.msd-module-shape{fill:#d8c9b5;stroke:#66594c;stroke-width:1.1;vector-effect:non-scaling-stroke;stroke-linejoin:round}
.msd-seat-cushion{fill:url(#msd-fabric);stroke:#b8a894;stroke-width:.85;vector-effect:non-scaling-stroke}
.msd-seat-seam{fill:none;stroke:#c8b9a6;stroke-width:.55;vector-effect:non-scaling-stroke;opacity:.8}
.msd-back-cushion{fill:url(#msd-back-fabric);stroke:#b6a690;stroke-width:.8;vector-effect:non-scaling-stroke}
.msd-cushion-seam{fill:none;stroke:#b9a995;stroke-width:.65;vector-effect:non-scaling-stroke;opacity:.8}
.msd-armrest{fill:#c8b59e;stroke:#9e8b75;stroke-width:.9;vector-effect:non-scaling-stroke}
.msd-foot{fill:#51483e;stroke:#3e362e;stroke-width:.45;vector-effect:non-scaling-stroke}

/* v0.7.0: Three.js true 3D modular sofa viewer */
.msd-canvas-wrap{position:relative;min-height:380px;background:radial-gradient(ellipse at 50% 35%,#f7f4ef 0%,#e8e1d7 75%,#dbd1c5 100%);border:1px solid #ddd2c5;border-radius:11px;overflow:hidden}
.msd-canvas{width:100%;height:clamp(360px,42vw,560px);min-height:340px;position:relative;touch-action:none!important;overflow:hidden}
.msd-canvas canvas{display:block;width:100%;height:100%;touch-action:none!important;cursor:grab;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.msd-canvas canvas:active{cursor:grabbing}
.msd-3d-loading,.msd-3d-error{position:absolute;inset:0;display:grid;place-items:center;padding:24px;color:#6e6255;font-size:13px;text-align:center}
.msd-3d-error{color:#8a4f3b}
.msd-3d-tip{margin-left:auto;color:#8a8176}
.msd-panel .msd-legend{align-items:center}
.msd-panel .msd-legend-back{background:#bcae9d}
.msd-panel .msd-legend-arm{background:#c7b7a5}
@media(max-width:768px){
 .msd-canvas-wrap{min-height:300px}
 .msd-canvas{height:clamp(300px,72vw,430px);min-height:290px}
 .msd-3d-tip{width:100%;margin-left:0}
}


/* v0.8.1 — high-contrast selected-module feedback */
.msd-canvas-wrap{position:relative}
.msd-selected-badge{
  position:absolute;z-index:12;top:13px;left:13px;max-width:min(75%,520px);
  padding:9px 13px;border:1px solid #a94710;border-radius:7px;
  background:#c95b19;color:#fff;font-size:11px;line-height:1.35;
  font-weight:750;letter-spacing:.045em;text-transform:uppercase;
  box-shadow:0 3px 12px rgba(76,39,17,.28);pointer-events:none;
}
.msd-selected-badge:before{
  content:"";display:inline-block;width:8px;height:8px;margin:0 8px 0 0;
  border-radius:50%;background:#fff;box-shadow:0 0 0 3px rgba(255,255,255,.2);
  vertical-align:1px;
}
.msd-selected-badge.is-empty{background:rgba(57,50,43,.82);border-color:rgba(255,255,255,.22);font-weight:600;text-transform:none}
@media(max-width:520px){.msd-selected-badge{top:8px;left:8px;max-width:88%;padding:7px 9px;font-size:9px}}


/* v0.8.2 — mobile 3D panel is positioned directly after the bundle total. */
@media(max-width:768px){.msd-panel.msd-mobile-after-total{clear:both;width:100%;max-width:100%;margin:18px 0 16px;}}
