/* Page layout: give the designer the full width of the product page */
.msm-product .woocommerce-product-gallery,.msm-product div.images{width:100%!important;max-width:100%!important;float:none!important}
.msm-product .summary,.msm-product .entry-summary{width:100%!important;max-width:100%!important;float:none!important}
.msm-product.msm-no-gallery .woocommerce-product-gallery,.msm-product.msm-no-gallery div.images{display:none!important}
/* Designer */
.msm-wrap{margin:0 0 22px;padding:18px;border:1px solid #ece7f4;border-radius:14px;background:#fff;color:#141218}
.msm-title{margin:0 0 14px;font-size:20px;color:#4c1d95}
.msm-layout{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:22px;align-items:start}
.msm-left{position:sticky;top:96px;min-width:0}
.msm-right{min-width:0}
.msm-canvas{position:relative;border-radius:12px;overflow:hidden;background:#f3eefb;min-height:280px;line-height:0}
.msm-canvas canvas{display:block;max-width:100%;cursor:grab;touch-action:none}
.msm-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:14px;color:#5c5668;line-height:1.4;pointer-events:none}
.msm-hint,.msm-dims,.msm-note{font-size:13px;color:#5c5668;margin:8px 0}
.msm-dims{font-weight:600;color:#141218}
.msm-help{font-size:13px;color:#5c5668;margin:0 0 10px}
.msm-tabs{display:flex;gap:6px;margin:0 0 14px;padding:4px;background:#f3eefb;border-radius:12px}
.msm-tab{flex:1;border:0;background:transparent;padding:10px 8px;border-radius:9px;font-size:15px;font-weight:600;color:#5c5668;cursor:pointer}
.msm-tab.is-on{background:#fff;color:#4c1d95;box-shadow:0 1px 4px #4c1d9526}
.msm-panel[hidden]{display:none}
.msm-group{margin:0 0 14px}
.msm-label{display:block;font-weight:600;font-size:14px;margin-bottom:6px}
.msm-input{width:100%;box-sizing:border-box;padding:10px 12px;border:1px solid #d9d2e6;border-radius:10px;font-size:16px;background:#fff}
.msm-initial{text-transform:uppercase;font-weight:700;text-align:center}
.msm-sizes{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.msm-size{display:block;border:1px solid #d9d2e6;border-radius:10px;padding:10px;cursor:pointer;text-align:center;position:relative}
.msm-size input{position:absolute;opacity:0}
.msm-size:has(input:checked){border-color:#7c3aed;background:#f3e8ff;box-shadow:0 0 0 2px #7c3aed33}
.msm-size-name{display:block;font-weight:700}
.msm-size-meta{display:block;font-size:12px;color:#5c5668;margin-top:2px}
.msm-swatches{display:flex;flex-wrap:wrap;gap:8px}
.msm-swatch{width:30px;height:30px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px #c9c1d8;cursor:pointer;padding:0}
.msm-swatch.is-on{box-shadow:0 0 0 3px #7c3aed}
.msm-colour-name{font-weight:400;color:#5c5668}
/* Compact sliders (about 40% smaller than before) */
.msm-sliders{margin:0 0 8px}
.msm-slider{margin:0 0 6px!important}
.msm-slider-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 1px}
.msm-slider-head .msm-label{margin:0;font-size:12px!important;line-height:1.2!important}
.msm-numwrap{display:inline-flex;align-items:center;gap:3px;background:#f3eefb;border-radius:6px;padding:0 6px;height:22px}
.msm-numwrap .msm-num{width:38px!important;height:20px!important;min-height:0!important;margin:0!important;border:0!important;box-shadow:none!important;background:transparent!important;text-align:right;font-size:12px!important;line-height:20px!important;font-weight:600;color:#141218;padding:0!important;-moz-appearance:textfield}
.msm-num::-webkit-outer-spin-button,.msm-num::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.msm-unit{font-size:11px;color:#5c5668}
.msm-range{-webkit-appearance:none;appearance:none;display:block;width:100%;height:14px!important;margin:0!important;padding:0!important;background:transparent!important;box-shadow:none!important;border:0!important;accent-color:#7c3aed}
.msm-range::-webkit-slider-runnable-track{height:3px;border-radius:2px;background:#d9d2e6;box-shadow:none}
.msm-range::-moz-range-track{height:3px;border-radius:2px;background:#d9d2e6}
.msm-range::-webkit-slider-thumb{-webkit-appearance:none;width:12px;height:12px;margin-top:-4.5px;border-radius:50%;background:#7c3aed;border:0;box-shadow:none}
.msm-range::-moz-range-thumb{width:12px;height:12px;border-radius:50%;background:#7c3aed;border:0}
.msm-sizeblock{margin-top:12px}
.msm-sizeblock .msm-sizes{margin-bottom:4px}
.msm-product .price:empty{display:none}
.msm-reset{display:inline-flex;align-items:center;gap:6px;margin:2px 0 6px;padding:9px 16px;border:1px solid #d9d2e6;border-radius:10px;background:#fff;font-size:14px;font-weight:600;color:#4c1d95;cursor:pointer}
.msm-reset:hover{background:#f3e8ff}
.msm-price{font-size:22px;font-weight:700;margin:14px 0 6px;color:#141218;text-align:center}
.msm-left .msm-note{text-align:center;margin:10px 0 0}
.msm-fontrow{display:block}
@media (min-width:521px){.msm-fontrow{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:center}.msm-fontrow .msm-group{margin:0}.msm-fontrow .msm-slider{margin:0!important}}
.msm-msg{color:#b42318;font-size:14px;min-height:0;margin:6px 0}
@media (max-width:900px){.msm-layout{grid-template-columns:1fr}.msm-left{position:static}}
@media (max-width:520px){.msm-wrap{padding:14px}.msm-sizes{gap:6px}.msm-size{padding:9px 4px}.msm-size-name{font-size:14px}.msm-size-meta{font-size:11px;line-height:1.3}}
/* Stamp maker additions */
.msm-card{border:1px solid #ece7f4;border-radius:12px;padding:10px 12px 6px;margin:0 0 10px;background:#fcfaff}
.msm-card .msm-group{margin-bottom:8px}
.msm-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.msm-impress{position:absolute;top:10px;left:10px;z-index:2;width:34%;max-width:150px;min-width:96px;padding:5px;background:rgba(255,253,248,.94);border:1px solid #ece7f4;border-radius:10px;box-shadow:0 2px 8px rgba(20,18,24,.12);pointer-events:none;line-height:1.2}
.msm-canvas .msm-impress canvas{display:block;width:100%;height:auto;max-width:100%;cursor:default;border-radius:6px;background:#fffdf8}
.msm-sub{font-size:10px;font-weight:700;color:#4c1d95;text-transform:uppercase;letter-spacing:.04em;margin:0 0 4px}
@media (max-width:520px){.msm-row{grid-template-columns:1fr}}

/* Phones and tablets: bigger touch targets, and no zoom-on-focus on iOS */
@media (pointer:coarse){
.msm-tab{min-height:46px;padding:12px 8px}
.msm-input{min-height:46px}
.msm-size{min-height:58px}
.msm-swatches{gap:10px}
.msm-swatch{width:38px;height:38px}
.msm-slider{margin:0 0 10px!important}
.msm-slider-head{margin:0 0 4px}
.msm-slider-head .msm-label{font-size:13px!important}
.msm-numwrap{height:34px;padding:0 10px;border-radius:8px}
.msm-numwrap .msm-num{width:48px!important;height:30px!important;line-height:30px!important;font-size:16px!important}
.msm-unit{font-size:13px}
.msm-range{height:34px!important}
.msm-range::-webkit-slider-runnable-track{height:4px}
.msm-range::-webkit-slider-thumb{width:28px;height:28px;margin-top:-12px;box-shadow:0 1px 5px #4c1d9559}
.msm-range::-moz-range-track{height:4px}
.msm-range::-moz-range-thumb{width:28px;height:28px}
.msm-reset{min-height:46px}
}

/* Zoom buttons on the 3D preview */
.msm-zoom{position:absolute;left:10px;bottom:10px;z-index:3;display:flex;flex-direction:column;gap:6px}
.msm-zoom-btn{width:40px;height:40px;border:1px solid #d9d2e6;border-radius:10px;background:rgba(255,255,255,.94);color:#4c1d95;font-size:22px;font-weight:700;line-height:1;cursor:pointer;box-shadow:0 2px 8px rgba(20,18,24,.12);padding:0}
.msm-zoom-btn:active{background:#f3e8ff}