
/* ══ OCULTAR todo botón en cart-bar excepto #cartbtn ══ */
#cart-bar button:not(#cartbtn),
#cart-bar a,
div#cart-bar > div button,
div#cart-bar > div > button:not(#cartbtn),
div#cart-bar button[style*="background:#1e1e1e"],
div#cart-bar button[style*="background: #1e1e1e"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  overflow: hidden !important;
}

/* ══ TABS INFERIORES ══ */
.bp-tabs {
  width:100%;
  border-bottom:2px solid #2a2a2a;
  background:#0d0d0d;
}
.bp-tabs-row {
  display:flex;
  gap:5px;
  padding:8px 8px 0;
  overflow-x:auto;
  scrollbar-width:none;
}
.bp-tabs-row::-webkit-scrollbar{display:none}
.bp-tab {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:12px 18px;
  background:#1e1e1e;
  border:2px solid #2a2a2a;
  border-bottom:none;
  border-radius:10px 10px 0 0;
  color:#aaa;
  cursor:pointer;
  font-size:13px;
  font-weight:700;
  font-family:inherit;
  transition:all .18s;
  white-space:nowrap;
  flex:1;
  text-align:center;
}
.bp-tab:hover {
  color:#fff;
  border-color:#444;
  background:#252525;
}
.bp-tab.on {
  background:#f5c518;
  border-color:#f5c518;
  color:#000;
  box-shadow:0 -3px 14px rgba(245,197,24,.25);
  margin-bottom:-2px;
  z-index:1;
  position:relative;
}
.bp-panel {
  display:none;
  background:#141414;
  border:2px solid #2a2a2a;
  border-top:none;
  border-radius:0 4px 14px 14px;
  padding:20px 22px 18px;
}
.bp-panel.on { display:block }

/* ══ TOOLBAR BOTONES ══ */
#cs-tb {
  display:flex;
  flex-direction:column;
  flex-shrink:0;
  width:100%;
  background:#111;
  border-bottom:2px solid #1e1e1e;
}
.cs-tb-row1 {
  display:flex;
  align-items:stretch;
  gap:6px;
  padding:8px 12px;
  background:#111;
  border-bottom:1px solid #1e1e1e;
  overflow-x:auto;
  scrollbar-width:none;
}
.cs-tb-row1::-webkit-scrollbar{display:none}
.cs-tb-row2 {
  display:flex;
  align-items:stretch;
  gap:6px;
  padding:6px 12px;
  background:#0d0d0d;
  overflow-x:auto;
  scrollbar-width:none;
}
.cs-tb-row2::-webkit-scrollbar{display:none}

