/* Fototassen-Designer: Frontend */
.ftd{--ftd-ink:#1b1d21;--ftd-btn:#2f3237;--ftd-red:#c62828;display:flex;flex-direction:column;gap:8px;margin:0 0 24px;color:var(--ftd-ink);font-size:16px;line-height:1.5}
.ftd *{box-sizing:border-box;min-width:0}
.ftd [hidden]{display:none!important}
.ftd button,.ftd input,.ftd select,.ftd textarea{font:inherit;color:inherit;margin:0;text-transform:none;letter-spacing:0;box-shadow:none;min-height:0;line-height:1.2}

/* Werkzeugleiste */
.ftd-bar{display:flex;gap:4px}
.ftd .ftd-ic{flex:none;width:48px;height:48px;display:flex;align-items:center;justify-content:center;gap:8px;padding:0;border:0;border-radius:6px;background:#2f3237;color:#fff;cursor:pointer}
.ftd .ftd-ic.wide{flex:1;width:auto}
.ftd .ftd-ic.on{background:#e3e5e8;color:#2f3237}
.ftd .ftd-ic:focus-visible{outline:2px solid #2f3237;outline-offset:2px}
.ftd-ic svg{width:32px;height:32px;flex:none;fill:currentColor;stroke:none}
.ftd-ic svg .orb{fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.ftd-ic.wide svg{width:42px;height:34px}
.ftd-ic.wide svg.flatic{width:80px;height:38px}
.ftd-ic .n360{font-size:20px;font-weight:700;letter-spacing:.5px}

/* Bühne */
.ftd-stage{position:relative;background:#cdd1d6;border-radius:8px;overflow:hidden}
.ftd-flat,.ftd-three{height:clamp(290px,76vw,460px)}
.ftd-flat{display:flex;align-items:center;justify-content:center}
.ftd-three{position:relative;touch-action:none;cursor:grab}
.ftd-three canvas{position:absolute;inset:0;width:100%;height:100%}

/* Zoom-Regler unten */
.ftd-zoom{position:absolute;bottom:8px;left:50%;transform:translateX(-50%);width:min(50%,200px);height:30px;border-radius:15px;background:rgba(255,255,255,.6);touch-action:none;cursor:pointer;z-index:2}
.ftd-zin{position:absolute;top:0;bottom:0;left:14px;right:14px}
.ftd-zt{position:absolute;top:50%;left:0;right:0;height:4px;margin-top:-2px;border-radius:2px;background:#9aa0a7}
.ftd-zk{position:absolute;top:50%;left:0;width:20px;height:20px;border-radius:50%;background:#3d4046;border:3px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.3);transform:translate(-50%,-50%)}

.ftd-warn{background:var(--ftd-red);color:#fff;border-radius:8px;padding:10px 12px;font-size:15px}

/* Boxen Text / Ebenen */
.ftd-sheet{display:none;flex-direction:column;background:#f1f2f4;border-radius:12px;box-shadow:0 2px 10px rgba(0,0,0,.15);overflow:hidden}
.ftd-sheet.on{display:flex}
.ftd-sh-h{display:flex;align-items:center;justify-content:space-between;background:#111;color:#fff;padding:8px 8px 8px 14px;font-size:17px;font-weight:500}
.ftd .ftd-sh-x{width:40px;height:40px;border:0;border-radius:8px;background:#2c2e32;color:#fff;display:grid;place-items:center;cursor:pointer;padding:0}
.ftd-sh-x svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.ftd-sh-b{padding:10px;overflow:auto;max-height:60vh;display:flex;flex-direction:column;gap:8px}
.ftd textarea#ftd-tin{width:100%;min-height:96px;height:auto;font-size:20px;line-height:1.3;border:1px solid #cdd1d6;border-radius:10px;padding:10px 12px;resize:vertical;background:#fff}
.ftd-row{display:flex;gap:8px;align-items:center}
.ftd .ftd-fld{height:44px;font-size:16px;border:1px solid #cdd1d6;border-radius:8px;padding:0 10px;background:#fff}
.ftd select#ftd-tfont{flex:1;width:auto}
.ftd .ftd-sw{display:block;position:relative;width:52px;flex:none;padding:0;cursor:pointer}
.ftd .ftd-sw input{position:absolute;inset:0;width:100%;height:100%;opacity:0;border:0;padding:0;cursor:pointer}
.ftd .ftd-ok{flex:none;width:64px;padding:0;border:1px solid var(--ftd-btn);background:var(--ftd-btn);color:#fff;font-weight:500;cursor:pointer;-webkit-appearance:none;appearance:none}

/* Ebenen */
.ftd-ly{display:flex;align-items:center;gap:8px;background:#fff;border-radius:10px;padding:8px;box-shadow:0 1px 3px rgba(0,0,0,.08);cursor:pointer}
.ftd-ly.sel{outline:2px solid #2f3237}
.ftd-ly.drag{box-shadow:0 8px 22px rgba(0,0,0,.25);position:relative;z-index:2}
.ftd-ly.off .ftd-nm b{color:#9aa0a7}
.ftd-th{width:44px;height:44px;flex:none;border-radius:6px;background:#e6e8eb center/contain no-repeat;display:grid;place-items:center;font-weight:600;font-size:18px}
.ftd-nm{flex:1}
.ftd-nm b{display:block;font-weight:400;font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ftd-nm small{font-size:13px;color:#5b6068}
.ftd .ftd-ib{width:38px;height:38px;flex:none;border:0;border-radius:8px;background:#e3e5e8;color:var(--ftd-ink);display:grid;place-items:center;cursor:pointer;padding:0}
.ftd-ib svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.ftd .ftd-ib.red{background:var(--ftd-red);color:#fff}
.ftd .ftd-ib.hd{cursor:grab;touch-action:none}
.ftd-empty{margin:0;font-size:15px;color:#5b6068}

/* Theme-Absicherung: Ecken und Größen der Buttons (Flatsome macht sonst Pillen/Kreise) */
.ftd .ftd-ic,.ftd .ftd-ib,.ftd .ftd-sh-x,.ftd .ftd-fld{border-radius:6px!important;box-shadow:none!important;text-shadow:none!important;min-height:0!important;margin:0!important}
.ftd .ftd-ic{height:48px!important;padding:0!important;line-height:1!important}
/* Icon-Farbe hart gegen Hell/Dunkel-Modus (Foto-Button ist ein Label) */
.ftd .ftd-ic,.ftd label.ftd-ic{background:#2f3237!important;color:#fff!important}
.ftd .ftd-ic.on,.ftd label.ftd-ic.on{background:#e3e5e8!important;color:#2f3237!important}
.ftd .ftd-ic svg{fill:currentColor!important}
.ftd .ftd-ic svg .orb{fill:none!important;stroke:currentColor!important}
.ftd .ftd-ib{border-radius:8px!important;height:38px!important;padding:0!important}
.ftd .ftd-sh-x{border-radius:8px!important;height:40px!important;padding:0!important}
.ftd .ftd-fld{height:44px!important;border-radius:8px!important}

/* Desktop: Bildspalte 2/3, Produktinfo 1/3, Bühne höher */
@media(min-width:850px){
  body.ftd-active .product-main .product-gallery,body.ftd-active .product-gallery{flex-basis:66.666%!important;max-width:66.666%!important}
  body.ftd-active .product-main .product-info,body.ftd-active .product-info{flex-basis:33.333%!important;max-width:33.333%!important}
  .ftd-flat,.ftd-three{height:clamp(380px,36vw,560px)}
}

/* Warenkorb-Button während Upload */
.ftd-busy{opacity:.6;pointer-events:none}

/* 1.1.1: Desktop – Text- und Ebenen-Box schwebt kompakt oben links über der Bühne */
@media(min-width:850px){
  .ftd{position:relative}
  .ftd-sheet{position:absolute;top:66px;left:10px;width:340px;max-width:calc(100% - 20px);z-index:5;box-shadow:0 6px 24px rgba(0,0,0,.25)}
  .ftd-sh-h{padding:3px 3px 3px 10px;font-size:14px}
  .ftd .ftd-sh-x{width:26px;height:26px!important}
  .ftd-sh-x svg{width:16px;height:16px}
  .ftd-sh-b{padding:6px;gap:6px;max-height:118px}
  .ftd textarea#ftd-tin{min-height:0;height:44px;font-size:15px;padding:6px 10px;border-radius:8px;resize:none}
  .ftd-row{gap:6px}
  .ftd .ftd-fld{height:38px!important;font-size:15px}
  .ftd .ftd-sw{width:44px}
  .ftd .ftd-ok{width:56px}
  .ftd-ly{padding:5px;gap:6px}
  .ftd-th{width:36px;height:36px;font-size:15px}
  .ftd-nm b{font-size:14px}
  .ftd-nm small{font-size:12px}
  .ftd .ftd-ib{width:32px;height:32px!important}
  .ftd-ib svg{width:17px;height:17px}
}

/* 1.1.2/1.1.3: Textfeld + Schriftwahl immer weiß, auch im Dunkelmodus (#ftd schlägt die Regel von Original Shirts Design) */
#ftd textarea#ftd-tin,#ftd select#ftd-tfont{background:#fff!important;color:#1b1d21!important;border-color:#cdd1d6!important}
/* 1.1.2: Farbtupfer */
.ftd-pal{display:flex;flex-wrap:wrap;gap:4px}
.ftd .ftd-pal button{flex:1 1 0;min-width:20px;max-width:34px;height:24px!important;min-height:0!important;padding:0!important;margin:0!important;border:1px solid #b6bbc1!important;border-radius:6px!important;box-shadow:none!important;cursor:pointer}
@media(min-width:850px){#ftd-s-text .ftd-sh-b{max-height:none}
  /* 1.1.4: Farbfeld unsichtbar am rechten Rand innerhalb der Box – Browser öffnet den Farbwähler rechts daneben, Box scrollt nie */
  #ftd .ftd-sheet{overflow:clip}
  #ftd .ftd-sw{position:static}
  #ftd .ftd-sw input{inset:auto;top:0;right:0;left:auto;width:2px;height:2px}
  /* 1.2.0: OK schmal, Schriftwahl füllt den Rest (ca. 160 px) */
}

/* 1.2.0: Fett-Knopf */
#ftd .ftd-bold{flex:none;width:52px;padding:0;font-weight:700;font-size:18px;cursor:pointer;background:#e3e5e8!important;color:#1b1d21!important;border:1px solid #cdd1d6;-webkit-appearance:none;appearance:none}
#ftd .ftd-bold.on{background:#2f3237!important;color:#fff!important;border-color:#2f3237}

/* 1.2.0: Zoom-Regler 3D senkrecht rechts */
.ftd-z3{position:absolute;right:10px;top:50%;transform:translateY(-50%);width:30px;height:min(60%,200px);border-radius:15px;background:rgba(255,255,255,.6);touch-action:none;cursor:pointer;z-index:2}
.ftd-z3in{position:absolute;left:0;right:0;top:14px;bottom:14px}
.ftd-z3t{position:absolute;left:50%;top:0;bottom:0;width:4px;margin-left:-2px;border-radius:2px;background:#9aa0a7}
.ftd-z3k{position:absolute;left:50%;top:100%;width:20px;height:20px;border-radius:50%;background:#3d4046;border:3px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.3);transform:translate(-50%,-50%)}

/* 1.2.0: Handy – Text- und Ebenen-Box schiebt sich von unten hoch */
@media(max-width:849px){
  .ftd-sheet{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:99990;border-radius:16px 16px 0 0;box-shadow:0 -6px 24px rgba(0,0,0,.25);transform:translateY(105%);visibility:hidden;transition:transform .25s ease,visibility 0s linear .25s;padding-bottom:env(safe-area-inset-bottom)}
  .ftd-sheet.on{transform:none;visibility:visible;transition:transform .25s ease,visibility 0s}
  .ftd-sh-b{max-height:50vh}
}
@media(max-width:849px) and (prefers-reduced-motion:reduce){.ftd-sheet,.ftd-sheet.on{transition:none}}
@media(min-width:850px){#ftd .ftd-bold{width:44px}}
