/* DF_MAGNET_RECT_EDITOR_V2 */
.dfmr{display:none}
.dfmr h2{margin:0 0 5px;font-size:25px}
.dfmr-note{margin:0 0 20px!important;color:#667085}
.dfmr-layout{
  display:flex;
  justify-content:center;
  align-items:flex-start;
  gap:28px;
  flex-wrap:wrap;
}
/* DF_MAGNET_RECT_CROSS_WRAPPER_V1 */
.dfmr-photo-box{
  width:310px;
  max-width:100%;
  position:relative;
  overflow:visible;
}
.dfmr-photo-box .dfmr-frame{
  width:100%;
  box-sizing:border-box;
}

.dfmr-frame{
  width:310px;
  aspect-ratio:3/2;
  position:relative;
  overflow:hidden;
  border:1px solid #d0d5dd;
  background:#f7f8fa;
}
.dfmr-frame img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  display:none;
}
.dfmr.has-photo .dfmr-frame img{display:block}
.dfmr-empty{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#667085;
}
.dfmr.has-photo .dfmr-empty{display:none}
.dfmr-side{width:220px;text-align:left}
.dfmr-btn{
  width:100%;
  border:0;
  background:#e31b23;
  color:#fff;
  padding:12px;
  font-weight:700;
  cursor:pointer;
}
.dfmr-file{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  opacity:0!important;
}
.dfmr-field{margin-top:14px}
.dfmr-field label{
  display:block;
  margin-bottom:5px;
  color:#667085;
  font-size:13px;
}
.dfmr-field select,.dfmr-field input{
  width:100%;
  height:38px;
  border:1px solid #d0d5dd;
  background:#fff;
  padding:0 9px;
  box-sizing:border-box;
}
.dfmr-price{
  margin-top:16px;
  color:#e31b23;
  font-size:22px;
  font-weight:800;
}

/* DF_MAGNET_RECT_DELETE_V2 */
.dfmr-del{
  display:none;
  position:absolute;
  top:-12px;
  right:-12px;
  width:26px;
  height:26px;
  padding:0;
  border:2px solid #fff;
  border-radius:50%;
  background:rgba(255,68,68,.92);
  color:#fff;
  z-index:30;
  align-items:center;
  justify-content:center;
  font-size:18px;
  font-weight:400;
  line-height:1;
  cursor:pointer;
  box-shadow:0 2px 6px rgba(0,0,0,.3);
}
.dfmr.has-photo .dfmr-del{display:flex}
.dfmr-del:hover{background:rgba(200,30,30,1);transform:scale(1.12)}

/* DF_MAGNET_ADD_PHOTO_STYLE_V1 */
.dfmr-btn{
  width:100%!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:#172033!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  gap:7px!important;
  font-weight:700!important;
}
.dfmr-btn:before{
  content:"+";
  display:flex;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  border-radius:50%;
  background:#e31b23;
  color:#fff;
  font-size:25px;
  line-height:1;
  font-weight:400;
}

/* DF MAGNETS: hide paper selector on rectangular magnets */
.dfmr label:has(.dfmr-paper-select),
.dfmr .dfmr-paper-select{
  display:none!important;
}


/* =========================================================
   DF RECT MAGNETS — UNIFIED DESIGN V1
   Только внешний вид Acrylic / 10x15 / 15x21 / 21x30
   ========================================================= */

body.df-magnets-v2-open #dfMagnetsV2 .dfmr{
  width:min(100%,920px);
  margin:18px auto 28px!important;
  padding:24px!important;
  box-sizing:border-box;
  background:#fff;
  border:1px solid #e4e7ec;
  border-radius:18px;
  box-shadow:0 10px 32px rgba(16,24,40,.08);
}

body.df-magnets-v2-open #dfMagnetsV2 .dfmr h2{
  margin:0 0 4px!important;
  text-align:center;
  font-size:24px!important;
  line-height:1.2;
  font-weight:800;
  color:#101828;
}

body.df-magnets-v2-open #dfMagnetsV2 .dfmr-note{
  margin:0 0 22px!important;
  text-align:center;
  font-size:14px;
  line-height:1.45;
  color:#667085;
}

body.df-magnets-v2-open #dfMagnetsV2 .dfmr-layout{
  display:grid!important;
  grid-template-columns:minmax(0,470px) minmax(230px,280px)!important;
  justify-content:center!important;
  align-items:start!important;
  gap:30px!important;
}

body.df-magnets-v2-open #dfMagnetsV2 .dfmr-photo-box{
  width:100%!important;
  max-width:470px!important;
  margin:0 auto!important;
}