/* Botón fila 1 */
.tb-btn {
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:6px;
  padding:10px 18px;
  background:var(--cs-btn-bg, #1e1e1e);
  border:2px solid var(--cs-btn-border, #3a3a3a);
  border-radius:10px;
  cursor:pointer;
  font-family:inherit;
  transition:all .2s;
  white-space:nowrap;
  flex:1;
  justify-content:center;
  min-width:80px;
  color:var(--cs-btn-color, #e0e0e0);
}
.tb-btn:hover:not(:disabled) {
  background:#2a2a2a;
  border-color:#666;
  color:#fff;
}
.tb-btn.active, .tb-btn.on {
  background:var(--cs-btn-active, #f5c518) !important;
  border-color:var(--cs-btn-active, #f5c518) !important;
  color:var(--cs-btn-active-text, #000) !important;
  box-shadow:0 3px 16px rgba(245,197,24,.5) !important;
  font-weight:900 !important;
}
.tb-btn:disabled {
  opacity:0.25;
  cursor:not-allowed;
  pointer-events:none;
}
.tb-btn.danger { border-color:#5a1a1a }
.tb-btn.danger:not(:disabled):not(.active) { color:#f87171 }
.tb-btn.danger:hover:not(:disabled) { background:#2a0808;border-color:#f87171 }
.tb-btn.mask { border-color:#5a3a8a;color:#c084fc }
.tb-btn.mask:hover:not(.active) { background:#1e0a30;border-color:#c084fc }

.tb-icon { font-size:16px;line-height:1;flex-shrink:0 }
.tb-label { font-size:13px;font-weight:700;color:inherit;line-height:1 }

/* Botón fila 2 */
.tb-btn2 {
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:5px;
  padding:7px 14px;
  background:#1e1e1e;
  border:2px solid #3a3a3a;
  border-radius:8px;
  cursor:pointer;
  font-family:inherit;
  transition:all .15s;
  white-space:nowrap;
  flex:1;
  justify-content:center;
  min-width:70px;
  color:#bbb;
}
.tb-btn2:hover:not(:disabled) {
  background:#2a2a2a;
  border-color:#666;
  color:#fff;
}
.tb-btn2.active, .tb-btn2.on { background:var(--cs-btn-active,#f5c518) !important;border-color:var(--cs-btn-active,#f5c518) !important;color:var(--cs-btn-active-text,#000) !important;font-weight:900 !important; }
.tb-btn2:disabled { opacity:0.2;cursor:not-allowed;pointer-events:none }
.tb-btn2.warn { color:#fbbf24;border-color:#3a2800 }
.tb-btn2.warn:hover:not(:disabled) { background:#1a1000;border-color:#fbbf24 }

/* Vista 3D */
.tb-3d {
  padding:9px 18px;
  background:linear-gradient(135deg,#f5c518,#d4a000);
  color:#000;
  border:none;
  border-radius:10px;
  cursor:pointer;
  font-size:13px;
  font-weight:900;
  font-family:inherit;
  white-space:nowrap;
  flex-shrink:0;
  box-shadow:0 3px 12px rgba(245,197,24,.4);
  transition:all .2s;
}
.tb-3d:hover { box-shadow:0 5px 18px rgba(245,197,24,.55);transform:translateY(-1px) }

/* Admin */
.tb-adm {
  padding:7px 11px;
  background:#181818;
  color:#444;
  border:1px solid #222;
  border-radius:8px;
  cursor:pointer;
  font-size:14px;
  font-family:inherit;
  flex-shrink:0;
}
.tb-adm:hover { color:#888;background:#222 }





#cs-tb {
  display:flex;
  flex-direction:column;
  flex-shrink:0;
  width:100%;
  background:#111;
  border-bottom:2px solid #1e1e1e;
}











.bp-tabs-row::-webkit-scrollbar { display:none }



#cs-app { display:flex; flex-direction:column; width:100%; background:#0a0a0a; }

/* ── TOOLBAR ── */
 {
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 14px;
  height:54px;
  background:#111;
  border-bottom:1px solid #1e1e1e;
  overflow-x:auto;
  scrollbar-width:none;
}

 { font-size:17px;font-weight:900;color:#f5c518;white-space:nowrap;margin-right:10px;flex-shrink:0;letter-spacing:-.01em }


 { color:#f5c518;border-color:#f5c518;background:#1a1500 }
 { color:#c084fc;border-color:#3a1a5a }





.cs-lbl { font-size:10px;color:#555;letter-spacing:.1em;text-transform:uppercase;font-weight:700;margin:8px 0 4px }

/* ── ÁREA PRINCIPAL: canvas + paneles ── */
#cs-main {
  display:flex; flex-direction:column;
  align-items:center;
  padding:12px 16px 30px;
  width:100%;
}

/* ── CANVAS ── */
#can-wrap {
  position:relative; display:inline-block; line-height:0;
  box-shadow:0 0 0 2px #f5c518; transform-origin:top center; flex-shrink:0;
}
#can { display:block; cursor:crosshair; background:#fff; }
#drag-ov { position:absolute;top:0;left:0;width:100%;height:100%;z-index:50;cursor:crosshair; }
.albl { font-size:9px;color:#3a3a3a;letter-spacing:.06em;margin-bottom:8px;text-transform:uppercase;text-align:center }
.ecnt { font-size:10px;color:#3a3a3a;margin-top:8px;text-align:center }

/* ── BARRA DE ACCIONES RÁPIDAS (debajo del canvas) ── */
#action-bar {
  display:flex; align-items:center; gap:6px;
  margin-top:10px; flex-wrap:wrap; justify-content:center; width:90%;
}


/* ── FILA DE TEXTO RÁPIDO ── */
#txt-quick { display:flex;gap:8px;align-items:center;width:90%;margin-top:10px }

/* ── PANELES INFERIORES (tabs) ── */
#bottom-panels { width:90%; margin-top:10px; }

 {
  display:flex;
  gap:5px;
  padding:8px 10px 0;
  overflow-x:auto;
  scrollbar-width:none;
}
.bp-tabs-row::-webkit-scrollbar { display:none }




/* Imagen */
.eb-row { display:grid;grid-template-columns:repeat(3,1fr);gap:20px 30px;width:100% }
.eb-col { display:flex;flex-direction:column;gap:8px;padding:4px 0 }
.eb-lbl { font-size:12px;color:#bbb;font-weight:700;letter-spacing:.06em;text-transform:uppercase;display:flex;justify-content:space-between;margin-bottom:2px }
.eb-lbl b { color:#f5c518;font-weight:900;text-transform:none;font-size:13px }
.sl { width:100%;appearance:none;-webkit-appearance:none;height:6px;border-radius:3px;background:#333;outline:none;cursor:pointer }
.sl::-webkit-slider-thumb { -webkit-appearance:none;width:20px;height:20px;border-radius:50%;background:#f5c518;cursor:pointer;border:2px solid #000;box-shadow:0 2px 5px rgba(0,0,0,.5) }
.sl::-moz-range-thumb { width:20px;height:20px;border-radius:50%;background:#f5c518;cursor:pointer;border:2px solid #000 }
.sel { padding:7px 10px;background:#222;color:#f0f0f0;border:1px solid #3a3a3a;border-radius:6px;font-size:12px;outline:none;font-family:inherit;width:100% }
.sel:focus { border-color:#f5c518 }
select.sel option { background:#1a1a1a }
.eb-fbtn {
  padding:11px 20px;
  background:#1e1e1e;
  color:#aaa;
  border:2px solid #2a2a2a;
  border-radius:24px;
  cursor:pointer;
  font-size:14px;
  font-weight:800;
  font-family:inherit;
  transition:all .15s;
  letter-spacing:.02em;
}
.eb-fbtn:hover,.eb-fbtn.on {
  background:#2a1f00;
  color:#f5c518;
  border-color:#f5c518;
  box-shadow:0 3px 14px rgba(245,197,24,.3);
  transform:scale(1.05);
}

.stybtn { width:34px;height:34px;background:#222;color:#bbb;border:1px solid #3a3a3a;border-radius:6px;cursor:pointer;font-family:inherit;font-size:15px;font-weight:800;transition:all .12s }
.stybtn:hover,.stybtn.on { background:#1a1500;color:#f5c518;border-color:#f5c518 }

/* Tazas (panel horizontal) */
#cup-panel { display:flex;flex-wrap:wrap;gap:8px;align-items:flex-start }
.tbtn { padding:10px 14px;text-align:left;background:#1a1a1a;color:#777;border:1px solid transparent;border-radius:8px;cursor:pointer;transition:all .12s;font-family:inherit;min-width:150px;flex:1 }
.tbtn:hover { background:#1e1e1e }
.tbtn.on { background:#1a1500;color:#f5c518;border-color:#f5c518 }
.tname { font-size:13px;font-weight:800;display:block }
.tprice { font-size:13px;color:#f5c518;font-weight:900 }
.tdesc { font-size:10px;color:#444;margin-top:2px }
.tsw { display:flex;gap:3px;margin-top:5px }
.sw { width:13px;height:13px;border-radius:50%;border:1px solid #2a2a2a }

/* Colores */
#pal-panel { display:flex;flex-wrap:wrap;gap:8px;align-items:flex-start;margin-top:8px }

/* Precio + carrito (fila horizontal) */
#price-row { display:flex;align-items:center;gap:16px;flex-wrap:wrap }
.pval { font-size:36px;font-weight:900;color:#f5c518;line-height:1 }



/* Clipart */
.ca-grid { display:flex;flex-wrap:wrap;gap:7px }
.ca-item { width:54px;height:54px;background:#1e1e1e;border:1px solid #2a2a2a;border-radius:9px;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:28px;transition:all .12s }
.ca-item:hover { background:#1a1500;border-color:#f5c518;transform:scale(1.1) }

/* Overlays */
.toast { position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#f5c518;color:#000;padding:8px 18px;border-radius:20px;font-size:12px;font-weight:800;z-index:99999;pointer-events:none;white-space:nowrap }
.c3d { width:88vw;height:88vh;background:#050505;border-radius:12px;border:1px solid #f5c518;position:relative;overflow:hidden }
.x3d { position:absolute;top:12px;right:12px;z-index:10;width:34px;height:34px;background:rgba(0,0,0,.6);border:1px solid #333;border-radius:50%;cursor:pointer;color:#777;font-size:15px;font-family:inherit;display:flex;align-items:center;justify-content:center }
.x3d:hover { background:#f5c518;color:#000 }
.ov3d-btns { position:absolute;bottom:16px;left:50%;transform:translateX(-50%);display:flex;gap:8px;z-index:10 }
.pbtn { padding:7px 14px;background:rgba(0,0,0,.75);color:#f5c518;border:1px solid #f5c518;border-radius:18px;cursor:pointer;font-size:12px;font-weight:700;font-family:inherit }
.rbtn { padding:7px 14px;background:rgba(15,0,0,.85);color:#ff4444;border:1px solid #ff4444;border-radius:18px;cursor:pointer;font-size:12px;font-weight:700;font-family:inherit;display:flex;align-items:center;gap:5px }
.rdot { width:8px;height:8px;border-radius:50%;background:#ff4444;animation:rb 1.2s ease-in-out infinite }
@keyframes rb{0%,100%{opacity:1}50%{opacity:.2}}
#rprog { position:absolute;top:0;left:0;height:3px;background:#ff4444;width:0%;z-index:20 }

/* Móvil */
@media(max-width:700px){
  .eb-row { grid-template-columns:repeat(2,1fr);gap:6px 12px }

  /* Canvas header */
  .ecnt-row { width:97% }
  .tb-3d { padding:6px 10px;font-size:12px }

  /* Mini toolbar compacto */
  #cs-mini-tb { padding:4px 1.5% 0;gap:4px }
  .mini-btn { padding:8px 4px;font-size:12px }

  /* Tabs compactos */
  .bp-tab { padding:8px 6px;font-size:12px }
  .bp-tabs-row { padding:4px 4px 0;gap:3px }

  /* Panel interior muy compacto */
  .bp-panel { padding:10px 12px 10px }

  /* Botón subir foto */
  .cs-upload-btn { padding:9px;font-size:13px;margin-bottom:8px }

  /* Sliders: labels más pequeños, menos espacio */
  .eb-col { gap:3px;padding:0 }
  .eb-lbl { font-size:10px;letter-spacing:.04em }
  .eb-lbl b { font-size:11px }
  .sl { height:18px }

  /* Filtros desplegable */
  .cs-dropdown-toggle { padding:8px 12px;font-size:13px }
  .cs-dropdown-content { padding:8px 10px 10px;gap:5px }
  .eb-fbtn { padding:7px 12px;font-size:12px }

  /* Texto quick input */
  #txt-quick { padding:4px 6px }
  #txt-quick input { padding:7px 10px;font-size:12px }

  /* Contador elementos */
  .ecnt { font-size:10px;padding:2px 0 }

  /* cs-main menos padding */
  #cs-main { padding:2px 0 16px;gap:4px }

  /* Cart bar */
  #cart-bar { width:100%;border-radius:0;padding:8px 12px 10px }
  .cart-price-val { font-size:28px !important }
  .bcart { padding:12px 20px !important;font-size:15px !important }

  /* Texto panel tabs */
  #bottom-panels { width:100% }
}

@media(max-width:400px){
  .mini-btn { padding:7px 2px;font-size:11px }
  .bp-tab { padding:7px 4px;font-size:11px }
  .eb-lbl { font-size:9px }
  .cs-upload-btn { padding:8px;font-size:12px }
}
#cs-tb::-webkit-scrollbar{display:none}

/* Barra de carrito fija debajo de los paneles */

#cart-price-info {
  display:flex;
  align-items:baseline;
  gap:10px;
}

/* Carrito vacío (sin diseño) */

@keyframes shake {
  0%,100%{transform:translateX(0)}
  20%,60%{transform:translateX(-6px)}
  40%,80%{transform:translateX(6px)}
}






/* Vista 3D encima del canvas */
.canvas-header {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  width:90%;
  margin:0 auto 2px;
}


/* ── Mini toolbar encima de los tabs ── */
#cs-mini-tb {
  display:flex;
  gap:6px;
  padding:8px 5% 0;
  width:100%;
  box-sizing:border-box;
  background:#0d0d0d;
}
.mini-btn {
  flex:1;
  padding:0 8px;
  height:var(--cs-btn-height,38px);
  background:var(--cs-btn-bg,#1e1e1e);
  color:var(--cs-btn-color,#e0e0e0);
  border:2px solid var(--cs-btn-border,#3a3a3a);
  border-radius:10px;
  cursor:pointer;
  font-size:var(--cs-btn-font,12px);
  font-weight:700;
  font-family:inherit;
  transition:all .18s;
  white-space:nowrap;
  text-align:center;
  display:flex;
  align-items:center;
  justify-content:center;
}
.mini-btn:hover:not(:disabled) {
  border-color:#666;
  color:#fff;
  background:#2a2a2a;
}
.mini-btn.active, .mini-btn.on {
  background:var(--cs-btn-active,#f5c518) !important;
  border-color:var(--cs-btn-active,#f5c518) !important;
  color:var(--cs-btn-active-text,#000) !important;
  font-weight:900 !important;
}
.mini-btn:disabled { opacity:0.25;cursor:not-allowed;pointer-events:none }
.mini-btn.del { border-color:#5a1a1a;color:#f87171 }
.mini-btn.del:not(:disabled):hover { background:#2a0808;border-color:#f87171 }
.mini-btn.mask { border-color:#5a3a8a;color:#c084fc }
.mini-btn.mask:hover { background:#1e0a30;border-color:#c084fc }

/* ── Botón subir foto ── */
.cs-upload-btn {
  display:block;
  width:100%;
  padding:12px;
  margin-bottom:14px;
  background:var(--cs-btn-bg,#1e1e1e);
  color:var(--cs-btn-color,#e0e0e0);
  border:2px dashed var(--cs-btn-border,#3a3a3a);
  border-radius:10px;
  cursor:pointer;
  font-size:14px;
  font-weight:700;
  font-family:inherit;
  transition:all .18s;
  text-align:center;
}
.cs-upload-btn:hover {
  border-color:var(--cs-btn-active,#f5c518);
  color:var(--cs-btn-active,#f5c518);
  background:#1a1500;
}


/* ── Desplegable filtros rápidos ── */
.cs-dropdown-toggle {
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  padding:11px 16px;
  background:#1e1e1e;
  color:var(--cs-btn-color,#e0e0e0);
  border:2px solid var(--cs-btn-border,#3a3a3a);
  border-radius:10px;
  cursor:pointer;
  font-size:14px;
  font-weight:700;
  font-family:inherit;
  transition:all .2s;
}
.cs-dropdown-toggle:hover {
  border-color:#555;
  color:#fff;
  background:#2a2a2a;
}
.cs-dropdown-toggle[aria-expanded="true"] {
  border-color:var(--cs-btn-active,#f5c518);
  color:var(--cs-btn-active,#f5c518);
  border-radius:10px 10px 0 0;
}
.cs-dropdown-arrow {
  font-size:11px;
  transition:transform .2s;
}
.cs-dropdown-toggle[aria-expanded="true"] .cs-dropdown-arrow {
  transform:rotate(180deg);
}
.cs-dropdown-content {
  background:#181818;
  border:2px solid var(--cs-btn-border,#3a3a3a);
  border-top:none;
  border-radius:0 0 10px 10px;
  padding:10px 12px 12px;
  display:none;
  flex-wrap:wrap;
  gap:7px;
}
.cs-dropdown-content.open {
  display:flex !important;
}


.ecnt-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:90%;
  gap:10px;
}
.ecnt-row .ecnt {
  margin:0;
  flex:1;
}

/* ═══ BARRA CARRITO ═══ */
#cart-bar {
  width:90%;
  background:#111;
  border-top:3px solid #f5c518;
  border-radius:0 0 14px 14px;
  padding:14px 20px 16px;
  box-sizing:border-box;
}
#cart-top-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
}
.cart-price { display:flex;align-items:baseline;gap:8px; }
.cart-price-label { font-size:10px;color:#555;text-transform:uppercase;letter-spacing:.12em; }
.cart-price-val { font-size:36px;font-weight:900;color:#f5c518;line-height:1;font-family:inherit; }
.cart-price-sub { font-size:11px;color:#444; }
.bout { display:none !important; }

.bcart {
  display:block !important;
  width:fit-content !important;
  max-width:100% !important;
  margin-left:auto !important;
  margin-right:auto !important;
  padding:16px 36px !important;
  background:linear-gradient(135deg,#f5c518,#d4a000) !important;
  color:#000 !important;
  border:none !important;
  border-radius:12px !important;
  cursor:pointer !important;
  font-size:17px !important;
  font-weight:900 !important;
  font-family:inherit !important;
  box-shadow:0 5px 22px rgba(245,197,24,.5) !important;
  letter-spacing:.04em !important;
  transition:all .22s !important;
  text-align:center !important;
  box-sizing:border-box !important;
}
.bcart:hover {
  background:linear-gradient(135deg,#ffd740,#f5c518) !important;
  box-shadow:0 8px 28px rgba(245,197,24,.65) !important;
  transform:translateY(-2px) !important;
}

/* Anti-PNG forzoso */
#cup-studio-wrap button[onclick*="exportPNG"],
#cup-studio-wrap a[onclick*="exportPNG"],
#cart-bar > div > button:not(.bcart),
#cart-top-row button:not(.bcart) {
  display:none !important;
}
