/* =========================================================
   نفذها — استوديو تلزيق الاستيكرات التفاعلي (Stickers Lab)
   ========================================================= */

.lab-page {
  min-height: 100vh;
  padding-bottom: 80px;
}

/* ---------- Header Hero in Studio ---------- */
.lab-hero {
  text-align: center;
  padding: 16px 16px 10px;
  position: relative;
}

.lab-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(236, 24, 118, 0.15);
  border: 1px solid rgba(236, 24, 118, 0.4);
  color: #ff4fa3;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.lab-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 36px);
  margin: 0 0 6px;
  color: var(--paper);
  text-shadow: 0 2px 20px rgba(107, 47, 165, 0.6);
}

.lab-hero p {
  color: #c9b7de;
  font-size: clamp(13px, 2vw, 14.5px);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ---------- Device Selector Pills ---------- */
.device-selector-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 12px 0 16px;
  flex-wrap: wrap;
}

.device-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d1c1e6;
  padding: 10px 20px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.device-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: translateY(-2px);
}

.device-btn.is-active {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(236, 24, 118, 0.4);
}

/* ---------- Workspace Layout (Always 2 Columns on Desktop, Laptops & Tablets) ---------- */
.lab-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 12px;
  box-sizing: border-box;
  align-items: start;
}

@media (min-width: 768px) {
  .lab-workspace {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 20px;
    padding: 0 16px;
  }

  .stage-panel {
    position: sticky;
    top: 75px;
    z-index: 10;
  }
}

@media (min-width: 1100px) {
  .lab-workspace {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 24px;
  }
}

/* Base constraints to prevent grid blowout */
.stage-panel,
.drawer-panel {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* ---------- Main Stage / Canvas Area ---------- */
.stage-panel {
  background: rgba(24, 12, 38, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Controls above canvas */
.stage-toolbar {
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  box-sizing: border-box;
}

.stage-toolbar__group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 100%;
}

.tool-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e5daf3;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-family: var(--font-body);
  box-sizing: border-box;
}

.tool-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: translateY(-1px);
}

.tool-btn--magic {
  background: linear-gradient(135deg, rgba(236, 24, 118, 0.25), rgba(107, 47, 165, 0.35));
  border-color: rgba(236, 24, 118, 0.5);
  color: #ffd400;
}
.tool-btn--magic:hover {
  background: linear-gradient(135deg, rgba(236, 24, 118, 0.4), rgba(107, 47, 165, 0.55));
}

.tool-btn--danger {
  color: #ff7676;
}
.tool-btn--danger:hover {
  background: rgba(255, 70, 70, 0.15);
  border-color: rgba(255, 70, 70, 0.4);
}

/* ---------- Device Canvas Wrapper ---------- */
.canvas-wrapper {
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 0;
  min-height: 240px;
  box-sizing: border-box;
  overflow: hidden;
}

@media (min-width: 768px) {
  .canvas-wrapper {
    min-height: 380px;
    padding: 10px 0;
  }
}

.device-viewport {
  position: relative;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-inline: auto;
}

/* 1. LAPTOP MOCKUP */
.device--laptop {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 16 / 10.5;
  background: radial-gradient(ellipse at 50% 30%, #363345 0%, #1c1a26 70%, #14121d 100%);
  border-radius: 18px;
  border: 3px solid #4a475d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 25px 50px rgba(0,0,0,0.65);
}

.device--laptop::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 6px;
  background: #23212d;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  border-top: none;
  z-index: 2;
}