body.df-magnets-v2-open #dfMagnetsV2 .dfmr-frame{
  width:100%!important;
  max-width:none!important;
  border:1px solid #d0d5dd!important;
  border-radius:14px!important;
  background:#f7f8fa!important;
  box-shadow:
    0 1px 2px rgba(16,24,40,.04),
    0 8px 24px rgba(16,24,40,.07)!important;
}

body.df-magnets-v2-open #dfMagnetsV2 .dfmr-frame img{
  border-radius:13px;
}

body.df-magnets-v2-open #dfMagnetsV2 .dfmr-empty{
  padding:24px;
  box-sizing:border-box;
  text-align:center;
  font-size:14px;
  line-height:1.45;
  color:#667085;
}

body.df-magnets-v2-open #dfMagnetsV2 .dfmr-side{
  width:100%!important;
  max-width:280px!important;
  padding:18px!important;
  box-sizing:border-box;
  background:#f8fafc;
  border:1px solid #e4e7ec;
  border-radius:14px;
  text-align:left!important;
}

body.df-magnets-v2-open #dfMagnetsV2 .dfmr-btn{
  min-height:46px;
  padding:12px 16px!important;
  border:0!important;
  border-radius:10px!important;
  background:#e31b23!important;
  color:#fff!important;
  font-size:14px!important;
  line-height:1.25;
  font-weight:800!important;
  cursor:pointer;
  box-shadow:0 4px 12px rgba(227,27,35,.18);
  transition:transform .15s ease,box-shadow .15s ease,background .15s ease;
}

body.df-magnets-v2-open #dfMagnetsV2 .dfmr-btn:hover{
  background:#c9151c!important;
  transform:translateY(-1px);
  box-shadow:0 6px 16px rgba(227,27,35,.23);
}

body.df-magnets-v2-open #dfMagnetsV2 .dfmr-field{
  margin-top:14px!important;
}

body.df-magnets-v2-open #dfMagnetsV2 .dfmr-field label{
  margin-bottom:6px!important;
  color:#475467!important;
  font-size:12px!important;
  line-height:1.3;
  font-weight:700;
}

body.df-magnets-v2-open #dfMagnetsV2 .dfmr-field select,
body.df-magnets-v2-open #dfMagnetsV2 .dfmr-field input{
  width:100%!important;
  height:42px!important;
  padding:0 11px!important;
  box-sizing:border-box;
  border:1px solid #d0d5dd!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#101828;
  font-size:14px;
  outline:none;
}

body.df-magnets-v2-open #dfMagnetsV2 .dfmr-field select:focus,
body.df-magnets-v2-open #dfMagnetsV2 .dfmr-field input:focus{
  border-color:#98a2b3!important;
  box-shadow:0 0 0 3px rgba(152,162,179,.13);
}

body.df-magnets-v2-open #dfMagnetsV2 .dfmr-price{
  margin-top:18px!important;
  padding-top:15px;
  border-top:1px solid #e4e7ec;
  color:#e31b23!important;
  font-size:24px!important;
  line-height:1.1;
  font-weight:900!important;
}

/* выбор поверхности в этих магнитах пользователю не показываем */
body.df-magnets-v2-open #dfMagnetsV2 .dfmr label:has(.dfmr-paper-select),
body.df-magnets-v2-open #dfMagnetsV2 .dfmr .dfmr-paper-select{
  display:none!important;
}

/* мобильный / узкий экран */
@media (max-width:760px){
  body.df-magnets-v2-open #dfMagnetsV2 .dfmr{
    width:100%!important;
    margin:12px auto 22px!important;
    padding:16px!important;
    border-radius:14px!important;
  }

  body.df-magnets-v2-open #dfMagnetsV2 .dfmr-layout{
    grid-template-columns:1fr!important;
    gap:18px!important;
  }

  body.df-magnets-v2-open #dfMagnetsV2 .dfmr-photo-box{
    width:100%!important;
    max-width:520px!important;
  }

  body.df-magnets-v2-open #dfMagnetsV2 .dfmr-side{
    width:100%!important;
    max-width:none!important;
    padding:14px!important;
  }

  body.df-magnets-v2-open #dfMagnetsV2 .dfmr h2{
    font-size:21px!important;
  }
}

/* очень узкие телефоны */
@media (max-width:430px){
  body.df-magnets-v2-open #dfMagnetsV2 .dfmr{
    padding:12px!important;
  }

  body.df-magnets-v2-open #dfMagnetsV2 .dfmr-side{
    padding:12px!important;
  }

  body.df-magnets-v2-open #dfMagnetsV2 .dfmr-btn{
    min-height:44px;
  }
}


/* DF RECT MAGNETS: keep paper DOM for JS, hide whole row visually */
.dfmr .dfmr-field.dfmr-paper{
  display:none!important;
}

