/* ══════════════════════════════════════════════════
   Cutiora — editor.css
   ══════════════════════════════════════════════════ */

.w-preview-wrap { position: relative; display: none; overflow: hidden; }
.w-change-btn {
  position: absolute;
  top: 10px; right: 10px;
  background: #fff;
  border: 2px solid #2c2c2c;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  box-shadow: 2px 2px 0 #2c2c2c;
}
.w-change-btn:hover { background: #f5f5f5; }

#wCanvas {
  display: block;
  width: 100% !important;
  height: auto !important;
  cursor: crosshair;
  touch-action: pan-y;
}

/* ── HTML overlay editor ── */
#wEditorWrap {
  position: relative;
  width: 100%;
  display: none;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}
#wBgLayer { width: 100%; display: block; pointer-events: none; }
#wTextLayer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 20;
  pointer-events: none;
}

/* ── Text drag wrap + controls ── */
.wDragTextWrap {
  pointer-events: auto;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  cursor: grab;
  will-change: transform;
  display: inline-block;
}
.wDragTextWrap.txt-selected {
  outline: 2px dashed rgba(255,255,255,0.85);
  outline-offset: 6px;
}
.wDragTextWrap.txt-dragging { cursor: grabbing; }

.wDragText {
  padding: 4px 8px;
  white-space: pre;
  word-break: normal;
  overflow: visible;
  text-align: center;
  line-height: 1.35;
  display: block;
  user-select: none;
  -webkit-user-select: none;
}

.wTxtDel, .wTxtResize, .wTxtRotate {
  position: absolute;
  width: 24px;
  height: 24px;
  background: #fff;
  border: 2px solid #e60023;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0,0,0,0.25);
  touch-action: none;
}
.wDragTextWrap.txt-selected .wTxtDel,
.wDragTextWrap.txt-selected .wTxtResize,
.wDragTextWrap.txt-selected .wTxtRotate { display: flex; }
.wTxtDel    { top: -12px; right: -12px; color: #e60023; font-weight: bold; font-size: 13px; cursor: pointer; }
.wTxtResize { bottom: -12px; right: -12px; cursor: nwse-resize; }
.wTxtRotate { bottom: -12px; left: -12px; cursor: alias; }
.wTxtResize::after { content: ''; width: 8px; height: 8px; border-right: 2px solid #e60023; border-bottom: 2px solid #e60023; display: block; }

/* ── Multi-text layer system ── */
#wTextLayersWrap { display: flex; flex-direction: column; }
#wTextTabBar {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0;
  padding: 16px 16px 0;
  background: transparent;
}
.wTextLayerTab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 3px solid #2c2c2c;
  border-bottom: none;
  padding: 6px 14px 6px 16px;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #2c2c2c;
  cursor: pointer;
  margin-right: 4px;
  margin-bottom: -3px;
  position: relative;
  z-index: 1;
  transition: background .12s;
}
.wTextLayerTab:hover { background: #fff8d6; }
.wTextLayerTab.active { background: #fff; z-index: 2; }
.wTextLayerTab-label { pointer-events: none; }
.wTextLayerTab-del {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #aaa;
  font-size: 12px;
  cursor: pointer;
  padding: 0 0 0 4px;
  line-height: 1;
  display: flex;
  align-items: center;
  pointer-events: auto;
}
.wTextLayerTab-del:hover { color: #e60023; }
#wAddTextBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff8d6;
  border: 3px solid #2c2c2c;
  border-bottom: none;
  padding: 6px 14px;
  font-size: 15px;
  font-weight: 800;
  color: #2c2c2c;
  cursor: pointer;
  margin-bottom: -3px;
  margin-left: 4px;
  position: relative;
  z-index: 1;
  transition: background .12s;
  line-height: 1;
  height: calc(100% + 3px);
  box-sizing: border-box;
  align-self: flex-end;
}
#wAddTextBtn:hover { background: #ffe566; }
#wTextLayerPanel {
  padding: 16px;
  border: 3px solid #2c2c2c;
  border-top: none;
  background: #fff;
  box-sizing: border-box;
  overflow: hidden;
}
#wTextLayerPanel textarea {
  width: 100%;
  box-sizing: border-box;
  border: 2px solid #ccc;
  border-radius: 0;
  font-family: 'Nunito', sans-serif;
}

/* ── Draw toolbar ── */
.wdt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.wdt-group {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f5f5f5;
  border: 1.5px solid #ddd;
  border-radius: 7px;
  padding: 4px 8px;
}
.wdt-label {
  font-family: 'Nunito', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #888;
  margin-right: 2px;
}
.wdt-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  color: #555;
  font-size: 16px;
  transition: background .1s, border-color .1s, color .1s;
}
.wdt-btn:hover { background: #fff8d6; border-color: #e6b800; color: #2c2c2c; }
.wdt-btn.active { background: #2c2c2c; border-color: #2c2c2c; color: #fff; }
.wdt-tool { width: 30px; height: 30px; }

#wDrawColor {
  width: 32px;
  height: 28px;
  border: 1.5px solid #ddd;
  border-radius: 7px;
  padding: 2px;
  cursor: pointer;
  background: #fff;
}
#wDrawSize, #wDrawOpacity { width: 80px; accent-color: #e60023; }
#wDrawSizePreview {
  background: #333;
  border-radius: 50%;
  flex-shrink: 0;
  width: 16px !important;
  height: 16px !important;
}
#wDrawSizeVal, #wDrawOpacityVal { font-size: 11px; color: #888; min-width: 26px; }
#wDrawCanvas { display: none; }
#wEditorWrap.draw-mode #wDrawCanvas { display: block !important; }
#wEditorWrap.draw-mode #wTextLayer  { pointer-events: none; }