/* Center Emblem on Laptop */
.device-center-emblem {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.18;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.device-center-emblem img {
  width: 65px;
  height: auto;
  filter: brightness(2) contrast(1.2);
}
.device-center-emblem span {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 2px;
  color: #fff;
}

/* 2. PHONE MOCKUP */
.device--phone {
  width: min(100%, 280px);
  aspect-ratio: 9 / 19;
  background: linear-gradient(155deg, #261d36 0%, #150f22 60%, #0d0917 100%);
  border-radius: 46px;
  border: 4px solid #3c3452;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15), 0 30px 60px rgba(0,0,0,0.75);
}

.device--phone .phone-camera-island {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 78px;
  height: 78px;
  background: rgba(18, 12, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 22px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.06);
  pointer-events: none;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 8px;
  gap: 6px;
  align-items: center;
  justify-items: center;
}

.camera-lens {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #2a223c, #06040a 80%);
  border: 2px solid #4a3e65;
  box-shadow: inset 0 0 5px #000, 0 2px 4px rgba(0,0,0,0.6);
  position: relative;
}
.camera-lens::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}
.camera-flash {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fbf6d9;
  box-shadow: 0 0 6px rgba(251, 246, 217, 0.6);
}

/* 3. NOTEBOOK MOCKUP */
.device--notebook {
  width: min(100%, 380px);
  aspect-ratio: 3 / 4.2;
  background: linear-gradient(135deg, #2a1542 0%, #150824 100%);
  border-radius: 14px 22px 22px 14px;
  border: 3px solid #43226a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), -8px 0 20px rgba(0,0,0,0.4), 0 25px 60px rgba(0,0,0,0.65);
}

.device--notebook .notebook-spine {
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  border-left: 1px dashed rgba(255, 255, 255, 0.15);
  pointer-events: none;
  z-index: 2;
}

.device--notebook .notebook-ribbon {
  position: absolute;
  bottom: -18px;
  right: 60px;
  width: 14px;
  height: 28px;
  background: var(--pink);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
  pointer-events: none;
  z-index: 1;
}

/* ---------- Placed Stickers on Device ---------- */
.canvas-sticker {
  position: absolute;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  transform-origin: center center;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.canvas-sticker img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55));
}

.canvas-sticker.is-dragging {
  cursor: grabbing !important;
}

/* Active Selection Outline & Handles */
.canvas-sticker.is-selected {
  outline: 2px dashed #ff4fa3;
  outline-offset: 4px;
  z-index: 50 !important;
}

.sticker-handle {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  z-index: 60;
  border: 2px solid #ffffff;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.sticker-handle--delete {
  top: -14px;
  right: -14px;
  background: #ec1876;
  color: #fff;
  font-weight: 800;
}
.sticker-handle--delete:hover {
  transform: scale(1.15);
  background: #ff1f85;
}

.sticker-handle--rotate {
  top: -34px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffd400;
  color: #100226;
  cursor: grab;
}
.sticker-handle--rotate::after {
  content: '';
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 8px;
  background: #ffd400;
}

.sticker-handle--scale {
  bottom: -14px;
  left: -14px;
  background: #00f5d4;
  color: #100226;
  cursor: nwse-resize;
  font-weight: 800;
}
.sticker-handle--scale:hover {
  transform: scale(1.15);
}

/* Canvas Hint & Empty state */
.canvas-empty-state {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
  width: 80%;
  z-index: 5;
}
.canvas-empty-state span {
  font-size: 32px;
  display: block;
  margin-bottom: 6px;
}
.canvas-empty-state p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

