/* ==========================================================================
   ALTER - DEDICATED MOBILE DESIGNER STYLES (App-like UX for Mobile Viewports)
   ========================================================================== */

:root {
  --mobile-header-h: 56px;
  --mobile-nav-h: 62px;
  --mobile-action-h: 56px;
  --sheet-radius: 20px;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-primary, #f8fafc);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: manipulation;
}

/* App Container - Fixed viewport, 100dvh, zero window scroll */
.mobile-app-container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  position: relative;
  overflow: hidden;
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-sizing: border-box;
}

/* ==========================================================================
   TOP APP BAR
   ========================================================================== */
.mobile-top-bar {
  height: var(--mobile-header-h);
  min-height: var(--mobile-header-h);
  background-color: var(--bg-secondary, #ffffff);
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.75rem;
  z-index: 40;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.mobile-brand-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--text-primary, #0f172a);
}

.mobile-brand-logo {
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', 'Arial Black', sans-serif;
  color: #dc2626;
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
}

.mobile-back-icon {
  width: 20px;
  height: 20px;
  color: var(--text-secondary, #64748b);
}

/* Prenda Quick Pill */
.mobile-garment-pill {
  background: var(--bg-tertiary, #f1f5f9);
  border: 1px solid var(--border-color, #e2e8f0);
  color: var(--text-primary, #0f172a);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 155px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-garment-pill:active {
  background: #e2e8f0;
  transform: scale(0.97);
}

.mobile-garment-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
  flex-shrink: 0;
  background-color: var(--tshirt-color, #ffffff);
}

/* Header Action Buttons */
.mobile-hdr-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.mobile-icon-btn {
  background: var(--bg-tertiary, #f1f5f9);
  border: 1px solid var(--border-color, #e2e8f0);
  color: var(--text-primary, #0f172a);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.mobile-icon-btn:active {
  transform: scale(0.92);
  background: #e2e8f0;
}

.mobile-cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--danger, #ef4444);
  color: white;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  line-height: 1;
  display: none;
}

/* ==========================================================================
   SUBHEADER / QUICK CANVAS BAR (Undo, Redo, Flip)
   ========================================================================== */
.mobile-sub-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  z-index: 30;
}

/* Segmented Pill for Garment Sides */
.mobile-sides-segmented {
  display: flex;
  background: var(--bg-tertiary, #f1f5f9);
  padding: 2px;
  border-radius: 20px;
  border: 1px solid var(--border-color, #e2e8f0);
}

.mobile-side-tab {
  border: none;
  background: transparent;
  padding: 0.3rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.mobile-side-tab.active {
  background: #ffffff;
  color: var(--text-primary, #0f172a);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.mobile-sub-tools {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.mobile-tool-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary, #64748b);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-tool-btn:active {
  background: var(--bg-tertiary, #f1f5f9);
  color: var(--text-primary, #0f172a);
}

/* ==========================================================================
   CANVAS STAGE (Central Viewport for the Garment)
   ========================================================================== */
.mobile-stage-viewport {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--studio-workspace-bg, #eaeff5);
  background-image: radial-gradient(var(--studio-dots-color, rgba(100, 116, 139, 0.22)) 1.2px, transparent 1.2px);
  background-size: 20px 20px;
  touch-action: none;
}

.mobile-garment-board {
  position: relative;
  width: 400px;
  height: 600px;
  transform-origin: center center;
  transform: translate(var(--mobile-pan-x, 0px), var(--mobile-pan-y, 0px)) scale(var(--mobile-zoom, 1));
  transition: transform 0.12s ease-out;
  will-change: transform;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.mobile-stage-viewport.is-panning .mobile-garment-board,
.mobile-stage-viewport.mode-pan-tool.is-panning .mobile-garment-board {
  transition: none !important;
}

.mobile-stage-viewport.mode-pan-tool {
  user-select: none !important;
  -webkit-user-select: none !important;
}

.mobile-stage-viewport.is-panning .canvas-container {
  pointer-events: none !important;
}

.mobile-garment-board,
.mobile-mockup-card,
.mobile-stage-viewport,
.mobile-canvas-wrapper,
.mobile-canvas-wrapper .canvas-container,
.mobile-canvas-wrapper canvas,
.mobile-canvas-wrapper .upper-canvas,
.mobile-canvas-wrapper .lower-canvas,
.mobile-tshirt-face {
  touch-action: none !important;
}

.mobile-canvas-wrapper .canvas-container {
  width: 400px !important;
  height: 600px !important;
  max-width: none !important;
  aspect-ratio: auto !important;
  pointer-events: auto;
}

.mobile-mockup-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-mockup-card.flipped {
  transform: rotateY(180deg);
}

.mobile-tshirt-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mobile-face-front {
  transform: rotateY(0deg);
  z-index: 2;
}

.mobile-face-back {
  transform: rotateY(180deg);
  z-index: 1;
}

/* Mockup Background Mask & Mold */
.mobile-tshirt-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: transparent;
  -webkit-mask-image: url('../images/remera_frente.png');
  mask-image: url('../images/remera_frente.png');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  z-index: 1;
  transition: background-color 0.25s ease;
  pointer-events: none;
}

.mobile-tshirt-bg.back {
  -webkit-mask-image: url('../images/remera_dorso.png');
  mask-image: url('../images/remera_dorso.png');
}

.mobile-tshirt-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: normal;
  z-index: 2;
  pointer-events: none;
}

/* Fabric.js Canvas Wrapper */
.mobile-canvas-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
}

/* Floating Object Selection Action Bar */
.mobile-object-bar {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  visibility: hidden;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 28px;
  padding: 0.35rem 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  z-index: 35;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  max-width: calc(100% - 16px);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  white-space: nowrap;
}

.mobile-object-bar::-webkit-scrollbar {
  display: none;
}

.mobile-object-bar.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.mobile-obj-action-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.35rem 0.55rem;
  border-radius: 12px;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-obj-action-btn:active {
  background: rgba(255, 255, 255, 0.2);
}

.mobile-obj-action-btn.danger {
  color: #f87171;
  background: rgba(239, 68, 68, 0.18);
  font-weight: 700;
}

.mobile-obj-action-btn.danger:active {
  background: rgba(239, 68, 68, 0.35);
}

/* Filter Presets Row & Buttons */
.filter-presets-row {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.35rem 0.15rem 0.55rem 0.15rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-presets-row::-webkit-scrollbar {
  display: none;
}

.filter-preset-btn {
  flex: 0 0 auto;
  min-width: 66px;
  height: 72px;
  background: var(--bg-secondary, #f8fafc);
  border: 1.5px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 0.35rem 0.45rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: var(--text-primary, #0f172a);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.filter-preset-btn .filter-preset-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary, #475569);
  transition: color 0.2s ease;
}

.filter-preset-btn .filter-preset-icon svg {
  width: 24px;
  height: 24px;
}

.filter-preset-btn .filter-preset-name {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-secondary, #64748b);
  letter-spacing: -0.2px;
}

.filter-preset-btn:hover {
  border-color: var(--accent-purple, #8b5cf6);
  background: var(--bg-hover, #f1f5f9);
}

.filter-preset-btn.active {
  border-color: var(--accent-purple, #8b5cf6);
  background: rgba(139, 92, 246, 0.1);
  box-shadow: 0 0 0 1px var(--accent-purple, #8b5cf6);
}

.filter-preset-btn.active .filter-preset-icon {
  color: var(--accent-purple, #8b5cf6);
}

.filter-preset-btn.active .filter-preset-name {
  color: var(--accent-purple, #8b5cf6);
  font-weight: 800;
}

html.dark-theme .filter-preset-btn {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

html.dark-theme .filter-preset-btn .filter-preset-icon {
  color: #94a3b8;
}

html.dark-theme .filter-preset-btn .filter-preset-name {
  color: #cbd5e1;
}

html.dark-theme .filter-preset-btn.active {
  background: rgba(139, 92, 246, 0.2);
  border-color: #a78bfa;
}

html.dark-theme .filter-preset-btn.active .filter-preset-icon,
html.dark-theme .filter-preset-btn.active .filter-preset-name {
  color: #a78bfa;
}

/* Floating Flip Garment Button */
.mobile-fab-flip {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: #ffffff;
  border: 1px solid var(--border-color, #e2e8f0);
  color: var(--text-primary, #0f172a);
  padding: 0.45rem 0.8rem;
  border-radius: 24px;
  font-size: 0.76rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  cursor: pointer;
  z-index: 25;
  transition: all 0.2s ease;
}

.mobile-fab-flip:active {
  transform: scale(0.95);
}

body.has-active-mobile-object .mobile-fab-flip {
  bottom: 58px;
}

/* ==========================================================================
   BOTTOM ACTION BAR (Price, Draft, Add to Cart)
   ========================================================================== */
.mobile-action-bar {
  background-color: var(--bg-secondary, #ffffff);
  border-top: 1px solid var(--border-color, #e2e8f0);
  padding: 0.45rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  z-index: 40;
}

.mobile-price-container {
  display: flex;
  flex-direction: column;
}

.mobile-price-label {
  font-size: 0.65rem;
  color: var(--text-secondary, #64748b);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.mobile-price-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary, #0f172a);
  line-height: 1.1;
}

.mobile-action-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  justify-content: flex-end;
}

/* Guardar borrador - letra más opaca/sutil */
.mobile-btn-draft {
  background: transparent;
  border: none;
  color: var(--text-secondary, #64748b);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.4rem 0.45rem;
  opacity: 0.75;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.mobile-btn-draft:active {
  opacity: 1;
  color: var(--text-primary, #0f172a);
}

/* Add to Cart Prominent */
.mobile-btn-cart {
  background: linear-gradient(135deg, var(--accent-purple, #8b5cf6), var(--accent-pink, #ec4899));
  color: #ffffff;
  border: none;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.55rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
  white-space: nowrap;
  transition: transform 0.1s ease;
}

.mobile-btn-cart:active {
  transform: scale(0.96);
}

/* ==========================================================================
   BOTTOM NAVIGATION BAR (Refactored Creative Tools Bar)
   ========================================================================== */
.mobile-nav-bar {
  height: var(--mobile-nav-h, 60px);
  min-height: var(--mobile-nav-h, 60px);
  background-color: var(--bg-secondary, #ffffff);
  border-top: 1px solid var(--border-color, #e2e8f0);
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 0.4rem;
  gap: 0.2rem;
  z-index: 40;
}

.mobile-nav-bar::-webkit-scrollbar {
  display: none;
}

.mobile-nav-item {
  flex: 0 0 auto;
  min-width: 58px;
  max-width: 66px;
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  padding: 0.25rem 0.1rem;
  border-radius: 8px;
  position: relative;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
}

.mobile-nav-item:active {
  background-color: rgba(139, 92, 246, 0.08);
  transform: scale(0.95);
}

.mobile-nav-item.active {
  color: var(--accent-purple, #8b5cf6);
  font-weight: 700;
}

.mobile-nav-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.mobile-nav-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  line-height: 1.1;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.mobile-nav-item.active .mobile-nav-label {
  color: var(--accent-purple, #8b5cf6);
  font-weight: 800;
}

.dark-theme .mobile-nav-bar,
[data-theme="dark"] .mobile-nav-bar {
  background-color: #0f172a;
  border-top-color: #1e293b;
}

.dark-theme .mobile-nav-label,
[data-theme="dark"] .mobile-nav-label {
  color: #94a3b8;
}

.dark-theme .mobile-nav-item.active .mobile-nav-label,
[data-theme="dark"] .mobile-nav-item.active .mobile-nav-label {
  color: #c084fc;
}
.mobile-nav-item-highlight:active .mobile-nav-icon-plus-wrap {
  transform: scale(0.92);
}
.mobile-nav-item-highlight .mobile-nav-icon {
  width: 18px;
  height: 18px;
  color: #ffffff;
}

.mobile-nav-icon {
  width: 22px;
  height: 22px;
}

.mobile-nav-label {
  font-size: 0.65rem;
  font-weight: 600;
  white-space: nowrap;
}

.mobile-nav-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 16px);
  background: var(--accent-purple, #8b5cf6);
  color: white;
  border-radius: 10px;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.05rem 0.3rem;
  line-height: 1;
}

/* ==========================================================================
   BOTTOM SHEET DRAWER (Smooth Slide-up Modal)
   ========================================================================== */
.mobile-sheet-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.mobile-sheet-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.mobile-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  max-height: 75vh;
  background-color: var(--bg-secondary, #ffffff);
  border-top-left-radius: var(--sheet-radius);
  border-top-right-radius: var(--sheet-radius);
  box-shadow: 0 -10px 30px rgba(0,0,0,0.15);
  z-index: 51;
  display: flex;
  flex-direction: column;
  transform: translateY(105%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.mobile-sheet.active {
  transform: translateY(0);
}

/* Sheet Top Handle */
.mobile-sheet-handle-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-top: 8px;
  cursor: pointer;
}

.mobile-sheet-handle {
  width: 40px;
  height: 4px;
  background-color: #cbd5e1;
  border-radius: 2px;
}

.mobile-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.85rem 0.6rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.mobile-sheet-back-btn {
  background: none;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--accent-purple, #8b5cf6);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
  line-height: 1;
}

.mobile-sheet-back-btn:active {
  background: rgba(139, 92, 246, 0.1);
}

.mobile-sheet-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
}

.mobile-sheet-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  line-height: 1;
}

.mobile-sheet-body {
  padding: 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  max-height: calc(75vh - 75px);
}

/* Panels Inside Sheet */
.mobile-sheet-panel {
  display: none;
}

.mobile-sheet-panel.active {
  display: block;
}

/* ==========================================================================
   MOBILE HUB GRID CARDS (Simplified Organization)
   ========================================================================== */
.mobile-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.mobile-hub-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.85rem 0.75rem;
  background: var(--bg-primary, #f8fafc);
  border: 1.5px solid var(--border-color, #e2e8f0);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
}

.mobile-hub-card:active {
  background: #f1f5f9;
  border-color: var(--accent-purple, #8b5cf6);
  transform: scale(0.97);
}

.mobile-hub-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.45rem;
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent-purple, #8b5cf6);
}

.mobile-hub-card-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  margin-bottom: 0.2rem;
  line-height: 1.2;
}

.mobile-hub-card-desc {
  font-size: 0.68rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.3;
}

.mobile-hub-card-full {
  grid-column: span 2;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

.mobile-hub-card-full .mobile-hub-card-icon {
  margin-bottom: 0;
  flex-shrink: 0;
}

/* Capas List inside Sheet */
.mobile-sheet-layers-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.mobile-sheet-layer-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  background: var(--bg-primary, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
}

.mobile-sheet-layer-icon {
  font-size: 1.15rem;
  width: 28px;
  text-align: center;
}

.mobile-sheet-layer-info {
  flex: 1;
  min-width: 0;
}

.mobile-sheet-layer-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-sheet-layer-sub {
  font-size: 0.66rem;
  color: var(--text-secondary, #64748b);
}

.mobile-sheet-layer-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.mobile-sheet-layer-btn {
  background: #ffffff;
  border: 1px solid var(--border-color, #cbd5e1);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary, #475569);
  padding: 0;
}

.mobile-sheet-layer-btn:active {
  background: #f1f5f9;
}

.mobile-sheet-layer-btn.danger {
  color: var(--danger, #ef4444);
  border-color: rgba(239, 68, 68, 0.3);
}

/* Section titles inside sheets */
.mobile-sec-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-secondary, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0.45rem 0 0.25rem;
}

.mobile-sec-title:first-child {
  margin-top: 0;
}

/* ==========================================================================
   SHEET 1: ARTÍCULO (Rediseñado - Moderno, Ergonómico y Adaptativo)
   ========================================================================== */

/* 1. Hero Card del Artículo Actual */
.mobile-article-hero-card {
  background: var(--bg-secondary, #ffffff);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.65rem;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.mobile-article-hero-card .hero-card-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.mobile-article-hero-card .hero-thumb-wrap {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-tertiary, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  flex-shrink: 0;
}

.mobile-article-hero-card .hero-thumb-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.mobile-article-hero-card .hero-info-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mobile-article-hero-card .hero-cat-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-purple, #8b5cf6);
  background: rgba(139, 92, 246, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.mobile-article-hero-card .hero-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary, #0f172a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-article-hero-card .hero-price {
  font-size: 0.85rem;
  font-weight: 800;
  color: #059669;
  margin-left: auto;
}

.mobile-article-hero-card .hero-selection-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--border-color, #e2e8f0);
}

.mobile-article-hero-card .hero-pill {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary, #475569);
  background: var(--bg-tertiary, #f1f5f9);
  border: 1px solid var(--border-color, #e2e8f0);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* 2. Secciones del Artículo */
.mobile-article-section {
  margin-bottom: 0.75rem;
}

.mobile-sec-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.mobile-sec-header .mobile-sec-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary, #0f172a);
  margin: 0;
  text-transform: none;
  letter-spacing: -0.01em;
}

.mobile-sec-header .mobile-sec-selected-val {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-purple, #8b5cf6);
  background: rgba(139, 92, 246, 0.08);
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
}

.mobile-sec-header .mobile-sec-badge {
  font-size: 0.7rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
}

/* 3. Selector de Modelos / Artículos (Cards Grid Ergonómicas) */
.mobile-garments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 0.65rem;
}

.mobile-garment-card {
  position: relative;
  background: var(--bg-secondary, #ffffff);
  border: 2px solid var(--border-color, #e2e8f0);
  border-radius: 14px;
  padding: 0.75rem 0.6rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mobile-garment-card:active {
  transform: scale(0.97);
}

.mobile-garment-card.active {
  border-color: var(--accent-purple, #8b5cf6);
  background: rgba(139, 92, 246, 0.03);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.16);
}

.mobile-garment-card.active::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  background-color: var(--accent-purple, #8b5cf6);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px 11px;
  border-radius: 50%;
}

.mobile-garment-card img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 0.35rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.06));
}

.mobile-garment-card .garment-card-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-primary, #0f172a);
  line-height: 1.25;
  margin-bottom: 0.2rem;
}

.mobile-garment-card .garment-card-price {
  font-size: 0.75rem;
  font-weight: 800;
  color: #059669;
}

/* 4. Selector de Color (Chips con Swatches y Nombres) */
.mobile-colors-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
  gap: 0.55rem;
}

.mobile-color-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.6rem 0.4rem;
  background: var(--bg-secondary, #ffffff);
  border: 1.5px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.mobile-color-chip:active {
  transform: scale(0.96);
}

.mobile-color-chip.active {
  border-color: var(--accent-purple, #8b5cf6);
  background: rgba(139, 92, 246, 0.04);
  box-shadow: 0 3px 10px rgba(139, 92, 246, 0.15);
}

.mobile-color-chip.active::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 5px;
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b5cf6' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}

.mobile-color-chip .color-swatch-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #cbd5e1, 0 2px 4px rgba(0,0,0,0.06);
  margin-bottom: 0.35rem;
  background-size: cover;
  background-position: center;
  position: relative;
}

.mobile-color-chip .color-chip-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  text-align: center;
  line-height: 1.2;
}

.mobile-color-chip .color-chip-extra {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent-purple, #8b5cf6);
  margin-top: 0.1rem;
}

.mobile-color-chip .color-texture-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  font-size: 0.65rem;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* 5. Selector de Talle (Botones Ergonómicos de Alto Impacto) */
.mobile-sizes-chips-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
  gap: 0.5rem;
}

.mobile-size-chip {
  min-height: 46px;
  padding: 0.4rem;
  background: var(--bg-secondary, #ffffff);
  border: 1.5px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary, #0f172a);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mobile-size-chip:active {
  transform: scale(0.95);
}

.mobile-size-chip.active {
  background: var(--accent-purple, #8b5cf6);
  color: #ffffff;
  border-color: var(--accent-purple, #8b5cf6);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* 6. Selector de Tela (Tarjetas con soporte de textura real) */
.mobile-fabrics-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.mobile-fabric-card {
  padding: 0.75rem 0.85rem;
  background: var(--bg-secondary, #ffffff);
  border: 1.5px solid var(--border-color, #e2e8f0);
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.15s ease;
}

.mobile-fabric-card:active {
  transform: scale(0.98);
}

.mobile-fabric-card.active {
  border-color: var(--accent-purple, #8b5cf6);
  background: rgba(139, 92, 246, 0.03);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.12);
}

.mobile-fabric-card .fabric-info-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.mobile-fabric-card .fabric-texture-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-color, #e2e8f0);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.mobile-fabric-card .fabric-texts {
  flex: 1;
  min-width: 0;
}

.mobile-fabric-card .fabric-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary, #0f172a);
  margin-bottom: 0.15rem;
  display: block;
}

.mobile-fabric-card .fabric-desc {
  font-size: 0.72rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.3;
  display: block;
}

.mobile-fabric-card .fabric-price-badge {
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--accent-purple, #8b5cf6);
  background: rgba(139, 92, 246, 0.08);
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  white-space: nowrap;
}

.mobile-fabric-card.active .fabric-price-badge {
  background: var(--accent-purple, #8b5cf6);
  color: #ffffff;
}

/* 7. Botón Inferior de Acción */
.mobile-article-sheet-actions {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.85rem 0 0.25rem;
  background: linear-gradient(to top, var(--bg-primary, #f8fafc) 80%, transparent);
  margin-top: 1rem;
  z-index: 5;
}

.mobile-btn-apply-article {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 800;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
  cursor: pointer;
  border: none;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #ffffff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mobile-btn-apply-article:active {
  transform: scale(0.98);
}

/* ==========================================================================
   SHEET 2: IMAGEN (Upload & Edit Image)
   ========================================================================== */
.mobile-upload-box {
  background: var(--bg-tertiary, #f1f5f9);
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
}

.mobile-upload-box:active {
  border-color: var(--accent-purple, #8b5cf6);
  background: #f8fafc;
}

.mobile-upload-icon {
  width: 40px;
  height: 40px;
  color: var(--accent-purple, #8b5cf6);
  margin-bottom: 0.5rem;
}

.mobile-upload-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  margin-bottom: 0.2rem;
}

.mobile-upload-sub {
  font-size: 0.72rem;
  color: var(--text-secondary, #64748b);
}

/* ==========================================================================
   SHEET 3: DIBUJO (Touch Drawing, RGB, Eraser)
   ========================================================================== */
.mobile-draw-tools-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.mobile-draw-switch-btn {
  padding: 0.55rem;
  background: var(--bg-tertiary, #f1f5f9);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
}

.mobile-draw-switch-btn.active {
  background: var(--accent-purple, #8b5cf6);
  color: #ffffff;
  border-color: var(--accent-purple, #8b5cf6);
}

.mobile-slider-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.mobile-slider-group input[type="range"] {
  flex: 1;
  accent-color: var(--accent-purple, #8b5cf6);
}

.mobile-brush-preview-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-palette-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.mobile-palette-circle {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.15s;
}

.mobile-palette-circle.active {
  transform: scale(1.2);
  box-shadow: 0 0 0 2px var(--accent-purple, #8b5cf6);
}

/* RGB Custom Picker in Mobile */
.mobile-rgb-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-tertiary, #f1f5f9);
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border-color, #e2e8f0);
}

.mobile-rgb-row input[type="color"] {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: none;
}

/* ==========================================================================
   SHEET 4: TEXTO (Add Text, Fonts, Colors)
   ========================================================================== */
.mobile-text-input-wrap {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.mobile-text-input {
  flex: 1;
  padding: 0.6rem 0.85rem;
  font-size: 0.88rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  outline: none;
}

.mobile-text-input:focus {
  border-color: var(--accent-purple, #8b5cf6);
}

.mobile-btn-add-text {
  background: var(--accent-purple, #8b5cf6);
  color: #ffffff;
  border: none;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0 0.85rem;
  border-radius: 10px;
  cursor: pointer;
}

.mobile-fonts-row {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  -webkit-overflow-scrolling: touch;
}

.mobile-font-chip {
  padding: 0.4rem 0.75rem;
  background: var(--bg-tertiary, #f1f5f9);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.mobile-font-chip.active {
  background: var(--accent-purple, #8b5cf6);
  color: #ffffff;
}

.mobile-font-cat-pills {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

.mobile-font-cat-pill {
  padding: 0.25rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 20px;
  border: 1px solid var(--border-color, #e2e8f0);
  background: var(--bg-tertiary, #f8fafc);
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.mobile-font-cat-pill.active {
  background: var(--accent-purple, #8b5cf6);
  border-color: var(--accent-purple, #8b5cf6);
  color: #ffffff;
}

.mobile-font-badge-3d {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #ffffff;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ==========================================================================
   SHEET 5: BORRADORES (Saved Drafts on Mobile)
   ========================================================================== */
.mobile-drafts-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.mobile-draft-item {
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary, #ffffff);
  border: 1.5px solid var(--border-color, #e2e8f0);
  border-radius: 14px;
  padding: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  gap: 0.65rem;
}

.mobile-draft-item-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-draft-thumb {
  width: 62px;
  height: 62px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--border-color, #e2e8f0);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-draft-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.mobile-draft-info {
  flex: 1;
  min-width: 0;
}

.mobile-draft-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-draft-sub {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent-purple, #8b5cf6);
  margin: 0.2rem 0 0;
}

.mobile-draft-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.mobile-btn-draft-action {
  min-height: 40px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: transform 0.1s ease, opacity 0.15s ease;
}

.mobile-btn-draft-action:active {
  transform: scale(0.96);
}

.mobile-btn-draft-edit {
  background: #f8fafc;
  border: 1.5px solid var(--border-color, #cbd5e1);
  color: var(--text-primary, #0f172a);
  flex: 1 1 calc(50% - 0.25rem);
}

.mobile-btn-draft-copy {
  background: #eff6ff;
  border: 1.5px solid #93c5fd;
  color: #1d4ed8;
  flex: 1 1 calc(50% - 0.25rem);
}

.mobile-btn-draft-cart {
  background: linear-gradient(135deg, var(--accent-purple, #8b5cf6), #7c3aed);
  color: #ffffff;
  flex: 1;
  box-shadow: 0 3px 8px rgba(139, 92, 246, 0.3);
}

.mobile-btn-draft-del {
  width: 42px;
  height: 42px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--danger, #ef4444);
  border-radius: 10px;
  font-size: 1.15rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Emergent Floating Finish Drawing Button & Action Bar */
.mobile-drawing-floating-container {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 0.5rem;
  z-index: 45;
  animation: popInBounce 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mobile-drawing-floating-container.active {
  display: flex;
}

.mobile-drawing-floating-container .mobile-btn-finish-drawing {
  position: static;
  transform: none;
  display: flex;
  margin: 0;
  animation: none;
}

.mobile-btn-finish-drawing {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.84rem;
  padding: 0.5rem 1.15rem;
  border-radius: 30px;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.5);
  display: none;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  z-index: 45;
  animation: popInBounce 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mobile-btn-finish-drawing.active {
  display: flex;
}

.mobile-btn-finish-drawing.state-activate {
  background: linear-gradient(135deg, var(--accent-purple, #8b5cf6), #7c3aed);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.45);
}

.mobile-btn-drawing-color {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  color: var(--text-primary, #0f172a);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.5rem 0.9rem;
  border-radius: 30px;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-btn-drawing-color:active {
  transform: scale(0.96);
}

.mobile-drawing-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
  display: inline-block;
  flex-shrink: 0;
}

html.dark-theme .mobile-btn-drawing-color {
  background: #1e293b;
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

html.dark-theme .mobile-drawing-color-dot {
  border-color: #334155;
}

/* Floating Stage Tools: Undo, Redo, Pan / Mano */
.mobile-stage-tools {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  z-index: 35;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  padding: 0.25rem 0.35rem;
  border-radius: 30px;
  border: 1px solid var(--border-color, #e2e8f0);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.mobile-tool-circle-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-color, #e2e8f0);
  background: #ffffff;
  color: var(--text-primary, #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.mobile-tool-circle-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.mobile-tool-circle-btn.active {
  background: var(--accent-purple, #8b5cf6);
  color: #ffffff;
  border-color: var(--accent-purple, #8b5cf6);
}

body.mobile-pan-active .mobile-stage-viewport {
  cursor: grab;
}

body.mobile-pan-active.is-panning .mobile-stage-viewport {
  cursor: grabbing;
}

body.mobile-pan-active .mobile-canvas-wrapper {
  pointer-events: auto;
}

.mobile-shapes-grid {
  grid-template-columns: repeat(4, 1fr) !important;
  margin-top: 0.4rem;
}

.mobile-presets-scroll {
  display: flex !important;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
}
.mobile-presets-scroll::-webkit-scrollbar {
  display: none;
}

/* --- Shape Mold Cards Mobile --- */
.shape-molds-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.shape-mold-card {
  aspect-ratio: 1 / 1;
  background: var(--bg-card, #ffffff);
  border: 1.5px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  cursor: pointer;
  padding: 0.4rem 0.2rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-primary, #0f172a);
}

.shape-mold-card:hover, .shape-mold-card:active {
  border-color: var(--accent-purple, #8b5cf6);
  background: rgba(139, 92, 246, 0.05);
}

.shape-mold-svg {
  width: 28px;
  height: 28px;
  display: block;
  fill: currentColor;
  color: inherit;
}

.shape-mold-name {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Categorías y Modos de Figuras en Mobile */
.shape-categories-bar {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 0.6rem;
  -webkit-overflow-scrolling: touch;
}
.shape-category-chip {
  flex-shrink: 0;
  background: var(--bg-tertiary, #f1f5f9);
  border: 1px solid var(--border-color, #e2e8f0);
  color: var(--text-secondary, #64748b);
  border-radius: 16px;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.shape-category-chip.active {
  background: var(--accent-purple, #8b5cf6);
  border-color: var(--accent-purple, #8b5cf6);
  color: #ffffff;
}
.shape-mode-toggle-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.btn-shape-mode {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border-color, #e2e8f0);
  background: var(--bg-card, #ffffff);
  color: var(--text-secondary, #64748b);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-shape-mode.active {
  background: var(--accent-purple, #8b5cf6);
  color: #ffffff;
  border-color: var(--accent-purple, #8b5cf6);
}

.shapes-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.shape-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.4rem;
  background: var(--bg-card, #ffffff);
  border: 1.5px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
}

.shape-cat-card:active {
  background: #f1f5f9;
  border-color: var(--accent-purple, #8b5cf6);
}

.shape-cat-preview {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary, #f8fafc);
  border-radius: 10px;
  margin-bottom: 0.45rem;
  color: var(--accent-purple, #8b5cf6);
  overflow: hidden;
  padding: 4px;
}

.shape-cat-preview svg {
  width: 100%;
  height: 100%;
  max-width: 32px;
  max-height: 32px;
  display: block;
}

.shape-cat-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  margin-bottom: 0.15rem;
}

.shape-cat-count {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
}

.shape-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.btn-back-shape-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg-tertiary, #f1f5f9);
  border: 1px solid var(--border-color, #e2e8f0);
  color: var(--accent-purple, #8b5cf6);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.3rem 0.55rem;
  border-radius: 8px;
}

.shape-current-cat-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
}


/* ==========================================================================
   LAYER PANEL (Panel de Capas)
   ========================================================================== */

/* ==========================================================================
   LAYER PANEL (Panel de Capas Moderno)
   ========================================================================== */

/* ==========================================================================
   LAYER PANEL (Panel de Capas Moderno)
   ========================================================================== */
.mobile-layer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 90vw;
  background: #ffffff;
  border-left: 1px solid #e2e8f0;
  box-shadow: none;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
  overscroll-behavior: contain;
  user-select: none;
  -webkit-user-select: none;
}

.mobile-layer-panel.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.16);
}

.layer-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  flex-shrink: 0;
}

.layer-panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.layer-panel-header h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.layer-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #8b5cf6;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
}

.layer-panel-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.layer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.layer-btn:hover,
.layer-btn:active {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #e2e8f0;
}

.layer-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0.65rem;
  background: #f8fafc;
  -webkit-overflow-scrolling: touch;
}

.layer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.layer-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.6rem 0.65rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
}

.layer-item:hover {
  background: #ffffff;
  border-color: #cbd5e1;
}

.layer-item.active {
  border-color: #8b5cf6;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.35);
}

.layer-item.locked {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.layer-item.hidden {
  opacity: 0.5;
  background: #f1f5f9;
}

.layer-item-dragging {
  opacity: 0.4;
  transform: scale(0.98);
}

.layer-item-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.layer-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #94a3b8;
  cursor: grab;
  flex-shrink: 0;
  border-radius: 4px;
}

.layer-drag-handle:active {
  cursor: grabbing;
  color: #8b5cf6;
}

.layer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #64748b;
  flex-shrink: 0;
}

.layer-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.layer-name-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.layer-type {
  font-size: 0.65rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 1px;
}

.layer-quick-actions {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}

.layer-control-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.layer-control-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.layer-control-btn.layer-visibility.off {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.layer-control-btn.layer-lock.on {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
}

.layer-control-btn.layer-delete:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* Sub row (opacidad, subir, bajar, duplicar, renombrar) */
.layer-item-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.4rem;
  margin-top: 0.2rem;
  border-top: 1px dashed #e2e8f0;
}

.layer-opacity-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.layer-sub-label {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 500;
  flex-shrink: 0;
}

.layer-opacity-slider {
  flex: 1;
  min-width: 45px;
  max-width: 75px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: #cbd5e1;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.layer-opacity-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #8b5cf6;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.layer-opacity-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #8b5cf6;
  border: none;
  cursor: pointer;
}

.layer-opacity-val {
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  min-width: 28px;
  text-align: right;
  flex-shrink: 0;
}

.layer-sub-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.layer-sub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 6px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.layer-sub-btn:hover {
  background: #f1f5f9;
  color: #8b5cf6;
  border-color: #8b5cf6;
}

.layer-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #94a3b8;
  font-size: 0.85rem;
}

.layer-panel-footer {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  flex-shrink: 0;
}

.layer-btn-secondary {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.layer-btn-secondary:hover,
.layer-btn-secondary:active {
  background: #f1f5f9;
  border-color: #8b5cf6;
  color: #8b5cf6;
}

/* ==========================================================================
   MOBILE MUG MODE & SUBLIMATION RECTANGULAR SHEET
   ========================================================================== */
.mobile-garment-board.is-mug-mode {
  width: 500px !important;
  height: 225px !important;
  background: #ffffff !important;
  border-radius: 4px !important;
  box-shadow: 0 14px 34px -6px rgba(0, 0, 0, 0.18), 0 3px 12px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.12) !important;
  overflow: visible !important;
}

.mobile-garment-board.is-mug-mode .mobile-mockup-card {
  width: 500px !important;
  height: 225px !important;
  transform: none !important;
}

.mobile-garment-board.is-mug-mode .mobile-tshirt-face {
  width: 500px !important;
  height: 225px !important;
  border-radius: 4px !important;
  overflow: hidden !important;
}

.mobile-garment-board.is-mug-mode .mobile-tshirt-img,
.mobile-garment-board.is-mug-mode .mobile-tshirt-bg,
.mobile-garment-board.is-mug-mode .mobile-face-back {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

.mobile-garment-board.is-mug-mode .mobile-canvas-wrapper {
  width: 500px !important;
  height: 225px !important;
  left: 0 !important;
  top: 0 !important;
  border-radius: 4px !important;
  overflow: hidden !important;
}

.mobile-garment-board.is-mug-mode .mobile-canvas-wrapper .canvas-container {
  width: 500px !important;
  height: 225px !important;
}

.mobile-garment-board.is-mug-mode canvas {
  border-radius: 4px !important;
}

/* Badge for Mug Mode */
.mobile-mug-badge {
  position: absolute;
  top: 0.65rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(139, 92, 246, 0.28);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #1e293b;
  pointer-events: none;
}

/* Hide Dorso Tab on Mug Mode */
.mobile-app-container.is-mug-mode .mobile-sides-segmented {
  display: none !important;
}

/* ==========================================================================
   MOBILE LLAVERO MODE (5x5 cm - 380x380 px con 2 Lados A y B)
   ========================================================================== */
.mobile-garment-board.is-llavero-mode {
  width: 380px !important;
  height: 380px !important;
  background: transparent !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.mobile-garment-board.is-llavero-mode .mobile-mockup-card {
  width: 380px !important;
  height: 380px !important;
}

.mobile-garment-board.is-llavero-mode .mobile-tshirt-face {
  width: 380px !important;
  height: 380px !important;
  background: #ffffff !important;
  border-radius: 8px !important;
  box-shadow: 0 14px 34px -6px rgba(0, 0, 0, 0.18), 0 3px 12px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.12) !important;
  overflow: visible !important;
}

.mobile-garment-board.is-llavero-mode .mobile-tshirt-img,
.mobile-garment-board.is-llavero-mode .mobile-tshirt-bg {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

.mobile-garment-board.is-llavero-mode .mobile-canvas-wrapper {
  width: 380px !important;
  height: 380px !important;
  left: 0 !important;
  top: 0 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

.mobile-garment-board.is-llavero-mode .mobile-canvas-wrapper .canvas-container {
  width: 380px !important;
  height: 380px !important;
}

.mobile-garment-board.is-llavero-mode canvas {
  border-radius: 8px !important;
}

/* Silueta Circular Mobile */
.mobile-garment-board.is-llavero-mode.shape-circular .mobile-tshirt-face,
.mobile-garment-board.is-llavero-mode.shape-circular .mobile-canvas-wrapper,
.mobile-garment-board.is-llavero-mode.shape-circular canvas {
  border-radius: 50% !important;
  clip-path: none !important;
}

/* Silueta Corazón Mobile */
.mobile-garment-board.is-llavero-mode.shape-corazon {
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.16)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.08)) !important;
}
.mobile-garment-board.is-llavero-mode.shape-corazon .mobile-tshirt-face {
  box-shadow: none !important;
  clip-path: path('M 190, 104 C 190, 104 154, 32 86, 32 C 32, 32 14, 86 14, 140 C 14, 222 108, 285 190, 357 C 272, 285 366, 222 366, 140 C 366, 86 348, 32 294, 32 C 226, 32 190, 104 190, 104 Z') !important;
}
.mobile-garment-board.is-llavero-mode.shape-corazon .mobile-canvas-wrapper,
.mobile-garment-board.is-llavero-mode.shape-corazon canvas {
  clip-path: path('M 190, 104 C 190, 104 154, 32 86, 32 C 32, 32 14, 86 14, 140 C 14, 222 108, 285 190, 357 C 272, 285 366, 222 366, 140 C 366, 86 348, 32 294, 32 C 226, 32 190, 104 190, 104 Z') !important;
}

/* Silueta Cuadrada Mobile */
.mobile-garment-board.is-llavero-mode.shape-cuadrado .mobile-tshirt-face,
.mobile-garment-board.is-llavero-mode.shape-cuadrado .mobile-canvas-wrapper,
.mobile-garment-board.is-llavero-mode.shape-cuadrado canvas {
  border-radius: 12px !important;
  clip-path: none !important;
}

/* Silueta Rectangular Mobile */
.mobile-garment-board.is-llavero-mode.shape-rectangular,
.mobile-garment-board.is-llavero-mode.shape-rectangular .mobile-mockup-card,
.mobile-garment-board.is-llavero-mode.shape-rectangular .mobile-tshirt-face,
.mobile-garment-board.is-llavero-mode.shape-rectangular .mobile-canvas-wrapper {
  width: 380px !important;
  height: 254px !important;
  border-radius: 12px !important;
  clip-path: none !important;
}

.mobile-app-container.is-llavero-mode .mobile-sides-segmented {
  display: flex !important;
}

/* Wizard Overlay Mobile Adaptations */
.wizard-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  box-sizing: border-box;
}

.wizard-overlay.active {
  display: flex !important;
}

.wizard-overlay .wizard-card {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.wizard-overlay .wizard-header {
  padding: 1.15rem 1.25rem 0.65rem;
  text-align: center;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
}

.wizard-overlay .wizard-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.6rem 0;
  letter-spacing: -0.02em;
}

.wizard-overlay .wizard-progress-bar {
  height: 4px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.65rem;
}

.wizard-overlay .wizard-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
  transition: width 0.3s ease;
}

.wizard-overlay .wizard-steps-indicator {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
}

.wizard-overlay .step-indicator {
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  text-transform: uppercase;
}

.wizard-overlay .step-indicator.active {
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.08);
}

.wizard-overlay .step-indicator.completed {
  color: #10b981;
}

.wizard-overlay .wizard-body {
  padding: 1rem 1.15rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

.wizard-overlay .wizard-step-content {
  display: none;
}

.wizard-overlay .wizard-step-content.active {
  display: block;
}

.wizard-overlay .wizard-step-desc {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0 0 0.85rem 0;
  text-align: center;
}

.wizard-overlay .categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.wizard-overlay .garments-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.wizard-overlay .wizard-category-card {
  padding: 1rem 0.6rem;
  text-align: center;
  border-radius: 14px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  position: relative;
}

.wizard-overlay .wizard-category-card:active {
  transform: scale(0.97);
}

.wizard-overlay .wizard-category-card.active {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.05);
  box-shadow: 0 0 0 1px #8b5cf6;
}

.wizard-overlay .wizard-category-card.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.wizard-overlay .cat-card-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.15rem;
}

.wizard-overlay .option-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.wizard-overlay .option-subtitle {
  font-size: 0.7rem;
  color: #64748b;
  line-height: 1.2;
}

.wizard-overlay .badge-cat-soon {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  font-size: 0.55rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #94a3b8;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  text-transform: uppercase;
}

.wizard-overlay .wizard-footer {
  padding: 0.85rem 1.15rem 1.1rem;
  display: flex;
  gap: 0.65rem;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
}

.wizard-overlay .wizard-footer button {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.wizard-overlay #wizardPrevBtn {
  background: #f1f5f9;
  color: #475569;
  flex: 1;
}

.wizard-overlay #wizardNextBtn {
  background: #0f172a;
  color: #ffffff;
  flex: 2;
}

.wizard-overlay #wizardNextBtn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Category Filter Pills in Bottom Sheet (#sheetPanelGarment) */
.mobile-cat-filter-pills {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.mobile-cat-pill-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s;
}

.mobile-cat-pill-btn.active {
  background: #8b5cf6;
  border-color: #8b5cf6;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

/* ==========================================================================
   MOBILE VOLUME DISCOUNTS & QUANTITY STEPPER
   ========================================================================== */
.mobile-volume-nudge-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.85rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(139, 92, 246, 0.15));
  border-top: 1px solid rgba(16, 185, 129, 0.3);
  border-bottom: 1px solid rgba(16, 185, 129, 0.2);
  font-size: 0.72rem;
  font-weight: 700;
  color: #059669;
  z-index: 10;
}

.mobile-btn-tiers-link {
  background: transparent;
  border: none;
  font-size: 0.72rem;
  font-weight: 700;
  color: #8b5cf6;
  text-decoration: underline;
  cursor: pointer;
  padding: 0 0.2rem;
}

.mobile-qty-counter {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  height: 32px;
}

.mobile-btn-qty {
  width: 28px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  font-size: 1rem;
  font-weight: 800;
  color: #334155;
  cursor: pointer;
}

.mobile-btn-qty:active {
  background: rgba(139, 92, 246, 0.2);
  color: #8b5cf6;
}

.mobile-qty-val {
  min-width: 24px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: #0f172a;
}

/* DPI Quality Detector Badge for Mobile */
.mobile-obj-dpi-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.6rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
}

/* Mobile QR Generator Modal & Callouts */
.qr-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100020 !important;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.qr-modal-overlay.active {
  display: flex !important;
}

/* TIERS MODAL (MOBILE) */
.tiers-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100010 !important;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.tiers-modal-overlay.active {
  display: flex !important;
}

.tiers-modal-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  padding: 1.25rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  animation: qrModalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.tiers-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.btn-close-tiers {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.25rem;
}

.tiers-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.tier-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.tier-item.mayorista {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1));
  border-color: rgba(245, 158, 11, 0.4);
}

.tier-range {
  font-weight: 700;
  font-size: 0.84rem;
  color: #0f172a;
}

.tier-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
}

.tier-badge.regular {
  background: #e2e8f0;
  color: #475569;
}

.tier-badge.off {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tier-badge.gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
}

.qr-modal-container {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: qrModalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

@keyframes qrModalPop {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.qr-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid #f1f5f9;
}

.qr-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 6px;
}

.qr-modal-body {
  padding: 1rem 1.1rem;
  overflow-y: auto;
  max-height: 75vh;
}

.qr-type-pills {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.qr-type-pill {
  padding: 0.45rem 0.75rem;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.qr-type-pill.active {
  background: #8b5cf6;
  border-color: #8b5cf6;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.qr-modal-content-grid {
  display: flex;
  flex-direction: column-reverse;
  gap: 1rem;
}

.qr-form-col {
  display: flex;
  flex-direction: column;
}

.qr-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.qr-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #334155;
}

.qr-input, .qr-select {
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-size: 0.82rem;
  color: #0f172a;
  background: #ffffff;
  outline: none;
}

.qr-input:focus, .qr-select:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.qr-help {
  font-size: 0.68rem;
  color: #64748b;
  line-height: 1.35;
  margin-top: 0.2rem;
}

.qr-preview-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-preview-box {
  width: 150px;
  height: 150px;
  border-radius: 12px;
  border: 1.5px dashed #cbd5e1;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  box-sizing: border-box;
}

.qr-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1.1rem;
  border-top: 1px solid #f1f5f9;
  background: #fafafa;
}



