/* DK Product Designer – Generic / multiview mode
 * Loaded ONLY on products with _dkpd_generic_enabled = yes.
 * Legacy designer assets are intentionally untouched.
 */

#dkpd-generic-modal{
  position:fixed;
  inset:0;
  z-index:100000;
  display:none;
  font-family:inherit;
}
#dkpd-generic-modal.open{display:block;}
#dkpd-generic-modal .dkpdg-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.62);
}
#dkpd-generic-modal .dkpdg-dialog{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  display:flex;
  flex-direction:column;
  width:calc(100vw - 8px);
  height:calc(100vh - 8px);
  max-width:1700px;
  max-height:1100px;
  margin:0;
  background:#fff;
  border-radius:6px;
  overflow:hidden;
  box-shadow:0 18px 60px rgba(0,0,0,.34);
}

.dkpdg-upload-loading{
  display:none;
  position:absolute;
  inset:0;
  z-index:500;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(255,255,255,.72);
  backdrop-filter:blur(1px);
}
.dkpdg-upload-loading.is-open{display:flex;}
.dkpdg-upload-loading-box{
  min-width:240px;
  max-width:calc(100vw - 40px);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:22px 26px 20px;
  border:1px solid #dedede;
  border-radius:7px;
  background:#fff;
  box-shadow:0 14px 45px rgba(0,0,0,.20);
  color:#333;
  text-align:center;
  font-size:13px;
  line-height:1.35;
}
.dkpdg-upload-loading-box strong{
  font-size:16px;
  line-height:1.1;
  color:#222;
}
.dkpdg-upload-spinner{
  width:30px;
  height:30px;
  margin-bottom:4px;
  border:3px solid #e6e6e6;
  border-top-color:#ff7317;
  border-radius:50%;
  animation:dkpdg-spin .75s linear infinite;
}
.dkpdg-upload-btn.is-loading{pointer-events:none;opacity:.6;}
@keyframes dkpdg-spin{to{transform:rotate(360deg)}}

 .dkpdg-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  height:46px;
  min-height:46px;
  max-height:46px;
  padding:4px 12px;
  border-bottom:1px solid #e8e8e8;
  background:#fff;
  flex:0 0 46px;
}
.dkpdg-title-wrap{
  min-width:0;
  display:flex;
  align-items:baseline;
  gap:10px;
  white-space:nowrap;
  overflow:hidden;
}
.dkpdg-title{
  margin:0!important;
  font-size:18px;
  line-height:1;
  font-weight:800;
  color:#111;
  white-space:nowrap;
  flex:0 0 auto;
}
.dkpdg-subtitle{
  display:block;
  margin:0;
  font-size:11px;
  line-height:1.2;
  color:#777;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.dkpdg-close{
  flex:0 0 auto;
  width:30px;
  height:30px;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#111;
  font-size:28px;
  font-weight:700;
  line-height:1;
  padding:0!important;
  cursor:pointer;
}
.dkpdg-tabs{
  display:flex;
  gap:6px;
  padding:9px 12px;
  overflow-x:auto;
  overflow-y:hidden;
  border-bottom:1px solid #e8e8e8;
  background:#fafafa;
  flex:0 0 auto;
  -webkit-overflow-scrolling:touch;
}
.dkpdg-tab{
  flex:0 0 auto;
  border:1px solid #cfcfcf;
  background:#fff;
  color:#222;
  border-radius:7px;
  padding:7px 11px;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  white-space:nowrap;
}
.dkpdg-tab.is-active{
  background:#2f3438;
  border-color:#2f3438;
  color:#fff;
}
.dkpdg-tab.is-used::after{
  content:'•';
  margin-left:5px;
  color:#ff7317;
  font-size:15px;
  line-height:0;
}
.dkpdg-tab.is-active.is-used::after{color:#fff;}
 .dkpdg-main{
  flex:1 1 auto;
  min-height:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) 290px;
  overflow:hidden;
}
.dkpdg-workspace{
  min-width:0;
  min-height:0;
  overflow:hidden;
  padding:3px 4px;
  background:#f1f2f3;
  display:flex;
  align-items:flex-start;
  justify-content:center;
}
.dkpdg-view{display:none;width:100%;}
.dkpdg-view.is-active{display:block;}
.dkpdg-view-label{
  display:none;
}
.dkpdg-canvas-shell{
  position:relative;
  margin:0 auto;
  width:max-content;
  max-width:100%;
  background:#fff;
  box-shadow:0 4px 18px rgba(0,0,0,.12);
  overflow:hidden;
}
.dkpdg-canvas-shell .canvas-container{max-width:100%;}
.dkpdg-canvas-shell canvas{display:block;}
.dkpdg-empty-bg{
  position:absolute;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  color:#aaa;
  font-size:12px;
  pointer-events:none;
  z-index:0;
}
.dkpdg-empty-bg.is-visible{display:flex;}
.dkpdg-sidebar{
  min-height:0;
  overflow-y:auto;
  padding:14px;
  border-left:1px solid #e6e6e6;
  background:#fff;
  -webkit-overflow-scrolling:touch;
}
.dkpdg-section{
  padding-bottom:13px;
  margin-bottom:13px;
  border-bottom:1px solid #ececec;
}
.dkpdg-section:last-child{border-bottom:0;margin-bottom:0;}
.dkpdg-section-title{
  margin:0 0 8px;
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.02em;
  color:#333;
}
.dkpdg-file-input{display:none!important;}
.dkpdg-upload-btn,
.dkpdg-control-btn,
.dkpdg-zoom-btn,
.dkpdg-save-btn,
.dkpdg-cart-btn{
  border:1px solid #cfcfcf;
  background:#fff;
  color:#111;
  min-height:38px;
  padding:8px 11px;
  border-radius:6px;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  box-sizing:border-box;
}
.dkpdg-upload-btn{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  border-color:#222;
}
.dkpdg-control-row{
  display:flex;
  align-items:center;
  gap:7px;
  margin:7px 0;
}
.dkpdg-control-row > label{
  flex:0 0 86px;
  font-size:11px;
  color:#555;
}
.dkpdg-control-row select,
.dkpdg-control-row input[type="range"],
.dkpdg-control-row input[type="color"]{
  flex:1 1 auto;
  min-width:0;
}
.dkpdg-control-row select{
  min-height:34px;
  border:1px solid #d4d4d4;
  border-radius:5px;
  background:#fff;
  padding:4px 7px;
}
.dkpdg-control-row input[type="color"]{
  max-width:70px;
  height:34px;
  padding:1px;
  border:1px solid #d4d4d4;
  background:#fff;
}
.dkpdg-text-main-actions{
  flex-wrap:nowrap;
}
.dkpdg-text-main-actions #dkpdg-add-text{
  flex:1 1 auto;
}
.dkpdg-text-main-actions #dkpdg-bold{
  flex:0 0 auto;
  min-width:76px;
}
.dkpdg-stroke-width-row input[type="range"]{
  accent-color:#27c4bd;
}
.dkpdg-range-value{
  flex:0 0 34px;
  min-width:34px;
  text-align:right;
  font-size:11px;
  color:#555;
  font-variant-numeric:tabular-nums;
}
.dkpdg-inline-buttons{display:flex;gap:6px;flex-wrap:wrap;}
.dkpdg-control-btn.is-active{
  border-color:#2f3438;
  background:#2f3438;
  color:#fff;
}
.dkpdg-delete-btn{
  border-color:#b32d2e;
  color:#b32d2e;
}
.dkpdg-crop-block{
  display:grid;
  grid-template-columns:1fr;
  gap:6px;
  margin:9px 0 7px;
}
.dkpdg-crop-block .dkpdg-control-btn{
  width:100%;
  min-height:36px;
}
.dkpdg-crop-start{
  border-color:#66778c;
  color:#33465b;
}
.dkpdg-crop-action{
  border-color:#ff7317;
  color:#c94f00;
}
.dkpdg-crop-action[hidden]{display:none!important;}
.dkpdg-copy-block{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  margin:5px 0 2px;
}
.dkpdg-copy-block .dkpdg-control-btn{
  width:100%;
  min-width:0;
  min-height:36px;
  padding-left:7px;
  padding-right:7px;
  font-size:10px;
}
.dkpdg-copy-btn{border-color:#66778c;color:#33465b;}
.dkpdg-paste-btn{border-color:#2f3438;color:#222;}
.dkpdg-copy-block .dkpdg-control-btn:disabled{
  opacity:.42;
  cursor:not-allowed;
}
.dkpdg-view-controls{
  display:grid;
  grid-template-columns:minmax(0,1fr) 90px;
  align-items:end;
  gap:10px;
  width:100%;
}
.dkpdg-view-control{min-width:0;}
.dkpdg-view-zoom{min-width:0;}
.dkpdg-view-rotation{min-width:0;}
.dkpdg-view-control-label{
  display:block;
  margin:0 0 5px;
  font-size:10px;
  line-height:1.1;
  font-weight:700;
  color:#555;
}
.dkpdg-zoom-row{
  display:grid;
  grid-template-columns:38px minmax(58px,1fr) 38px;
  align-items:center;
  gap:5px;
  width:100%;
}
.dkpdg-zoom-row .dkpdg-zoom-btn{
  width:100%;
  min-width:0;
  height:38px;
  min-height:38px;
  padding:0 4px;
  white-space:nowrap;
}
#dkpdg-zoom-reset{font-size:11px;}
.dkpdg-rotation-wrap{
  display:flex;
  align-items:center;
  height:38px;
  border:1px solid #cfcfcf;
  border-radius:6px;
  background:#fff;
  overflow:hidden;
}
.dkpdg-rotation-wrap input{
  width:60px!important;
  min-width:0!important;
  height:36px!important;
  margin:0!important;
  padding:5px 3px 5px 8px!important;
  border:0!important;
  box-shadow:none!important;
  background:transparent!important;
  font-size:12px!important;
  font-weight:700;
  text-align:right;
}
.dkpdg-rotation-wrap input:focus{outline:0!important;box-shadow:none!important;}
.dkpdg-rotation-wrap input:disabled{opacity:.45;cursor:not-allowed;}
.dkpdg-rotation-wrap span{
  flex:0 0 auto;
  padding:0 7px 0 1px;
  font-size:13px;
  font-weight:700;
  color:#444;
}
.dkpdg-status{
  min-height:18px;
  margin-top:10px;
  font-size:12px;
  line-height:1.35;
}
.dkpdg-status.ok{color:#16803a;font-weight:700;}
.dkpdg-status.error{color:#b32d2e;font-weight:700;}
 .dkpdg-footer-actions{
  display:grid;
  grid-template-columns:minmax(160px,230px) repeat(3,minmax(160px,230px));
  align-items:stretch;
  justify-content:center;
  gap:10px;
  padding:9px 12px;
  border-top:1px solid #e5e5e5;
  background:#fff;
  flex:0 0 auto;
}
.dkpdg-footer-price{
  min-width:0;
  min-height:42px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:5px 10px;
  border:1px solid #e0e0e0;
  border-radius:5px;
  background:#fafafa;
  box-sizing:border-box;
  line-height:1.15;
}
.dkpdg-footer-price span{
  display:block;
  margin-bottom:3px;
  font-size:9px;
  font-weight:700;
  color:#777;
  letter-spacing:.02em;
}
.dkpdg-footer-price strong{
  display:block;
  font-size:12px;
  color:#222;
  font-weight:800;
  white-space:nowrap;
}
.dkpdg-footer-actions button{
  width:100%;
  min-width:0;
  min-height:42px;
  margin:0!important;
  padding:8px 16px;
  border-radius:5px;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}
.dkpdg-cancel-btn{background:#fff;border:1px solid #555;color:#333;}
.dkpdg-save-btn{background:#f36b21;border:1px solid #f36b21;color:#fff;}
.dkpdg-cart-btn{background:#2f3438;border:1px solid #2f3438;color:#fff;}
.dkpdg-save-btn:disabled,
.dkpdg-cart-btn:disabled,
.dkpdg-upload-btn:disabled{
  opacity:.55;
  cursor:not-allowed;
}

/* Product-page button: only rendered for generic-enabled products. */
.dkpdg-open-wrap{
  display:inline-flex;
  align-items:center;
  margin-left:8px;
  vertical-align:middle;
}
.dkpdg-open-button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:42px!important;
  padding:0 20px!important;
  margin:0!important;
  background:#2f3438!important;
  border-color:#2f3438!important;
  color:#fff!important;
  font-weight:700!important;
  box-shadow:none!important;
}
.dkpdg-open-button:hover{
  background:#1f2327!important;
  border-color:#1f2327!important;
  color:#fff!important;
}

/* Generic product-page action row. It exists only on products where the new multiview designer is enabled. */
.dkpdg-cart-actions-row{
  display:flex!important;
  align-items:center!important;
  flex-wrap:nowrap!important;
  gap:10px!important;
  width:100%!important;
}
.dkpdg-cart-actions-row .quantity,
.dkpdg-cart-actions-row .single_add_to_cart_button,
.dkpdg-cart-actions-row .dkpdg-open-wrap{
  flex:0 0 auto!important;
  margin:0!important;
  width:auto!important;
  clear:none!important;
}
.dkpdg-cart-actions-row .single_add_to_cart_button,
.dkpdg-cart-actions-row .dkpdg-open-button{
  height:42px!important;
  min-height:42px!important;
  max-height:42px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  line-height:1!important;
}
.dkpdg-superseded-upload{display:none!important;}

/* Popup used after save and after successful add-to-cart. */
.dkpdg-notice-layer{
  position:fixed;
  inset:0;
  z-index:100120;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(0,0,0,.45);
}
.dkpdg-notice-box{
  width:min(520px,calc(100vw - 30px));
  background:#fff;
  border-radius:7px;
  box-shadow:0 18px 60px rgba(0,0,0,.35);
  padding:26px 24px 22px;
  text-align:center;
}
.dkpdg-notice-text{font-size:16px;line-height:1.55;font-weight:600;color:#444;margin:0 0 18px;}
.dkpdg-notice-ok{min-width:140px;min-height:42px;background:#f36b21;border:1px solid #f36b21;color:#fff;font-weight:800;cursor:pointer;}

html.dkpdg-lock,
body.dkpdg-lock{overflow:hidden!important;}

@media(max-width:820px){
  #dkpd-generic-modal .dkpdg-dialog{
    position:fixed;
    left:0;top:0;transform:none;
    width:100vw;
    height:100dvh;
    max-width:none;
    max-height:none;
    margin:0;
    border-radius:0;
  }
  .dkpdg-header{height:46px;min-height:46px;max-height:46px;padding:4px 10px;}
  .dkpdg-title{font-size:16px;}
  .dkpdg-subtitle{font-size:10px;}
  .dkpdg-tabs{padding:7px 8px;}
  .dkpdg-main{
    display:flex;
    flex-direction:column;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
  }
  .dkpdg-workspace{
    flex:0 0 auto;
    min-height:auto;
    overflow:hidden;
    padding:8px;
  }
  .dkpdg-sidebar{
    flex:0 0 auto;
    overflow:visible;
    border-left:0;
    border-top:1px solid #e6e6e6;
    padding:10px;
  }
  .dkpdg-control-row > label{flex-basis:82px;}
  .dkpdg-open-wrap{
    display:flex;
    margin:8px 0 0;
  }
  .dkpdg-open-button{width:100%!important;}
  .dkpdg-footer-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:7px 6px;}
  .dkpdg-footer-price{grid-column:1/-1;min-height:36px;display:grid;grid-template-columns:auto 1fr;align-items:center;gap:8px;padding:5px 8px;}
  .dkpdg-footer-price span{margin:0;font-size:8px;}
  .dkpdg-footer-price strong{text-align:right;font-size:10px;}
  .dkpdg-footer-actions button{min-width:0;padding:7px 5px;font-size:9px;line-height:1.15;}
  .dkpdg-cart-actions-row{flex-wrap:wrap!important;}
}

@media(max-width:420px){
  .dkpdg-view-controls{grid-template-columns:minmax(0,1fr) 86px;gap:8px;}
  .dkpdg-zoom-row{grid-template-columns:34px minmax(54px,1fr) 34px;gap:4px;}
  .dkpdg-zoom-row .dkpdg-zoom-btn{height:36px;min-height:36px;padding:0 3px;}
  .dkpdg-rotation-wrap{height:36px;}
  .dkpdg-rotation-wrap input{height:34px!important;}
}


.dkpdg-close:hover,.dkpdg-close:focus{background:transparent!important;border:0!important;box-shadow:none!important;color:#111!important;}