/* ---------- Sticker Drawer / Catalog Panel ---------- */
.drawer-panel {
  background: rgba(24, 12, 38, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* عند الدخول لكوليكشن محدد، نخفي الترويسة العلوية الكبيرة لتوفير المساحة وإبقاء موكاب اللابتوب والاستيكرات ظاهرة بالكامل */
.drawer-panel.is-in-stickers-view .drawer-header {
  display: none;
}

.drawer-header {
  margin-bottom: 14px;
}

.drawer-header__main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.drawer-header h3 {
  font-family: var(--font-display);
  font-size: 19px;
  margin: 0;
  color: var(--paper);
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-header__count-badge {
  background: rgba(236, 24, 118, 0.15);
  border: 1px solid rgba(236, 24, 118, 0.4);
  color: #ff77a8;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.drawer-header__desc {
  margin: 0 0 12px;
  color: #c4b3dc;
  font-size: 12.5px;
  line-height: 1.45;
}

/* Quick Search Box */
.drawer-search-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 10px;
}

.drawer-search-input {
  width: 100%;
  background: rgba(10, 4, 18, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 9px 36px 9px 32px;
  color: #ffffff;
  font-size: 12.5px;
  font-family: var(--font-body);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.drawer-search-input:focus {
  outline: none;
  border-color: #ffd400;
  box-shadow: 0 0 14px rgba(255, 212, 0, 0.25);
  background: rgba(16, 7, 28, 0.85);
}

.drawer-search-input::placeholder {
  color: #8c7aa5;
}

.drawer-search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  opacity: 0.75;
  pointer-events: none;
}

.drawer-search-clear {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.drawer-search-clear:hover {
  background: #ec1876;
}

/* View Switchers (Categories vs All) */
.drawer-view-switchers {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
}

.view-switch-btn {
  flex: 1;
  padding: 7px 10px;
  background: transparent;
  border: none;
  border-radius: 9px;
  color: #c6b7dc;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.view-switch-btn:hover {
  color: #fff;
}

.view-switch-btn.is-active {
  background: linear-gradient(135deg, rgba(236, 24, 118, 0.35), rgba(144, 71, 255, 0.35));
  color: #ffd400;
  border: 1px solid rgba(255, 212, 0, 0.35);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* ================= 1. COLLECTIONS VIEW (GRID OF FOLDERS) ================= */
.collections-view {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.collections-view__hint {
  font-size: 12px;
  color: #d8c8ec;
  font-weight: 700;
  margin-bottom: 8px;
}

.collections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  max-height: 440px;
  overflow-y: auto;
  padding: 4px 2px 12px;
  scrollbar-width: thin;
}

.collections-grid::-webkit-scrollbar {
  width: 6px;
}
.collections-grid::-webkit-scrollbar-thumb {
  background: rgba(236, 24, 118, 0.3);
  border-radius: 4px;
}

.collection-card {
  background: linear-gradient(145deg, rgba(38, 18, 56, 0.8), rgba(18, 8, 28, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 12px 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.collection-card:hover {
  border-color: #ffd400;
  background: linear-gradient(145deg, rgba(50, 24, 75, 0.9), rgba(26, 11, 40, 0.95));
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.55), 0 0 15px rgba(255, 212, 0, 0.25);
}

.collection-card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffd400;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  line-height: 1.2;
}

.collection-card__cover-wrap {
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0 8px;
  position: relative;
}

.collection-card__cover-wrap img {
  max-width: 100%;
  max-height: 100%;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
  transition: transform 0.25s ease;
}

.collection-card:hover .collection-card__cover-wrap img {
  transform: scale(1.12) rotate(4deg);
}

.collection-card__title {
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 32px;
}

.collection-card__tagline {
  font-size: 10px;
  color: #baa4d0;
  margin: 0 0 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.collection-card__btn {
  width: 100%;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(236, 24, 118, 0.15);
  border: 1px solid rgba(236, 24, 118, 0.35);
  color: #ff77a8;
  font-size: 11px;
  font-weight: 800;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.collection-card:hover .collection-card__btn {
  background: #ec1876;
  border-color: #ec1876;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(236, 24, 118, 0.4);
}

/* ================= 2. STICKERS VIEW (INSIDE COLLECTION) ================= */
.stickers-view {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.stickers-view__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.btn-back-categories {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffd400;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  font-family: var(--font-body);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-back-categories:hover {
  background: #ffd400;
  color: #160624;
  transform: translateX(2px);
}

.active-category-info {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.active-category-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.active-category-count {
  font-size: 11.5px;
  color: #bfa9d8;
  white-space: nowrap;
}

.stickers-view__footer {
  margin-top: 12px;
  text-align: center;
}

.btn-browse-more-cats {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  color: #d8c7ed;
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-browse-more-cats:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: #ffd400;
}

/* Category Filter Tabs (Quick Switcher Pills) */
.drawer-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  margin-bottom: 12px;
  scrollbar-width: thin;
}
.drawer-tabs::-webkit-scrollbar {
  height: 4px;
}
.drawer-tabs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.tab-pill {
  flex-shrink: 0;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cfc2e2;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.tab-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.tab-pill.is-active {
  background: #ec1876;
  color: #fff;
  border-color: #ec1876;
  box-shadow: 0 2px 10px rgba(236, 24, 118, 0.4);
}

/* Sticker Thumbnails Grid */
.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 8px;
  max-height: 520px;
  overflow-y: auto;
  padding: 6px 2px 12px;
  scrollbar-width: thin;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .sticker-grid {
    grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
    gap: 6px;
    max-height: 380px;
  }
}

.sticker-grid::-webkit-scrollbar {
  width: 6px;
}
.sticker-grid::-webkit-scrollbar-thumb {
  background: rgba(236, 24, 118, 0.3);
  border-radius: 4px;
}

.sticker-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  position: relative;
  min-height: 102px;
  justify-content: space-between;
}

.sticker-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(236, 24, 118, 0.5);
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.sticker-card.is-just-added {
  animation: stickerAddedPulse 0.4s ease;
  border-color: #25d366 !important;
}

@keyframes stickerAddedPulse {
  0% { transform: scale(1); }
  50% { transform: scale(0.92); }
  100% { transform: scale(1.03); }
}

.sticker-card__img-wrap {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.sticker-card__img-wrap img {
  max-width: 100%;
  max-height: 100%;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
  transition: transform 0.2s ease;
}

.sticker-card:hover .sticker-card__img-wrap img {
  transform: scale(1.1);
}

.sticker-card__name {
  font-size: 11px;
  font-weight: 700;
  color: #e6dbf3;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sticker-card__tag {
  font-size: 9px;
  color: #ffd400;
  margin-top: 4px;
  opacity: 0.9;
}

.sticker-card__add-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(236, 24, 118, 0.85);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.2s ease;
}

.sticker-card:hover .sticker-card__add-badge {
  opacity: 1;
  transform: scale(1);
}

/* Custom Upload Card */
.sticker-card--upload {
  border: 1px dashed rgba(255, 212, 0, 0.4);
  background: rgba(255, 212, 0, 0.05);
}
.sticker-card--upload:hover {
  background: rgba(255, 212, 0, 0.12);
  border-color: #ffd400;
}

/* ---------- Smart Cart Summary Bar ---------- */
.lab-summary-bar {
  background: linear-gradient(135deg, rgba(35, 14, 58, 0.95), rgba(20, 8, 34, 0.95));
  border: 1px solid rgba(236, 24, 118, 0.35);
  border-radius: 20px;
  padding: 16px 20px;
  margin-top: 24px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.summary-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.summary-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-sheets-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.summary-sheet-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: #eedeff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.summary-sheet-chip img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  object-fit: cover;
}

.summary-price-box {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.summary-price-val {
  font-family: var(--font-display);
  font-size: 24px;
  color: #ffd400;
}

.summary-price-old {
  font-size: 13px;
  color: #9f8bb5;
  text-decoration: line-through;
}

.summary-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-add-bundle {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: 14px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 25px rgba(236, 24, 118, 0.4);
  transition: all 0.25s ease;
}

.btn-add-bundle:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(236, 24, 118, 0.55);
}

.btn-whatsapp-custom {
  background: #25d366;
  color: #fff;
  border: none;
  padding: 12px 18px;
  border-radius: 14px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-whatsapp-custom:hover {
  background: #20ba59;
  transform: translateY(-2px);
}

/* Hidden file input */
#sticker-file-input {
  display: none;
}

/* Toast Message */
.lab-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(50px);
  background: #1e0d33;
  color: #fff;
  border: 1px solid #ec1876;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.lab-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Responsive adjust */
@media (max-width: 600px) {
  .stage-panel, .drawer-panel {
    padding: 12px 10px;
    border-radius: 18px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .stage-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }
  .stage-toolbar__group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    justify-content: center;
  }
  .stage-toolbar__group .tool-btn {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
    padding: 8px 6px;
    font-size: 11.5px;
    text-align: center;
  }
  #btn-download-design {
    flex: 1 1 100%;
    padding: 10px 12px;
    font-size: 13px;
  }
  .canvas-wrapper {
    min-height: 220px;
    padding: 4px 0;
  }
  .device--laptop {
    border-radius: 14px;
    border-width: 2.5px;
  }
  .device--phone {
    max-width: 220px;
    border-radius: 36px;
  }
  .device--notebook {
    max-width: 280px;
    border-radius: 12px 18px 18px 12px;
  }
  .lab-summary-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 14px;
    border-radius: 16px;
  }
  .summary-info {
    align-items: center;
    width: 100%;
  }
  .sheet-capacity-wrap {
    max-width: 100%;
  }
  .sheet-capacity-meta {
    justify-content: center;
    text-align: center;
  }
  .summary-actions {
    flex-direction: column;
    width: 100%;
  }
  .btn-add-bundle, .btn-whatsapp-custom {
    width: 100%;
    justify-content: center;
  }
}

/* ---------- Document PNG Tool Button ---------- */
.tool-btn--png {
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.22), rgba(0, 245, 212, 0.18));
  border: 1.5px solid #25d366;
  color: #a6ffcb;
  font-weight: 800;
}
.tool-btn--png:hover {
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.38), rgba(0, 245, 212, 0.32));
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
}

/* ---------- Document Guidance Modal ---------- */
.doc-guide-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.doc-guide-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.doc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 2, 22, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.doc-modal-card {
  position: relative;
  z-index: 2;
  background: linear-gradient(145deg, #241038, #150824);
  border: 2px solid #ec1876;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(236, 24, 118, 0.25);
  border-radius: 24px;
  padding: 28px 24px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  color: #fff;
  transform: translateY(20px) scale(0.96);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.doc-guide-modal.is-open .doc-modal-card {
  transform: translateY(0) scale(1);
}

.doc-modal-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s ease;
}
.doc-modal-close:hover {
  background: #ec1876;
  border-color: #ec1876;
}

.doc-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37, 211, 102, 0.15);
  border: 1px solid rgba(37, 211, 102, 0.4);
  color: #79ffa8;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.doc-modal-card h3 {
  font-family: var(--font-display);
  font-size: 24px;
  margin: 0 0 8px;
  color: #ffffff;
}

.doc-modal-subtitle {
  font-size: 13px;
  color: #c9b7de;
  margin: 0 0 18px;
  line-height: 1.5;
}

.doc-filename {
  display: inline-block;
  background: rgba(0, 0, 0, 0.5);
  color: #ffd400;
  border: 1px dashed rgba(255, 212, 0, 0.5);
  padding: 4px 12px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 13px;
  margin-top: 6px;
  direction: ltr;
}

.doc-instruction-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px;
  text-align: right;
  margin-bottom: 20px;
}