.wdt-save-btn {
  background: #e60023 !important;
  border-color: #e60023 !important;
  color: #fff !important;
  width: auto !important;
  padding: 0 12px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  gap: 4px;
}
.wdt-save-btn:hover { background: #c0001d !important; border-color: #c0001d !important; }

/* ── Sticker system ── */
#wStickerLayer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 10;
}
.wst-el {
  position: absolute;
  cursor: grab;
  pointer-events: auto;
  user-select: none;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.wst-el.selected { border: 2px dashed #e60023; }
.wst-el:active { cursor: grabbing; }
.wst-el img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  display: block;
}
.wst-del, .wst-resize, .wst-rotate, .wst-flip {
  position: absolute;
  width: 24px;
  height: 24px;
  background: #fff;
  border: 2px solid #e60023;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.wst-el.selected .wst-del,
.wst-el.selected .wst-resize,
.wst-el.selected .wst-rotate,
.wst-el.selected .wst-flip { display: flex; }
.wst-del { top: -12px; right: -12px; color: #e60023; font-weight: bold; }
.wst-resize { bottom: -12px; right: -12px; cursor: nwse-resize; }
.wst-rotate { bottom: -12px; left: -12px; cursor: alias; }
.wst-flip { top: -12px; left: -12px; cursor: pointer; color: #e60023; font-size: 14px; }
.wst-resize::after { content: ''; width: 8px; height: 8px; border-right: 2px solid #e60023; border-bottom: 2px solid #e60023; }

#wStickerCatBar::-webkit-scrollbar { display: none; }
.wst-cat {
  flex-shrink: 0;
  background: #f5f5f5;
  border: 1.5px solid #ddd;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: all 0.15s;
}
.wst-cat:hover { background: #eee; border-color: #bbb; }
.wst-cat.active { background: #e60023; border-color: #e60023; color: #fff; }

#wStickerGrid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  max-height: 210px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 2px;
  scrollbar-width: thin;
  box-sizing: border-box;
  width: 100%;
}
@media (max-width: 480px) { #wStickerGrid { grid-template-columns: repeat(4, 1fr); gap: 5px; max-height: 230px; } }
@media (max-width: 360px) { #wStickerGrid { grid-template-columns: repeat(3, 1fr); gap: 4px; max-height: 260px; } }

.wst-thumb {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  background: #fafafa;
  border: 1.5px solid #eee;
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.12s, border-color 0.12s;
  box-sizing: border-box;
}
.wst-thumb:hover, .wst-thumb:active { transform: scale(1.08); border-color: #e60023; }
.wst-thumb img {
  position: absolute;
  top: 4px; left: 4px; right: 4px; bottom: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  object-fit: contain;
  object-position: center;
  display: block;
}
#wStickerGrid::-webkit-scrollbar { width: 4px; }
#wStickerGrid::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

/* ── Aesthetic symbols panel ── */
#wAestheticPanel {
  display: none;
  position: fixed;
  z-index: 999999;
  background: #fff;
  border: 2px solid #2c2c2c;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  box-sizing: border-box;
}
#wAestheticGrid { display: flex; flex-wrap: wrap; gap: 4px; }



/* ══ Missing CSS Rules (patched) ══ */
#pfInfraredCanvas {
    mix-blend-mode: normal !important;
  }

#pfNeonCanvas {
    mix-blend-mode: normal !important;
  }

#wDrawToolbar {
    background: rgba(0,0,0,0.04);
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(0,0,0,0.08);
  }

.w-draw-toggle {
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: #2c2c2c;
    background: none;
    border: none !important;
    border-radius: 10px;
    box-shadow: none;
    padding: 8px 14px !important;
    transition: background .15s;
  }

.w-toggle-active {
    background: #FFE566;
  }

.wsi-copy      { background: #FFE566; border-color: #2c2c2c; }

.wsi-instagram { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }

.wsi-pinterest { background: #E60023; }

.wsi-reddit    { background: #FF4500; }

.wsi-x         { background: #000; }

.go-card-img-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #fde8ef 0%, #ffd6e7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
  }

.pf-all-shown {
    color: #aaa;
    border-color: #ddd;
    background: #fafafa;
    cursor: default;
  }

.w-coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    gap: 16px;
    padding: 60px 16px;
  }

.w-cs-icon { font-size: 52px; line-height: 1; }

.w-drawer-section-label {
    padding: 12px 20px 6px;
    font-family: 'Nunito', sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: #E60023;
    background: #fff7f7;
    border-bottom: 1px solid #f0e0e0;
  }
