/* ============ گالری تصاویر فعلی ============ */
.existing-gallery-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.btn-delete-all-images {
  background: #fee2e2;
  color: #991b1b;
  border: 0;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  transition: all .2s ease;
}

.btn-delete-all-images:hover {
  background: #fecaca;
  transform: translateY(-1px);
}

.existing-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.existing-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #e2e8f0;
  transition: all .3s ease;
  background: #f8fafc;
}

.existing-item:hover {
  border-color: #ef4444;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -8px rgba(239, 68, 68, .4);
}

.existing-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ✅ دکمه حذف تک‌به‌تک - همیشه نمایان */
.existing-item button {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  border: 2px solid #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, .6);
  transition: all .2s ease;
  opacity: 1;
  transform: scale(1);
  z-index: 5;
}

.existing-item button:hover {
  background: #dc2626;
  transform: scale(1.15);
  box-shadow: 0 6px 18px rgba(239, 68, 68, .8);
}

/* شماره ترتیب عکس (اختیاری) */
.image-number {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, .7);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  z-index: 5;
  backdrop-filter: blur(6px);
}

/* ============ عکس کاور فعلی ============ */
.current-cover {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
}

.cover-wrapper {
  position: relative;
  display: inline-block;
}

.cover-wrapper img {
  max-width: 150px;
  max-height: 100px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}

/* ✅ دکمه حذف کاور - همیشه نمایان */
.btn-delete-cover {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  border: 2px solid #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, .6);
  transition: all .2s ease;
  z-index: 5;
}

.btn-delete-cover:hover {
  background: #dc2626;
  transform: scale(1.15);
  box-shadow: 0 6px 18px rgba(239, 68, 68, .8);
}