.doc-instruction-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffd400;
  font-size: 14px;
  margin-bottom: 6px;
}

.doc-instruction-desc {
  font-size: 12px;
  color: #ded1ee;
  margin: 0 0 14px;
  line-height: 1.5;
}

.doc-steps-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-step-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  padding: 8px 10px;
}

.doc-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ec1876;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-step-text {
  font-size: 12px;
  color: #f1e9fb;
  line-height: 1.4;
}

.doc-badge-warning {
  color: #ff7676;
  font-weight: 700;
}

.doc-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-doc-whatsapp {
  background: #25d366;
  color: #fff;
  border: none;
  padding: 14px 20px;
  border-radius: 14px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  transition: all 0.2s ease;
  width: 100%;
}
.btn-doc-whatsapp:hover {
  background: #20ba59;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.5);
}

.btn-doc-redownload {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cfc2e2;
  padding: 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}
.btn-doc-redownload:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ---------- Custom Sheet Capacity & Counter ---------- */
.sheet-count-tag {
  background: rgba(236, 24, 118, 0.2);
  border: 1px solid rgba(236, 24, 118, 0.5);
  color: #ff4fa3;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  margin-right: 6px;
}

.sheet-capacity-wrap {
  width: 100%;
  max-width: 360px;
  margin-top: 6px;
}

.sheet-capacity-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 5px;
  gap: 8px;
}

.sheet-capacity-text {
  color: #ffffff;
  font-weight: 700;
}

.sheet-capacity-text strong {
  color: #ffd400;
  font-size: 14px;
}

.sheet-capacity-status {
  font-size: 11px;
  color: #c9b7de;
}

.sheet-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.sheet-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ec1876, #ffd400);
  border-radius: 999px;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sheet-badge-save {
  background: rgba(37, 211, 102, 0.18);
  border: 1px solid rgba(37, 211, 102, 0.45);
  color: #8affb4;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}

/* ---------- Sheet Limit Modal ---------- */
.sheet-limit-modal {
  position: fixed;
  inset: 0;
  z-index: 10005;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sheet-limit-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.sheet-limit-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 2, 22, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.sheet-limit-card {
  position: relative;
  z-index: 2;
  background: linear-gradient(145deg, #26113b, #130722);
  border: 2px solid #ffd400;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 212, 0, 0.25);
  border-radius: 24px;
  padding: 26px 22px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  color: #fff;
  transform: translateY(20px) scale(0.96);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.sheet-limit-modal.is-open .sheet-limit-card {
  transform: translateY(0) scale(1);
}

.sheet-limit-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s ease;
}
.sheet-limit-close:hover {
  background: #ec1876;
  border-color: #ec1876;
}

.sheet-limit-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 212, 0, 0.15);
  border: 1px solid rgba(255, 212, 0, 0.4);
  color: #ffd400;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.sheet-limit-card h3 {
  font-family: var(--font-display);
  font-size: 24px;
  margin: 0 0 8px;
  color: #ffffff;
}

.sheet-limit-desc {
  font-size: 13px;
  color: #c9b7de;
  margin: 0 0 16px;
  line-height: 1.6;
}

.sheet-limit-advice-box {
  background: rgba(255, 212, 0, 0.08);
  border: 1px dashed rgba(255, 212, 0, 0.4);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 12px;
  color: #f7edff;
  line-height: 1.5;
  text-align: right;
  margin-bottom: 18px;
}

.sheet-limit-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-sheet-save-new {
  background: linear-gradient(135deg, #25d366, #00b4d8);
  color: #fff;
  border: none;
  padding: 13px 18px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
  transition: all 0.2s ease;
}
.btn-sheet-save-new:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.5);
}

.btn-sheet-continue {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #cfc2e2;
  padding: 11px 16px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-sheet-continue:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}


